-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
86 lines (85 loc) · 2.36 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
{
inputs = {
# Specify the source of Home Manager and Nixpkgs
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
musnix = {
url = "github:musnix/musnix";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-alien.url = "github:thiagokokada/nix-alien";
my-nvim = {
url = "path:./nvim";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
nix-gaming = {
url = "github:fufexan/nix-gaming";
inputs.nixpkgs.follows = "nixpkgs";
};
rime-ice = {
url = "github:iDvel/rime-ice";
flake = false;
};
librime-lua = {
url = "github:hchunhui/librime-lua";
flake = false;
};
};
outputs =
{ self
, nixpkgs
, nixpkgs-unstable
, home-manager
, my-nvim
, nix-alien
, ...
}@inputs:
let
system = "x86_64-linux";
build = modules: nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit self inputs;
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
};
modules = [
./modules/nvidia.nix
./modules/laptop-powermanagement.nix
./modules/defaults.nix
inputs.musnix.nixosModules.musnix
home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
users.pca006132 = import ./home.nix;
extraSpecialArgs = { inherit inputs; };
};
}
({ ... }: {
config = {
environment.etc."nix/channels/nixpkgs".source = nixpkgs.outPath;
environment.etc."nix/channels/nixpkgs-unstable".source = nixpkgs-unstable.outPath;
nix.nixPath = [
"nixpkgs=/etc/nix/channels/nixpkgs"
"nixpkgs-unstable=/etc/nix/channels/nixpkgs-unstable"
];
};
})
] ++ modules;
};
in
{
nixosConfigurations = {
pca-xps15 = build [ ./machines/xps-15.nix ];
pca-pc = build [ ./machines/pc.nix ];
pca-workstation = build [ ./machines/workstation.nix ];
};
};
}