mirror of
https://github.com/hyprwm/hyprland-infra.git
synced 2025-05-12 21:30:36 +01:00
flake: move nixosConfigurations setup to hosts/
This commit is contained in:
parent
824e09de21
commit
f7e3a9bff6
2 changed files with 25 additions and 24 deletions
15
flake.nix
15
flake.nix
|
@ -5,26 +5,17 @@
|
|||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
|
||||
typhon.url = "github:typhon-ci/typhon";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
flake-parts,
|
||||
...
|
||||
} @ inputs:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
outputs = inputs:
|
||||
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
systems = ["x86_64-linux"];
|
||||
|
||||
imports = [./hosts];
|
||||
perSystem = {pkgs, ...}: {
|
||||
devShells.default = pkgs.mkShell {
|
||||
buildInputs = [pkgs.alejandra];
|
||||
};
|
||||
};
|
||||
|
||||
flake = {
|
||||
nixosConfigurations = import ./hosts {inherit self;};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -14,8 +14,14 @@
|
|||
...
|
||||
} @ args:
|
||||
mkSystem {
|
||||
inherit system;
|
||||
modules = [{networking.hostName = hostname;}] ++ args.modules or [];
|
||||
modules =
|
||||
[
|
||||
{
|
||||
networking.hostName = hostname;
|
||||
nixpkgs.hostPlatform = system;
|
||||
}
|
||||
]
|
||||
++ args.modules or [];
|
||||
specialArgs = {inherit inputs self;} // args.specialArgs or {};
|
||||
};
|
||||
|
||||
|
@ -23,15 +29,19 @@
|
|||
inputs.agenix.nixosModules.default
|
||||
];
|
||||
in {
|
||||
caesar = mkNixosSystem {
|
||||
hostname = "caesar";
|
||||
system = "x86_64-linux";
|
||||
modules =
|
||||
[
|
||||
./caesar
|
||||
../modules/nix-daemon.nix
|
||||
../modules/openssh.nix
|
||||
]
|
||||
++ sharedModules;
|
||||
flake.nixosConfigurations = {
|
||||
caesar = mkNixosSystem {
|
||||
hostname = "caesar";
|
||||
system = "x86_64-linux";
|
||||
modules = builtins.concatLists [
|
||||
[
|
||||
./caesar
|
||||
../modules/nix-daemon.nix
|
||||
../modules/openssh.nix
|
||||
]
|
||||
|
||||
[sharedModules]
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue