-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
95 lines (78 loc) · 2.92 KB
/
flake.nix
File metadata and controls
95 lines (78 loc) · 2.92 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
{
description = "Personal config preferences";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs-23-05.url = "github:NixOS/nixpkgs/nixos-23.05";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-unstable = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
stylix = {
url = "github:nix-community/stylix";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
mac-app-util = {
url = "github:hraban/mac-app-util";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko/latest";
inputs.nixpkgs.follows = "nixpkgs";
};
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, ... }:
let
cfgLib = import ./cfglib.nix { inherit self; };
lib = self.inputs.nixpkgs.lib;
in
with cfgLib; {
nixosConfigurations = with self.inputs; {
t14 = mkSystem "x86_64-linux" "t14" "leo" nixpkgs-unstable;
t15 = mkSystem "x86_64-linux" "t15" "leo" nixpkgs-unstable;
bee = mkSystem "x86_64-linux" "bee" "leo" nixpkgs;
tower = mkSystem "x86_64-linux" "tower" "leo" nixpkgs;
sparrow = mkSystem "x86_64-linux" "sparrow" "leo" nixpkgs;
h0 = mkSystem "x86_64-linux" "h0" "leo" nixpkgs;
moni = mkSystem "x86_64-linux" "moni" "leo" nixpkgs;
};
homeConfigurations = with self.inputs; {
"leo@t14" = mkHome "x86_64-linux" "t14" "leo" home-manager-unstable;
"leo@t15" = mkHome "x86_64-linux" "t15" "leo" home-manager-unstable;
"leo@tower" = mkHome "x86_64-linux" "tower" "leo" home-manager;
"ji09br@APM3LJDY9D2K7HC" = mkHome "aarch64-darwin" "APM3LJDY9D2K7HC" "ji09br" home-manager-unstable;
"deck@deck" = mkHome "x86_64-linux" "deck" "deck" home-manager;
};
packages = forEachSystem
(system: import ./pkgs { pkgs = (import self.inputs.nixpkgs { inherit system; }); });
overlays = import ./overlays {};
devShells = forEachSystem
(system: import ./shells { inherit system self; });
checks = builtins.mapAttrs
(system: deployLib: deployLib.deployChecks self.deploy)
self.inputs.deploy-rs.lib;
deploy.nodes =
let
managedNodes = lib.attrsets.filterAttrs
(_: val: with val.config.syslib.deploy; role == "managed" || role == "both")
self.nixosConfigurations;
in
builtins.mapAttrs mkDeployNode managedNodes;
};
}