2023-09-28 14:08:07 +02:00
|
|
|
{
|
|
|
|
description = "NixOS System Config";
|
2023-12-15 13:45:08 +01:00
|
|
|
inputs = import ./inputs.nix;
|
2023-12-09 13:12:45 +01:00
|
|
|
outputs = { self, nixpkgs, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, deploy-rs, ... } @inputs:
|
2023-09-28 14:08:07 +02:00
|
|
|
let
|
|
|
|
inherit (self) outputs;
|
2023-12-13 13:47:44 +01:00
|
|
|
stateVersion = "23.11";
|
2023-12-13 08:56:19 +01:00
|
|
|
hmStateVersion = "23.11";
|
2023-12-09 14:24:58 +01:00
|
|
|
libx = import ./lib { inherit self inputs outputs stateVersion hmStateVersion; };
|
2023-09-28 14:08:07 +02:00
|
|
|
in {
|
|
|
|
nixosConfigurations = {
|
2023-12-11 11:52:52 +01:00
|
|
|
osaka-linode-01 = libx.mkHost { hostname = "osaka-linode-01"; type = "small"; };
|
|
|
|
nixos-vm-01 = libx.mkHost { hostname = "nixos-vm-01"; };
|
2023-12-06 03:56:24 +01:00
|
|
|
framework-server = libx.mkHost { hostname = "framework-server"; };
|
2023-12-13 08:27:50 +01:00
|
|
|
# nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; desktop = "gnome"; gpu = "nvidia"; };
|
|
|
|
# nixos-framework = libx.mkHost { hostname = "nixos-framework"; desktop = "hyprland"; gpu = "amd"; theme = "green"; };
|
2023-12-13 08:26:31 +01:00
|
|
|
backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; };
|
|
|
|
piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; };
|
2023-09-28 14:08:07 +02:00
|
|
|
};
|
|
|
|
homeConfigurations = {
|
2023-12-11 11:52:52 +01:00
|
|
|
"albert@osaka-linode-01" = libx.mkHome { hostname = "osaka-linode-01"; };
|
|
|
|
"albert@nixos-vm-01" = libx.mkHome { hostname = "nixos-vm-01"; };
|
2023-11-25 07:17:29 +01:00
|
|
|
"albert@framework-server" = libx.mkHome { hostname = "framework-server"; };
|
2023-12-13 08:27:50 +01:00
|
|
|
# "albert@nixos-desktop" = libx.mkHome { hostname = "nixos-desktop"; desktop = "gnome"; };
|
|
|
|
# "albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "green"; };
|
2023-12-13 06:17:46 +01:00
|
|
|
"albert@backups-rpi4" = libx.mkHome { hostname = "backups-rpi4"; platform = "aarch64-linux"; type = "small"; };
|
|
|
|
"albert@piaware-rpi4" = libx.mkHome { hostname = "piaware-rpi4"; platform = "aarch64-linux"; type = "small"; };
|
2023-09-28 14:08:07 +02:00
|
|
|
};
|
2023-12-09 14:10:15 +01:00
|
|
|
deploy.nodes = {
|
|
|
|
osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; };
|
|
|
|
nixos-vm-01 = libx.deploy { hostname = "nixos-vm-01"; };
|
|
|
|
framework-server = libx.deploy { hostname = "framework-server"; };
|
2023-12-13 08:27:50 +01:00
|
|
|
# nixos-desktop = libx.deploy { hostname = "nixos-desktop"; };
|
|
|
|
# nixos-framework = libx.deploy { hostname = "nixos-framework"; };
|
2023-12-15 13:42:53 +01:00
|
|
|
backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; platform = "aarch64-linux"; };
|
2023-12-15 10:58:06 +01:00
|
|
|
piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; platform = "aarch64-linux"; };
|
2023-12-09 14:10:15 +01:00
|
|
|
};
|
2023-12-12 05:27:40 +01:00
|
|
|
imageConfigurations = {
|
|
|
|
nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; };
|
2023-12-15 06:20:48 +01:00
|
|
|
nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; format = "sd-aarch64"; platform = "aarch64-linux"; };
|
2023-12-12 05:27:40 +01:00
|
|
|
nixos-iso-console = libx.mkImage { hostname = "nixos-iso-console"; format = "iso"; };
|
|
|
|
nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "gnome"; };
|
|
|
|
};
|
2023-12-12 05:29:35 +01:00
|
|
|
|
|
|
|
# Checks for deploy-rs - Makes deploy-rs fail when system evaluations fail
|
2023-12-13 04:23:41 +01:00
|
|
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
2023-12-12 05:29:35 +01:00
|
|
|
|
|
|
|
# Devshell for bootstrapping; acessible via 'nix develop'
|
|
|
|
devShells = libx.forAllSystems (system:
|
|
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in import ./shell.nix { inherit pkgs sops-nix deploy-rs system; }
|
|
|
|
);
|
2023-09-28 14:08:07 +02:00
|
|
|
};
|
|
|
|
}
|