-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
115 lines (109 loc) · 3.97 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
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
{
description = "Skademaskinen configuration";
nixConfig = {
extra-substituters = [
"https://nix-community.cachix.org"
];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
inputs = {
# external depends
nixpkgs = {
url = "nixpkgs/nixos-24.05";
};
system-manager = {
url = "github:numtide/system-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-system-graphics = {
url = "github:soupglasses/nix-system-graphics";
inputs.nixpkgs.follows = "nixpkgs";
};
# personal project depends
nix-velocity = {
url = "github:Mast3rwaf1z/nix-velocity";
inputs.nixpkgs.follows = "nixpkgs";
};
homepage = {
url = "github:Mast3rwaf1z/homepage";
inputs.nixpkgs.follows = "nixpkgs";
};
putricide = {
url = "github:Skademaskinen/Putricide";
inputs.nixpkgs.follows = "nixpkgs";
};
rp-utils = {
url = "github:Skademaskinen/RP-Utils";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, system-manager, nix-system-graphics, nix-velocity, homepage, putricide, rp-utils }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
defconfig = [
./modules
./shared/locale.nix
./shared/networking.nix
./shared/programs/nix.nix
./shared/programs/git.nix
];
in rec {
nixosConfigurations.Skademaskinen = nixpkgs.lib.nixosSystem {
inherit system;
modules = builtins.concatLists [defconfig [
{
_module.args = {
nix-velocity = nix-velocity;
homepage = homepage;
};
}
nix-velocity.nixosModules.default
homepage.nixosModules.${system}.default
putricide.nixosModules.default
rp-utils.nixosModules.default
./systems/skademaskinen
./shared/bootloader/systemd-boot.nix
./shared/users/mast3r.nix
./shared/users/taoshi.nix
]];
};
# non-nixos systems
systemConfigs = {
desktop = system-manager.lib.makeSystemConfig {
modules = [
nix-system-graphics.systemModules.default
({
environment.systemPackages = [system-manager.packages.${system}.system-manager];
nixpkgs.hostPlatform = system;
system-manager.allowAnyDistro = true;
system-graphics.enable = true;
})
];
};
laptop = system-manager.lib.makeSystemConfig {
modules = [
nix-system-graphics.systemModules.default
({
environment.systemPackages = [system-manager.packages.${system}.system-manager];
nixpkgs.hostPlatform = system;
system-manager.allowAnyDistro = true;
system-graphics = {
enable = true;
};
})
];
};
};
packages.${system} = {
warcraftlogsuploader = pkgs.callPackage ./packages/warcraftlogsuploader {};
banner = pkgs.callPackage ./packages/banner {};
sketch-bot = pkgs.callPackage ./packages/sketch-bot {};
lavalink = pkgs.callPackage ./packages/lavalink {};
p8 = pkgs.callPackage ./packages/p8 {};
server = nixosConfigurations.Skademaskinen.config.system.build.vm;
};
};
}