-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake-outputs.nix
168 lines (155 loc) · 4.92 KB
/
flake-outputs.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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
{ self
, nixpkgs-unstable
, home-manager-unstable
, jovian
, plasma-manager
, spicetify-nix
, nix-gaming
, flake-utils
, ...
}@inputs:
let
lib = nixpkgs-unstable.lib;
in
let
#region Helpers
defaultNixpkgsConfig = system:
{ extraOverlays ? [ ]
, includeDefaultOverlay ? true
, includeSharedOverlay ? true
}: {
inherit system;
config.allowUnfree = true;
overlays =
[ self.overlays.nur ]
++ extraOverlays
++ lib.lists.optional includeDefaultOverlay self.overlays.default
++ lib.lists.optional includeSharedOverlay self.overlays.shared;
};
fop-utils = (import ./utils.nix { inherit lib; });
fop-flake-utils = (import ./flake-utils.nix { inherit self lib inputs fop-utils defaultNixpkgsConfig; });
inherit (fop-flake-utils)
mkHome mkHomeConfiguration
homeManagerModules homeManagerConfigs
mkSystem
nixosModules;
in
{
overlays = (import ./overlays.nix { inherit inputs defaultNixpkgsConfig fop-utils; });
#region Users
# Base home configs to be used with NixOS configs
# TODO: Add custom check for homeUsers - issue(s) and PR open:
# - https://github.com/NixOS/nix/issues/6453
# - https://github.com/NixOS/nix/pull/8892
# TODO: Make configs automatically require their needed modules (spicetify, plasma, etc.) - probably not possible, at least easily.
homeUsers = fop-utils.recursiveMerge [
(mkHome "faupi" {
extraModules = [ ];
graphicalModules = [
plasma-manager.homeManagerModules.plasma-manager
homeManagerModules.kde-klipper
homeManagerModules.zen-browser
spicetify-nix.homeManagerModules.default
homeManagerConfigs.shared.command-not-found
homeManagerConfigs.shared.kde-plasma
homeManagerConfigs.shared.kde-html-wallpaper
homeManagerConfigs.shared.maliit-keyboard
homeManagerConfigs.shared.vscodium
homeManagerConfigs.shared.easyeffects
homeManagerConfigs.shared.prusa-slicer
homeManagerConfigs.shared.spicetify
];
})
(mkHome "masp" {
extraModules = [ ];
graphicalModules = [
plasma-manager.homeManagerModules.plasma-manager
homeManagerModules.kde-klipper
homeManagerModules.zen-browser
spicetify-nix.homeManagerModules.default
homeManagerConfigs.shared.command-not-found
homeManagerConfigs.shared.syncDesktopItems
homeManagerConfigs.shared.kde-plasma
homeManagerConfigs.shared.vscodium
homeManagerConfigs.shared.easyeffects
homeManagerConfigs.shared.spicetify
];
})
];
#region Homes
# Home configurations used by home-manager
homeConfigurations = fop-utils.recursiveMerge [
(mkHomeConfiguration "masp" {
system = "x86_64-linux";
variantArgs = { graphical = true; };
targetNixpkgs = nixpkgs-unstable;
targetHomeManager = home-manager-unstable;
extraModules = [
{
nixGLPackage = "intel";
programs.plasma.launcherIcon = "start-here-kubuntu";
apparmor.enable = true;
}
homeManagerConfigs.shared.touchegg # X11, no native touchpad gestures
];
})
];
#region Systems
# System configurations
nixosConfigurations = fop-utils.recursiveMerge [
(mkSystem "homeserver" {
system = "x86_64-linux";
# TODO: Split off most configurations similar to home-manager?
extraModules = [
nixosModules.service-containers
nixosModules.octoprint
nixosModules.vintagestory
];
})
(mkSystem "deck" {
system = "x86_64-linux";
targetNixpkgs = nixpkgs-unstable;
targetHomeManager = home-manager-unstable;
extraModules = [
jovian.nixosModules.jovian # NOTE: Imports overlays too
nixosModules.steamdeck
nixosModules.vintagestory
];
})
(mkSystem "go" {
system = "x86_64-linux";
targetNixpkgs = nixpkgs-unstable;
targetHomeManager = home-manager-unstable;
extraModules = [
jovian.nixosModules.jovian # NOTE: Imports overlays too
nix-gaming.nixosModules.pipewireLowLatency
nix-gaming.nixosModules.platformOptimizations
nixosModules.decky
nixosModules.gaming
nixosModules.moonlight-external-display
];
})
(mkSystem "LT-masp" {
system = "x86_64-linux";
targetNixpkgs = nixpkgs-unstable;
targetHomeManager = home-manager-unstable;
extraModules = [
nixosModules.openvpn3-indicator
];
})
(mkSystem "sandbox" {
system = "x86_64-linux";
targetNixpkgs = nixpkgs-unstable;
targetHomeManager = home-manager-unstable;
extraModules = [ ];
})
];
} // flake-utils.lib.eachSystem [ flake-utils.lib.system.x86_64-linux ] (system: {
# Other than overlay, we have packages independently declared in flake.
packages = (import ./pkgs {
inherit lib;
pkgs = import nixpkgs-unstable {
inherit system;
};
});
})