-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathflake.nix
More file actions
87 lines (72 loc) · 2.49 KB
/
flake.nix
File metadata and controls
87 lines (72 loc) · 2.49 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
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
{
description = "System configurations";
inputs = {
nixpkgs-unstable.url = "github:nixos/nixpkgs/?shallow=1&ref=nixos-unstable";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs-unstable";
home-manager.url = "github:nix-community/home-manager/release-25.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
catppuccin.url = "github:catppuccin/nix/release-25.11";
# Personal project flakes and secrets
bwm.url = "github:firecat53/bitwarden-menu";
bwm.inputs.nixpkgs.follows = "nixpkgs";
keepmenu.url = "github:firecat53/keepmenu";
keepmenu.inputs.nixpkgs.follows = "nixpkgs";
todocalmenu.url = "github:firecat53/todocalmenu";
todocalmenu.inputs.nixpkgs.follows = "nixpkgs";
urlscan.url = "github:firecat53/urlscan";
urlscan.inputs.nixpkgs.follows = "nixpkgs";
watson-dmenu.url = "github:firecat53/watson-dmenu";
watson-dmenu.inputs.nixpkgs.follows = "nixpkgs";
my-secrets.url = "/home/firecat53/nixos/nixos-secrets";
my-secrets.flake = false;
neovim.url = "git+https://git.firecat53.me/firecat53/nix-neovim.git";
neovim.inputs.nixpkgs.follows = "nixpkgs-unstable";
};
outputs =
inputs@{
self,
catppuccin,
disko,
home-manager,
nixpkgs,
nixpkgs-unstable,
sops-nix,
...
}:
let
inherit (self) outputs;
# Helper function to create a nixos system configuration
# Usage:
# Default x86_64: mkSystem { host = "hostname"; };
# Custom system: mkSystem { host = "hostname"; system = "aarch64-linux"; };
mkSystem =
{
host,
system ? "x86_64-linux",
}:
nixpkgs.lib.nixosSystem {
modules = [
{ nixpkgs.hostPlatform = system; }
./hosts/${host}/configuration.nix
];
specialArgs = {
inherit inputs outputs;
};
};
in
{
nixosConfigurations = {
backup = mkSystem { host = "backup"; };
homeserver = mkSystem { host = "homeserver"; };
laptop = mkSystem { host = "laptop"; };
office = mkSystem { host = "office"; };
pangolin = mkSystem { host = "pangolin"; };
vps = mkSystem { host = "vps"; };
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-tree;
};
}