2024-02-04 20:51:11 +00:00
|
|
|
{
|
|
|
|
description = "My NixOS configuration";
|
|
|
|
|
|
|
|
inputs = {
|
2024-03-08 21:46:46 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
2024-02-04 20:51:11 +00:00
|
|
|
hardware.url = "github:NixOS/nixos-hardware";
|
|
|
|
impermanence.url = "github:nix-community/impermanence";
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
2024-03-08 21:46:46 +00:00
|
|
|
myvim.url = "github:lukaswrz/myvim";
|
2024-02-04 20:51:11 +00:00
|
|
|
};
|
|
|
|
|
2024-03-08 21:46:46 +00:00
|
|
|
outputs = {
|
|
|
|
nixpkgs,
|
|
|
|
flake-parts,
|
|
|
|
...
|
|
|
|
} @ inputs:
|
|
|
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
|
|
|
systems = ["x86_64-linux" "aarch64-linux"];
|
|
|
|
|
|
|
|
flake = let
|
|
|
|
commonNixosSystem = name: class:
|
|
|
|
nixpkgs.lib.nixosSystem {
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
attrName = name;
|
|
|
|
};
|
|
|
|
modules = [
|
|
|
|
inputs.impermanence.nixosModules.impermanence
|
|
|
|
inputs.agenix.nixosModules.default
|
|
|
|
|
|
|
|
./common
|
|
|
|
./class/${class}
|
|
|
|
./hosts/${name}
|
|
|
|
|
|
|
|
({lib, ...}: {networking.hostName = lib.mkDefault name;})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
nixosConfigurations = builtins.mapAttrs commonNixosSystem {
|
|
|
|
glacier = "desktop";
|
|
|
|
flamingo = "desktop";
|
|
|
|
abacus = "server";
|
|
|
|
vessel = "server";
|
2024-02-26 18:27:27 +00:00
|
|
|
};
|
2024-02-04 20:51:11 +00:00
|
|
|
};
|
|
|
|
|
2024-03-08 21:46:46 +00:00
|
|
|
perSystem = {
|
|
|
|
inputs',
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
devShells.default = pkgs.mkShellNoCC {
|
|
|
|
packages = [inputs'.agenix.packages.agenix];
|
|
|
|
};
|
2024-02-04 20:51:11 +00:00
|
|
|
|
2024-03-08 21:46:46 +00:00
|
|
|
formatter = pkgs.alejandra;
|
2024-02-04 20:51:11 +00:00
|
|
|
};
|
2024-03-08 21:46:46 +00:00
|
|
|
};
|
2024-02-04 20:51:11 +00:00
|
|
|
}
|