-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
55 lines (47 loc) · 1.53 KB
/
flake.nix
File metadata and controls
55 lines (47 loc) · 1.53 KB
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
{
description = "Proxmox Homelab & VPS";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Add Home Manager
home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
# Add sops-nix for managing secrets
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, disko, sops-nix, ... }@inputs: {
# --- HOME SERVER ---
nixosConfigurations.homelab = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
disko.nixosModules.disko
./disko-config.nix
./configuration.nix
sops-nix.nixosModules.sops
];
};
# --- UBUNTU VPS CONFIGURATION ---
homeConfigurations."ubuntu" = home-manager.lib.homeManagerConfiguration {
# The VPS is x86_64 (AMD/Intel)
pkgs = import nixpkgs {
system = "x86_64-linux";
config.allowUnfree = true;
};
# Pass unstable for the Caddy build
extraSpecialArgs = {
pkgs-unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
modules = [
./vps/home.nix
# sops-nix.homeManagerModules.sops
];
};
};
}