fix flake
This commit is contained in:
parent
b89da7fdd7
commit
aca30aa527
3 changed files with 23 additions and 37 deletions
30
flake.lock
30
flake.lock
|
@ -365,11 +365,11 @@
|
||||||
"utils": "utils_2"
|
"utils": "utils_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1662759269,
|
"lastModified": 1663099612,
|
||||||
"narHash": "sha256-lt8bAfEZudCQb+MxoNKmenhMTXhu3RCCyLYxU9t5FFk=",
|
"narHash": "sha256-ucokjFDRwCFWbcGiqxz0mfHv82UqwyW7RXY6ZgKSl80=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "9f7fe353b613d0e45d7a5cdbd1f13c96c15803dd",
|
"rev": "60c6bfe322944d04bb38e76b64effcbd01258824",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -384,11 +384,11 @@
|
||||||
"wlroots": "wlroots"
|
"wlroots": "wlroots"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663064996,
|
"lastModified": 1663104400,
|
||||||
"narHash": "sha256-gw5AnClp+pm7Qd35QpjYHulz4b0P1j+AW6o6974PIbs=",
|
"narHash": "sha256-tWz8UAPrxxR5fiRWIU8vHPHAGpY13dRiD2UgNWrFK1I=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "7d4f0a319943f56b1a277ceae198fc3f77615afe",
|
"rev": "ae2173f703e8d61de953d48cc40565ba0bc9d5f7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -472,11 +472,11 @@
|
||||||
"utils": "utils_3"
|
"utils": "utils_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663034396,
|
"lastModified": 1663120334,
|
||||||
"narHash": "sha256-ySk0Jnsndl/XEHV7daBwUpstZzaiWAlFDmFyPa847do=",
|
"narHash": "sha256-6OzKHiEWvvXCmoDZtiUhox8QwhftiU4yfIxhg3psPqQ=",
|
||||||
"owner": "jyooru",
|
"owner": "jyooru",
|
||||||
"repo": "nix-minecraft-servers",
|
"repo": "nix-minecraft-servers",
|
||||||
"rev": "c796808005d9fa678ca4f2efd4fa835b1679caf1",
|
"rev": "e4e9f126df09d00e3284dbe79a92768aa898efa1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -583,11 +583,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663047086,
|
"lastModified": 1663122717,
|
||||||
"narHash": "sha256-gAKeS/8PgVjeBiYiPN0HzKx8GAC4eohHwnrzvDGpNEg=",
|
"narHash": "sha256-J+3/eIqCQEJkoJdlSws/5sTl3NmGwV8I8nG8p7BnveY=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "bcc5b8857ff078188c738c19b2600c5fcc040632",
|
"rev": "3ff5deafc470403d5cb7ec8edbc7b21b719d2894",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -696,11 +696,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1663003161,
|
"lastModified": 1663078836,
|
||||||
"narHash": "sha256-Og3MM2+Cwz82sRV3AgU5vPRf+QdeFDhG1zv+DMLqagk=",
|
"narHash": "sha256-M19944iIibZqxvj04UO9anad4yzbdsUmv0rvUknBV4k=",
|
||||||
"owner": "DeterminateSystems",
|
"owner": "DeterminateSystems",
|
||||||
"repo": "riff",
|
"repo": "riff",
|
||||||
"rev": "fca05c4d80dcd12cbb0d65681279729489a92e68",
|
"rev": "f56af6f5ee0d0ee5f0d268f677ebc7c814d5c7b2",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
11
flake.nix
11
flake.nix
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
description = "Delft Deployment";
|
description = "0x76's infrastructure";
|
||||||
|
|
||||||
# Based on:
|
# Based on:
|
||||||
# * https://github.com/serokell/pegasus-infra/blob/master/flake.nix
|
# * https://github.com/serokell/pegasus-infra/blob/master/flake.nix
|
||||||
|
@ -77,8 +77,13 @@
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Make the nixosConfigurations, mostly for vault-secrets
|
# Make the nixosConfigurations for compat reasons
|
||||||
nixosConfigurations = util.mkNixosConfigurations specialArgs nixHosts;
|
nixosConfigurations = (import (inputs.colmena + "/src/nix/hive/eval.nix") {
|
||||||
|
rawFlake = self;
|
||||||
|
colmenaOptions = import (inputs.colmena + "/src/nix/hive/options.nix");
|
||||||
|
colmenaModules = import (inputs.colmena + "/src/nix/hive/modules.nix");
|
||||||
|
}).nodes;
|
||||||
|
|
||||||
|
|
||||||
# Make the coleman configuration
|
# Make the coleman configuration
|
||||||
colmena = lib.foldr (el: acc: acc // util.mkColmenaHost el)
|
colmena = lib.foldr (el: acc: acc // util.mkColmenaHost el)
|
||||||
|
|
19
util.nix
19
util.nix
|
@ -25,23 +25,6 @@ rec {
|
||||||
flatten_hosts = hosts: concatLists (attrValues hosts);
|
flatten_hosts = hosts: concatLists (attrValues hosts);
|
||||||
filter_nix_hosts = hosts: filter ({ nix ? true, ... }: nix) hosts;
|
filter_nix_hosts = hosts: filter ({ nix ? true, ... }: nix) hosts;
|
||||||
|
|
||||||
mkNixosSystem = specialArgs: { hostname, realm, system ? "x86_64-linux", ... }@host: {
|
|
||||||
"${hostname}.${realm}" = lib.nixosSystem {
|
|
||||||
inherit system specialArgs;
|
|
||||||
modules =
|
|
||||||
[
|
|
||||||
({ config, pkgs, ... }: {
|
|
||||||
nixpkgs.overlays = [ (import ./nixos/pkgs) ];
|
|
||||||
networking = {
|
|
||||||
hostName = hostname;
|
|
||||||
domain = realm;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
] ++
|
|
||||||
(resolve_imports host);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
mkColmenaHost = { ip ? null, hostname, tags, realm, type ? "lxc", ... }@host:
|
mkColmenaHost = { ip ? null, hostname, tags, realm, type ? "lxc", ... }@host:
|
||||||
let
|
let
|
||||||
name = if realm == "thalassa" then hostname else "${hostname}.${realm}";
|
name = if realm == "thalassa" then hostname else "${hostname}.${realm}";
|
||||||
|
@ -61,6 +44,4 @@ rec {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
mkNixosConfigurations = specialArgs: hosts: lib.foldr (el: acc: acc // mkNixosSystem specialArgs el) { } hosts;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue