78 lines
2.6 KiB
Nix
78 lines
2.6 KiB
Nix
{
|
|
inputs = {
|
|
disko.url = "github:nix-community/disko";
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/master";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
wayland-pipewire-idle-inhibit = {
|
|
url = "github:rafaelrc7/wayland-pipewire-idle-inhibit";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = inputs@{
|
|
self,
|
|
nixpkgs,
|
|
nix,
|
|
disko,
|
|
nixos-hardware,
|
|
home-manager,
|
|
wayland-pipewire-idle-inhibit,
|
|
...
|
|
}:
|
|
let
|
|
inputs = { inherit disko home-manager nixpkgs nixos-hardware wayland-pipewire-idle-inhibit; };
|
|
|
|
genPkgs = system: import nixpkgs { inherit system; config.allowUnfree = true; };
|
|
|
|
# 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";
|
|
|
|
# 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";
|
|
|
|
# test system
|
|
# use this for a blank ISO + disko to work
|
|
nixos = nixosSystem "x86_64-linux" "nixos" "don";
|
|
};
|
|
};
|
|
}
|