first pass at reorg
This commit is contained in:
parent
123d74cb27
commit
dbae17bd46
17 changed files with 120 additions and 99 deletions
148
flake.nix
148
flake.nix
|
|
@ -17,108 +17,62 @@
|
|||
self,
|
||||
nixpkgs,
|
||||
nix,
|
||||
disko,
|
||||
nixos-hardware,
|
||||
home-manager,
|
||||
wayland-pipewire-idle-inhibit,
|
||||
...
|
||||
}: {
|
||||
nixosConfigurations = let
|
||||
workstation = {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./workstation
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
./home
|
||||
./home/gui
|
||||
./wm/sway
|
||||
];
|
||||
};
|
||||
server = {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./server
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
./home
|
||||
];
|
||||
};
|
||||
}:
|
||||
let
|
||||
inputs = { inherit disko home-manager nixpkgs nixos-hardware wayland-pipewire-idle-inhibit; };
|
||||
|
||||
genPkgs = system: import nixpkgs { inherit system; config.allowUnfree = true; };
|
||||
|
||||
# creates a nixos system config
|
||||
nixosSystem = system: hostname: username:
|
||||
let
|
||||
pkgs = genPkgs system;
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit pkgs;
|
||||
# lets us use these things in modules
|
||||
customArgs = { inherit system hostname username pkgs; };
|
||||
};
|
||||
modules = [
|
||||
#disko.nixosModules.disko
|
||||
./hosts/${hostname}
|
||||
home-manager.nixosModules.home-manager {
|
||||
networking.hostName = hostname;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
#home-manager.users.${username} = { imports = [ ./home/${username}.nix ]; };
|
||||
}
|
||||
];
|
||||
};
|
||||
in {
|
||||
fred = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = server.modules ++ [
|
||||
{
|
||||
networking.hostName = "fred";
|
||||
}
|
||||
./hosts/fred
|
||||
];
|
||||
};
|
||||
www2 = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = server.modules ++ [
|
||||
{
|
||||
networking.hostName = "www2";
|
||||
}
|
||||
./hosts/fred
|
||||
];
|
||||
};
|
||||
loki = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = workstation.modules ++ [
|
||||
{
|
||||
networking.hostName = "loki";
|
||||
}
|
||||
./hosts/loki
|
||||
inputs.nixos-hardware.nixosModules.dell-xps-13-9310
|
||||
];
|
||||
};
|
||||
smaug = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = workstation.modules ++ [
|
||||
{
|
||||
networking.hostName = "smaug";
|
||||
}
|
||||
./hosts/smaug
|
||||
./hosts/smaug/podman.nix
|
||||
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x260
|
||||
];
|
||||
};
|
||||
pocket2 = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = workstation.modules ++ [
|
||||
{
|
||||
networking.hostName = "pocket2";
|
||||
}
|
||||
./hosts/pocket2
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
||||
inputs.nixos-hardware.nixosModules.common-gpu-intel
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||
];
|
||||
};
|
||||
dragon = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = workstation.modules ++ [
|
||||
{
|
||||
networking.hostName = "dragon";
|
||||
}
|
||||
./hosts/dragon
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
||||
inputs.nixos-hardware.nixosModules.common-gpu-intel
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
||||
inputs.nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||
];
|
||||
};
|
||||
eve = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = workstation.modules ++ [
|
||||
{
|
||||
networking.hostName = "eve";
|
||||
}
|
||||
./hosts/eve
|
||||
inputs.nixos-hardware.nixosModules.google-pixelbook
|
||||
];
|
||||
};
|
||||
vm2 = inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = workstation.modules ++ [
|
||||
{
|
||||
services.getty.autologinUser = "don";
|
||||
networking.hostName = "vm2";
|
||||
}
|
||||
./hosts/vm1
|
||||
];
|
||||
nixosConfigurations = {
|
||||
# clients
|
||||
ace = nixosSystem "x86_64-linux" "ace" "don";
|
||||
dragon = nixosSystem "x86_64-linux" "dragon" "don";
|
||||
eve = nixosSystem "x86_64-linux" "eve" "don";
|
||||
loki = nixosSystem "x86_64-linux" "loki" "don";
|
||||
pocket2 = nixosSystem "x86_64-linux" "pocket2" "don";
|
||||
smaug = nixosSystem "x86_64-linux" "smaug" "don";
|
||||
#t2 = nixosSystem "x86_64-linux" "t2" "don";
|
||||
|
||||
# servers
|
||||
display = nixosSystem "x86_64-linux" "display" "don";
|
||||
harper2 = nixosSystem "x86_64-linux" "harper2" "don";
|
||||
harper = nixosSystem "x86_64-linux" "harper" "don";
|
||||
nuwww = nixosSystem "x86_64-linux" "nuwww" "don";
|
||||
pihole = nixosSystem "x86_64-linux" "pihole" "don";
|
||||
www2 = nixosSystem "x86_64-linux" "www2" "don";
|
||||
|
||||
# test system
|
||||
# use this for a blank ISO + disko to work
|
||||
nixos = nixosSystem "x86_64-linux" "nixos" "don";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue