-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
65 lines (56 loc) · 1.89 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
65
{
description = "Yippeee";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2";
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
lanzaboote.inputs.rust-overlay.follows = "rust-overlay";
lix-module.url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz";
lix-module.inputs.nixpkgs.follows = "nixpkgs";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
# nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
# nixos-cosmic.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = {
nixpkgs,
home-manager,
lix-module,
rust-overlay,
...
} @ inputs: let
specialArgs = {
lanzaboote = inputs.lanzaboote or null;
nixos-cosmic = inputs.nixos-cosmic or null;
};
shared-modules = [
./configuration.nix
lix-module.nixosModules.default
home-manager.nixosModules.home-manager
{
# make `nix run nixpkgs#nixpkgs` use the same nixpkgs as the one used by this flake.
nix.registry.nixpkgs.flake = nixpkgs;
nix.channel.enable = false; # remove nix-channel related tools & configs, we use flakes instead.
# Keep nixPath so we don't have to use flakes for projects
nix.nixPath = [
"nixpkgs=${nixpkgs}"
"rust-overlay=${rust-overlay}"
];
}
./modules/cosmic.nix
];
in {
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [./main ./modules/secureboot.nix] ++ shared-modules;
};
nicetop = nixpkgs.lib.nixosSystem {
inherit specialArgs;
modules = [./nicetop] ++ shared-modules;
};
};
};
}