-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
127 lines (112 loc) · 4.45 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
116
117
118
119
120
121
122
123
124
125
126
127
{
description = "Oliver's NixOS config";
inputs = {
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
#nixpkgs.url = "github:oliver-koss/nixpkgs/lcd-i2c";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
xnix.url = "git+https://git.xeredo.it/xeredo/xnix.git";
xnix.inputs.nixpkgs.follows = "nixpkgs";
# Home manager
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
mkg-mod.url = "github:mkg20001/mkg-mod/master";
mkg-mod.inputs.nixpkgs.follows = "nixpkgs";
acme.url = "git+https://git.xeredo.it/xeredo/nixdeploy/acme-distributor";
acme.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
# TODO: Add any other flake you might need
# hardware.url = "github:nixos/nixos-hardware";
# Shameless plug: looking for a way to nixify your themes and make
# everything match nicely? Try nix-colors!
# nix-colors.url = "github:misterio77/nix-colors";
};
outputs = { nixpkgs, home-manager, nixos-hardware, mkg-mod, xnix, acme, ... }@inputs: rec {
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
oliver-nix = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
modules = [
mkg-mod.nixosModules.yggdrasil
mkg-mod.nixosModules.firewall-ips
nixos-hardware.nixosModules.common-cpu-amd
# nixos-hardware.nixosModules.common-gpu-nvidia
nixos-hardware.nixosModules.common-pc-laptop-ssd
# > Our main nixos configuration file <
./config.nix
];
};
oliver-server = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
modules = [
mkg-mod.nixosModules.yggdrasil
mkg-mod.nixosModules.firewall-ips
"${xnix}/defaults/services/sso.nix"
"${xnix}/defaults/services/nextcloud.nix"
# > Our main nixos configuration file <
./server.nix
];
};
oliver-pi = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
modules = [
mkg-mod.nixosModules.yggdrasil
mkg-mod.nixosModules.firewall-ips
acme.nixosModules.acme-shim
# > Our main nixos configuration file <
./pi.nix
];
};
oliver-nuc = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
modules = [
mkg-mod.nixosModules.yggdrasil
mkg-mod.nixosModules.firewall-ips
nixos-hardware.nixosModules.common-cpu-intel
acme.nixosModules.acme-shim
# > Our main nixos configuration file <
./nuc.nix
];
};
pq-vpn = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
modules = [
mkg-mod.nixosModules.yggdrasil
mkg-mod.nixosModules.firewall-ips
nixos-hardware.nixosModules.common-cpu-intel
acme.nixosModules.acme-shim
# > Our main nixos configuration file <
./pq/configuration.nix
];
};
};
legacyPackages.x86_64-linux = {
all = nixpkgs.legacyPackages.x86_64-linux.releaseTools.aggregate {
name = "all-devices";
constituents = map (c: c.config.system.build.toplevel) (builtins.attrValues nixosConfigurations);
};
};
packages.x86_64-linux = {
pq-iso = (nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
modules = [
./iso.nix
./pq/base.nix
];
}).config.system.build.isoImage;
};
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
# homeConfigurations = {
# # FIXME replace with your username@hostname
# "your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
# extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
# # > Our main home-manager configuration file <
# modules = [ ./home-manager/home.nix ];
# };
# };
};
}