blob: e0cef8c0a5f9e18cc829087fffe2b115600fc445 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
{
description = "tzlil's system(s)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
impermanence.url = "github:nix-community/impermanence";
agenix.url = "github:ryantm/agenix";
nixos-hardware.url = "github:nixos/nixos-hardware";
# deploy-rs.url = "github:serokell/deploy-rs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs: let
mkSystem_ = pkgs: system: h: modules:
pkgs.lib.nixosSystem {
system = system;
modules = [./hosts/${h}/cfg.nix] ++ modules;
specialArgs = {inherit inputs;};
};
mkSystem = pkgs: system: h: (mkSystem_ pkgs system h [
inputs.agenix.nixosModule inputs.impermanence.nixosModules.impermanence
]);
in {
nixosConfigurations = {
pc = mkSystem inputs.nixpkgs "x86_64-linux" "lilith";
vm = mkSystem inputs.nixpkgs "x86_64-linux" "vm";
};
# deploy.nodes.some-random-system.profiles.system = {
# user = "root";
# path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.vm;
# };
# This is highly advised, and will prevent many possible mistakes
# checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
};
}
|