introduce deploy-rs

This commit is contained in:
Rouven Seifert 2023-06-12 12:58:21 +02:00
parent eff5f20fa9
commit 33a2c28aad
Signed by: rouven.seifert
GPG key ID: B95E8FE6B11C4D09
4 changed files with 86 additions and 66 deletions

View file

@ -32,40 +32,45 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"crane": { "deploy-rs": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": "flake-compat",
"lanzaboote",
"flake-compat"
],
"flake-utils": [
"lanzaboote",
"flake-utils"
],
"nixpkgs": [ "nixpkgs": [
"lanzaboote",
"nixpkgs" "nixpkgs"
], ],
"rust-overlay": [ "utils": "utils"
"lanzaboote",
"rust-overlay"
]
}, },
"locked": { "locked": {
"lastModified": 1683505101, "lastModified": 1685948350,
"narHash": "sha256-VBU64Jfu2V4sUR5+tuQS9erBRAe/QEYUxdVMcJGMZZs=", "narHash": "sha256-1FldJ059so0X/rScdbIiOlQbjjSNCCTdj2cUr5pHU4A=",
"owner": "ipetkov", "owner": "serokell",
"repo": "crane", "repo": "deploy-rs",
"rev": "7b5bd9e5acb2bb0cfba2d65f34d8568a894cdb6c", "rev": "65211db63ba1199f09b4c9f27e5eba5ec50d76ac",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "ipetkov", "owner": "serokell",
"repo": "crane", "repo": "deploy-rs",
"type": "github" "type": "github"
} }
}, },
"flake-compat": { "flake-compat": {
"flake": false,
"locked": {
"lastModified": 1668681692,
"narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1673956053, "lastModified": 1673956053,
@ -81,7 +86,7 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_2": { "flake-compat_3": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1668681692, "lastModified": 1668681692,
@ -165,11 +170,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1686391840, "lastModified": 1686564129,
"narHash": "sha256-5S0APl6Mfm6a37taHwvuf11UHnAX0+PnoWQbsYbMUnc=", "narHash": "sha256-jzb2mHvQEZJL3a3ANhTeLIaa1nyjFJ/RzUJjCJme/V4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "0144ac418ef633bfc9dbd89b8c199ad3a617c59f", "rev": "9e37a1b6f9507ed27080518ff4007988a50c957e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -215,22 +220,20 @@
}, },
"lanzaboote": { "lanzaboote": {
"inputs": { "inputs": {
"crane": "crane", "flake-compat": "flake-compat_2",
"flake-compat": "flake-compat",
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"pre-commit-hooks-nix": "pre-commit-hooks-nix", "pre-commit-hooks-nix": "pre-commit-hooks-nix"
"rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1686415556, "lastModified": 1686559216,
"narHash": "sha256-88nOOiLYzYGIMEiQ91DxuyUa786mqunRw6k6GipXmxg=", "narHash": "sha256-8yFA8F8dqUziMgd94DUSM4ljCgudcMYyWeaqdHFUvWE=",
"owner": "nix-community", "owner": "nix-community",
"repo": "lanzaboote", "repo": "lanzaboote",
"rev": "9f97a908e4059221d39c7b7d0906c88b9fcc9c9b", "rev": "59e3ebb19fdd3fd235d8275b008538a72872bad7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -294,11 +297,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1686412476, "lastModified": 1686501370,
"narHash": "sha256-inl9SVk6o5h75XKC79qrDCAobTD1Jxh6kVYTZKHzewA=", "narHash": "sha256-G0WuM9fqTPRc2URKP9Lgi5nhZMqsfHGrdEbrLvAPJcg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "21951114383770f96ae528d0ae68824557768e81", "rev": "75a5ebf473cd60148ba9aec0d219f72e5cf52519",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -387,11 +390,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1682596858, "lastModified": 1684842236,
"narHash": "sha256-Hf9XVpqaGqe/4oDGr30W8HlsWvJXtMsEPHDqHZA6dDg=", "narHash": "sha256-rYWsIXHvNhVQ15RQlBUv67W3YnM+Pd+DuXGMvCBq2IE=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "fb58866e20af98779017134319b5663b8215d912", "rev": "61e567d6497bc9556f391faebe5e410e6623217f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -422,6 +425,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"deploy-rs": "deploy-rs",
"home-manager": "home-manager", "home-manager": "home-manager",
"impermanence": "impermanence", "impermanence": "impermanence",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
@ -435,40 +439,15 @@
"trucksimulatorbot": "trucksimulatorbot" "trucksimulatorbot": "trucksimulatorbot"
} }
}, },
"rust-overlay": {
"inputs": {
"flake-utils": [
"lanzaboote",
"flake-utils"
],
"nixpkgs": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1684030847,
"narHash": "sha256-z4tOxaN9Cl8C80u6wyZBpPt9A9MbL21fZ3zdB/vG+AU=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "aa1480f16bec7dda3c62b8cdb184c7e823331ba2",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"simple-nixos-mailserver": { "simple-nixos-mailserver": {
"inputs": { "inputs": {
"blobs": "blobs", "blobs": "blobs",
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_3",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-22_11": "nixpkgs-22_11", "nixpkgs-22_11": "nixpkgs-22_11",
"utils": "utils" "utils": "utils_2"
}, },
"locked": { "locked": {
"lastModified": 1686468558, "lastModified": 1686468558,
@ -541,6 +520,21 @@
} }
}, },
"utils": { "utils": {
"locked": {
"lastModified": 1667395993,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"utils_2": {
"locked": { "locked": {
"lastModified": 1605370193, "lastModified": 1605370193,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",

View file

@ -14,6 +14,13 @@
impermanence.url = "github:nix-community/impermanence"; impermanence.url = "github:nix-community/impermanence";
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
home-manager = { home-manager = {
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
@ -50,6 +57,7 @@
, nix-index-database , nix-index-database
, sops-nix , sops-nix
, impermanence , impermanence
, deploy-rs
, nix-colors , nix-colors
, nixos-hardware , nixos-hardware
, lanzaboote , lanzaboote
@ -136,5 +144,22 @@
]; ];
}; };
}; };
deploy.nodes = {
nuc = {
hostname = "nuc";
profiles.system = {
sshUser = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.nuc;
};
};
falkenstein-1 = {
hostname = "falkenstein-1";
profiles.system = {
sshUser = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.falkenstein-1;
};
};
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
}; };
} }

View file

@ -28,7 +28,6 @@
}; };
environment.persistence."/nix/persist/system" = { environment.persistence."/nix/persist/system" = {
directories = [ directories = [
"/etc/nixos"
"/etc/ssh" "/etc/ssh"
"/root/.local/share/zsh" "/root/.local/share/zsh"
]; ];

View file

@ -200,6 +200,8 @@
virt-viewer # multi monitor for vms virt-viewer # multi monitor for vms
sbctl sbctl
deploy-rs
]; ];
programs.java.enable = true; programs.java.enable = true;