infra/nix/os/devices/sj-bm-hostkey0/flake.nix

67 lines
1.5 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";
mycelium.url = "github:threefoldtech/mycelium";
2023-11-23 16:03:07 +01:00
};
# outputs = _: {};
outputs = {
self,
get-flake,
nixpkgs,
...
} @ attrs: let
system = "x86_64-linux";
nodeName = "sj-bm-hostkey0";
mkNixosConfiguration = {extraModules ? [], ...} @ attrs:
nixpkgs.lib.nixosSystem (
nixpkgs.lib.attrsets.recursiveUpdate
attrs
{
specialArgs = {
nodeFlake = self;
repoFlake = get-flake ../../../..;
inherit nodeName;
};
modules =
[
./configuration.nix
# flake registry
{
nix.registry.nixpkgs.flake = nixpkgs;
}
({lib, ...}: {
2023-11-23 16:03:07 +01:00
nixpkgs.overlays = [
2024-02-08 20:59:31 +01:00
(final: previous: {})
2023-11-23 16:03:07 +01:00
];
})
2023-11-23 16:03:07 +01:00
]
++ extraModules;
}
);
in {
nixosConfigurations = {
native = mkNixosConfiguration {
inherit system;
};
};
};
}