-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
84 lines (76 loc) · 1.79 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
{
inputs = {
nixos.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
blocklist.url = "github:sjhgvr/oisd";
blocklist.flake = false;
rust = {
url = "github:oxalica/rust-overlay/stable";
inputs.nixpkgs.follows = "nixpkgs";
};
dmm = {
url = "github:abysssol/dmm";
inputs = {
nixpkgs.follows = "nixpkgs";
utils.follows = "utils";
rust.follows = "rust";
};
};
};
outputs =
{
nixos,
nixpkgs,
rust,
dmm,
blocklist,
...
}:
let
system = "x86_64-linux";
hostname = "tungsten";
nixpkgsConfig = {
inherit system;
# Allow specific unfree packages
config.allowUnfreePredicate =
pkg:
builtins.elem (nixos.lib.getName pkg) [
# These are required to enable unfree nvidia drivers
"nvidia-x11"
"nvidia-settings"
"steam"
"steam-run"
"steam-original"
];
};
pkgs = import nixos nixpkgsConfig;
unstable = import nixpkgs nixpkgsConfig;
inherit (pkgs) lib;
defaultPackage = name: value: value.packages.${system}.default;
flakes = lib.mapAttrs defaultPackage { inherit rust dmm; };
specialArgs = {
inherit
hostname
unstable
flakes
blocklist
;
};
in
{
nixosConfigurations.${hostname} = nixos.lib.nixosSystem {
inherit
system
pkgs
lib
specialArgs
;
modules = [
./hardware-configuration.nix
./local-configuration.nix
./configuration.nix
];
};
};
}