diff --git a/flake.nix b/flake.nix index e8e6c68..7b822ee 100644 --- a/flake.nix +++ b/flake.nix @@ -23,117 +23,62 @@ nixpkgs, nixpkgs-2311, 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 { - specialArgs = {inherit inputs;}; - modules = server.modules ++ [ - { - networking.hostName = "fred"; - } - ./hosts/fred - ]; - }; - www2 = inputs.nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = server.modules ++ [ - { - networking.hostName = "www2"; - } - ./hosts/fred - ]; - }; - loki = inputs.nixpkgs.lib.nixosSystem { - #specialArgs = {inherit inputs;}; - #extraSpecialArgs = {inherit inputs;}; - modules = workstation.modules ++ [ - { - networking.hostName = "loki"; - } - ./hosts/loki - inputs.nixos-hardware.nixosModules.dell-xps-13-9310 - ]; - }; - smaug = inputs.nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = workstation.modules ++ [ - { - networking.hostName = "smaug"; - } - ./hosts/smaug - ./hosts/smaug/podman.nix - inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x260 - ]; - }; - pocket2 = inputs.nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - 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 { - specialArgs = {inherit inputs;}; - 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 { - specialArgs = {inherit inputs;}; - modules = workstation.modules ++ [ - { - networking.hostName = "eve"; - } - ./hosts/eve - inputs.nixos-hardware.nixosModules.google-pixelbook - ]; - }; - vm2 = inputs.nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - 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"; }; }; - }; } diff --git a/home/gui/citrix.nix b/home/gui/citrix.nix index ba623c2..4d2fe7a 100644 --- a/home/gui/citrix.nix +++ b/home/gui/citrix.nix @@ -1,8 +1,6 @@ { config, pkgs, inputs, ... }: { home.packages = with pkgs; [ - #inputs.nixpkgs-2311.opencv - #opencv citrix_workspace ]; home.file."ICAClient" = { diff --git a/hosts/ace/default.nix b/hosts/ace/default.nix index cb8ba8b..eaee1e9 100644 --- a/hosts/ace/default.nix +++ b/hosts/ace/default.nix @@ -4,5 +4,10 @@ imports = [ ./hardware-configuration.nix + ../../workstation + ../../home + ../../home/gui + ../../wm ]; + networking.hostName = "ace"; } diff --git a/hosts/display/default.nix b/hosts/display/default.nix index cb8ba8b..f0acbde 100644 --- a/hosts/display/default.nix +++ b/hosts/display/default.nix @@ -4,5 +4,8 @@ imports = [ ./hardware-configuration.nix + ../../server + ../../home ]; + networking.hostName = "display"; } diff --git a/hosts/dragon/default.nix b/hosts/dragon/default.nix index cb8ba8b..d4624cb 100644 --- a/hosts/dragon/default.nix +++ b/hosts/dragon/default.nix @@ -1,8 +1,17 @@ -{ config, pkgs, ... }: +{ inputs, config, pkgs, ... }: { imports = [ ./hardware-configuration.nix + #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 + ../../workstation + ../../home + ../../home/gui + ../../wm ]; + networking.hostName = "dragon"; } diff --git a/hosts/eve/default.nix b/hosts/eve/default.nix index cb8ba8b..5a662bd 100644 --- a/hosts/eve/default.nix +++ b/hosts/eve/default.nix @@ -4,5 +4,10 @@ imports = [ ./hardware-configuration.nix + ../../workstation + ../../home + ../../home/gui + ../../wm ]; + networking.hostName = "eve"; } diff --git a/hosts/fred/default.nix b/hosts/fred/default.nix index 6d3aa57..3044397 100644 --- a/hosts/fred/default.nix +++ b/hosts/fred/default.nix @@ -6,4 +6,5 @@ ./hardware-configuration.nix ./podman.nix ]; + networking.hostName = "fred"; } diff --git a/hosts/harper/default.nix b/hosts/harper/default.nix index cb8ba8b..8cd08cc 100644 --- a/hosts/harper/default.nix +++ b/hosts/harper/default.nix @@ -4,5 +4,8 @@ imports = [ ./hardware-configuration.nix + ../../server + ../../home ]; + networking.hostName = "harper"; } diff --git a/hosts/harper2/default.nix b/hosts/harper2/default.nix index cb8ba8b..8286c1f 100644 --- a/hosts/harper2/default.nix +++ b/hosts/harper2/default.nix @@ -4,5 +4,8 @@ imports = [ ./hardware-configuration.nix + ../../server + ../../home ]; + networking.hostName = "harper2"; } diff --git a/hosts/loki/default.nix b/hosts/loki/default.nix index cb8ba8b..8e109ac 100644 --- a/hosts/loki/default.nix +++ b/hosts/loki/default.nix @@ -4,5 +4,10 @@ imports = [ ./hardware-configuration.nix + ../../workstation + ../../home + ../../home/gui + ../../wm ]; + networking.hostName = "loki"; } diff --git a/hosts/nuwww/default.nix b/hosts/nuwww/default.nix index cb8ba8b..3cc444f 100644 --- a/hosts/nuwww/default.nix +++ b/hosts/nuwww/default.nix @@ -4,5 +4,8 @@ imports = [ ./hardware-configuration.nix + ../../server + ../../home ]; + networking.hostName = "nuwww"; } diff --git a/hosts/pihole/default.nix b/hosts/pihole/default.nix index cb8ba8b..6bbd8e1 100644 --- a/hosts/pihole/default.nix +++ b/hosts/pihole/default.nix @@ -4,5 +4,8 @@ imports = [ ./hardware-configuration.nix + ../../server + ../../home ]; + networking.hostName = "pihole"; } diff --git a/hosts/pocket2/default.nix b/hosts/pocket2/default.nix index cb8ba8b..6e8eb1c 100644 --- a/hosts/pocket2/default.nix +++ b/hosts/pocket2/default.nix @@ -1,8 +1,17 @@ -{ config, pkgs, ... }: +{ inputs, config, pkgs, ... }: { imports = [ ./hardware-configuration.nix + #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 + ../../workstation + ../../home + ../../home/gui + ../../wm ]; + networking.hostName = "pocket2"; } diff --git a/hosts/smaug/default.nix b/hosts/smaug/default.nix index cb8ba8b..d03e7aa 100644 --- a/hosts/smaug/default.nix +++ b/hosts/smaug/default.nix @@ -4,5 +4,10 @@ imports = [ ./hardware-configuration.nix + ../../workstation + ../../home + ../../home/gui + ../../wm ]; + networking.hostName = "smaug"; } diff --git a/hosts/t2/default.nix b/hosts/t2/default.nix index cb8ba8b..57bd63a 100644 --- a/hosts/t2/default.nix +++ b/hosts/t2/default.nix @@ -4,5 +4,10 @@ imports = [ ./hardware-configuration.nix + ../../workstation + ../../home + ../../home/gui + ../../wm ]; + networking.hostName = "t2"; } diff --git a/hosts/vm1/default.nix b/hosts/vm1/default.nix index cb8ba8b..a6042a8 100644 --- a/hosts/vm1/default.nix +++ b/hosts/vm1/default.nix @@ -5,4 +5,5 @@ [ ./hardware-configuration.nix ]; + networking.hostName = "vm1"; } diff --git a/hosts/www2/default.nix b/hosts/www2/default.nix index cb8ba8b..7568efe 100644 --- a/hosts/www2/default.nix +++ b/hosts/www2/default.nix @@ -4,5 +4,8 @@ imports = [ ./hardware-configuration.nix + ../../server + ../../home ]; + networking.hostName = "www2"; } diff --git a/server/default.nix b/server/default.nix index a85c7cd..27b0e03 100644 --- a/server/default.nix +++ b/server/default.nix @@ -154,7 +154,7 @@ in gnupg = { agent = { enable = true; - pinentryFlavor = "curses"; + #pinentryFlavor = "curses"; enableSSHSupport = true; }; }; diff --git a/wm/default.nix b/wm/default.nix new file mode 100644 index 0000000..980bcac --- /dev/null +++ b/wm/default.nix @@ -0,0 +1,4 @@ +{ pkgs, ... }: + { + imports = [ ./sway ]; + }