tangled
alpha
login
or
join now
bwc9876.dev
/
nixos-config
1
fork
atom
Flake for my NixOS devices
1
fork
atom
overview
issues
pulls
pipelines
Update
bwc9876.dev
2 months ago
5633530f
26a2ea84
verified
This commit was signed with the committer's
known signature
.
bwc9876.dev
SSH Key Fingerprint:
SHA256:DanMEP/RNlSC7pAVbnXO6wzQV00rqyKj053tz4uH5gQ=
+146
-141
8 changed files
expand all
collapse all
unified
split
flake.lock
homeModules
dev.nix
firefox.nix
utils.nix
nixosConfigurations
black-mesa.nix
nixosModules
imperm.nix
user-bean.nix
packages
packwiz.nix
+31
-31
flake.lock
···
135
"rust-analyzer-src": "rust-analyzer-src"
136
},
137
"locked": {
138
-
"lastModified": 1764571808,
139
-
"narHash": "sha256-+oo9W5rz03TjfpNqDSLEQwgKiuBbjrHdORyTHli2RuM=",
140
"owner": "nix-community",
141
"repo": "fenix",
142
-
"rev": "df3c2e78ec13418f85c1f26e77a50f865ec57d38",
143
"type": "github"
144
},
145
"original": {
···
401
]
402
},
403
"locked": {
404
-
"lastModified": 1767048910,
405
-
"narHash": "sha256-KLFTeA/xquN+F3XHLAXcserk0L0nijbhzuldxNDF1eE=",
406
"owner": "nix-community",
407
"repo": "home-manager",
408
-
"rev": "d99b4ca5debaa082c7d76015aa2b7f3fc7e8b5f7",
409
"type": "github"
410
},
411
"original": {
···
480
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
481
},
482
"locked": {
483
-
"lastModified": 1767077227,
484
-
"narHash": "sha256-wdUitn3XbaC99X0ctfHf0q5lGQ/1ogUwzjqTD4bkrDg=",
485
"owner": "sodiboo",
486
"repo": "niri-flake",
487
-
"rev": "9c4cb4a2b1adf7a24064a8cf5c829f464622d520",
488
"type": "github"
489
},
490
"original": {
···
513
"niri-unstable": {
514
"flake": false,
515
"locked": {
516
-
"lastModified": 1767072131,
517
-
"narHash": "sha256-JEpNneZyi8ydU0VVpxrHis2panjmeagFLGAiqigWMbE=",
518
"owner": "YaLTeR",
519
"repo": "niri",
520
-
"rev": "1ab1737653d8727c63252fb569e011c0903a9ace",
521
"type": "github"
522
},
523
"original": {
···
548
},
549
"nixos-hardware": {
550
"locked": {
551
-
"lastModified": 1767070591,
552
-
"narHash": "sha256-b0aM3221Pw6vbACFqZrVzZjMNqXVPi1dvgLr8QTbajc=",
553
"owner": "NixOS",
554
"repo": "nixos-hardware",
555
-
"rev": "9b3c38bf6c260d0e88154ef07fa833fa845bfd14",
556
"type": "github"
557
},
558
"original": {
···
563
},
564
"nixpkgs": {
565
"locked": {
566
-
"lastModified": 1766902085,
567
-
"narHash": "sha256-coBu0ONtFzlwwVBzmjacUQwj3G+lybcZ1oeNSQkgC0M=",
568
"owner": "NixOS",
569
"repo": "nixpkgs",
570
-
"rev": "c0b0e0fddf73fd517c3471e546c0df87a42d53f4",
571
"type": "github"
572
},
573
"original": {
···
579
},
580
"nixpkgs-stable": {
581
"locked": {
582
-
"lastModified": 1766885793,
583
-
"narHash": "sha256-P6RVkrM9JLCW6xBjSwHfgTOQ1JwBUma5xe5LI8xAPC0=",
584
"owner": "NixOS",
585
"repo": "nixpkgs",
586
-
"rev": "9ef261221d1e72399f2036786498d78c38185c46",
587
"type": "github"
588
},
589
"original": {
···
602
"systems": "systems"
603
},
604
"locked": {
605
-
"lastModified": 1767002962,
606
-
"narHash": "sha256-HGFRwMRUwt56E+SiVX9YQOzpOwHy0/rtEqMoEbkF8Yg=",
607
"owner": "nix-community",
608
"repo": "nixvim",
609
-
"rev": "63c957603751f0a107c4d9c2cbaff1c8749fc9f1",
610
"type": "github"
611
},
612
"original": {
···
765
"rust-analyzer-src": {
766
"flake": false,
767
"locked": {
768
-
"lastModified": 1764525349,
769
-
"narHash": "sha256-vR3vU9AwzMsBvjNeeG2inA5W/2MwseFk5NIIrLFEMHk=",
770
"owner": "rust-lang",
771
"repo": "rust-analyzer",
772
-
"rev": "d646b23f000d099d845f999c2c1e05b15d9cdc78",
773
"type": "github"
774
},
775
"original": {
···
838
"prismlauncher-meta": "prismlauncher-meta"
839
},
840
"locked": {
841
-
"lastModified": 1767100171,
842
-
"narHash": "sha256-/6khjDUAlCRa7dgyCxO/TECCKvhtlSsNjcE0Nz+MfEs=",
843
"ref": "refs/heads/main",
844
-
"rev": "1b24a1dfdbfa14af6ded52420dd77266e025abf1",
845
-
"revCount": 354,
846
"type": "git",
847
"url": "https://codeberg.org/spoonbaker/mono"
848
},
···
135
"rust-analyzer-src": "rust-analyzer-src"
136
},
137
"locked": {
138
+
"lastModified": 1767250179,
139
+
"narHash": "sha256-PnQdWvPZqHp+7yaHWDFX3NYSKaOy0fjkwpR+rIQC7AY=",
140
"owner": "nix-community",
141
"repo": "fenix",
142
+
"rev": "a3eaf682db8800962943a77ab77c0aae966f9825",
143
"type": "github"
144
},
145
"original": {
···
401
]
402
},
403
"locked": {
404
+
"lastModified": 1767104570,
405
+
"narHash": "sha256-GKgwu5//R+cLdKysZjGqvUEEOGXXLdt93sNXeb2M/Lk=",
406
"owner": "nix-community",
407
"repo": "home-manager",
408
+
"rev": "e4e78a2cbeaddd07ab7238971b16468cc1d14daf",
409
"type": "github"
410
},
411
"original": {
···
480
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
481
},
482
"locked": {
483
+
"lastModified": 1767257541,
484
+
"narHash": "sha256-eAZD0o5eC85jES3k8S0e1NlJJv+rTgofhl0QajhFjyM=",
485
"owner": "sodiboo",
486
"repo": "niri-flake",
487
+
"rev": "0eb70f38f02923ff59743a0978fed88f04c98c7d",
488
"type": "github"
489
},
490
"original": {
···
513
"niri-unstable": {
514
"flake": false,
515
"locked": {
516
+
"lastModified": 1767160009,
517
+
"narHash": "sha256-aTj88rDBdhmzaGXoFPOsHjXYM2OjNttixsGftT/X0dI=",
518
"owner": "YaLTeR",
519
"repo": "niri",
520
+
"rev": "cf0b4bc0ca93ab5c18b562ada1d8609b67b3c4e3",
521
"type": "github"
522
},
523
"original": {
···
548
},
549
"nixos-hardware": {
550
"locked": {
551
+
"lastModified": 1767185284,
552
+
"narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=",
553
"owner": "NixOS",
554
"repo": "nixos-hardware",
555
+
"rev": "40b1a28dce561bea34858287fbb23052c3ee63fe",
556
"type": "github"
557
},
558
"original": {
···
563
},
564
"nixpkgs": {
565
"locked": {
566
+
"lastModified": 1767116409,
567
+
"narHash": "sha256-5vKw92l1GyTnjoLzEagJy5V5mDFck72LiQWZSOnSicw=",
568
"owner": "NixOS",
569
"repo": "nixpkgs",
570
+
"rev": "cad22e7d996aea55ecab064e84834289143e44a0",
571
"type": "github"
572
},
573
"original": {
···
579
},
580
"nixpkgs-stable": {
581
"locked": {
582
+
"lastModified": 1767047869,
583
+
"narHash": "sha256-tzYsEzXEVa7op1LTnrLSiPGrcCY6948iD0EcNLWcmzo=",
584
"owner": "NixOS",
585
"repo": "nixpkgs",
586
+
"rev": "89dbf01df72eb5ebe3b24a86334b12c27d68016a",
587
"type": "github"
588
},
589
"original": {
···
602
"systems": "systems"
603
},
604
"locked": {
605
+
"lastModified": 1767185101,
606
+
"narHash": "sha256-gyNczVfQMoi+OQghxBik6wx8XLsCelok9SMl1bMLUoc=",
607
"owner": "nix-community",
608
"repo": "nixvim",
609
+
"rev": "df9d3637e80b98c5b937fc73a465d0eea2c3aa88",
610
"type": "github"
611
},
612
"original": {
···
765
"rust-analyzer-src": {
766
"flake": false,
767
"locked": {
768
+
"lastModified": 1767191410,
769
+
"narHash": "sha256-cCZGjubgDWmstvFkS6eAw2qk2ihgWkycw55u2dtLd70=",
770
"owner": "rust-lang",
771
"repo": "rust-analyzer",
772
+
"rev": "a9026e6d5068172bf5a0d52a260bb290961d1cb4",
773
"type": "github"
774
},
775
"original": {
···
838
"prismlauncher-meta": "prismlauncher-meta"
839
},
840
"locked": {
841
+
"lastModified": 1767240050,
842
+
"narHash": "sha256-NHV78UUI3BPyelMwwgfgMb5RH0+h5zZ+RwusBRAyVQs=",
843
"ref": "refs/heads/main",
844
+
"rev": "85763f8fd86b6e08dd3436346d4edb1ebb8f1bc8",
845
+
"revCount": 357,
846
"type": "git",
847
"url": "https://codeberg.org/spoonbaker/mono"
848
},
+11
-7
homeModules/dev.nix
···
1
-
{inputs, outputs, ...}: {
0
0
0
0
2
config,
3
lib,
4
pkgs,
···
16
python = mkLangOpt "Python dev stuff";
17
dotnet = mkLangOpt ".NET dev stuff";
18
cutter = mkLangOpt "Cutter";
19
-
mc = lib.mkEnableOption "Minecraft modpack stuff";
20
};
21
22
config = let
···
69
gcc
70
gdb
71
])
72
-
++ (lib.optionals conf.mc [
73
-
outputs.packages.${pkgs.system}.packwiz
74
-
inputs.spoon.packages.${pkgs.system}.mc-srv-git-hook.passthru.mrpack-install'
75
-
jre
76
-
])
77
++ (lib.optionals conf.rust [
78
(pkgs.fenix.complete.withComponents [
79
"cargo"
···
1
+
{
2
+
inputs,
3
+
outputs,
4
+
...
5
+
}: {
6
config,
7
lib,
8
pkgs,
···
20
python = mkLangOpt "Python dev stuff";
21
dotnet = mkLangOpt ".NET dev stuff";
22
cutter = mkLangOpt "Cutter";
23
+
mc = lib.mkEnableOption "Minecraft modpack stuff";
24
};
25
26
config = let
···
73
gcc
74
gdb
75
])
76
+
++ (lib.optionals conf.mc [
77
+
outputs.packages.${pkgs.system}.packwiz
78
+
inputs.spoon.packages.${pkgs.system}.mc-srv-git-hook.passthru.mrpack-install'
79
+
jre
80
+
])
81
++ (lib.optionals conf.rust [
82
(pkgs.fenix.complete.withComponents [
83
"cargo"
+5
-5
homeModules/firefox.nix
···
175
);
176
in "${noPath}/favicon.${iconExt}"
177
));
178
-
mkModrinth = aliases: type: mkEngine aliases "https://modrinth.com/discover/${type}?q={searchTerms}" "ico";
179
in {
180
# Dev
181
"GitHub Repos" =
···
293
"Netflix" = mkEngine ["@nfx"] "https://www.netflix.com/search?q={searchTerms}" "ico";
294
"IMDb" = mkEngine ["@imdb"] "https://www.imdb.com/find?q={searchTerms}" "ico";
295
296
-
# Minecraft
297
-
"Modrinth" = mkModrinth ["@mr"] "mods";
298
-
"Modrinth Resource Packs" = mkModrinth ["@mrr"] "resourcepacks";
299
-
"Modrinth Data Packs" = mkModrinth ["@mrd"] "datapacks";
300
301
# Misc
302
"Firefox Add-ons" = mkEngine [
···
175
);
176
in "${noPath}/favicon.${iconExt}"
177
));
178
+
mkModrinth = aliases: type: mkEngine aliases "https://modrinth.com/discover/${type}?q={searchTerms}" "ico";
179
in {
180
# Dev
181
"GitHub Repos" =
···
293
"Netflix" = mkEngine ["@nfx"] "https://www.netflix.com/search?q={searchTerms}" "ico";
294
"IMDb" = mkEngine ["@imdb"] "https://www.imdb.com/find?q={searchTerms}" "ico";
295
296
+
# Minecraft
297
+
"Modrinth" = mkModrinth ["@mr"] "mods";
298
+
"Modrinth Resource Packs" = mkModrinth ["@mrr"] "resourcepacks";
299
+
"Modrinth Data Packs" = mkModrinth ["@mrd"] "datapacks";
300
301
# Misc
302
"Firefox Add-ons" = mkEngine [
-1
homeModules/utils.nix
···
29
dust
30
zip
31
inputs.gh-grader-preview.packages.${pkgs.system}.default
32
-
wol
33
libqalculate
34
p7zip
35
poop
···
29
dust
30
zip
31
inputs.gh-grader-preview.packages.${pkgs.system}.default
0
32
libqalculate
33
p7zip
34
poop
+87
-89
nixosConfigurations/black-mesa.nix
···
2
inputs,
3
outputs,
4
...
5
-
}:
6
-
{
7
system = "x86_64-linux";
8
-
specialArgs.inputs = inputs // inputs.spoon.inputs // { inherit (inputs) self; };
9
10
-
modules = (builtins.attrValues outputs.nixosModules) ++ [
11
-
inputs.nixos-hardware.nixosModules.common-gpu-amd
12
-
inputs.nixos-hardware.nixosModules.common-cpu-amd
13
-
inputs.spoon.nixosModules.black-mesa
14
-
(
15
-
{ config, ... }:
16
-
{
17
-
home-manager.users.bean.home.stateVersion = "25.05";
18
-
system.stateVersion = "25.05";
19
-
networking.hostName = "black-mesa";
0
20
21
-
powerManagement.cpuFreqGovernor = "performance";
22
23
-
boot.initrd.availableKernelModules = [
24
-
"nvme"
25
-
"xhci_pci"
26
-
"ahci"
27
-
"usbhid"
28
-
"usb_storage"
29
-
"sd_mod"
30
-
];
31
-
boot.kernelModules = [ "kvm-amd" ];
32
-
boot.extraModulePackages = [ ];
33
34
-
hardware.enableRedistributableFirmware = true;
35
36
-
# Other disks handled by cow.disks
37
-
fileSystems."/mnt/storage" = {
38
-
device = "/dev/sda1";
39
-
fsType = "btrfs";
40
-
};
41
42
-
users.users =
43
-
let
44
secureRoot = "/nix/persist/secure";
45
-
in
46
-
{
47
bean.hashedPasswordFile = "${secureRoot}/hashed-passwd";
48
root = {
49
-
openssh.authorizedKeys.keys = [ config.cow.bean.pubkey ];
50
hashedPasswordFile = "${secureRoot}/hashed-passwd";
51
};
52
};
53
54
-
home-manager.users.bean.cow = {
55
-
sync.enable = true;
56
-
dev.enable = true;
57
-
};
58
-
59
-
cow = {
60
-
bean.sudoer = true;
61
-
lanzaboote.enable = true;
62
-
ssh-server.enable = true;
63
-
role-desktop.enable = true;
64
-
gaming.enable = true;
65
-
imperm.enable = true;
66
-
disks = {
67
-
enable = true;
68
-
partition-prefix = "cow-bm";
69
-
swap = false;
70
-
luks = true;
71
};
72
-
};
73
-
}
74
-
)
75
-
{
76
-
# Bingus!
77
-
imports = [ inputs.bingus.nixosModules.default ];
78
-
nixpkgs.overlays = [ inputs.bingus.overlays.default ];
79
80
-
cow.imperm.keep = [
81
-
"/var/lib/private/bingus"
82
-
];
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
83
84
-
services.bingus-bot = {
85
-
enable = true;
86
-
tokenFile = "/nix/persist/secure/bingus-token";
87
-
replyChannels = [
88
-
1295447496948191262
89
-
1295245646542143489
90
];
91
-
};
92
-
}
93
-
{
94
-
# for WOL
95
-
systemd.network.links."79-eth-wol" = {
96
-
matchConfig = {
97
-
Type = "ether";
98
-
Driver = "!veth";
99
-
Virtualization = "false";
100
};
101
-
linkConfig = {
102
-
WakeOnLan = "magic";
103
-
NamePolicy = "keep kernel database onboard slot path";
104
-
AlternativeNamesPolicy = "database onboard slot path mac";
105
-
MACAddressPolicy = "persistent";
0
0
0
0
0
0
0
0
0
0
106
};
107
-
};
108
-
}
109
-
{
110
-
virtualisation.podman.enable = true;
111
112
-
cow.imperm.keep = [ "/var/lib/containers" ];
113
-
}
114
-
];
115
}
···
2
inputs,
3
outputs,
4
...
5
+
}: {
0
6
system = "x86_64-linux";
7
+
specialArgs.inputs = inputs // inputs.spoon.inputs // {inherit (inputs) self;};
8
9
+
modules =
10
+
(builtins.attrValues outputs.nixosModules)
11
+
++ [
12
+
inputs.nixos-hardware.nixosModules.common-gpu-amd
13
+
inputs.nixos-hardware.nixosModules.common-cpu-amd
14
+
inputs.spoon.nixosModules.black-mesa
15
+
(
16
+
{config, ...}: {
17
+
home-manager.users.bean.home.stateVersion = "25.05";
18
+
system.stateVersion = "25.05";
19
+
networking.hostName = "black-mesa";
20
21
+
powerManagement.cpuFreqGovernor = "performance";
22
23
+
boot.initrd.availableKernelModules = [
24
+
"nvme"
25
+
"xhci_pci"
26
+
"ahci"
27
+
"usbhid"
28
+
"usb_storage"
29
+
"sd_mod"
30
+
];
31
+
boot.kernelModules = ["kvm-amd"];
32
+
boot.extraModulePackages = [];
33
34
+
hardware.enableRedistributableFirmware = true;
35
36
+
# Other disks handled by cow.disks
37
+
fileSystems."/mnt/storage" = {
38
+
device = "/dev/sda1";
39
+
fsType = "btrfs";
40
+
};
41
42
+
users.users = let
0
43
secureRoot = "/nix/persist/secure";
44
+
in {
0
45
bean.hashedPasswordFile = "${secureRoot}/hashed-passwd";
46
root = {
47
+
openssh.authorizedKeys.keys = [config.cow.bean.pubkey];
48
hashedPasswordFile = "${secureRoot}/hashed-passwd";
49
};
50
};
51
52
+
home-manager.users.bean.cow = {
53
+
sync.enable = true;
54
+
dev.enable = true;
0
0
0
0
0
0
0
0
0
0
0
0
0
0
55
};
0
0
0
0
0
0
0
56
57
+
cow = {
58
+
bean.sudoer = true;
59
+
lanzaboote.enable = true;
60
+
ssh-server.enable = true;
61
+
role-desktop.enable = true;
62
+
gaming.enable = true;
63
+
imperm.enable = true;
64
+
disks = {
65
+
enable = true;
66
+
partition-prefix = "cow-bm";
67
+
swap = false;
68
+
luks = true;
69
+
};
70
+
};
71
+
}
72
+
)
73
+
{
74
+
# Bingus!
75
+
imports = [inputs.bingus.nixosModules.default];
76
+
nixpkgs.overlays = [inputs.bingus.overlays.default];
77
78
+
cow.imperm.keep = [
79
+
"/var/lib/private/bingus"
0
0
0
0
80
];
81
+
82
+
services.bingus-bot = {
83
+
enable = true;
84
+
tokenFile = "/nix/persist/secure/bingus-token";
85
+
replyChannels = [
86
+
1295447496948191262
87
+
1295245646542143489
88
+
];
0
89
};
90
+
}
91
+
{
92
+
# for WOL
93
+
systemd.network.links."79-eth-wol" = {
94
+
matchConfig = {
95
+
Type = "ether";
96
+
Driver = "!veth";
97
+
Virtualization = "false";
98
+
};
99
+
linkConfig = {
100
+
WakeOnLan = "magic";
101
+
NamePolicy = "keep kernel database onboard slot path";
102
+
AlternativeNamesPolicy = "database onboard slot path mac";
103
+
MACAddressPolicy = "persistent";
104
+
};
105
};
106
+
}
107
+
{
108
+
virtualisation.podman.enable = true;
0
109
110
+
cow.imperm.keep = ["/var/lib/containers"];
111
+
}
112
+
];
113
}
+1
-1
nixosModules/imperm.nix
···
67
"/var/lib/systemd/timers"
68
"/var/lib/systemd/rfkill"
69
"/var/lib/systemd/backlight"
70
-
"/var/tmp"
71
]
72
++ config.cow.imperm.keepCache;
73
users =
···
67
"/var/lib/systemd/timers"
68
"/var/lib/systemd/rfkill"
69
"/var/lib/systemd/backlight"
70
+
"/var/tmp"
71
]
72
++ config.cow.imperm.keepCache;
73
users =
+5
-5
nixosModules/user-bean.nix
···
9
options.cow.bean = {
10
enable = lib.mkEnableOption "Bean user";
11
sudoer = lib.mkEnableOption "Bean being a sudoer";
12
-
pubkey = lib.mkOption {
13
-
type = lib.types.str;
14
-
description = "Public Key to Add for Bean";
15
-
default = pubkey;
16
-
};
17
};
18
19
config = lib.mkIf config.cow.bean.enable {
···
9
options.cow.bean = {
10
enable = lib.mkEnableOption "Bean user";
11
sudoer = lib.mkEnableOption "Bean being a sudoer";
12
+
pubkey = lib.mkOption {
13
+
type = lib.types.str;
14
+
description = "Public Key to Add for Bean";
15
+
default = pubkey;
16
+
};
17
};
18
19
config = lib.mkIf config.cow.bean.enable {
+6
-2
packages/packwiz.nix
···
1
-
{ packwiz, fetchFromGitHub, ... }:
0
0
0
0
2
packwiz.overrideAttrs (prev: next: {
3
-
version = "0-unstable-2025-11-24";
4
5
src = fetchFromGitHub {
6
owner = "packwiz";
···
1
+
{
2
+
packwiz,
3
+
fetchFromGitHub,
4
+
...
5
+
}:
6
packwiz.overrideAttrs (prev: next: {
7
+
version = "0-unstable-2025-11-24";
8
9
src = fetchFromGitHub {
10
owner = "packwiz";