restructured repo to support nix-darwin

This commit is contained in:
Leyla Becker 2024-11-25 16:58:12 -06:00
parent 3924a5aa8d
commit 0d0443a02a
47 changed files with 111 additions and 34 deletions

View file

@ -11,7 +11,7 @@
inputs.nixpkgs.follows = "nixpkgs";
};
# self hosted repo of secrets file to further protect files in case of future encryption vunrabilities
# self hosted repo of secrets file to further protect files in case of future encryption vulnerabilities
secrets = {
url = "git+https://git.jan-leila.com/jan-leila/nix-config-secrets?ref=main";
flake = false;
@ -28,6 +28,11 @@
# url = "github:nix-community/impermanence";
# };
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
# users home directories
home-manager = {
url = "github:nix-community/home-manager";
@ -70,7 +75,8 @@
} @ inputs: let
util = import ./util {inherit inputs;};
forEachPkgs = util.forEachPkgs;
mkSystem = util.mkSystem;
mkNixosSystem = util.mkNixosSystem;
mkDarwinSystem = util.mkDarwinSystem;
mkHome = util.mkHome;
in {
formatter = forEachPkgs (pkgs: pkgs.alejandra);
@ -95,6 +101,16 @@
};
});
nixosConfigurations = {
horizon = mkNixosSystem "horizon";
twilight = mkNixosSystem "twilight";
defiant = mkNixosSystem "defiant";
};
darwinConfigurations = {
hesperium = mkDarwinSystem "hesperium";
};
homeConfigurations = nixpkgs.lib.attrsets.mergeAttrsList (
nixpkgs.lib.attrsets.mapAttrsToList (hostname: system: (
nixpkgs.lib.attrsets.mapAttrs' (user: _: {
@ -105,11 +121,5 @@
))
self.nixosConfigurations
);
nixosConfigurations = {
horizon = mkSystem "horizon";
twilight = mkSystem "twilight";
defiant = mkSystem "defiant";
};
};
}