-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
146 lines (113 loc) · 4.75 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
{
inputs = {
# Disko - Declarative partition management
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
# Manage the home folder and user applications
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# Impermanence - come back to truth at every boot
impermanence.url = "github:nix-community/impermanence";
# Neovim Nightly
neovim.url = "github:nix-community/neovim-nightly-overlay";
neovim.inputs.nixpkgs.follows = "nixpkgs";
# NixOS Hardware
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# Nixpkgs
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-exiftool.url = "github:NixOS/nixpkgs/0dfa68647420b93080a04508dda41476cccc0cd0";
# Sops - secret management
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
# Wezterm
wezterm.url = "github:wez/wezterm?dir=nix";
# Zellij status plugin
zjstatus.url = "github:dj95/zjstatus";
zjstatus.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { nixpkgs, ... }@inputs: {
nixosConfigurations = let
overlays = import ./overlays.nix { inherit inputs; };
buildSystem = sysConfig: nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs sysConfig; };
modules = [
# Load overlays
{ nixpkgs.overlays = with overlays; [ additions modifications ]; }
# Load in Modules from Libraries
inputs.disko.nixosModules.disko
inputs.home-manager.nixosModules.home-manager
inputs.impermanence.nixosModules.impermanence
inputs.sops-nix.nixosModules.sops
# User config
./users/default.nix # Defaults for all users
./users/${sysConfig.user}.nix # Specific user configuration
# System Config
./systems/default.nix # Defaults for all systems
./systems/${sysConfig.hostname}.nix # Specific for this machine
];
};
in {
# Espresso: Desktop 5700g
"espresso" = let
sysConfig = {
hostname = "espresso";
instalVersion = "24.11";
user = "matshkas";
systemImpermanence = true;
homeImpermanence = false;
};
in buildSystem ( sysConfig );
# Gram: Framework 11th Gen i5-1135G7
"gram" = let
sysConfig = {
hostname = "gram";
instalVersion = "24.05";
user = "matt";
systemImpermanence = true;
homeImpermanence = true;
};
in buildSystem ( sysConfig );
# Magrathea: Intel i5-2500K Nextcloud server with Kodi, media storage, and snapshot backups
"magrathea" = let
sysConfig = {
hostname = "magrathea";
instalVersion = "24.05";
user = "matt";
systemImpermanence = true;
homeImpermanence = true;
};
in buildSystem ( sysConfig );
# Mjolnir: MinisForum UM790 Pro
"mjolnir" = let
sysConfig = {
hostname = "mjolnir";
instalVersion = "23.05";
user = "matt";
systemImpermanence = true;
homeImpermanence = true;
};
in buildSystem ( sysConfig );
# Oolong: Dell Inspiron 14 3473 - 4GB RAM, 32GB SSD
"oolong" = let
sysConfig = {
hostname = "oolong";
instalVersion = "24.11"; # Fresh install on December 17th, 2024
user = "matshkas";
systemImpermanence = false;
homeImpermanence = false;
};
in buildSystem ( sysConfig );
# Serenity: Ryzen 5 2400g Kodi, media storage, and off-site snapshot backups
"serenity" = let
sysConfig = {
hostname = "serenity";
instalVersion = "";
user = "matt";
systemImpermanence = true;
homeImpermanence = true;
};
in buildSystem ( sysConfig );
};
};
}