From aaa31cf08870c28d83da6a57a6c29bf52a4ab74e Mon Sep 17 00:00:00 2001 From: Natasha Moongrave Date: Sun, 22 Mar 2026 18:20:09 +0100 Subject: Made some adjustments to allow for multiple configurations to exist under the flake --- flake.nix | 43 ++++++++++++++++++++++++++++++++++--------- 1 file changed, 34 insertions(+), 9 deletions(-) mode change 100755 => 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix old mode 100755 new mode 100644 index abcef04..cde03f8 --- a/flake.nix +++ b/flake.nix @@ -7,24 +7,49 @@ url = "github:nix-community/home-manager/release-25.11"; inputs.nixpkgs.follows = "nixpkgs"; }; + lix-module = { + url = "https://git.lix.systems/lix-project/nixos-module/archive/latest.tar.gz"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; - outputs = { self, nixpkgs, home-manager, ... }@inputs: { + outputs = { + self, + nixpkgs, + home-manager, + lix-module, + ... + } @ inputs: + # ← let goes here + let + hmModule = { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.mun = import ./mun.nix; + }; + in { nixosConfigurations = { kronos = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - specialArgs = { inherit inputs; }; + specialArgs = {inherit inputs;}; modules = [ + lix-module.nixosModules.default ./configuration.nix home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - - home-manager.users.mun = import ./mun.nix; - } + hmModule # ← use shared module + ]; + }; + + herra = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs;}; + modules = [ + lix-module.nixosModules.default + ./hosts/herra/configuration.nix + home-manager.nixosModules.home-manager + hmModule ]; }; - }; + }; }; } -- cgit v1.2.3