-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
executable file
·69 lines (65 loc) · 1.83 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
stylix.url = "github:danth/stylix";
firefox-gnome-theme = {
url = "github:rafaelmardojai/firefox-gnome-theme";
flake = false;
};
nix-gaming.url = "github:fufexan/nix-gaming";
programsdb = {
url = "github:wamserma/flake-programs-sqlite";
inputs.nixpkgs.follows = "nixpkgs";
};
wrapper-manager = {
url = "github:viperML/wrapper-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
stylix,
nixpkgs,
home-manager,
...
} @ inputs: let
dirUtils = {
opt = nixpkgs.lib.optionals;
dirFiles = dir: map (file: "${dir}/${file}") (builtins.attrNames (builtins.readDir dir));
};
nixpkgs-teams = import inputs.nixpkgs-teams {
system = "x86_64-linux";
config.allowUnfree = true;
};
system = hostname: isDesktop:
with dirUtils;
nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs self isDesktop dirUtils nixpkgs-teams;
};
modules =
[
./wrappers
inputs.nix-gaming.nixosModules.pipewireLowLatency
]
++ dirFiles "${self}/${hostname}"
++ dirFiles ./modules/common
++ opt isDesktop (
(dirFiles ./modules/common-desktop)
++ [
stylix.nixosModules.stylix
./stylix.nix
home-manager.nixosModules.home-manager
./home-manager.nix
]
);
};
in {
nixosConfigurations = {
"quadraticpc" = system "quadraticpc" true;
"quadtop" = system "quadtop" true;
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
};
}