deploy-rs instead of colmena cause its easier
This commit is contained in:
80
flake.lock
generated
80
flake.lock
generated
@@ -43,6 +43,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"deploy-rs": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"utils": "utils"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1756719547,
|
||||||
|
"narHash": "sha256-N9gBKUmjwRKPxAafXEk1EGadfk2qDZPBQp4vXWPHINQ=",
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "deploy-rs",
|
||||||
|
"rev": "125ae9e3ecf62fb2c0fd4f2d894eb971f1ecaed2",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "serokell",
|
||||||
|
"repo": "deploy-rs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"disko": {
|
"disko": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -64,6 +86,22 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1733328505,
|
||||||
|
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-compat_2": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650374568,
|
"lastModified": 1650374568,
|
||||||
@@ -102,7 +140,7 @@
|
|||||||
},
|
},
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_2"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731533236,
|
"lastModified": 1731533236,
|
||||||
@@ -139,7 +177,7 @@
|
|||||||
},
|
},
|
||||||
"flake-utils_2": {
|
"flake-utils_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_4"
|
"systems": "systems_5"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694529238,
|
"lastModified": 1694529238,
|
||||||
@@ -263,7 +301,7 @@
|
|||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"nuschtosSearch": "nuschtosSearch",
|
"nuschtosSearch": "nuschtosSearch",
|
||||||
"systems": "systems_3"
|
"systems": "systems_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1761744315,
|
"lastModified": 1761744315,
|
||||||
@@ -305,6 +343,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
|
"deploy-rs": "deploy-rs",
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"home-manager": "home-manager_2",
|
"home-manager": "home-manager_2",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
@@ -314,7 +353,7 @@
|
|||||||
},
|
},
|
||||||
"snowfall-lib": {
|
"snowfall-lib": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat_2",
|
||||||
"flake-utils-plus": "flake-utils-plus",
|
"flake-utils-plus": "flake-utils-plus",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
@@ -393,6 +432,39 @@
|
|||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems_5": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
69
flake.nix
69
flake.nix
@@ -3,6 +3,10 @@
|
|||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
deploy-rs = {
|
||||||
|
url = "github:serokell/deploy-rs";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@@ -24,20 +28,59 @@
|
|||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
inputs:
|
inputs:
|
||||||
inputs.snowfall-lib.mkFlake {
|
let
|
||||||
inherit inputs;
|
# Base outputs generated by snowfall-lib
|
||||||
src = ./.;
|
flake = inputs.snowfall-lib.mkFlake {
|
||||||
snowfall = {
|
inherit inputs;
|
||||||
namespace = "snowfall";
|
src = ./.;
|
||||||
|
snowfall = {
|
||||||
|
namespace = "snowfall";
|
||||||
|
};
|
||||||
|
systems.modules.nixos = with inputs; [
|
||||||
|
agenix.nixosModules.default
|
||||||
|
];
|
||||||
|
homes.modules = with inputs; [
|
||||||
|
agenix.homeManagerModules.default
|
||||||
|
];
|
||||||
|
channels-config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
systems.modules.nixos = with inputs; [
|
|
||||||
agenix.nixosModules.default
|
inventory = import ./inventory.nix;
|
||||||
];
|
|
||||||
homes.modules = with inputs; [
|
mkNode =
|
||||||
agenix.homeManagerModules.default
|
name:
|
||||||
];
|
let
|
||||||
channels-config = {
|
node = inventory.nodes.${name};
|
||||||
allowUnfree = true;
|
system = flake.nixosConfigurations.${name}.pkgs.system;
|
||||||
|
activate = inputs.deploy-rs.lib.${system}.activate;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
hostname = node.zerotierIp or node.hostname;
|
||||||
|
profiles.system = {
|
||||||
|
user = "root";
|
||||||
|
path = activate.nixos flake.nixosConfigurations.${name};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
deployCfg = {
|
||||||
|
user = "root";
|
||||||
|
remoteBuild = true;
|
||||||
|
nodes = builtins.listToAttrs (
|
||||||
|
map (name: {
|
||||||
|
name = name;
|
||||||
|
value = mkNode name;
|
||||||
|
}) (builtins.attrNames inventory.nodes)
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
in
|
||||||
|
flake
|
||||||
|
// {
|
||||||
|
# deploy-rs configuration generated from inventory.nix
|
||||||
|
deploy = deployCfg;
|
||||||
|
|
||||||
|
# Helpful check to validate deploy config
|
||||||
|
checks.x86_64-linux.deploy = inputs.deploy-rs.lib.x86_64-linux.deployChecks deployCfg;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
pkgs.cachix
|
pkgs.cachix
|
||||||
pkgs.ouch
|
pkgs.ouch
|
||||||
inputs.agenix.packages.aarch64-darwin.default # this should be using ${home} but it doesn't seem to be working
|
inputs.agenix.packages.aarch64-darwin.default # this should be using ${home} but it doesn't seem to be working
|
||||||
|
inputs.deploy-rs.packages.aarch64-darwin.default # this should be using ${home} but it doesn't seem to be working
|
||||||
|
|
||||||
pkgs.claude-code
|
pkgs.claude-code
|
||||||
pkgs.codex
|
pkgs.codex
|
||||||
|
|||||||
Reference in New Issue
Block a user