testing
This commit is contained in:
parent
35540e5ccc
commit
558669ab35
5 changed files with 107 additions and 69 deletions
116
flake.nix
116
flake.nix
|
|
@ -30,55 +30,91 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inputs = { inherit disko home-manager nixpkgs nixos-hardware wayland-pipewire-idle-inhibit; };
|
||||
inherit (self) outputs;
|
||||
lib = nixpkgs.lib // home-manager.lib;
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
|
||||
pkgsFor = lib.genAttrs systems (system: import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
});
|
||||
in
|
||||
{
|
||||
inherit lib;
|
||||
nixosModules = import ./modules/nixos;
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
templates = import ./templates;
|
||||
|
||||
genPkgs = system: import nixpkgs { inherit system; config.allowUnfree = true; };
|
||||
overlays = import ./overlays { inherit inputs outputs; };
|
||||
hydraJobs = import ./hydra.nix { inherit inputs outputs; };
|
||||
|
||||
# packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
|
||||
# devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
|
||||
# formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
|
||||
|
||||
# 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 {
|
||||
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";
|
||||
ace = lib.nixosSystem {
|
||||
modules = [ ./hosts/ace ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
dragon = lib.nixosSystem {
|
||||
modules = [ ./hosts/dragon ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
eve = lib.nixosSystem {
|
||||
modules = [ ./hosts/eve ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
loki = lib.nixosSystem {
|
||||
modules = [ ./hosts/loki ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
pocket2 = lib.nixosSystem {
|
||||
modules = [ ./hosts/pocket2 ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
smaug = lib.nixosSystem {
|
||||
modules = [ ./hosts/smaug ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
# t2 = lib.nixosSystem {
|
||||
# modules = [ ./hosts/t2 ];
|
||||
# specialArgs = { inherit inputs outputs; };
|
||||
# };
|
||||
|
||||
# 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";
|
||||
display = lib.nixosSystem {
|
||||
modules = [ ./hosts/display ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
harper2 = lib.nixosSystem {
|
||||
modules = [ ./hosts/harper2 ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
harper = lib.nixosSystem {
|
||||
modules = [ ./hosts/harper ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
nuwww = lib.nixosSystem {
|
||||
modules = [ ./hosts/nuwww ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
pihole = lib.nixosSystem {
|
||||
modules = [ ./hosts/pihole ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
www2 = lib.nixosSystem {
|
||||
modules = [ ./hosts/www2 ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
|
||||
# test system
|
||||
# use this for a blank ISO + disko to work
|
||||
nixos = nixosSystem "x86_64-linux" "nixos" "don";
|
||||
nixos = lib.nixosSystem {
|
||||
modules = [ ./hosts/nixos ];
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue