diff options
-rw-r--r-- | flake.nix | 29 | ||||
-rw-r--r-- | hosts/loki/default.nix | 33 | ||||
-rw-r--r-- | modules/default.nix | 4 |
3 files changed, 58 insertions, 8 deletions
@@ -24,7 +24,7 @@ in { nixosConfigurations = mergeSets [ - (mkSystem "frigg" inputs.nixpkgs [ + (mkSystem "frigg" "x86_64-linux" inputs.nixpkgs [ { type = "profiles"; modules = [ @@ -54,7 +54,7 @@ ]; } ]) - (mkSystem "heimdall" inputs.nixpkgs [ + (mkSystem "heimdall" "x86_64-linux" inputs.nixpkgs [ { type = "profiles"; modules = [ @@ -79,7 +79,24 @@ ]; } ]) - (mkSystem "odin" inputs.nixpkgs [ + (mkSystem "loki" "aarch64-linux" inputs.nixpkgs [ + { + type = "profiles"; + modules = [ + "common" + "security" + "upgrade" + ]; + } + { + type = "scripts"; + modules = [ + "motd" + "pushover" + ]; + } + ]) + (mkSystem "odin" "x86_64-linux" inputs.nixpkgs [ { type = "containers"; modules = [ @@ -120,7 +137,7 @@ ]; } ]) - (mkSystem "sparrow" inputs.nixpkgs ( + (mkSystem "sparrow" "x86_64-linux" inputs.nixpkgs ( inputs.nixpkgs.lib.singleton { type = "profiles"; modules = [ @@ -132,7 +149,7 @@ ]; } )) - (mkSystem "thor" inputs.nixpkgs [ + (mkSystem "thor" "x86_64-linux" inputs.nixpkgs [ { type = "profiles"; modules = [ @@ -159,7 +176,7 @@ ]; } ]) - (mkSystem "woodpecker" inputs.nixpkgs ( + (mkSystem "woodpecker" "x86_64-linux" inputs.nixpkgs ( inputs.nixpkgs.lib.singleton { type = "profiles"; modules = [ diff --git a/hosts/loki/default.nix b/hosts/loki/default.nix new file mode 100644 index 0000000..dc461dc --- /dev/null +++ b/hosts/loki/default.nix @@ -0,0 +1,33 @@ +{ inputs, ... }: +{ + system.stateVersion = "24.11"; + + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users = import "${inputs.self}/users"; + extraSpecialArgs = { + inherit inputs; + headless = true; + }; + }; + + networking = { + hostName = "loki"; + networkmanager.enable = true; + }; + + time.timeZone = "Europe/Helsinki"; + + boot.loader.grub = { + enable = true; + device = "/dev/sda2"; + efiSupport = true; + }; + + programs.motd = { + enable = true; + networkInterfaces = [ "enp1s0" ]; + servicesToCheck = [ ]; + }; +} diff --git a/modules/default.nix b/modules/default.nix index a8ac000..21e86fc 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -6,9 +6,9 @@ let mkModules = moduleAttrList: builtins.concatMap (moduleAttr: genModules moduleAttr) moduleAttrList; in { - mkSystem = hostname: nixpkgsVersion: modules: { + mkSystem = hostname: system: nixpkgsVersion: modules: { ${hostname} = nixpkgsVersion.lib.nixosSystem { - system = "x86_64-linux"; + system = system; modules = (mkModules modules) ++ [ "${inputs.self}/hosts/${hostname}" "${inputs.self}/modules/users" |