infra/nix/os/devices/hstk0/flake.nix

53 lines
1.2 KiB
Nix
Raw Normal View History

2023-11-23 16:03:07 +01:00
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2023-11-23 16:03:07 +01:00
get-flake.url = "github:ursi/get-flake";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-11-23 16:03:07 +01:00
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
srvos.url = "github:numtide/srvos";
srvos.inputs.nixpkgs.follows = "nixpkgs";
};
# outputs = _: {};
2024-11-15 10:17:56 +01:00
outputs =
{
self,
get-flake,
nixpkgs,
...
}:
let
system = "x86_64-linux";
nodeName = "hostkey-0";
2023-11-23 16:03:07 +01:00
2024-11-15 10:17:56 +01:00
mkNixosConfiguration =
2023-11-23 16:03:07 +01:00
{
2024-11-15 10:17:56 +01:00
extraModules ? [ ],
...
}@attrs:
nixpkgs.lib.nixosSystem (
nixpkgs.lib.attrsets.recursiveUpdate attrs {
specialArgs = {
nodeFlake = self;
repoFlake = get-flake ../../../..;
inherit nodeName;
};
2023-11-23 16:03:07 +01:00
2024-11-15 10:17:56 +01:00
modules = [ ./configuration.nix ] ++ extraModules;
}
);
in
{
nixosConfigurations = {
native = mkNixosConfiguration { inherit system; };
2023-11-23 16:03:07 +01:00
};
};
}