-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflake.nix
More file actions
141 lines (123 loc) · 3.73 KB
/
flake.nix
File metadata and controls
141 lines (123 loc) · 3.73 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
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
{
description = "orangc's NixOS flake";
inputs = {
# unstable nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-small.url = "github:NixOS/nixpkgs/nixos-unstable-small"; # moves faster, has less packages
# when raf writes documentation for hjem, we'll be switching from home-manager to hjem
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# unstable Hyprland
hyprland.url = "github:hyprwm/Hyprland";
# i don't know if i still want to be using stylix but we'll stick with it
stylix.url = "github:danth/stylix";
# ferris says hi!
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# quickshillin' it
quickshell.url = "git+https://git.outfoxxed.me/quickshell/quickshell";
# fancy nixy neovim
nvf = {
url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# secrets management
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# for modules.server.minecraft
nix-minecraft = {
url = "github:infinidoge/nix-minecraft";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# widgets framework configurable in *python*!!
ignis = {
url = "github:ignis-sh/ignis";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# walker (we be walkin') written by a bald man
walker.url = "github:abenz1267/walker";
# for hoyoverse games like genshin and honkai
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
# for blocking gambling websites, porn, etc
stevenBlackHosts = {
url = "github:StevenBlack/hosts";
inputs.nixpkgs.follows = "nixpkgs-small";
};
# hjem is a rafware alternative to home-mananager
hjem = {
url = "github:feel-co/hjem";
inputs.nixpkgs.follows = "nixpkgs-small";
};
hjem-rum = {
url = "github:snugnug/hjem-rum";
inputs.nixpkgs.follows = "nixpkgs-small";
inputs.hjem.follows = "hjem";
};
# copyparty is a file server that is awesome
copyparty.url = "github:9001/copyparty";
# so nix-index, nix-locate, and comma can work
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs@{
nixpkgs,
home-manager,
hjem,
...
}:
let
system = "x86_64-linux";
username = "orangc";
lib = nixpkgs.lib;
nixosMachine =
{ host }:
lib.nixosSystem {
specialArgs = {
inherit
inputs
system
host
username
;
};
modules = [
./hosts/${host}/config.nix
home-manager.nixosModules.home-manager
(lib.mkAliasOptionModule [ "hm" ] [ "home-manager" "users" username ])
# hjem.nixosModules.default
{
home-manager = {
extraSpecialArgs = {
inherit
inputs
system
host
username
;
};
useUserPackages = true;
backupFileExtension = "backup";
users.${username} = import ./hosts/${host}/home.nix;
};
}
];
};
in
{
formatter.${system} = nixpkgs.legacyPackages.${system}.nixfmt;
nixosConfigurations = {
komashi = nixosMachine { host = "komashi"; };
sirius = nixosMachine { host = "sirius"; };
gensokyo = nixosMachine { host = "gensokyo"; };
};
};
}