-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
64 lines (61 loc) · 1.64 KB
/
flake.nix
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
description = "Impermanence options for NixOS modules";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs"; # /nixos-22.05
# Input is used for checks
impermanence.url = "github:nix-community/impermanence";
};
outputs = {
self,
nixpkgs,
impermanence,
}: let
lib = nixpkgs.lib;
defaultSystems = [
"aarch64-linux"
"aarch64-darwin"
"i686-linux"
"x86_64-darwin"
"x86_64-linux"
];
in {
formatter = lib.genAttrs defaultSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
nixosModules = rec {
bluetooth = import ./nixos-modules/bluetooth/persistence.nix;
environment = import ./nixos-modules/environment/persistence.nix;
networkmanager = import ./nixos-modules/networkmanager/persistence.nix;
sound = import ./nixos-modules/sound/persistence.nix;
ssh = import ./nixos-modules/ssh/persistence.nix;
tailscale = import ./nixos-modules/tailscale/persistence.nix;
default = {
imports = [
bluetooth
environment
networkmanager
sound
ssh
tailscale
];
};
};
checks.x86_64-linux.example =
(lib.nixosSystem {
system = "x86_64-linux";
modules = [
impermanence.nixosModules.impermanence
self.nixosModules.default
{
environment.automaticPersistence = {
normal.path = "/persistence";
};
boot.loader.systemd-boot.enable = true;
fileSystems."/".device = "none";
}
];
})
.config
.system
.build
.toplevel;
};
}