Compare commits

...
Sign in to create a new pull request.

380 commits

Author SHA1 Message Date
faukah
58f0189a6b temperance: clean up programs
Signed-off-by: faukah <fau@faukah.com>
Change-Id: I6a6a6964d0d546be1fb6aaf4867b10f774e41b4d
2025-08-01 12:29:01 +02:00
faukah
73018dad32 nushell: update config
Signed-off-by: faukah <fau@faukah.com>
Change-Id: I6a6a69644bbbc510b04f6eea9b642b58fa2f2aa5
2025-08-01 12:28:48 +02:00
faukah
1c7b2b348a npins: update sources 2025-08-01 12:28:28 +02:00
faukah
f0d3993af5 sudo: use Theo de Raadt's quote list for insults
Signed-off-by: faukah <fau@faukah.com>
Change-Id: I6a6a69642a62454277434355a51bfa46492c8af3
2025-07-30 20:53:37 +02:00
faukah
ba990d25e1 wms/portal: remove kwallet
Signed-off-by: faukah <fau@faukah.com>
Change-Id: I6a6a6964c72b33e60b617f5bf860d1b1dba46bc8
2025-07-29 22:44:15 +02:00
faukah
b37855a6b2 niri: add custom animations for window opening and resizing
Signed-off-by: faukah <fau@faukah.com>
Change-Id: I6a6a69647336104b507fbba5b82de23684e60291
2025-07-29 22:40:37 +02:00
faukah
e4dc42c2f9 helix: disable custom shell 2025-07-29 22:40:23 +02:00
fau
c5915e1d24 niri: move config to nix
Signed-off-by: faukah <fau@faukah.com>
Change-Id: I6a6a6964cffaba7ce75488a48739398758d49363
2025-07-29 21:59:43 +02:00
fau
0c995da8af
niri: add keybind for ghostty spawning + window expelling
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a69649fa8323e8fcae94b4ffdc2123e4a75cd
2025-07-27 18:06:29 +02:00
fau
967218a48e
btop: move to modules/home, clean up
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a696439b1369f17f636024507155d43005dec
2025-07-27 18:06:28 +02:00
fau
c621860314
docs: resizing delete
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a69649b3ad1d5faffa80ae72730a57d0ff33a
2025-07-27 17:40:41 +02:00
fau
03067acb8d
apply statix lints
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a696442c7de5f519287ef8b3d80668973ef48
2025-07-27 17:40:41 +02:00
fau
6ae25f23cf
helix: refactor, set a bunch of config options
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a696435b4ad15f4b5a6570bb6fd3c34a29d92
2025-07-27 17:40:40 +02:00
fau
e69e385f93
niri: module: set cargoHash instead of lockFile
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a6964f85e6ab79c3bcbd388ad7dd2a1ee1c7c
2025-07-27 17:40:40 +02:00
fau
dc1fdbe07b
switch to Gruvbox Dark Hard
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a696426a5ae06361492adc245fb4436411fe8
2025-07-27 17:40:39 +02:00
fau
cffcf81824
npins: update sources
Signed-off-by: fau <fau@faukah.com>
Change-Id: I6a6a6964808d37c79ffa659ea7147908e7324483
2025-07-27 17:40:38 +02:00
1524aa6c1f
hardware: graphics: update module
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964aff2aa0b8443da4726686024c9515490
2025-07-27 00:52:41 +02:00
347d9fcb6f
use unstable comma
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69648046cf7bdab09db39431ffcabec8d6a0
2025-07-27 00:52:41 +02:00
cc13ebdfe1
forgejo: hard-link instead of soft-link config files
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964eaeb84f3eb32511106e80c155e1bdb71
2025-07-27 00:52:41 +02:00
03ecaf76d6 hermit: programs: drop wordgrinder 2025-07-25 16:59:49 +02:00
000f4aa56b niri: formatting 2025-07-25 16:59:42 +02:00
c4c770e703 niri: config: a bunch of changes 2025-07-25 16:59:03 +02:00
08a8b1f39c greetd: cleanup 2025-07-25 16:58:48 +02:00
7533a9fc02 steam: add udev rule for controller 2025-07-25 16:58:35 +02:00
e21c2c25c0 ghostty: set background opacity to 1 2025-07-25 16:58:16 +02:00
512921e8f6 users: switch to ssh as default shell
My efforts to use nushell as a default shell have been
for naught so far. It silently breaks stuff you wouln't
expect it to break, like shipping environment variables
and stuff.
2025-07-25 16:57:07 +02:00
5ea857c6cf packages: add uad and ouch 2025-07-25 16:56:38 +02:00
5b0b9d9992 npins: update sources 2025-07-25 16:56:17 +02:00
d3d08aa4af security: switch to gnome-keyring instead of kwallet.
gnome-keyring seems to be more reliable in the long term
I only have to force disable gcr, which it ships with it.
2025-07-25 16:55:23 +02:00
cc9735063b brave: set password store to gnome-keyring 2025-07-25 16:55:08 +02:00
658530b991 brave: switch to normal brave package
Vulkan in chromium does not yet work on Wayland.
I'd rather have an OpenGL browser on Wayland than
a Vulkan browser in XWayland.
2025-07-25 16:41:22 +02:00
6bba60f5d9 hermit: disable foot 2025-07-25 16:36:29 +02:00
77b014a457 hermit: fix configuration 2025-07-23 17:30:20 +02:00
f687548762 lanzaboote: fix module using flake-compat 2025-07-23 17:29:40 +02:00
fcb5ee3581
temperance: remove nixpkgs.hostPlatform
This option does not exist anymore since I set nixpkgs' pkgs
value, which disables most options.

Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964fb25569eef1b0ae547b724a36a71bc95
2025-07-21 00:26:21 +02:00
2b7a72a6d5
fla: use BuiltinsFetchTree
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69644d409983dc04ca29a43fd12b60e73ed0
2025-07-21 00:26:20 +02:00
28f2c699e7
hermit: drop newer-nil from programs
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69649fe97fcc35f81034e3c5d0464b26afbc
2025-07-21 00:26:19 +02:00
f967df7b1e
niri: conf: decrease zoom size
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69647a28f5754ee957567f85a8896f6707c0
2025-07-21 00:26:19 +02:00
5765bbc868
niri: switch to master package, move config file location
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696441d048ff2328d08338293b4a1be005e7
2025-07-21 00:26:18 +02:00
f4790c05ed
nix: switch to lix
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69641a5c002234e971b698d9164999be08f3
2025-07-21 00:26:17 +02:00
6293930e1f
packages: add nushell packages to systemPackages
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696403f8a1a3f2c7cff8b73bf745376e6172
2025-07-21 00:26:16 +02:00
8c3ff343b0
nushell: move to modules/home
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964b332aee4de78ddbba4d16b55f6783485
2025-07-21 00:26:16 +02:00
71505a4629
helix: move to modules/home
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964949ee86c73c9dee2fc4a89c01a7a0579
2025-07-21 00:26:15 +02:00
917074fb32
ghostty: move to modules/home
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69641141c64ef2be00b4e93eefeba26ae292
2025-07-21 00:26:14 +02:00
2d3d2ef1d7
hjem: init
Finally, a sane home management system.

Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696430c3a408520811d1b0b3038a66b0f73a
2025-07-21 00:26:13 +02:00
3a9e31cc88
nixpkgs: switch to read-only packages
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69641b8369b151024324d8d06f2acb790c15
2025-07-21 00:26:12 +02:00
d276dea712
changes
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696407aaf040f34e2ef257545f441b621c99
2025-07-21 00:26:12 +02:00
467155afc6
forgejo: update themes
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69645a04ba54314c439162c2fb8946656a7f
2025-07-21 00:26:11 +02:00
f2d0e9239f
templates: fix home template
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696493a9883095a74467ffd3154851585173
2025-07-20 02:14:33 +02:00
e641dfa114
treewide: format using nixfmt
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69641c36f9763e104087a559c148d0449f00
2025-07-20 02:14:32 +02:00
f4464732e3
tooling: switch from alejandra to nixfmt
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696436b90e48895139b7e0b59b75c0e64cae
2025-07-20 02:14:31 +02:00
9603b43f34
fix tower config
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964afea0dea3adad9edc09f578fb75a43de
2025-07-20 00:48:16 +02:00
eb0b42ced4
npins: drop nixpkgs_2
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69643a1a80a163373dbb2e578f99c821e78d
2025-07-20 00:29:56 +02:00
59a80481e3
nh: switch to unstable
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964ba5b3182dd0f37ba74d4c3498305d83e
2025-07-20 00:29:55 +02:00
1cffdd7818
temperance: programs: drop emacs
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a69643f4d6374e81e8cc6b33ff02661b7b0c7
2025-07-19 23:53:14 +02:00
7ac4ac73c0
nushell: config: fix switch command
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696416730a7fd831e8dfde51397e6ea41577
2025-07-19 23:53:13 +02:00
0a37fb5863
default.nix: cleanup
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964349f8e23a87c2c0c9ab0d949d1bb92ad
2025-07-19 23:53:13 +02:00
0b82c15255
flake: switch to npins
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964f4aa3349951fe7574622564452ad1af1
2025-07-19 23:45:02 +02:00
45179ade64
quickshell: BackgroundImage: enable backgounds again
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964a68815e795aa84d4a173542c01893d35
2025-07-19 19:29:38 +02:00
49882fbae8
various: environment.sessionVariables => environment.variables
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696495dd9b0b531ce319785d337e6f5b173f
2025-07-19 19:29:38 +02:00
3bd3da0c0d
packages: nushell: init
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964bcbbf4d3f08ea2ebc9c22e84b200de93
2025-07-19 19:29:37 +02:00
32f12cf705
hosts: common: make uutils highprio, make fish non-highprio
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696475cf73ae355ad06a428a00d7017848b2
2025-07-19 19:29:37 +02:00
e9a49bc050
flake: disable install checks for all own programs
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964bd39f24817e0ad59633ba150cb8828a5
2025-07-19 17:16:47 +02:00
132426232d
nh: fox NH_FLAKE path
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964bd6df9956c18c5972f5b69523e8a91bc
2025-07-19 16:41:17 +02:00
5e7ea5772a
niri: config: fix path for quickshell
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a6964eebe587d151cba7eafd2ed27725bcfbd
2025-07-19 16:41:16 +02:00
4d57f072d0
temperance: programs: remove joplin-desktop
Signed-off-by: Bloxx12 <charlie@charlieroot.dev>
Change-Id: I6a6a696486bb26a060f004a9dbf7d3ed5d1098ce
2025-07-19 16:41:15 +02:00
36180ec0be
gitignore: add .qmlls.ini 2025-07-19 12:38:34 +02:00
1f8eab22b4
spotify: add spicetify-nix 2025-07-19 12:38:34 +02:00
378828b856
helix: set word-completion trigger-length to 2 2025-07-19 00:47:14 +02:00
d3d266bf9b
qt: enable qt and set platformTheme to qt5ct 2025-07-19 00:47:13 +02:00
6a0ecd3fe7
niri/config: config changes 2025-07-19 00:47:12 +02:00
683509d009
helix: switch to my own fork again 2025-07-19 00:47:11 +02:00
04e8033af3
TODO.md: delete 2025-07-19 00:47:10 +02:00
b82a3580ec
quickshell: a bunch of changes 2025-07-19 00:47:10 +02:00
8c6b9f65c9
security: add pam configuration 2025-07-19 00:47:09 +02:00
f813eb37d3
security: enable soteria
Soteria is a GTK-based Polkit authentication agent.
2025-07-19 00:47:08 +02:00
484bddd03b
spotifyd: set pipewire backend 2025-07-19 00:47:07 +02:00
0fa9bee865
temperance/programs: program updates 2025-07-19 00:47:06 +02:00
327f149a42
helix/languages: drop scls
helix master support buffer completion now.
2025-07-19 00:47:06 +02:00
655626c237
services/ssh: drop SSH_AUTH_SOCK env var, disable ssh.startAgent 2025-07-19 00:47:05 +02:00
ef617f52db
gui/bitwarden: init 2025-07-19 00:47:04 +02:00
fa71542fe2
system: options: drop mainUser 2025-07-19 00:47:03 +02:00
89ca8e59b3
wm/portal: cleanup 2025-07-19 00:47:02 +02:00
9750c64d9c
system.mod.nix: init 2025-07-19 00:47:02 +02:00
dee3cc7745
wm/portal.mod.nix: cleanup, add kwallet 2025-07-18 23:21:23 +02:00
598e92640e
gui: dolphin: init
Add dolphin, a graphical file manager with
kio-fuse and kio-extras to support mounting of filesystems
2025-07-18 23:21:22 +02:00
681cd8a453
ghostty: set background opacity to 0.9 2025-07-18 23:21:20 +02:00
098f38e9a4
nil: update to newest version 2025-07-18 23:21:19 +02:00
33f6b08982
gtk: drop HYPRCURSOR_{SIZE, THEME} variables 2025-07-18 23:21:18 +02:00
98690011c4
btop: remove desktop entry 2025-07-18 23:21:16 +02:00
574c0d2db1
brave: disable Vulkan, add Humble new tab page 2025-07-18 23:21:15 +02:00
3ab2613290
wm/variables: Hyprland => niri, set ELECTRON_OZONE_PLATFORM_HINT 2025-07-18 23:21:14 +02:00
fba74410c0
flake.lock: bump inputs 2025-07-18 23:21:13 +02:00
a64d7571d8
helix: drop rust-overlay 2025-07-18 23:21:11 +02:00
c9da7d036b
flake: drop rust-overlay 2025-07-18 23:21:10 +02:00
42b2f14173
quickshell: update code to work with qmlls 2025-07-17 00:53:39 +02:00
5cb871f702
quickshell: switch to -git again 2025-07-17 00:53:21 +02:00
b1490ec9a8
small update 2025-07-16 22:15:41 +02:00
c4f6785845
temperance: configuration: disable uwsm and greetd 2025-07-13 22:51:33 +02:00
6be7300827
temperance: configuration: enable system76-scheduler 2025-07-13 22:51:33 +02:00
253ba3719e
temperance: configuration: switch to linuxPackages_latest 2025-07-13 22:51:29 +02:00
23bdd9c99f
temperance: configuration: cleanup 2025-07-13 22:50:44 +02:00
3a868edf78
niri: config: drop spawn-at-startup of swww-daemon 2025-07-13 22:50:19 +02:00
024e08e1a2
wholefoods: fix image size 2025-07-13 22:49:13 +02:00
d5dfa36b6d
quickshell: add Background module
This allows me to set my background image using
Quickshell. No need for swww or any other wallpaper
daemon :D
2025-07-13 22:48:11 +02:00
a2e77e2498
niri: remove new-swww 2025-07-13 21:15:05 +02:00
7f5c2c7875
brave: fix brave-wrapped name arg 2025-07-13 21:13:04 +02:00
e6eb20be3a
temperance: programs: add various programs
Add:
 - carapace
 - mergiraf
 - starship
 - vivid
2025-07-13 21:12:09 +02:00
b2b50d298f
flake.lock: bump inputs 2025-07-13 13:13:47 +02:00
4492a17574
helix: set colorscheme to gruvbox_dark_hard 2025-07-12 10:38:15 +02:00
23c3b8572e
hermit: configuration: drop zsh 2025-07-11 22:44:54 +02:00
81e4a09f04
users: drop zsh 2025-07-11 22:44:33 +02:00
e84221e414
helix: bump version 2025-07-11 22:43:40 +02:00
f04da35bca
flake.lock: bump inputs 2025-07-11 22:43:28 +02:00
54123d393f
flake.lock: bump inputs 2025-07-11 18:11:01 +02:00
2f68b25e53
brave: fix /etc/hosts mapping 2025-07-09 23:05:37 +02:00
288ef433fb
brave: add UBlock Origin filter lists 2025-07-09 23:05:24 +02:00
0fd18deca3
hosts/temperance: progam updates 2025-07-09 22:12:16 +02:00
d409f61226
brave: add links to sources 2025-07-09 22:11:53 +02:00
190323c198
niri: add playerctl to pkgs 2025-07-09 22:11:42 +02:00
1abab409f8
users: set default shell to nushell 2025-07-09 22:11:27 +02:00
99b7c4f250
quickshell: switch to nixpkgs quickshell 2025-07-09 21:05:45 +02:00
fec612ff72
brave: schizomax 2025-07-09 21:04:49 +02:00
ab64591da8
wayland/niri: switch to unstable niri with reload patch
I need my hot reloading.
2025-07-08 22:58:41 +02:00
2cf1b03685
services/wayneko: add catppuccin theming 2025-07-08 22:58:16 +02:00
c0aa4f2f8f
niri/config: add window rules to float windows; fix screencasting 2025-07-08 22:57:48 +02:00
adc4bd9f3c
wms/wayland: fix portals, set kde portal as default for FileChooser 2025-07-08 22:57:27 +02:00
059c40e6a2
programs/brave: init 2025-07-08 18:13:31 +02:00
a337eabba2
modules/wayland: fix xdg portals 2025-07-08 16:20:11 +02:00
4fba84bc9d
flake: switch to nixpkgs via the Tarball protocol
see https://github.com/NixOS/infra/pull/562
2025-07-08 16:19:33 +02:00
866f023b4c
flake.nix: cleanup 2025-07-08 16:19:23 +02:00
3d1f6645ae
chore: drop .github
I moved off github a long time ago, time to drop
this remnance of it.
2025-07-08 14:22:26 +02:00
2411c0b496
chore: apply lints 2025-07-08 14:22:21 +02:00
ec1b31cabc
helix/languages: make clippy pedantic warnings not erorr 2025-07-08 13:56:52 +02:00
53bfb9303f
flake: update comment 2025-07-08 13:56:43 +02:00
95e9586d4c
flake: drop devshell 2025-07-08 13:56:43 +02:00
0a0d5a1e72
flake.lock: bump inputs 2025-07-07 20:47:06 +02:00
0d8d5364bd
flake.nix: drop lix 2025-07-07 20:47:00 +02:00
2b9a8a4f3b
ghostty: fix config 2025-07-07 20:43:56 +02:00
b414e7c2af
style/fonts: add fancy-iosevka once again 2025-07-07 20:42:08 +02:00
e1df5fa28e
helix: switch to finalAttrs for helix build 2025-07-07 20:42:08 +02:00
213d31230b
flak.nix: update lix version 2025-07-07 20:42:08 +02:00
fc4abfb8ec
programs: drop zed 2025-07-05 16:49:55 +02:00
3080bace28
flake: bump inputs 2025-07-05 16:49:55 +02:00
1758f4a644
flake: drop lix 2025-07-05 16:49:55 +02:00
a342876437
nix: switch to determinate 2025-07-05 16:49:55 +02:00
b5e9130de8
niri: config: fix quickshell 2025-06-29 17:01:02 +02:00
73a34287f0
system: fix rebuild 2025-06-29 16:58:28 +02:00
1eaf307047
quickshell: progress dump 2025-06-29 16:58:03 +02:00
b9e02538aa
flake.lock: bump inputs 2025-06-29 16:57:50 +02:00
ddd440d87c
niri: add lastest swww
Waow, namespace support!
2025-06-26 20:49:36 +02:00
d41e4a1d51
nix: add Max's cache
I trust you, Max (please don't let this be a bad choice...)
2025-06-26 20:49:36 +02:00
26d5d7e24b
system: enable rebuild.enableNg 2025-06-26 20:49:36 +02:00
7535a6bb9e
hardware: power: set new watt default config 2025-06-26 20:49:36 +02:00
5e9c4e8e4c
quickshell: init config 2025-06-26 20:49:36 +02:00
cbb594395a
helix: build with lto and native cpu target 2025-06-26 20:49:36 +02:00
5779ca210d
flake: inputs: add rust-rust-overlay
What is rust making me do, send help
2025-06-26 20:46:15 +02:00
4b8775bab0
services: printing: enable browsing, add drivers 2025-06-26 20:45:27 +02:00
fe40ebce25
flake: add zedless 2025-06-26 20:45:11 +02:00
dc6aecdc31
niri: config: fix screenshotting 2025-06-20 12:12:03 +02:00
cd756c1a0e
nix: documentation: enable dev manpages 2025-06-20 12:12:03 +02:00
05aef1ae1e
ghostty: enable copy-on-select and set $TERM 2025-06-20 12:12:03 +02:00
4d60efe2dc
temperance: programs: drop swww and vscodium 2025-06-20 12:12:03 +02:00
f2ea16b341
hermit: programs: drop swww and vscodium 2025-06-20 12:12:03 +02:00
c6a7e5d9f0
flake.lock: bump inputs 2025-06-20 12:12:03 +02:00
f3954defc3
flake: bump inputs 2025-06-20 12:12:03 +02:00
adb432ac10
ghostty: add confirm-close-surface = false 2025-06-20 12:11:42 +02:00
cf46a85ee3
hermit: programs: add brave, drop ungoogled-chromium 2025-06-20 12:11:22 +02:00
ae61334587
hermit: configuration: disable docker, disable niri 2025-06-20 12:10:41 +02:00
c0c919be76
niri: config: updates 2025-06-12 20:13:12 +02:00
cbcb45221d
niri: enable if isGraphical is true 2025-06-12 20:12:52 +02:00
0e43fa97ee
hermit: configuration: set systemType to laptop 2025-06-12 20:12:31 +02:00
8f19e283d8
modules: users: add systemType and isGraphical options
systemType describes the type of a system, e.g. a laptop,
desktop or server. 

isGraphical takes this to determine whether a system needs
programs such as a compositor, graphical applications etc.
2025-06-12 20:11:08 +02:00
64db6a4d5f
kanata: fix dell-keyboard 2025-06-12 20:10:38 +02:00
6cdd9badc5
temperance: programs: drop ghostty and element-desktop 2025-06-12 20:10:32 +02:00
0cc0a28e39
hermit: programs: drop ghostty 2025-06-12 20:10:28 +02:00
64adfc6ea4
modules: ghostty: init 2025-06-12 20:09:38 +02:00
362e52b874
fish: fix atuin 2025-06-12 20:09:29 +02:00
b40df13a90
fish: remove yt-dlp 2025-06-12 20:09:18 +02:00
ffc32faed0
helix: languages: make clippy more restrictive 2025-06-12 20:08:38 +02:00
7f57ac844f
flake: bump inputs 2025-06-12 20:08:17 +02:00
8ea0b0cd87
niri: config: fix compose key 2025-06-10 20:26:39 +02:00
04d18c1127
hermit: programs: add nushell 2025-06-10 20:26:30 +02:00
68eb88f562
hermit: enable zsh 2025-06-10 20:26:30 +02:00
cd362bc5cd
users: switch to zsh as my default shell 2025-06-10 20:26:29 +02:00
e5134f2ae0
power: superfreq => watt 2025-06-10 20:26:17 +02:00
53855172d3
flake.lock: bump inputs 2025-06-10 20:23:42 +02:00
d852199742
packages: shell => fish 2025-06-07 17:54:40 +02:00
4834edd2d4
templates: rust: init 2025-06-07 17:32:25 +02:00
87f6792f12
flake.lock: bump inputs 2025-06-05 08:27:13 +02:00
b8ce3ff5d9
niri: config: fix compose key 2025-06-05 08:27:01 +02:00
92bfadfea7
hermit: enable own cups module, remove prining service 2025-06-04 22:32:31 +02:00
609e8e4439
services: printing: init
Adds CUPS and avahi for printing and discovering
printers on the network.
2025-06-04 22:31:36 +02:00
22ab0638d2
kanata: add my shitty dell keyboard 2025-06-04 22:31:23 +02:00
296a386ee4
hermit: programs: add ungoogled-chromium 2025-06-04 22:30:49 +02:00
653938a61f
niri: config: many changes 2025-06-04 08:32:11 +02:00
24f35c4ccd
shell: stop fish from having to be built every time
Drop the patch to fish source code, instead opting
to employ fish's inbuilt share/fish/vendor_conf.d
to add custom code to fish.

This is both a bit simpler, and makes it so fish does not
have to be compiled on every update to it's source / to my configuration.
2025-06-04 08:32:09 +02:00
2c8ed668ca
wayland: niri: add xdg portal 2025-06-04 08:29:40 +02:00
a64bc12cf1
loki: stalwart: formatting 2025-06-04 08:29:24 +02:00
ef8c6854f4
zellij: config: formatting, fix keybindings 2025-06-04 08:29:04 +02:00
45d2f35c64
hosts: hermit: programs: remove element-desktop, add ghostty 2025-06-04 08:28:44 +02:00
33c4a5b297
hosts: hermit: switch to niri 2025-06-04 08:28:32 +02:00
41b72ce92c
flake: employ pipes! 2025-06-04 08:28:21 +02:00
2239e0e983
helix: rework 2025-06-04 08:27:35 +02:00
4267ca1d9e
flake.lock: bump inputs 2025-06-04 08:26:46 +02:00
b98c824f87
nix: module: set max-jobs to "auto" and cores to 0 2025-06-04 08:26:40 +02:00
7d45992c07
system: nixpkgs: update 2025-06-04 08:26:40 +02:00
a951911578
progress dump 2025-06-04 08:26:35 +02:00
4741aa8a47
niri: config: update 2025-05-30 23:17:46 +02:00
424dca4257
temperance: configuration: disable docker 2025-05-30 23:17:34 +02:00
4d6fc9ab67
flake.lock: bump inputs 2025-05-30 18:20:27 +02:00
411ff78e57
temperance: configuration: enable niri 2025-05-30 18:20:15 +02:00
ace64e5e3f
niri: init 2025-05-30 18:19:56 +02:00
e7a87b12f7
helix: add kdlfmt 2025-05-30 18:19:46 +02:00
0eaf1282d5
hermit: programs: remove zellij 2025-05-26 12:23:19 +02:00
9a7cb95be8
zellij: init 2025-05-26 12:23:13 +02:00
9b49d467e8
plausible: fix base url 2025-05-26 10:38:06 +02:00
9deefd02e5
services: plausible: init 2025-05-26 10:32:38 +02:00
5984b39f69
grafana: fix path to dashboards 2025-05-26 10:10:35 +02:00
1dd7f57bb3
grafana: fix fetchurl 2025-05-26 10:04:30 +02:00
d742bcafc3
forgejo: cleanup, disable dump 2025-05-26 10:00:18 +02:00
89b240ddd0
jj: disable 2025-05-26 10:00:06 +02:00
7c04c06766
grafana: add dashboards 2025-05-26 09:59:56 +02:00
11d3888cc1
hermit: programs: add rusty tools 2025-05-26 09:59:33 +02:00
feb0f86e95
stalwart: add stalwart user 2025-05-22 22:55:05 +02:00
4e4795cc88
stalwart: fix localhost ips, fix postgresql 2025-05-22 22:42:38 +02:00
35f32fe673
acme: remove invalid config 2025-05-22 22:42:30 +02:00
79d75bb7c2
stalwart: progress 2025-05-22 22:29:59 +02:00
6d4540dd25
acme: remove own certs 2025-05-22 22:07:13 +02:00
9caba268fa
acme: append extra config 2025-05-22 21:53:22 +02:00
136e9285fa
postgresql: comment changes 2025-05-22 21:53:22 +02:00
cac0f1d7b5
jj: init 2025-05-22 21:53:22 +02:00
1675c5f193
acme: fix acmeroot 2025-05-22 18:52:49 +02:00
ca3205346e
forgejo: remove redundant acme settings 2025-05-22 18:32:15 +02:00
980abb4022
acme: update domains 2025-05-22 18:28:07 +02:00
145286e80f
power: remove undervolt 2025-05-22 18:26:25 +02:00
c0aeed8ea4
stalwart: fix domain issues 2025-05-22 18:19:27 +02:00
a20746490a
acme: init 2025-05-22 18:08:18 +02:00
9edc2a4ad4
stalwart: init 2025-05-22 17:45:17 +02:00
3c044ef8ee
flake.lock: bump inputs 2025-05-22 09:44:42 +02:00
82db20a329
helix: set colorscheme to Catppuccin 2025-05-22 09:34:39 +02:00
0ac72db5b8
hermit: programs: add zathura 2025-05-22 09:34:29 +02:00
6a600ab6c6
xdg: switch pdf viewer to zathura 2025-05-22 09:34:15 +02:00
86e8bb500a
style: switch to Catppuccin and JetbrainsMono 2025-05-21 00:21:28 +02:00
641baa4989
helix: languages: cleanup 2025-05-21 00:21:14 +02:00
4cea4192a1
aliases.nix: make ls show no icons 2025-05-21 00:21:03 +02:00
a6972fc6f3
helix: add deadnix 2025-05-21 00:20:54 +02:00
fb30009872
flake.lock: bump inputs 2025-05-21 00:20:37 +02:00
a7e75316d0
foot: switch to JetBrainsMono 2025-05-19 21:22:36 +02:00
863bb97129
hermit/programs: formatting 2025-05-17 23:49:14 +02:00
3919677cb8
hermit/packages: add yazi, scc -> tokei 2025-05-17 23:48:53 +02:00
36b64b6c5f
helix: add Zig language server 2025-05-17 23:48:37 +02:00
47d1166938
helix/colorscheme: switch to base16_transparent 2025-05-17 23:48:18 +02:00
8485ad994f
style: switch to Black Metal Venom 2025-05-17 23:47:58 +02:00
ba21521179
power: add sample superfreq config 2025-05-17 23:47:23 +02:00
82347ff291
wayneko: switch to virt's fork
I love my zebra cat
2025-05-17 23:47:05 +02:00
547385a0d8
foot: switch to ComicShannsMono 2025-05-17 23:46:56 +02:00
e710c4d5da
hermit: enable lanzaboote 2025-05-17 23:46:31 +02:00
f9688aacb2
lanzaboote: add mkEnableOption 2025-05-17 23:46:08 +02:00
9ad0b23105
flake.lock: bump superfreq to 0.2.0 2025-05-17 23:45:28 +02:00
90f05c271e
flake.lock: bump superfreq 2025-05-16 10:45:29 +02:00
3a0ca30117
hermit: add zellij 2025-05-15 15:10:26 +02:00
fb6e0db5a0
power.nix: enable superfreq 2025-05-15 11:37:34 +02:00
8634db6c53
shell: packages:: add trash-cli 2025-05-15 11:37:34 +02:00
9fbc6e83ba
world: init 2025-05-15 11:37:34 +02:00
184253c3fe
flake.lock: bump superfreq 2025-05-15 11:22:50 +02:00
f741410f03
style/module.nix: remove theming.nix frim imports 2025-05-15 09:17:49 +02:00
Bloxx12
7df33a9323 flake: add superfreq 2025-05-14 12:31:05 +02:00
Bloxx12
608d5f8158 nix/module.nix: remove outdated repl-flake experimental feature 2025-05-13 22:47:07 +02:00
22052a7f07 style: remove default.nix, theming.nix
unused
2025-05-13 13:21:38 +02:00
Bloxx12
2c94133c34
flake: switch to newer lix version 2025-05-12 13:03:10 +02:00
14ca7a1848 flake.lock: bump inputs 2025-05-12 11:39:20 +02:00
2b5bfb8e14
chore: docs cleanup 2025-05-12 10:53:26 +02:00
1826f85f4d
shell: packages: cleanup 2025-05-12 10:53:13 +02:00
215509ade7
helix: switch from marksman to taplo 2025-05-12 10:52:59 +02:00
8e9995597f
temperance: programs: add ghostty 2025-05-12 10:52:11 +02:00
0b3a851a57
common.nix: make fish binaries high-priority 2025-05-12 10:52:08 +02:00
a5b47bc75b
hyprland: add workspace_swipe 2025-05-09 11:37:55 +02:00
94819e9c74
chore: switch to gruvbox 2025-05-09 11:36:50 +02:00
c47de3d4f1
networking/networkmanager.nix: do not manage docker interfaces 2025-05-09 11:36:33 +02:00
88c73558f4
chore: split up helix into multiple packages 2025-05-09 11:05:21 +02:00
9f925d579b
chore: allow pinging of hosts, remove unneeded firewall file 2025-05-09 09:53:49 +02:00
dd32a67e91
tower: set kernelPackage to latest 2025-05-09 09:38:43 +02:00
fcc8a5a102
hyprland/decorations.nix: enable xray blur 2025-05-09 09:37:50 +02:00
c5898e58d0
feat: schizo networking 2025-05-09 09:37:36 +02:00
92bb3f929b
foot.nix: fix colors, set alpha 2025-05-08 23:51:51 +02:00
eddaca96e0
fix catppuccin 2025-05-08 19:51:26 +02:00
c71ca90e94
hosts/common.nix: do not set EDITOR env var to the whole helix path 2025-05-08 18:58:00 +02:00
3d9518e758
hyprland/binds.nix: add keybind for grabbing rouge windows 2025-05-06 21:55:55 +02:00
08658d4c42
helix: do not display display hints automatically
Display hints can be annoying, hence I toggle them using
<space>-i instead.
2025-05-06 21:55:05 +02:00
154da6736d
system: switch to Catppuccin again 2025-05-06 21:53:27 +02:00
216ddc8755
shell/packages: remove carapace 2025-05-06 09:42:23 +02:00
1aea5c4474
flake.lock: bump inputs 2025-05-06 09:42:05 +02:00
4ef6c24751
hyprland/decorations.nix: enable decorations again 2025-05-05 11:07:19 +02:00
ee58fd0628
packages/helix.nix: add clippy flags 2025-05-05 11:06:57 +02:00
087e9a3d4f
hyprland/binds.nix: switch to quickshell launcher 2025-05-05 11:06:36 +02:00
d89347da32
gui/foot.nix: fix bold font 2025-05-05 11:06:10 +02:00
c11fac7e01
flake: add lix module; set default nix to lix 2025-05-05 11:05:52 +02:00
db01784a8b
flake.lock: bump inputs 2025-05-05 11:05:34 +02:00
57612c66fe temperance/configuration.nix: disable docker 2025-05-04 09:54:07 +02:00
559ccacb10 temperance/programs.nix: remove nextcloud-client 2025-05-04 00:26:23 +02:00
1c662fcce6 owncloud/module.nix: unharden 2025-05-04 00:26:08 +02:00
288289d6ce flake.nix: cleanup 2025-05-03 19:25:47 +02:00
fff25b9905 flake.nix: fix helix for all systems 2025-05-03 18:55:20 +02:00
99474e28c0 temperance/programs.nix: add oculante 2025-05-03 18:55:20 +02:00
8ffd6c056e helix: add some kakoune-ish keybinds 2025-05-03 18:47:19 +02:00
4e6bb680a3 quickshell/module.nix: do not hardcode system 2025-05-03 18:19:24 +02:00
274c79705c flake.lock: bump inputs 2025-05-03 15:38:02 +02:00
c668221808 nix/module.nix: add repl-flake to experimental features 2025-05-03 15:36:47 +02:00
ea6cff5140 hyprland/binds.nix: add screen text extraction keybind 2025-05-03 14:56:35 +02:00
86e61a67cc shell/packages.nix: dog -> dig 2025-05-03 14:55:44 +02:00
52f00c84cc hermit/configuration.nix: enable gpg-agent, disable auto-cpufreq 2025-05-02 14:01:05 +02:00
be7bebcc7e hosts/{hermit, temperance}: enable quickshell 2025-05-02 14:00:32 +02:00
cecfd15fd2 networking/module.nix: switch to Mullvad as DNS provider 2025-05-02 13:57:08 +02:00
6e3dd312a4 quickshell: add option to enable it 2025-05-02 13:47:42 +02:00
39e2eefd98 grafana: remove http prefix for postgres 2025-05-02 13:23:39 +02:00
6fd7d24087 hyprland: add quickshell autostart and bind 2025-05-01 08:35:22 +02:00
3ae55fdd6a flake.lock: bump inputs 2025-05-01 08:34:48 +02:00
7eaa519978 hermit/programs.nix: remove brave and manix 2025-04-30 16:58:09 +02:00
f5477289c4 helix: config: remove nixd, ad qmlls config 2025-04-29 23:31:44 +02:00
3174b8a07e temperance/programs.nix: remove brave 2025-04-29 23:31:32 +02:00
e311a8759e flake: quickshell: init 2025-04-29 23:29:05 +02:00
57a0a84398 wrapped programs: switch to nativeBuildInputs 2025-04-29 16:46:28 +02:00
9b56e8daaa helix.nix: fix nix language server 2025-04-29 14:01:05 +02:00
c02522ffc4 flake.lock: bump inputs 2025-04-29 13:55:04 +02:00
84c05eb005 hermit/programs.nix: add manix, remove python3 2025-04-26 23:37:39 +02:00
af0fd0f55e helix: use upstream version 2025-04-26 16:24:47 +02:00
8ab86a1204 nix/module.nix: refactor comments 2025-04-25 20:20:11 +02:00
cfefe9bbe1 hardware/power.nix: init 2025-04-25 20:19:07 +02:00
cb504ad8ca networking/networkmanager.nix: switch backend to wpa_supplicant 2025-04-25 20:15:21 +02:00
c120398b51 hermit/programs.nix: add abook, aerc, aichat, wordgrinder 2025-04-25 20:14:37 +02:00
67e4c17305 hosts/common.nix: remove links2, add w3m 2025-04-25 20:14:17 +02:00
e35cad1252 hermit/configuration.nix: enable docker (blegh) 2025-04-22 21:29:22 +02:00
1e8007f233 hermit/configuration.nix: enable gtk theming 2025-04-22 21:29:06 +02:00
25943c1b71 hermit/programs.nix: remove emacs 2025-04-22 21:26:36 +02:00
3dce32f616 style: working gtk colors
Still have to set the stuff using dconf tho L
2025-04-22 21:25:59 +02:00
824e30fc7c wayneko/module.nix: more systemd hardening tweaks 2025-04-22 21:25:36 +02:00
6ba88e2edc networking/module.nix: fix dnsovertls spelling 2025-04-21 21:28:07 +02:00
fcbd4cd0af hyprland/decorations.nix: enable theming 2025-04-21 21:24:30 +02:00
fc1175b8a0 boot/module.nix: quiesce boot process 2025-04-21 21:22:52 +02:00
03374732ad style: cleanup gtk theming 2025-04-21 21:22:30 +02:00
b998471e57 hermit/configuration.nix: disable schizofox 2025-04-21 21:22:12 +02:00
5a54d79b92 hyprland/settings.nix: suppress startup errors 2025-04-21 21:21:36 +02:00
6e70e952e2 greetd, hyprland: fix greeter and lock screen 2025-04-20 20:48:25 +02:00
57af25abe7 wayneko/module.nix: extra hardening 2025-04-20 20:48:08 +02:00
2836770da9 hardware/bluetooth.nix: configure powerOnBoot properly 2025-04-20 20:47:32 +02:00
f7e85b6cde hermit/programs.nix: cleanup 2025-04-20 20:47:11 +02:00
d3ad51f43c hosts/default.nix: cleanup 2025-04-20 20:33:05 +02:00
1ccc346287 flake.lock: bump inputs 2025-04-20 20:33:05 +02:00
b168b0bb49 networking/module.nix: networking improvements 2025-04-20 20:33:05 +02:00
e810a89232 hyprland/exec.nix: add uwsm finalize 2025-04-20 20:14:09 +02:00
c794381bac greetd/module.nix: Hyprland autologin 2025-04-20 20:13:49 +02:00
42ea3cb8b0 systemd/module.nix: faster startup 2025-04-20 17:10:35 +02:00
f037c63d84 boot/module.nix: cleanup, add plymouth 2025-04-20 17:09:40 +02:00
95e99962d6 hermit/configuration.nix: cleanup 2025-04-19 19:59:57 +02:00
56d037477c hermit: disable nvidia 2025-04-19 19:59:57 +02:00
caabda23d3 wayland/variables.nix: change ELECTRON_OZONE_PLATFORM_HINT to wayland 2025-04-19 19:59:57 +02:00
3f7231b438 hermit/programs.nix: remove firefox and fftw 2025-04-19 19:59:57 +02:00
abc773d79c hermit/configuration.nix: enable schizofox 2025-04-19 19:59:57 +02:00
41b9409856 flake: add schizofox again 2025-04-19 19:59:57 +02:00
69b732c1c5 hyprland: change locking to hyprlock 2025-04-19 19:21:21 +02:00
47329510a8 style/wholefoods.jpg -> style/wholefoods.png 2025-04-19 19:20:41 +02:00
e0fb4b8903 services: move .nix files into their own dirs 2025-04-18 18:01:27 +02:00
7ccea14afb {temperance, hermit}/configuration.nix: enable thunar 2025-04-18 17:57:51 +02:00
2b045992c1 thunar/module.nix: add {enableOption, gvfs, file-roller, thumbnails} 2025-04-18 17:56:49 +02:00
b4c1c7891a foot.nix: cleanup 2025-04-18 17:53:32 +02:00
b9bfb14bad fonts.nix: remove custom font
building this takes a truly stupid amount of resources
2025-04-18 17:51:36 +02:00
2a3c4899fb forgejo/module.nix: add dumping 2025-04-18 17:50:26 +02:00
936d8f9090 grafana/module.nix: fix datasources 2025-04-18 15:59:15 +02:00
49969059ec tower/configuration.nix: enable prometheus 2025-04-18 15:58:56 +02:00
61f9e30242 prometheus/module.nix: fix cfg 2025-04-18 15:58:41 +02:00
290f541c5f loki/module.nix: init 2025-04-18 15:51:28 +02:00
1142f10c18 prometheus/module.nix: add nginx 2025-04-18 15:51:08 +02:00
9454d21bbd grafana: disable signup, add provisioning 2025-04-18 15:50:39 +02:00
524edd90ed prometheus/module.nix: init 2025-04-18 15:08:39 +02:00
734e30bc45 forgejo/module.nix: inherit mkEnableOption 2025-04-18 14:50:32 +02:00
70221186b2 tower/configuration.nix: enable grafana 2025-04-18 14:50:32 +02:00
f6803029fd tower/configuration.nix: set timeout duration of 30 2025-04-18 14:50:32 +02:00
a5f955ff08 boot/module.nix: add timeout option
On desktop systems, it is convenient to have the timeout
at zero, and just spam space when trying to start
a previous generation. On servers however, it is preferable
to have some time to choose the generation, which is
quite convenient if you have to acess is remotely via a
web interface, which tend to be quite slow and unresponsive.
2025-04-18 14:50:32 +02:00
bbe481be8a services/grafana: init 2025-04-18 14:50:32 +02:00
219 changed files with 9377 additions and 3416 deletions

5
.envrc
View file

@ -1,4 +1 @@
watch_file flake.nix use flake
use flake

207
.github/logo.svg vendored
View file

@ -1,207 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="200"
height="200"
viewBox="0 0 501.56251 501.56249"
id="svg2"
version="1.1"
inkscape:version="1.3.2 (091e20ef0f, 2023-11-25)"
sodipodi:docname="nix-webring.svg"
inkscape:export-filename="nix-webring.png"
inkscape:export-xdpi="107.66355"
inkscape:export-ydpi="107.66355"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient5562">
<stop
style="stop-color:#699ad7;stop-opacity:1"
offset="0"
id="stop5564" />
<stop
id="stop5566"
offset="0.24345198"
style="stop-color:#7eb1dd;stop-opacity:1" />
<stop
style="stop-color:#7ebae4;stop-opacity:1"
offset="1"
id="stop5568" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient5053">
<stop
style="stop-color:#415e9a;stop-opacity:1"
offset="0"
id="stop5055" />
<stop
id="stop5057"
offset="0.23168644"
style="stop-color:#4a6baf;stop-opacity:1" />
<stop
style="stop-color:#5277c3;stop-opacity:1"
offset="1"
id="stop5059" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5053"
id="linearGradient4330"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(864.69589,-1491.3405)"
x1="-584.19934"
y1="782.33563"
x2="-496.29703"
y2="937.71399" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient1"
gradientUnits="userSpaceOnUse"
gradientTransform="rotate(60,1285.574,-127.0267)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient2"
gradientUnits="userSpaceOnUse"
gradientTransform="rotate(-60,-541.80106,-249.3096)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5562"
id="linearGradient3"
gradientUnits="userSpaceOnUse"
gradientTransform="rotate(180,372.09351,-188.18095)"
x1="200.59668"
y1="351.41116"
x2="290.08701"
y2="506.18814" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5053"
id="linearGradient4"
gradientUnits="userSpaceOnUse"
gradientTransform="rotate(120,405.50413,279.20289)"
x1="-584.19934"
y1="782.33563"
x2="-496.29703"
y2="937.71399" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5053"
id="linearGradient5"
gradientUnits="userSpaceOnUse"
gradientTransform="rotate(-120,-455.57263,-219.8159)"
x1="-584.19934"
y1="782.33563"
x2="-496.29703"
y2="937.71399" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.70710678"
inkscape:cx="428.50671"
inkscape:cy="330.92597"
inkscape:document-units="px"
inkscape:current-layer="g2"
showgrid="false"
inkscape:window-width="2560"
inkscape:window-height="1404"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:snap-global="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:showpageshadow="2"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="gradient-logo"
style="display:inline;opacity:1"
transform="translate(-156.41121,933.30685)">
<g
id="g2"
transform="matrix(0.99994059,0,0,0.99994059,-0.06321798,33.188377)"
style="stroke-width:1.00006">
<g
id="g5"
transform="matrix(1.5923554,0,0,1.5923554,-241.25483,424.14882)">
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="use3439-6"
d="m 353.65459,-797.57947 -75.33983,131.03333 -28.53475,-48.37004 14.05181,-24.82625 33.4638,-57.69041 z"
style="fill:url(#linearGradient1);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.00018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="use3445-0"
d="m 363.03058,-628.3791 150.65887,0.012 -27.6223,48.89684 -28.03684,-0.0386 -66.69326,-0.1353 z"
style="fill:url(#linearGradient2);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.00018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="use3449-5"
d="m 505.28844,-721.12473 -75.88193,-131.23275 56.15706,-0.5268 14.54791,25.05223 33.22946,57.8257 z"
style="fill:url(#linearGradient3);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.00018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4330);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.00018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 309.54892,-710.38827 75.60056,130.67022 -56.15706,0.5268 -14.26654,-24.4897 -33.22946,-57.8256 z"
id="path4260-0"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient4);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.00018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 451.30201,-803.62004 -150.65887,-0.012 27.62231,-48.89684 28.03683,0.0386 66.69317,0.13525 z"
id="use4354-5"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
<path
style="color:#000000;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:url(#linearGradient5);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:3.00018;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 460.90516,-633.96606 75.33983,-131.03333 28.53475,48.37004 -14.05181,24.82625 -33.46371,57.69035 z"
id="use4362-2"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
</g>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 8.7 KiB

1
.gitignore vendored
View file

@ -1 +1,2 @@
/.direnv /.direnv
.qmlls.ini

21
TODO.md
View file

@ -1,21 +0,0 @@
## Todo
This is a list of all the things I still have to fix/achive in this
configuration:
- [ ] Fix apparmor
- [ ] Lanzaboote
- [ ] Remove all `with`
- [ ] better documentation
- [ ] Fix greetd
- [ ] ClamAV
- [ ]
- [ ]
- [ ]
- [ ]
- [ ]
- [ ]
- [ ]
- [ ]
- [ ]
- [ ]

34
default.nix Normal file
View file

@ -0,0 +1,34 @@
let
inherit (builtins) filter mapAttrs;
# https://github.com/andir/npins?tab=readme-ov-file#using-the-nixpkgs-fetchers
src = import ./npins;
pkgs = import src.nixpkgs { };
sources = mapAttrs (_: v: v { inherit pkgs; }) src;
inherit (pkgs) lib;
inherit (lib.filesystem) listFilesRecursive;
inherit (lib.strings) hasSuffix;
mkSystem =
hostname:
import (src.nixpkgs + "/nixos/lib/eval-config.nix") {
specialArgs = {
inherit sources;
self = ./.;
};
modules = [
# This is used to pre-emptively set the hostPlatform for nixpkgs.
# Also, we set the system hostname here.
{ networking.hostName = hostname; }
./hosts/common.nix
./hosts/${hostname}
]
++ ((listFilesRecursive ./modules) |> filter (hasSuffix ".mod.nix"));
};
in
{
temperance = mkSystem "temperance";
hermit = mkSystem "hermit";
tower = mkSystem "tower";
}

View file

@ -1,8 +0,0 @@
## Resizing images using imagemagick
I wanted to resize an image using imagemagick.
To do this I had to run:
`magick lain.png -crop 1072x1448^ -gravity center -quality 90 sca.png`
What does this do?

605
flake.lock generated
View file

@ -1,605 +0,0 @@
{
"nodes": {
"aquamarine": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1743265529,
"narHash": "sha256-QbjP15/2N+VJl0b5jxrrTc+VOt39aU4XrDvtP0Lz5ik=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "1d2dbd72c2bbaceab031c592d4810f744741d203",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "aquamarine",
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1741148495,
"narHash": "sha256-EV8KUaIZ2/CdBXlutXrHoZYbWPeB65p5kKZk71gvDRI=",
"owner": "ipetkov",
"repo": "crane",
"rev": "75390a36cd0c2cdd5f1aafd8a9f827d7107f2e53",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1733328505,
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1740872218,
"narHash": "sha256-ZaMw0pdoUKigLpv9HiNDH2Pjnosg7NBYMJlHTIsHEUo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "3876f6b87db82f33775b1ef5ea343986105db764",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"hyprland",
"pre-commit-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"gitignore_2": {
"inputs": {
"nixpkgs": [
"lanzaboote",
"pre-commit-hooks-nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"hyprcursor": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1742215578,
"narHash": "sha256-zfs71PXVVPEe56WEyNi2TJQPs0wabU4WAlq0XV7GcdE=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "2fd36421c21aa87e2fe3bee11067540ae612f719",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprcursor",
"type": "github"
}
},
"hyprgraphics": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1739049071,
"narHash": "sha256-3+7TpXMrbsUXSwgr5VAKAnmkzMb6JO+Rvc9XRb5NMg4=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "175c6b29b6ff82100539e7c4363a35a02c74dd73",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprgraphics",
"type": "github"
}
},
"hyprland": {
"inputs": {
"aquamarine": "aquamarine",
"hyprcursor": "hyprcursor",
"hyprgraphics": "hyprgraphics",
"hyprland-protocols": "hyprland-protocols",
"hyprland-qtutils": "hyprland-qtutils",
"hyprlang": "hyprlang",
"hyprutils": "hyprutils",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks": "pre-commit-hooks",
"systems": [
"systems"
],
"xdph": "xdph"
},
"locked": {
"lastModified": 1744214922,
"narHash": "sha256-136gjyhECXU5t9uFCpWsC4t50lUJnI4PJ9KZsNIaydg=",
"owner": "hyprwm",
"repo": "hyprland",
"rev": "0dc531c4a7d6849f2db61084497b3007e92f470b",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland",
"type": "github"
}
},
"hyprland-protocols": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1743714874,
"narHash": "sha256-yt8F7NhMFCFHUHy/lNjH/pjZyIDFNk52Q4tivQ31WFo=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "3a5c2bda1c1a4e55cc1330c782547695a93f05b2",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-protocols",
"type": "github"
}
},
"hyprland-qt-support": {
"inputs": {
"hyprlang": [
"hyprland",
"hyprland-qtutils",
"hyprlang"
],
"nixpkgs": [
"hyprland",
"hyprland-qtutils",
"nixpkgs"
],
"systems": [
"hyprland",
"hyprland-qtutils",
"systems"
]
},
"locked": {
"lastModified": 1737634706,
"narHash": "sha256-nGCibkfsXz7ARx5R+SnisRtMq21IQIhazp6viBU8I/A=",
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"rev": "8810df502cdee755993cb803eba7b23f189db795",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qt-support",
"type": "github"
}
},
"hyprland-qtutils": {
"inputs": {
"hyprland-qt-support": "hyprland-qt-support",
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprland-qtutils",
"hyprlang",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1739048983,
"narHash": "sha256-REhTcXq4qs3B3cCDtLlYDz0GZvmsBSh947Ub6pQWGTQ=",
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"rev": "3504a293c8f8db4127cb0f7cfc1a318ffb4316f8",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprland-qtutils",
"type": "github"
}
},
"hyprlang": {
"inputs": {
"hyprutils": [
"hyprland",
"hyprutils"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1741191527,
"narHash": "sha256-kM+11Nch47Xwfgtw2EpRitJuORy4miwoMuRi5tyMBDY=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "72df3861f1197e41b078faa3e38eedd60e00018d",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprlang",
"type": "github"
}
},
"hyprutils": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1743950287,
"narHash": "sha256-/6IAEWyb8gC/NKZElxiHChkouiUOrVYNq9YqG0Pzm4Y=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "f2dc70e448b994cef627a157ee340135bd68fbc6",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprutils",
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1739870480,
"narHash": "sha256-SiDN5BGxa/1hAsqhgJsS03C3t2QrLgBT8u+ENJ0Qzwc=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "206367a08dc5ac4ba7ad31bdca391d098082e64b",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1737831083,
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"lanzaboote": {
"inputs": {
"crane": "crane",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs"
],
"pre-commit-hooks-nix": "pre-commit-hooks-nix",
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1741442524,
"narHash": "sha256-tVcxLDLLho8dWcO81Xj/3/ANLdVs0bGyCPyKjp70JWk=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "d8099586d9a84308ffedac07880e7f07a0180ff4",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "lanzaboote",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1744098102,
"narHash": "sha256-tzCdyIJj9AjysC3OuKA+tMD/kDEDAF9mICPDU7ix0JA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c8cd81426f45942bb2906d5ed2fe21d2f19d95b7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"pre-commit-hooks": {
"inputs": {
"flake-compat": "flake-compat",
"gitignore": "gitignore",
"nixpkgs": [
"hyprland",
"nixpkgs"
]
},
"locked": {
"lastModified": 1742649964,
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
"lanzaboote",
"flake-compat"
],
"gitignore": "gitignore_2",
"nixpkgs": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1740915799,
"narHash": "sha256-JvQvtaphZNmeeV+IpHgNdiNePsIpHD5U/7QN5AeY44A=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "42b1ba089d2034d910566bf6b40830af6b8ec732",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"type": "github"
}
},
"root": {
"inputs": {
"hyprland": "hyprland",
"impermanence": "impermanence",
"lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs",
"systems": "systems"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [
"lanzaboote",
"nixpkgs"
]
},
"locked": {
"lastModified": 1741228283,
"narHash": "sha256-VzqI+k/eoijLQ5am6rDFDAtFAbw8nltXfLBC6SIEJAE=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "38e9826bc4296c9daf18bc1e6aa299f3e932a403",
"type": "github"
},
"original": {
"owner": "oxalica",
"repo": "rust-overlay",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": [
"hyprland",
"hyprland-protocols"
],
"hyprlang": [
"hyprland",
"hyprlang"
],
"hyprutils": [
"hyprland",
"hyprutils"
],
"hyprwayland-scanner": [
"hyprland",
"hyprwayland-scanner"
],
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1741934139,
"narHash": "sha256-ZhTcTH9FoeAtbPfWGrhkH7RjLJZ7GeF18nygLAMR+WE=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "150b0b6f52bb422a1b232a53698606fe0320dde0",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View file

@ -1,53 +1,43 @@
{ {
description = "My NixOS config flake"; description = "My NixOS config flake";
outputs = inputs: let
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
eachSystem = inputs.nixpkgs.lib.genAttrs (import inputs.systems);
pkgsFor = inputs.nixpkgs.legacyPackages;
in {
nixosConfigurations = import ./hosts inputs;
devShells.x86_64-linux.default = pkgs.callPackage ./shell.nix {}; # No inputs, take this flakers
formatter.x86_64-linux = pkgs.alejandra; outputs =
_:
let
sources = import ./npins;
nixpkgs =
(import sources.flake-compat {
src = sources.nixpkgs;
copySourceTreeToStore = false;
useBuiltinsFetchTree = true;
}).outputs;
inherit (nixpkgs) lib;
pkgsFor = nixpkgs.legacyPackages;
inputs = sources;
in
{
nixosConfigurations = import ./default.nix;
packages = eachSystem ( packages = lib.mapAttrs (_: pkgs: {
system: { inherit
inherit (import ./packages pkgsFor.${system}) fish helix kakoune; (import ./packages {
} inherit inputs pkgs sources;
); })
fish
kakoune
;
}) pkgsFor;
devShells = lib.mapAttrs (_: pkgs: {
default = pkgs.mkShellNoCC {
packages = [
(pkgs.callPackage (sources.npins + "/npins.nix") { })
];
env.NPINS_OVERRIDE_nichts = ".";
};
}) pkgsFor;
apps = eachSystem (system: let templates = import ./templates;
inherit (inputs.self.packages.${system}) fish helix;
in {
default = {
type = "app";
program = "${fish}/bin/fish";
};
helix = {
type = "app";
program = "${helix}/bin/hx";
};
});
};
inputs = {
# Unstable nixpkgs baby!
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
systems.url = "github:nix-systems/default-linux";
impermanence.url = "github:nix-community/impermanence";
# secure booting
lanzaboote = {
url = "github:nix-community/lanzaboote";
inputs.nixpkgs.follows = "nixpkgs";
}; };
hyprland = {
url = "github:hyprwm/hyprland";
inputs.nixpkgs.follows = "nixpkgs";
inputs.systems.follows = "systems";
};
};
} }

View file

@ -3,44 +3,48 @@
# since these also get installed to server, # since these also get installed to server,
# which should have a small attack surface. # which should have a small attack surface.
{ {
self, lib,
pkgs, pkgs,
... ...
}: let }:
inherit (self.packages.${pkgs.stdenv.system}) helix fish; let
in { inherit (lib.meta) hiPrioSet;
environment.systemPackages = builtins.attrValues { in
inherit {
(pkgs) environment.systemPackages =
cachix builtins.attrValues {
calc inherit (pkgs)
difftastic cachix
eza calc
gcc delta
git difftastic
httpie eza
inetutils gcc
jujutsu git
just httpie
lazygit inetutils
links2 jujutsu
linuxHeaders just
neofetch lazygit
microfetch linuxHeaders
mprocs neofetch
nmap microfetch
polkit mprocs
ripgrep nmap
smartmontools ripgrep
television smartmontools
trash-cli television
util-linux trash-cli
wireguard-tools util-linux
zip w3m
zoxide wireguard-tools
; zip
inherit helix fish; zoxide
}; ;
}
++ builtins.attrValues (hiPrioSet {
})
++ [ (lib.hiPrio pkgs.uutils-coreutils-noprefix) ];
# helix as the only editor, a reasonable choice. # helix as the only editor, a reasonable choice.
environment.sessionVariables.EDITOR = pkgs.lib.getExe' helix "hx"; environment.variables.EDITOR = "hx";
} }

View file

@ -1,7 +1,12 @@
inputs: let {
inherit (inputs) self; sources,
nixpkgs,
self,
...
}:
let
inherit (builtins) filter map toString; inherit (builtins) filter map toString;
inherit (inputs.nixpkgs) lib; inherit (nixpkgs) lib;
inherit (lib.attrsets) recursiveUpdate; inherit (lib.attrsets) recursiveUpdate;
inherit (lib.filesystem) listFilesRecursive; inherit (lib.filesystem) listFilesRecursive;
inherit (lib.lists) concatLists flatten singleton; inherit (lib.lists) concatLists flatten singleton;
@ -10,44 +15,41 @@ inputs: let
# NOTE: This was inspired by raf, and I find this # NOTE: This was inspired by raf, and I find this
# to be quite a sane way of managing all modules in my flake. # to be quite a sane way of managing all modules in my flake.
mkSystem = { mkSystem =
system, {
hostname, system,
... hostname,
} @ args: ...
}@args:
nixosSystem { nixosSystem {
specialArgs = specialArgs = recursiveUpdate {
recursiveUpdate inherit lib;
{ inputs = sources;
inherit lib; inherit self;
inherit inputs; } args.specialArgs or { };
inherit self;
}
(args.specialArgs or {});
modules = concatLists [ modules = concatLists [
# This is used to pre-emptively set the hostPlatform for nixpkgs. # This is used to pre-emptively set the hostPlatform for nixpkgs.
# Also, we set the system hostname here. # Also, we set the system hostname here.
[
# self.nixosModules.user
]
(singleton { (singleton {
networking.hostName = hostname; networking.hostName = hostname;
nixpkgs.hostPlatform = system; nixpkgs.hostPlatform = system;
}) })
(flatten ( (
concatLists [ concatLists [
# configuration for the host, passed as an argument.
(singleton ./${hostname}/default.nix) (singleton ./${hostname}/default.nix)
# common configuration, which all hosts share.
(singleton ./common.nix) (singleton ./common.nix)
( # Import all files called module.nix from my modules directory.
filter (hasSuffix "module.nix") ( (map toString (listFilesRecursive ../modules) |> filter (hasSuffix "module.nix"))
map toString (listFilesRecursive ../modules) (map toString (listFilesRecursive ../modules) |> filter (hasSuffix ".mod.nix"))
)
)
] ]
)) |> flatten
)
]; ];
}; };
in { in
{
temperance = mkSystem { temperance = mkSystem {
system = "x86_64-linux"; system = "x86_64-linux";
hostname = "temperance"; hostname = "temperance";
@ -61,4 +63,8 @@ in {
system = "aarch64-linux"; system = "aarch64-linux";
hostname = "tower"; hostname = "tower";
}; };
# world = mkSystem {
# system = "x86_64-linux";
# hostname = "world";
# };
} }

View file

@ -2,38 +2,49 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
# Time Zone # Time Zone
time.timeZone = "Europe/Zurich"; time.timeZone = "Europe/Zurich";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "uk"; console.keyMap = "uk";
security.polkit.enable = true;
programs.kdeconnect.enable = false;
programs.nix-ld.enable = false;
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
services = { services = {
fstrim.enable = lib.mkDefault true; fstrim.enable = lib.mkDefault true;
thermald.enable = true; thermald.enable = true;
auto-cpufreq.enable = true; };
printing.enable = true; programs = {
avahi = { nix-ld.enable = false;
gnupg.agent = {
enable = true; enable = true;
nssmdns4 = true; pinentryPackage = pkgs.pinentry-qt;
openFirewall = true;
}; };
}; };
modules = { modules = {
desktops.hyprland.enable = true; wms.wayland.enable = true;
# desktops.niri.enable = true;
theming = {
gtk.enable = true;
quickshell.enable = true;
};
system = { system = {
boot.systemd-boot.enable = true; systemType = "laptop";
isGraphical = true;
boot = {
systemd-boot.enable = true;
lanzaboote.enable = true;
};
impermanence.enable = false; impermanence.enable = false;
services = { services = {
owncloud.enable = true; owncloud.enable = true;
}; };
hardware = { hardware = {
nvidia.enable = true; nvidia.enable = false;
intel.enable = true; intel.enable = true;
bluetooth = { bluetooth = {
enable = true; enable = true;
@ -44,19 +55,15 @@
editors = { editors = {
helix.enable = true; helix.enable = true;
}; };
# nushell.enable = true;
# starship.enable = true;
terminals = {
foot.enable = true;
};
}; };
sound.enable = true; sound.enable = true;
}; };
services = { services = {
locate.enable = true; locate.enable = true;
kanata.enable = true; kanata.enable = true;
uwsm.enable = true; uwsm.enable = false;
greetd.enable = true; greetd.enable = false;
cups.enable = true;
media.mpd = { media.mpd = {
enable = true; enable = true;
@ -69,6 +76,7 @@
ssh.enable = true; ssh.enable = true;
btop.enable = true; btop.enable = true;
nh.enable = true; nh.enable = true;
thunar.enable = true;
}; };
}; };
system.stateVersion = "23.11"; system.stateVersion = "23.11";

View file

@ -1,6 +1,7 @@
{ {
config = { config = {
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/10318654-ed20-43f6-885d-35366a427581"; boot.initrd.luks.devices."cryptroot".device =
"/dev/disk/by-uuid/10318654-ed20-43f6-885d-35366a427581";
fileSystems = { fileSystems = {
"/boot" = { "/boot" = {
device = "/dev/disk/by-uuid/5D7D-FC52"; device = "/dev/disk/by-uuid/5D7D-FC52";
@ -10,17 +11,28 @@
"/" = { "/" = {
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e"; device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
fsType = "btrfs"; fsType = "btrfs";
options = ["compress=zstd" "noatime"]; options = [
"compress=zstd"
"noatime"
];
}; };
"/nix" = { "/nix" = {
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e"; device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=nix" "compress=zstd" "noatime"]; options = [
"subvol=nix"
"compress=zstd"
"noatime"
];
}; };
"/home" = { "/home" = {
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e"; device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=home" "compress=zstd" "noatime"]; options = [
"subvol=home"
"compress=zstd"
"noatime"
];
}; };
}; };
# swapDevices = [ # swapDevices = [

View file

@ -6,16 +6,53 @@
lib, lib,
modulesPath, modulesPath,
... ...
}: { }:
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; boot = {
boot.initrd.kernelModules = []; initrd = {
boot.kernelModules = ["kvm-intel"]; availableKernelModules = [
boot.kernelParams = ["mem_sleep_default=deep"]; "xhci_pci"
boot.extraModulePackages = []; "ahci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
blacklistedKernelModules = [
"nouveau"
"nvidia"
"nvidia_drm"
"nvidia_modeset"
];
kernelParams = [ "mem_sleep_default=deep" ];
extraModulePackages = [ ];
extraModprobeConfig = ''
blacklist nouveau
options nouveau modeset=0
'';
};
services.udev.extraRules = ''
# Remove NVIDIA USB xHCI Host Controller devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA USB Type-C UCSI devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA Audio devices, if present
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
# Remove NVIDIA VGA/3D controller devices
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
'';
# swapDevices = # swapDevices =
# [ { device = "/dev/disk/by-uuid/3518272e-1051-41e2-a7f0-f5c744e46789"; } # [ { device = "/dev/disk/by-uuid/3518272e-1051-41e2-a7f0-f5c744e46789"; }
@ -26,8 +63,6 @@
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp59s0.useDHCP = lib.mkDefault true;
# Enable firmware updates via `fwupdmgr`. # Enable firmware updates via `fwupdmgr`.
services.fwupd.enable = lib.mkDefault true; services.fwupd.enable = lib.mkDefault true;

View file

@ -1 +1 @@
_: {imports = [./monitors.nix];} _: { imports = [ ./monitors.nix ]; }

View file

@ -3,8 +3,10 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
xanmod_custom = callPackage ./xanmod.nix; xanmod_custom = callPackage ./xanmod.nix;
in { in
{
boot.kernelPackages = xanmod_custom; boot.kernelPackages = xanmod_custom;
} }

View file

@ -1,30 +1,26 @@
{ {pkgs, ...}: {
self,
pkgs,
...
}: {
environment.systemPackages = builtins.attrValues { environment.systemPackages = builtins.attrValues {
inherit inherit
(pkgs) (pkgs)
abook
aerc
aichat
alsa-utils alsa-utils
anki anki
asciinema asciinema
bacon
brave brave
cachix cachix
calc calc
# calibre cargo-info
cbonsai cbonsai
cinny-desktop cinny-desktop
cmus cmus
comma
difftastic difftastic
element dua
element-desktop
emacs30-pgtk
evince evince
eza eza
firefox fselect
fftw
gcc gcc
gh gh
grc grc
@ -35,67 +31,48 @@
httpie httpie
hyperfine hyperfine
imagemagick imagemagick
img2pdf
impala impala
imv imv
inetutils inetutils
jujutsu jujutsu
just just
jrnl
keepassxc keepassxc
lazygit lazygit
libtool libtool
librewolf librewolf
links2 links2
linuxHeaders linuxHeaders
moc mprocs
mpv mpv
ncmpcpp
neofetch
networkmanagerapplet networkmanagerapplet
nicotine-plus
nil
nitch nitch
obsidian obsidian
swww
microfetch microfetch
nmap nmap
pamixer pamixer
pavucontrol pwvucontrol
pdfarranger pdfarranger
pdfpc pdfpc
pfetch pfetch
pidgin
playerctl playerctl
polkit presenterm
pulsemixer pulsemixer
python3
ripgrep ripgrep
rmpc rmpc
rusty-man
signal-desktop signal-desktop
smartmontools smartmontools
telegram-desktop telegram-desktop
texliveFull
tldr
thunderbird thunderbird
tor-browser
trash-cli trash-cli
typst typst
util-linux util-linux
v4l-utils v4l-utils
vesktop
vlc vlc
vscodium wiki-tui
weechat
wireguard-tools wireguard-tools
xournalpp xournalpp
zapzap zathura
zip
zoxide
kakoune
kakoune-lsp
television
; ;
inherit (self.packages.${pkgs.stdenv.system}) helix;
}; };
} }

View file

@ -3,46 +3,31 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
inherit {
(
pkgs.callPackage ./kernel/xanmod.nix {
inherit lib;
inherit
(pkgs)
stdenv
fetchFromGitHub
kernelPatches
buildLinux
variant
;
}
)
xanmod_blox
;
in {
# Time Zone # Time Zone
time.timeZone = "Europe/Zurich"; time.timeZone = "Europe/Zurich";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us"; console.keyMap = "us";
security.polkit.enable = true;
# boot.kernelPackages = pkgs.linuxPackagesFor xanmod_blox; # boot.kernelPackages = pkgs.linuxPackagesFor xanmod_blox;
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; boot.kernelPackages = pkgs.linuxPackages_latest;
programs.nix-ld.enable = true; programs.nix-ld.enable = true;
services = { services = {
fstrim.enable = lib.mkDefault true; fstrim.enable = lib.mkDefault true;
udisks2.enable = true; udisks2.enable = true;
system76-scheduler = {
enable = true;
};
}; };
virtualisation.docker.enable = true;
meta = { meta = {
mainUser.gitSigningKey = ""; mainUser.gitSigningKey = "";
}; };
modules = { modules = {
system = { system = {
isGraphical = true;
impermanence.enable = true; impermanence.enable = true;
boot = { boot = {
systemd-boot.enable = true; systemd-boot.enable = true;
@ -64,10 +49,11 @@ in {
nvidia.enable = true; nvidia.enable = true;
}; };
}; };
desktops.hyprland.enable = true; desktops.niri.enable = true;
theming = { theming = {
gtk.enable = true; gtk.enable = true;
quickshell.enable = true;
}; };
services = { services = {
@ -79,8 +65,8 @@ in {
enable = true; enable = true;
musicDirectory = "/home/${config.modules.other.system.username}/cloud/media/Music"; musicDirectory = "/home/${config.modules.other.system.username}/cloud/media/Music";
}; };
uwsm.enable = true; # uwsm.enable = true;
greetd.enable = true; # greetd.enable = true;
}; };
other = { other = {
system = { system = {
@ -89,8 +75,8 @@ in {
}; };
programs = { programs = {
ssh.enable = true; ssh.enable = true;
btop.enable = true;
nh.enable = true; nh.enable = true;
thunar.enable = true;
}; };
}; };
} }

View file

@ -1,6 +1,7 @@
{ {
config = { config = {
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/96e8f3d6-8d2d-4e2d-abd9-3eb7f48fed02"; boot.initrd.luks.devices."cryptroot".device =
"/dev/disk/by-uuid/96e8f3d6-8d2d-4e2d-abd9-3eb7f48fed02";
fileSystems = { fileSystems = {
"/boot" = { "/boot" = {
device = "/dev/disk/by-uuid/B3AC-9050"; device = "/dev/disk/by-uuid/B3AC-9050";
@ -10,29 +11,49 @@
"/" = { "/" = {
device = "none"; device = "none";
fsType = "tmpfs"; fsType = "tmpfs";
options = ["defaults" "size=40%" "mode=755"]; options = [
"defaults"
"size=40%"
"mode=755"
];
}; };
"/nix" = { "/nix" = {
device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548"; device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=nix" "compress=zstd" "noatime"]; options = [
"subvol=nix"
"compress=zstd"
"noatime"
];
}; };
"/persist" = { "/persist" = {
device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548"; device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548";
neededForBoot = true; neededForBoot = true;
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=persist" "compress=zstd" "noatime"]; options = [
"subvol=persist"
"compress=zstd"
"noatime"
];
}; };
"/home" = { "/home" = {
device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548"; device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=home" "compress=zstd" "noatime"]; options = [
"subvol=home"
"compress=zstd"
"noatime"
];
}; };
"/swap" = { "/swap" = {
device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548"; device = "/dev/disk/by-uuid/f0569993-722e-4721-b0d9-8ac537a7a548";
fsType = "btrfs"; fsType = "btrfs";
options = ["subvol=swap" "compress=lzo" "noatime"]; options = [
"subvol=swap"
"compress=lzo"
"noatime"
];
}; };
}; };
swapDevices = [ swapDevices = [

View file

@ -3,13 +3,22 @@
lib, lib,
modulesPath, modulesPath,
... ...
}: { }:
imports = [(modulesPath + "/installer/scan/not-detected.nix")]; {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "sd_mod"]; boot = {
boot.initrd.kernelModules = []; initrd.availableKernelModules = [
boot.kernelModules = []; "xhci_pci"
boot.extraModulePackages = []; "ahci"
"nvme"
"usbhid"
"sd_mod"
];
initrd.kernelModules = [ ];
kernelModules = [ ];
extraModulePackages = [ ];
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
@ -18,7 +27,5 @@
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true; # networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1 +1 @@
_: {imports = [./monitors.nix];} _: { imports = [ ./monitors.nix ]; }

View file

@ -3,8 +3,10 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
xanmod_custom = callPackage ./xanmod.nix; xanmod_custom = callPackage ./xanmod.nix;
in { in
{
boot.kernelPackages = xanmod_custom; boot.kernelPackages = xanmod_custom;
} }

View file

@ -1,8 +1,10 @@
{lib, ...}: let { lib, ... }:
let
inherit (lib.kernel) no unset; inherit (lib.kernel) no unset;
inherit (lib.attrsets) mapAttrs; inherit (lib.attrsets) mapAttrs;
inherit (lib.modules) mkForce; inherit (lib.modules) mkForce;
in { in
{
boot.kernelPatches = [ boot.kernelPatches = [
{ {
name = "disable-unused-features"; name = "disable-unused-features";

View file

@ -4,7 +4,8 @@
buildLinux, buildLinux,
kernelPatches, kernelPatches,
... ...
}: let }:
let
pname = "linux-xanmod"; pname = "linux-xanmod";
version = "6.11.5"; version = "6.11.5";
vendorSuffix = "xanmod1"; vendorSuffix = "xanmod1";
@ -58,17 +59,17 @@
}; };
}) })
# 1:1 taken from raf's custom kernel, check out his config for this. # 1:1 taken from raf's custom kernel, check out his config for this.
.overrideAttrs (oa: { .overrideAttrs
prePatch = (oa: {
(oa.prePatch or "") prePatch = oa.prePatch or "" + ''
+ ''
# bragging rights # bragging rights
echo "Replacing localversion with custom suffix" echo "Replacing localversion with custom suffix"
substituteInPlace localversion \ substituteInPlace localversion \
--replace-fail "xanmod1" "blox" --replace-fail "xanmod1" "blox"
''; '';
}); });
in { in
{
inherit inherit
xanmod_blox xanmod_blox
; ;

View file

@ -1,24 +1,19 @@
{pkgs, ...}: let { pkgs, ... }:
in { {
environment.systemPackages = builtins.attrValues { environment.systemPackages = builtins.attrValues {
inherit inherit (pkgs)
(pkgs)
alsa-utils alsa-utils
anki anki
asciinema asciinema
beets beets
brave
bubblewrap bubblewrap
cachix cachix
calc calc
calibre calibre
cinny-desktop carapace
comma
digikam digikam
difftastic difftastic
dnsutils dnsutils
devenv
element-desktop
evince evince
gcc gcc
gh gh
@ -33,48 +28,40 @@ in {
impala impala
imv imv
inetutils inetutils
joplin-desktop inshellisense
jujutsu jujutsu
julia
just just
keepassxc keepassxc
lazygit lazygit
librewolf librewolf
libtool libtool
logiops logiops
mergiraf
mpv mpv
nautilus nautilus
nextcloud-client
nheko
nicotine-plus nicotine-plus
obsidian obsidian
swww oculante
pandoc pandoc
pavucontrol pavucontrol
pdfarranger pdfarranger
picard picard
polkit
pulsemixer pulsemixer
python3
pwvucontrol pwvucontrol
qbittorrent qbittorrent
r2modman
radare2 radare2
ripgrep ripgrep
rmpc rmpc
ruby_3_2
signal-desktop signal-desktop
strawberry starship
telegram-desktop telegram-desktop
texliveFull
thunderbird thunderbird
topiary
tor-browser tor-browser
trash-cli trash-cli
tutanota-desktop
typst typst
vscodium vesktop
walker vivid
wayneko
wireguard-tools wireguard-tools
xdg-utils xdg-utils
xournalpp xournalpp
@ -82,10 +69,13 @@ in {
zathura zathura
zotero zotero
zoxide zoxide
; curl
inherit git
(pkgs.wineWowPackages) wget
waylandFull unzip
zip
util-linux
zed-editor
; ;
}; };
} }

View file

@ -2,16 +2,15 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
# Time Zone # Time Zone
time.timeZone = "Europe/Vienna"; time.timeZone = "Europe/Vienna";
# Select internationalisation properties. # Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "uk"; console.keyMap = "uk";
security.polkit.enable = true;
# boot.kernelPackages = pkgs.linuxPackagesFor xanmod_blox; boot.kernelPackages = pkgs.linuxPackages_latest;
# boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
programs.nix-ld.enable = true; programs.nix-ld.enable = true;
users.users."cr".openssh.authorizedKeys.keys = [ users.users."cr".openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPiRe9OH/VtWFWyy5QbAVcN7CLxr4zUtRCwmxD6aeN6" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPiRe9OH/VtWFWyy5QbAVcN7CLxr4zUtRCwmxD6aeN6"
@ -29,8 +28,15 @@
locate.enable = true; locate.enable = true;
}; };
system = { system = {
boot.grub.enable = true; boot = {
services.forgejo.enable = true; grub.enable = true;
timeout = 30;
};
services = {
forgejo.enable = true;
grafana.enable = true;
prometheus.enable = true;
};
programs = { programs = {
editors = { editors = {
helix.enable = true; helix.enable = true;

View file

@ -8,7 +8,7 @@
"/" = { "/" = {
device = "/dev/disk/by-uuid/3a781f2e-290a-4609-9035-a93374459def"; device = "/dev/disk/by-uuid/3a781f2e-290a-4609-9035-a93374459def";
fsType = "ext4"; fsType = "ext4";
options = ["noatime"]; options = [ "noatime" ];
}; };
}; };
} }

View file

@ -2,17 +2,24 @@
lib, lib,
modulesPath, modulesPath,
... ...
}: { }:
{
imports = [ imports = [
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot.initrd.availableKernelModules = ["xhci_pci" "virtio_scsi" "sr_mod"]; boot = {
boot.initrd.kernelModules = []; initrd.availableKernelModules = [
boot.kernelModules = []; "xhci_pci"
boot.extraModulePackages = []; "virtio_scsi"
"sr_mod"
];
initrd.kernelModules = [ ];
kernelModules = [ ];
extraModulePackages = [ ];
};
swapDevices = []; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -1,7 +1,7 @@
{pkgs, ...}: { { pkgs, ... }:
{
environment.systemPackages = builtins.attrValues { environment.systemPackages = builtins.attrValues {
inherit inherit (pkgs)
(pkgs)
; ;
}; };
} }

View file

@ -0,0 +1,51 @@
{
lib,
pkgs,
...
}:
{
# Time Zone
time.timeZone = "Europe/Zurich";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "uk";
programs.nix-ld.enable = false;
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
services = {
fstrim.enable = lib.mkDefault true;
thermald.enable = true;
};
modules = {
desktops.hyprland.enable = true;
system = {
boot.systemd-boot.enable = true;
impermanence.enable = false;
hardware = {
intel.enable = true;
};
programs = {
editors = {
helix.enable = true;
};
terminals = {
foot.enable = true;
};
};
};
services = {
kanata.enable = true;
};
other = {
system.username = "cr";
};
programs = {
ssh.enable = true;
btop.enable = true;
nh.enable = true;
thunar.enable = true;
};
};
system.stateVersion = "23.11";
}

8
hosts/world/default.nix Normal file
View file

@ -0,0 +1,8 @@
_: {
imports = [
./configuration.nix
./programs.nix
./hardware-configuration.nix
./hardware
];
}

View file

@ -0,0 +1,45 @@
{
config = {
boot.initrd.luks.devices."cryptroot".device =
"/dev/disk/by-uuid/10318654-ed20-43f6-885d-35366a427581";
fileSystems = {
"/boot" = {
device = "/dev/disk/by-uuid/5D7D-FC52";
fsType = "vfat";
};
"/" = {
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
fsType = "btrfs";
options = [
"compress=zstd"
"noatime"
];
};
"/nix" = {
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
fsType = "btrfs";
options = [
"subvol=nix"
"compress=zstd"
"noatime"
];
};
"/home" = {
device = "/dev/disk/by-uuid/e353013b-8ac7-40ed-80f2-ddbea21b8d5e";
fsType = "btrfs";
options = [
"subvol=home"
"compress=zstd"
"noatime"
];
};
};
# swapDevices = [
# {
# device = "/swap/swapfile";
# size = (1024 * 16) + (1024 * 2);
# }
# ];
};
}

View file

@ -0,0 +1,48 @@
{
config,
lib,
modulesPath,
...
}:
{
imports = [
# (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd = {
availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
kernelModules = [ ];
};
kernelModules = [ "kvm-intel" ];
blacklistedKernelModules = [
"nouveau"
"nvidia"
"nvidia_drm"
"nvidia_modeset"
];
kernelParams = [ "mem_sleep_default=deep" ];
extraModulePackages = [ ];
extraModprobeConfig = ''
blacklist nouveau
options nouveau modeset=0
'';
};
# Earlier font setup
console.earlySetup = true;
# Enable firmware updates via `fwupdmgr`.
services.fwupd.enable = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1 @@
_: { imports = [ ./monitors.nix ]; }

View file

@ -0,0 +1,16 @@
_: {
modules.system.hardware.monitors = {
eDP-1 = {
resolution = {
x = 1920;
y = 1080;
};
scale = 1;
refreshRate = 60;
position = {
x = 1920;
y = 0;
};
};
};
}

41
hosts/world/programs.nix Normal file
View file

@ -0,0 +1,41 @@
{
self,
pkgs,
...
}:
{
environment.systemPackages = builtins.attrValues {
inherit (pkgs)
calc
comma
difftastic
evince
eza
gcc
gh
grc
gparted
git
httpie
imagemagick
img2pdf
imv
inetutils
jujutsu
just
lazygit
libtool
librewolf
linuxHeaders
mpv
networkmanagerapplet
microfetch
nmap
pfetch
ripgrep
smartmontools
util-linux
wireguard-tools
;
};
}

View file

@ -0,0 +1,481 @@
{
lib,
pkgs,
sources,
...
}:
let
inherit (lib.attrsets) mapAttrs' nameValuePair;
inherit (lib.meta) getExe;
helix = pkgs.helix.overrideAttrs (
finalAttrs: _: {
version = "25.07.2";
src = pkgs.fetchzip {
url = "https://github.com/bloxx12/helix/releases/download/${finalAttrs.version}/helix-${finalAttrs.version}-source.tar.xz";
hash = "sha256-ZNsQwFfPXe6oewajx1tl68W60kVo7q2SuvTgy/o1HKk=";
stripRoot = false;
};
doInstallCheck = false;
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
inherit (helix) src;
hash = "sha256-3poZSvIrkx8lguxxDeNfngW6+4hH8TV/LHcZx5W5aXg=";
};
}
);
toml = pkgs.formats.toml { };
languages =
let
inherit (lib.meta) getExe getExe';
nixfmt = pkgs.callPackage "${sources.nixfmt}/default.nix" { };
nil = pkgs.rustPlatform.buildRustPackage {
pname = "nil";
version = "unstable";
src = sources.nil;
cargoLock = {
lockFile = "${sources.nil}/Cargo.lock";
allowBuiltinFetchGit = false;
};
nativeBuildInputs = [ pkgs.nixVersions.latest ];
doInstallCheck = false;
meta.mainProgram = "nil";
};
new-deadnix = pkgs.deadnix.overrideAttrs (
_: _: {
version = "unstable-15-07-2025";
src = pkgs.fetchFromGitHub {
owner = "astro";
repo = "deadnix";
rev = "d75457b95d7cfa82fcd60970939f76fccfce19e5";
hash = "sha256-O/z2neAXL8JNkGosvxC+DyZnnJ8zYP9XHApxHVmlzfY=";
};
doInstallCheck = false;
cargoDeps = pkgs.rustPlatform.fetchCargoVendor {
inherit (new-deadnix) src;
hash = "sha256-O8yhqyPflOvQXAA19k1XpbrHysgV5VNWLBX0l5Q5GkM=";
};
meta.mainProgram = "nil";
}
);
in
{
language =
let
mark = lang: {
command = getExe pkgs.deno;
args = [
"fmt"
"-"
"--ext"
lang
];
};
in
[
{
name = "bash";
auto-format = true;
formatter = {
command = getExe pkgs.shfmt;
args = [
"-i"
"2"
];
};
}
{
name = "clojure";
injection-regex = "(clojure|clj|edn|boot|yuck)";
file-types = [
"clj"
"cljs"
"cljc"
"clje"
"cljr"
"cljx"
"edn"
"boot"
"yuck"
];
}
{
name = "cmake";
auto-format = true;
language-servers = [ "cmake-language-server" ];
formatter = {
command = getExe pkgs.cmake-format;
args = [ "-" ];
};
}
{
name = "javascript";
auto-format = true;
language-servers = [
"dprint"
"typescript-language-server"
];
}
{
name = "json";
formatter = mark "json";
}
{
name = "markdown";
auto-format = true;
formatter = mark "md";
language-servers = [ "taplo" ];
}
{
name = "nix";
language-servers = [
"nil"
"deadnix"
];
}
{
name = "qml";
language-servers = [ "qmlls" ];
}
{
name = "python";
auto-format = true;
language-servers = [
"basedpyright"
"ruff"
];
}
{
name = "typescript";
auto-format = true;
language-servers = [
"dprint"
"typescript-language-server"
];
}
{
name = "rust";
}
{
name = "c";
auto-format = true;
language-servers = [ "clangd" ];
}
{
name = "zig";
auto-format = true;
}
{
name = "c";
}
];
language-server = {
bash-language-server = {
command = getExe pkgs.bash-language-server;
args = [ "start" ];
};
rust-analyzer = {
command = getExe pkgs.rust-analyzer;
config.rust-analyzer = {
checkOnSave.command = "clippy";
procMacro.enable = true;
cargo = {
loadOutDirsFromCheck = true;
features = "all";
};
assist = {
preferSelf = true;
};
check = {
command = "clippy";
extraArgs = [
"--"
"-W"
"clippy::pedantic"
"-W"
"clippy::nursery"
"-W"
"clippy::perf"
];
};
lens = {
references = true;
methodReferences = true;
};
completion.autoimport.enable = true;
experimental.procAttrMacros = true;
interpret.tests = true;
};
};
clangd = {
command = "${pkgs.clang-tools}/bin/clangd";
clangd.fallbackFlags = [ "-std=c++2b" ];
};
cmake-language-server = {
command = getExe pkgs.cmake-language-server;
};
deno-lsp = {
command = getExe pkgs.deno;
args = [ "lsp" ];
environment.NO_COLOR = "1";
config.deno = {
enable = true;
lint = true;
unstable = true;
suggest = {
completeFunctionCalls = false;
imports = {
hosts."https://deno.land" = true;
};
};
inlayHints = {
enumMemberValues.enabled = true;
functionLikeReturnTypes.enabled = true;
parameterNames.enabled = "all";
parameterTypes.enabled = true;
propertyDeclarationTypes.enabled = true;
variableTypes.enabled = true;
};
};
};
dprint = {
command = getExe pkgs.dprint;
args = [ "lsp" ];
};
nil = {
command = getExe nil;
config.nil = {
formatting.command = [ "${getExe nixfmt}" ];
diagnostics = {
bindingEndHintMinLines = 10;
};
nix.flake = {
autoArchive = true;
autoEvalInputs = true;
nixpkgsInputName = "nixpkgs";
};
};
};
deadnix = {
command = getExe new-deadnix;
};
typescript-language-server = {
command = getExe pkgs.typescript-language-server;
args = [ "--stdio" ];
config = {
typescript-language-server.source = {
addMissingImports.ts = true;
fixAll.ts = true;
organizeImports.ts = true;
removeUnusedImports.ts = true;
sortImports.ts = true;
};
};
};
ruff = {
command = getExe pkgs.ruff;
args = [ "server" ];
};
qmlls.command = getExe' pkgs.kdePackages.qtdeclarative "qmlls";
basedpyright.command = "${pkgs.basedpyright}/bin/basedpyright-langserver";
vscode-css-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server";
args = [ "--stdio" ];
config = {
provideFormatter = true;
css.validate.enable = true;
scss.validate.enable = true;
};
};
zls = {
command = getExe pkgs.zls;
config = {
enable_build_on_save = true;
build_on_save_args = [
"check"
"-fincremental"
"--watch"
];
enable_autofix = false;
warn_style = true;
highlight_global_var_declarations = true;
};
};
};
};
themes = {
rose_pine_transparent = {
inherits = "rose_pine";
"ui.background" = { };
};
rose_pine_dawn_transparent = {
inherits = "rose_pine_dawn";
"ui.background" = { };
};
nightfox_transparent = {
inherits = "nightfox";
"ui.background" = { };
};
nord_transparent = {
inherits = "nord";
"ui.background" = { };
};
};
settings = {
theme = "gruvbox_dark_hard";
editor = {
cursorline = true;
color-modes = true;
true-color = true;
indent-guides.render = true;
lsp = {
enable = true;
auto-signature-help = true;
display-inlay-hints = true;
display-messages = true;
display-progress-messages = true;
snippets = true;
};
file-picker = {
hidden = false;
};
line-number = "relative";
completion-timeout = 5;
clipboard-provider = "wayland";
completion-trigger-len = 1;
completion-replace = true;
mouse = true;
bufferline = "multiple";
popup-border = "none";
soft-wrap.enable = true;
word-completion = {
enable = true;
trigger-length = 2;
};
cursor-shape = {
insert = "bar";
normal = "block";
select = "underline";
};
statusline = {
left = [
"spinner"
"diagnostics"
"file-name"
];
right = [
"file-base-name"
"position"
];
diagnostics = [
"warning"
"error"
];
workspace-diagnostics = [
"warning"
"error"
];
};
gutters.layout = [
"diff"
"diagnostics"
"line-numbers"
];
inline-diagnostics = {
cursor-line = "hint";
other-lines = "error";
};
};
keys = {
normal = {
space = {
g = [
":new"
":buffer-close!"
":redraw"
];
i = ":toggle lsp.display-inlay-hints";
};
esc = [
"collapse_selection"
"keep_primary_selection"
"normal_mode"
];
A-H = "goto_previous_buffer";
A-L = "goto_next_buffer";
A-w = ":buffer-close";
A-f = ":format";
A-r = ":reload";
A-x = "extend_to_line_bounds";
X = [
"extend_line_up"
"extend_to_line_bounds"
];
";" = "flip_selections";
"A-;" = "collapse_selection";
# Kakoune-like config
H = "extend_char_left";
J = "extend_line_down";
K = "extend_line_up";
L = "extend_char_right";
};
select = {
A-x = "extend_to_line_bounds";
X = [
"extend_line_up"
"extend_to_line_bounds"
];
g = {
e = "goto_file_end";
};
};
};
};
in
{
packages = builtins.attrValues {
inherit helix;
inherit (pkgs)
tinymist
taplo
kdlfmt
gopls
;
};
files = {
".config/helix/config.toml".source = toml.generate "helix-config.toml" settings;
".config/helix/languages.toml".source = toml.generate "helix-languages.toml" languages;
}
// mapAttrs' (
name: value:
nameValuePair ".config/helix/themes/${name}.toml" {
source = toml.generate "helix-theme-${name}.toml" value;
}
) themes;
}

36
modules/home/hjem.mod.nix Normal file
View file

@ -0,0 +1,36 @@
{
config,
lib,
pkgs,
sources,
...
}:
let
inherit (builtins) filter;
inherit (config.meta.mainUser) username;
inherit (lib.modules) mkForce;
inherit (lib.filesystem) listFilesRecursive;
inherit (lib.strings) hasSuffix;
in
{
imports = [ (sources.hjem + "/modules/nixos") ];
config = {
hjem = {
clobberByDefault = true;
linker = pkgs.smfh;
users.${username} = {
enable = true;
user = username;
directory = config.users.users.${username}.home;
clobberFiles = mkForce true;
};
extraModules = (listFilesRecursive ./.) |> filter (hasSuffix ".hjem.nix");
specialArgs = {
inherit sources;
};
};
};
}

View file

@ -0,0 +1 @@

View file

@ -0,0 +1,309 @@
#! /usr/bin/env nu
$env.config = {
bracketed_paste: true
buffer_editor: "hx"
datetime_format: {}
edit_mode: vi
error_style: fancy
float_precision: 2
footer_mode: 25
render_right_prompt_on_last_line: false
show_banner: false
use_ansi_coloring: true
use_kitty_protocol: true
shell_integration: {
osc2: false
osc7: true
osc8: true
osc9_9: false
osc133: true
osc633: true
reset_application_mode: true
}
}
$env.config.color_config = {
binary: '#b48ead'
block: '#81a1c1'
cell-path: '#e5e9f0'
closure: '#88c0d0'
custom: '#8fbcbb'
duration: '#ebcb8b'
float: '#bf616a'
glob: '#8fbcbb'
int: '#b48ead'
list: '#88c0d0'
nothing: '#bf616a'
range: '#ebcb8b'
record: '#88c0d0'
string: '#a3be8c'
bool: {|| if $in { '#88c0d0' } else { '#ebcb8b' } }
datetime: {|| (date now) - $in |
if $in < 1hr {
{ fg: '#bf616a' attr: 'b' }
} else if $in < 6hr {
'#bf616a'
} else if $in < 1day {
'#ebcb8b'
} else if $in < 3day {
'#a3be8c'
} else if $in < 1wk {
{ fg: '#a3be8c' attr: 'b' }
} else if $in < 6wk {
'#88c0d0'
} else if $in < 52wk {
'#81a1c1'
} else { 'dark_gray' }
}
filesize: {|e|
if $e == 0b {
'#e5e9f0'
} else if $e < 1mb {
'#88c0d0'
} else {{ fg: '#81a1c1' }}
}
shape_and: { fg: '#b48ead' attr: 'b' }
shape_binary: { fg: '#b48ead' attr: 'b' }
shape_block: { fg: '#81a1c1' attr: 'b' }
shape_bool: '#88c0d0'
shape_closure: { fg: '#88c0d0' attr: 'b' }
shape_custom: '#a3be8c'
shape_datetime: { fg: '#88c0d0' attr: 'b' }
shape_directory: '#88c0d0'
shape_external: '#88c0d0'
shape_external_resolved: '#88c0d0'
shape_externalarg: { fg: '#a3be8c' attr: 'b' }
shape_filepath: '#88c0d0'
shape_flag: { fg: '#81a1c1' attr: 'b' }
shape_float: { fg: '#bf616a' attr: 'b' }
shape_garbage: { fg: '#FFFFFF' bg: '#FF0000' attr: 'b' }
shape_glob_interpolation: { fg: '#88c0d0' attr: 'b' }
shape_globpattern: { fg: '#88c0d0' attr: 'b' }
shape_int: { fg: '#b48ead' attr: 'b' }
shape_internalcall: { fg: '#88c0d0' attr: 'b' }
shape_keyword: { fg: '#b48ead' attr: 'b' }
shape_list: { fg: '#88c0d0' attr: 'b' }
shape_literal: '#81a1c1'
shape_match_pattern: '#a3be8c'
shape_matching_brackets: { attr: 'u' }
shape_nothing: '#bf616a'
shape_operator: '#ebcb8b'
shape_or: { fg: '#b48ead' attr: 'b' }
shape_pipe: { fg: '#b48ead' attr: 'b' }
shape_range: { fg: '#ebcb8b' attr: 'b' }
shape_raw_string: { fg: '#8fbcbb' attr: 'b' }
shape_record: { fg: '#88c0d0' attr: 'b' }
shape_redirection: { fg: '#b48ead' attr: 'b' }
shape_signature: { fg: '#a3be8c' attr: 'b' }
shape_string: '#a3be8c'
shape_string_interpolation: { fg: '#88c0d0' attr: 'b' }
shape_table: { fg: '#81a1c1' attr: 'b' }
shape_vardecl: { fg: '#81a1c1' attr: 'u' }
shape_variable: '#b48ead'
foreground: '#e5e9f0'
background: '#2e3440'
cursor: '#e5e9f0'
empty: '#81a1c1'
header: { fg: '#a3be8c' attr: 'b' }
hints: '#4c566a'
leading_trailing_space_bg: { attr: 'n' }
row_index: { fg: '#a3be8c' attr: 'b' }
search_result: { fg: '#bf616a' bg: '#e5e9f0' }
separator: '#e5e9f0'
}
$env.config.ls = {
clickable_links: true
use_ls_colors: true
}
$env.config.rm.always_trash = true
$env.config.table = {
header_on_separator: true
footer_inheritance: true
index_mode: always
mode: compact
missing_value_symbol: kek
padding: {left: 1 right: 1}
show_empty: false
trim: {
methodology: wrapping
truncating_suffix: "..."
wrapping_try_keep_words: true
}
}
$env.config.explore = {
command_bar_text: {fg: "#C4C9C6"}
highlight: {fg: black bg: yellow}
status: {
error: {fg: white bg: red}
warn: {}
info: {}
}
status_bar_background: {fg: "#1D1F21" bg: "#C4C9C6"}
table: {
split_line: {fg: "#404040"}
selected_cell: {bg: light_blue}
selected_row: {}
selected_column: {}
}
}
$env.config.history = {
file_format: sqlite
isolation: false
max_size: 100_000
sync_on_enter: true
}
$env.config.cursor_shape = {
vi_insert: line
vi_normal: block
}
$env.config.hooks = {
command_not_found: {|| }
pre_execution: [
{
let prompt = commandline | str trim
if ($prompt | is-empty) {
return
}
print $"(ansi title)($prompt) — nu(char bel)"
}
]
pre_prompt: [
{||
if not ($env.PWD | path join .envrc | path exists) {
return
}
if (which direnv | is-empty) {
return
}
direnv export json | from json | default {} | load-env
$env.PATH = $env.PATH | split row (char env_sep)
}
]
}
let menus = [
{
name: completion_menu
only_buffer_difference: false
marker: $"(ansi yellow)╋ "
type: {
layout: ide
min_completion_width: 0
max_completion_width: 150
max_completion_height: 25
padding: 0
border: false
cursor_offset: 0
description_mode: "prefer_right"
min_description_width: 0
max_description_width: 50
max_description_height: 10
description_offset: 1
correct_cursor_pos: true
}
style: {
text: white
selected_text: white_reverse
description_text: yellow
match_text: { attr: u }
selected_match_text: { attr: ur }
}
}
{
name: history_menu
only_buffer_difference: true
marker: $env.PROMPT_INDICATOR
type: {
layout: list
page_size: 10
}
style: {
text: white
selected_text: white_reverse
}
}
]
$env.config.menus = $env.config.menus
| where name not-in ($menus | get name)
| append $menus
$env.config.keybindings ++= [
{
name: copy_commandline
modifier: alt
keycode: char_c
mode: [vi_normal vi_insert]
event: {
send: executehostcommand
cmd: 'commandline | nu-highlight | $"```ansi\n($in)\n```" | wl-copy $in'
}
}
]
let env_vars_file = '/tmp/nushell-env-vars'
if not ($env_vars_file | path exists) {
open /etc/profile
| lines
| select 11
| str trim
| split column ' ' del path
| get path.0
| open $in
| str trim
| lines
| parse 'export {name}="{value}"'
| transpose --header-row --as-record
| tee { load-env $in }
| to nuon
| save --force $env_vars_file
} else {
open $env_vars_file
| from nuon
| load-env $in
}
def switch [] {
nh os switch --file ($env.NH_FLAKE | path join default.nix) (open /etc/hostname | str trim)
}
def --env y [...args] {
let tmp = (mktemp -t "yazi-cwd.XXXXXX")
yazi ...$args --cwd-file $tmp
let cwd = (open $tmp)
if $cwd != "" and $cwd != $env.PWD {
cd $cwd
}
rm -fp $tmp
}
# fix sudo by prepending /run/wrappers/bin to the PATH.
$env.PATH = ($env.PATH | split row (char esep) | prepend '/run/wrappers/bin')
$env.PATH = ($env.PATH | split row (char esep) | prepend '/etc/profiles/per-user/cr/bin')
carapace _carapace nushell
| save -f ($nu.user-autoload-dirs | path join carapace.nu)
source ./prompt.nu
source ./zoxide.nu

View file

@ -0,0 +1,22 @@
{
pkgs,
...
}:
{
packages = with pkgs; [
nushell
inshellisense
carapace
];
environment.sessionVariables = {
CARAPACE_BRIDGES = "inshellisense,carapace,clap,bash";
CARAPACE_MATCH = 1;
};
files = {
".config/nushell/config.nu".source = ./config.nu;
".config/nushell/prompt.nu".source = ./prompt.nu;
".config/nushell/zoxide.nu".source = ./zoxide.nu;
};
}

View file

@ -0,0 +1,73 @@
use std null_device
export-env {
load-env {
PROMPT_COMMAND: {||
let exit_code = $env.LAST_EXIT_CODE
mut path_segment = $env.PWD | path basename
let exit_code_segment = if ($exit_code == 0) {
""
} else {
$"(ansi yellow)━┫(ansi red)($exit_code)(ansi yellow)┣━"
}
[$"(ansi yellow)┏" $exit_code_segment "━ " $path_segment "\n"] | str join
}
TRANSIENT_PROMPT_COMMAND: {||
let path_segment = $env.PWD | path basename
let exit_code_segment = if ($env.LAST_EXIT_CODE == 0) {
""
} else {
$"(ansi yellow)━┫(ansi red)($env.LAST_EXIT_CODE)(ansi yellow)┣━"
}
[$"(ansi yellow)━" $exit_code_segment "━ " $path_segment] | str join
}
PROMPT_INDICATOR_VI_INSERT: $"(ansi yellow)┃ "
PROMPT_INDICATOR_VI_NORMAL: $"(ansi yellow)┋ "
PROMPT_MULTILINE_INDICATOR: $"(ansi yellow)┃ "
TRANSIENT_PROMPT_INDICATOR_VI_INSERT: " "
TRANSIENT_PROMPT_INDICATOR_VI_NORMAL: " "
TRANSIENT_PROMPT_MULTILINE_INDICATOR: $"(ansi yellow)┃ "
config: (
$env.config? | default {} | merge {
render_right_prompt_on_last_line: true
}
)
PROMPT_COMMAND_RIGHT: {||
let jj_status = try {
jj --quiet --color always --ignore-working-copy log --no-graph --revisions @ --template '
separate(
" ",
if(empty, label("empty", "(empty)")),
coalesce(
surround(
"\"",
"\"",
if(
description.first_line().substr(0, 24).starts_with(description.first_line()),
description.first_line().substr(0, 24),
description.first_line().substr(0, 23) ++ "…"
)
),
label(if(empty, "empty"), description_placeholder)
),
bookmarks.join(", "),
change_id.shortest(),
commit_id.shortest(),
if(conflict, label("conflict", "(conflict)")),
if(divergent, label("divergent prefix", "(divergent)")),
if(hidden, label("hidden prefix", "(hidden)")),
)
' err> $null_device
} catch {
""
}
$jj_status
}
}
}

View file

@ -0,0 +1,54 @@
# Initialize hook to add new entries to the database.
export-env {
$env.config = (
$env.config?
| default {}
| upsert hooks { default {} }
| upsert hooks.env_change { default {} }
| upsert hooks.env_change.PWD { default [] }
)
let __zoxide_hooked = (
$env.config.hooks.env_change.PWD | any { try { get __zoxide_hook } catch { false } }
)
if not $__zoxide_hooked {
$env.config.hooks.env_change.PWD = ($env.config.hooks.env_change.PWD | append {
__zoxide_hook: true,
code: {|_, dir| zoxide add -- $dir}
})
}
}
def zoxide_completions [context: string] {
let parts = $context | split row " " | skip 1
{
options: {
sort: false,
completion_algorithm: substring,
case_sensitive: false,
},
completions: (^zoxide query --list --exclude $env.PWD -- ...$parts | lines | first 10)
}
}
# Jump to a directory using only keywords.
def --env --wrapped __zoxide_z [...rest: string@zoxide_completions] {
let path = match $rest {
[] => {'~'},
[ '-' ] => {'-'},
[ $arg ] if ($arg | path expand | path type) == 'dir' => {$arg}
_ => {
zoxide query --exclude $env.PWD -- ...$rest | str trim -r -c "\n"
}
}
cd $path
}
# Jump to a directory using interactive search.
def --env --wrapped __zoxide_zi [...rest:string] {
cd $'(zoxide query --interactive -- ...$rest | str trim -r -c "\n")'
}
# =============================================================================
alias z = __zoxide_z
alias zi = __zoxide_zi

View file

@ -0,0 +1,40 @@
{
lib,
pkgs,
...
}:
let
inherit (builtins) attrValues;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.strings) concatStringsSep;
btop-settings = {
truecolor = "True";
vim_keys = "True";
rounded_corners = "True";
update_ms = "100";
graph_symbol = "braille";
cpu_single_graph = "True";
clock_format = "%X";
use_fstab = "True";
io_mode = "True";
net_sync = "True";
net_iface = "enp4s0";
log_level = "ERROR";
color_theme = "gruvbox_dark";
};
btop-no-desktop-entry = pkgs.btop.overrideAttrs (prev: {
postInstall = ''
${prev.postInstall or ""}
rm -rf $out/share/applications/*.desktop
'';
});
in
{
packages = attrValues { inherit btop-no-desktop-entry; };
files.".config/btop/btop.conf".text =
concatStringsSep "\n" <| mapAttrsToList (name: value: "${name} = ${toString value}") btop-settings;
}

View file

@ -0,0 +1,69 @@
{
lib,
osConfig,
pkgs,
...
}:
let
inherit (lib.lists) elem;
inherit (lib.meta) getExe;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.strings) concatStringsSep;
inherit (osConfig.meta.mainUser.defaultShell) name package;
# Shell integration for ghostty only supports
# bash, fish and zsh for now.
shell-integration =
if
elem name [
"bash"
"fish"
"zsh"
]
then
name
else
"none";
ghostty-settings = {
font-size = 14;
font-family = "JetBrainsMonoNerdFont";
app-notifications = "no-clipboard-copy";
background-opacity = 1.0;
bold-is-bright = "true";
confirm-close-surface = "false";
cursor-style-blink = "false";
gtk-single-instance = "true";
gtk-tabs-location = "bottom";
gtk-wide-tabs = false;
mouse-hide-while-typing = "true";
resize-overlay-duration = "0s";
shell-integration-features = "cursor,sudo,no-title";
term = "xterm-256color";
theme = "GruvboxDarkHard";
window-decoration = "none";
window-padding-balance = true;
window-padding-x = 8;
window-padding-y = 8;
window-theme = "ghostty";
cursor-style = "block";
# Whether to automatically copy selected text to the clipboard. true will prefer to copy to the selection clipboard, otherwise it will copy to the system clipboard.
# The value clipboard will always copy text to the selection clipboard as well as the system clipboard.
copy-on-select = "clipboard";
inherit shell-integration;
command = getExe package;
};
in
{
packages = builtins.attrValues {
inherit (pkgs) ghostty;
};
files.".config/ghostty/config".text =
concatStringsSep "\n"
<| mapAttrsToList (name: value: "${name} = ${toString value}") ghostty-settings;
}

View file

@ -1,10 +1,18 @@
{lib, ...}: let { lib, ... }:
let
inherit (lib.options) mkOption; inherit (lib.options) mkOption;
inherit (lib.types) submodule int ints number attrsOf; inherit (lib.types)
in { submodule
int
ints
number
attrsOf
;
in
{
options.modules.system.hardware.monitors = mkOption { options.modules.system.hardware.monitors = mkOption {
description = "\n List of monitors to use\n "; description = "\n List of monitors to use\n ";
default = {}; default = { };
type = attrsOf (submodule { type = attrsOf (submodule {
options = { options = {
resolution = mkOption { resolution = mkOption {

View file

@ -1,7 +0,0 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption;
in {
options.modules.system.networking = {
nftbles.enable = mkEnableOption "Nftables firewall";
};
}

View file

@ -2,49 +2,26 @@
config, config,
lib, lib,
... ...
}: let }:
let
inherit (builtins) elemAt; inherit (builtins) elemAt;
inherit (lib.options) mkOption mkEnableOption; inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) enum listOf str nullOr bool package; inherit (lib.types)
in { enum
imports = [ listOf
# configuration options for nixos activation scripts str
# ./activation.nix nullOr
bool
# boot/impermanence mounts ;
# ./boot.nix inherit (lib.lists) elem;
# ./impermanence.nix
# network and overall hardening
./networking
# ./security.nix
# ./encryption.nix
# filesystems
# ./fs.nix
# package and program related options
# ./services
./programs
# monitor configuration
./monitors.nix
];
inherit (config.modules.system) systemType;
in
{
options.modules.system = { options.modules.system = {
mainUser = mkOption {
type = enum config.modules.system.users;
default = elemAt config.modules.system.users 0;
description = ''
The username of the main user for your system.
In case of a multiple systems, this will be the user with priority in ordered lists and enabled options.
'';
};
users = mkOption { users = mkOption {
type = listOf str; type = listOf str;
default = ["charlie"]; default = [ "cr" ];
description = "A list of users on the system."; description = "A list of users on the system.";
}; };
@ -57,10 +34,37 @@ in {
''; '';
}; };
systemType = mkOption {
type = nullOr (enum [
"desktop"
"laptop"
"server"
]);
default = null;
description = ''
The type of the current system. This is used to determine whether things like graphical
environments and power-saving programs should be installed or not.
'';
};
isGraphical = mkOption {
type = bool;
default = elem systemType [
"desktop"
"laptop"
];
description = ''
Whether the current system is a graphical system.
'';
};
yubikeySupport = { yubikeySupport = {
enable = mkEnableOption "yubikey support"; enable = mkEnableOption "yubikey support";
deviceType = mkOption { deviceType = mkOption {
type = nullOr (enum ["NFC5" "nano"]); type = nullOr (enum [
"NFC5"
"nano"
]);
default = null; default = null;
description = "A list of device models to enable Yubikey support for"; description = "A list of device models to enable Yubikey support for";
}; };
@ -72,6 +76,7 @@ in {
impermanence = { impermanence = {
enable = mkEnableOption "Enable Impermanence"; enable = mkEnableOption "Enable Impermanence";
}; };
video = { video = {
enable = mkEnableOption "video drivers and programs that require a graphical user interface"; enable = mkEnableOption "video drivers and programs that require a graphical user interface";
nvidia = mkEnableOption "Nvidia graphics drivers"; nvidia = mkEnableOption "Nvidia graphics drivers";
@ -89,18 +94,9 @@ in {
enable = mkEnableOption "printing"; enable = mkEnableOption "printing";
extraDrivers = mkOption { extraDrivers = mkOption {
type = listOf str; type = listOf str;
default = []; default = [ ];
description = "A list of extra drivers to enable for printing"; description = "A list of extra drivers to enable for printing";
}; };
"3d" = {
enable = mkEnableOption "3D printing suite";
extraPrograms = mkOption {
type = listOf package;
default = [];
description = "A list of extra programs to enable for 3D printing";
};
};
}; };
}; };
} }

View file

@ -1,7 +1,9 @@
{lib, ...}: let { lib, ... }:
let
inherit (lib.types) str enum; inherit (lib.types) str enum;
inherit (lib.options) mkEnableOption mkOption; inherit (lib.options) mkEnableOption mkOption;
in { in
{
options.modules.system.programs = { options.modules.system.programs = {
editors = { editors = {
helix.enable = mkEnableOption "Helix text editor"; helix.enable = mkEnableOption "Helix text editor";
@ -27,23 +29,42 @@ in {
}; };
default = { default = {
terminal = mkOption { terminal = mkOption {
type = enum ["foot" "kitty"]; type = enum [
"foot"
"kitty"
];
default = "foot"; default = "foot";
}; };
fileManager = mkOption { fileManager = mkOption {
type = enum ["thunar" "dolphin" "nemo"]; type = enum [
"thunar"
"dolphin"
"nemo"
];
default = "thunar"; default = "thunar";
}; };
browser = mkOption { browser = mkOption {
type = enum ["firefox" "librewolf" "chromium"]; type = enum [
"firefox"
"librewolf"
"chromium"
];
default = "firefox"; default = "firefox";
}; };
editor = mkOption { editor = mkOption {
type = enum ["neovim" "helix" "emacs"]; type = enum [
"neovim"
"helix"
"emacs"
];
default = "emacs"; default = "emacs";
}; };
launcher = mkOption { launcher = mkOption {
type = enum ["anyrun" "rofi" "wofi"]; type = enum [
"anyrun"
"rofi"
"wofi"
];
default = "anyrun"; default = "anyrun";
}; };
}; };

View file

@ -1,7 +1,8 @@
{pkgs, ...}: let { pkgs, ... }:
key = let
pkgs.writeText "signingkey" "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw=="; key = pkgs.writeText "signingkey" "ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw==";
in { in
{
programs.git = { programs.git = {
enable = true; enable = true;
lfs.enable = true; lfs.enable = true;

View file

@ -1,8 +0,0 @@
_: {
imports = [
./system.nix
./xdg.nix
./git.nix
./users.nix
];
}

View file

@ -1,7 +1,9 @@
{lib, ...}: let { lib, ... }:
let
inherit (lib.options) mkOption; inherit (lib.options) mkOption;
inherit (lib.types) str; inherit (lib.types) str;
in { in
{
options.modules.other.system = { options.modules.other.system = {
username = mkOption { username = mkOption {
description = "username for this system"; description = "username for this system";

View file

@ -2,19 +2,21 @@
config, config,
lib, lib,
pkgs, pkgs,
self, sources,
... ...
}: let }:
let
inherit (builtins) elemAt; inherit (builtins) elemAt;
inherit (lib.options) mkOption; inherit (lib.options) mkOption;
inherit (lib.types) listOf str; inherit (lib.types) listOf str package;
inherit (config.meta.mainUser) username; inherit (config.meta.mainUser) username;
in { in
{
imports = [ (sources.hjem + "/modules/nixos") ];
options.meta = { options.meta = {
users = mkOption { users = mkOption {
type = listOf str; type = listOf str;
default = ["cr"]; default = [ "cr" ];
description = '' description = ''
A list of users on a system. A list of users on a system.
''; '';
@ -27,17 +29,36 @@ in {
The main user for each system. This is the first element of the list of users by default. The main user for each system. This is the first element of the list of users by default.
''; '';
}; };
gitSigningKey = mkOption { gitSigningKey = mkOption {
type = str; type = str;
description = '' description = ''
The main user's git signing key, used to automatically sing git commits with this key The main user's git signing key, used to automatically sing git commits with this key
''; '';
default = '' default = ''
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw== ''; ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw==
'';
};
# TODO: clean this up and move it somewhere else.
defaultShell = {
name = mkOption {
type = str;
default = "nushell";
description = ''
The default shell of a user. This is not the main system shell, but the shell used in terminals.
'';
};
package = mkOption {
type = package;
default = pkgs.nushell;
};
}; };
}; };
}; };
config = { config = {
# environment.shells = [ pkgs.nushell ];
programs.zsh.enable = true;
users = { users = {
mutableUsers = true; mutableUsers = true;
users = { users = {
@ -52,10 +73,8 @@ in {
"nix" "nix"
"docker" "docker"
]; ];
shell = self.packages.${pkgs.stdenv.system}.fish; shell = pkgs.zsh;
# hashedPasswordFile = "/etc/passwords/cr";
}; };
# root.hashedPasswordFile = "/persist/passwords/root";
}; };
}; };
}; };

74
modules/other/xdg.mod.nix Normal file
View file

@ -0,0 +1,74 @@
{
config,
pkgs,
...
}:
let
inherit (config.meta.mainUser) username;
primary_browser = "Librewolf.desktop";
mail_client = "thunderbird.desktop";
file_manager = "nautilus.desktop";
media_player = "mpv.desktop";
image_viewer = "imv.desktop";
text_editor = "helix.desktop";
terminal = "foot.desktop";
pdf_viewer = "zathura.desktop";
in
{
environment = {
systemPackages = [ pkgs.xdg-utils ];
variables = {
TERMINAL = "${terminal}";
XDG_CACHE_HOME = "/home/${username}/.config";
};
};
xdg = {
autostart.enable = true;
menus.enable = true;
icons.enable = true;
mime = {
enable = true;
defaultApplications = {
"text/html" = [ primary_browser ];
"x-scheme-handler/http" = [ primary_browser ];
"x-scheme-handler/https" = [ primary_browser ];
"x-scheme-handler/about" = [ primary_browser ];
"x-scheme-handler/unknown" = [ primary_browser ];
"x-scheme-handler/mailto" = [ mail_client ];
"message/rfc822" = [ mail_client ];
"x-scheme-handler/mid" = [ mail_client ];
"inode/directory" = [ file_manager ];
"audio/mp3" = [ media_player ];
"audio/ogg" = [ media_player ];
"audio/mpeg" = [ media_player ];
"audio/aac" = [ media_player ];
"audio/opus" = [ media_player ];
"audio/wav" = [ media_player ];
"audio/webm" = [ media_player ];
"audio/3gpp" = [ media_player ];
"audio/3gpp2" = [ media_player ];
"video/mp4" = [ media_player ];
"video/x-msvideo" = [ media_player ];
"video/mpeg" = [ media_player ];
"video/ogg" = [ media_player ];
"video/mp2t" = [ media_player ];
"video/webm" = [ media_player ];
"video/3gpp" = [ media_player ];
"video/3gpp2" = [ media_player ];
"image/png" = [ image_viewer ];
"image/jpeg" = [ image_viewer ];
"image/gif" = [ image_viewer ];
"image/avif" = [ image_viewer ];
"image/bmp" = [ image_viewer ];
"image/vnd.microsoft.icon" = [ image_viewer ];
"image/svg+xml" = [ image_viewer ];
"image/tiff" = [ image_viewer ];
"image/webp" = [ image_viewer ];
"text/plain" = [ text_editor ];
"application/pdf" = [ pdf_viewer ];
};
};
};
}

View file

@ -1,72 +0,0 @@
{
config,
pkgs,
...
}: let
inherit (config.meta.mainUser) username;
primary_browser = "Librewolf.desktop";
mail_client = "thunderbird.desktop";
file_manager = "nautilus.desktop";
media_player = "mpv.desktop";
image_viewer = "imv.desktop";
text_editor = "helix.desktop";
terminal = "foot.desktop";
pdf_viewer = "sioyek.desktop";
in {
environment = {
systemPackages = [pkgs.xdg-utils];
sessionVariables = {
TERMINAL = "${terminal}";
XDG_CACHE_HOME = "/home/${username}/.config";
};
};
xdg = {
autostart.enable = true;
menus.enable = true;
icons.enable = true;
mime = {
enable = true;
defaultApplications = {
"text/html" = [primary_browser];
"x-scheme-handler/http" = [primary_browser];
"x-scheme-handler/https" = [primary_browser];
"x-scheme-handler/about" = [primary_browser];
"x-scheme-handler/unknown" = [primary_browser];
"x-scheme-handler/mailto" = [mail_client];
"message/rfc822" = [mail_client];
"x-scheme-handler/mid" = [mail_client];
"inode/directory" = [file_manager];
"audio/mp3" = [media_player];
"audio/ogg" = [media_player];
"audio/mpeg" = [media_player];
"audio/aac" = [media_player];
"audio/opus" = [media_player];
"audio/wav" = [media_player];
"audio/webm" = [media_player];
"audio/3gpp" = [media_player];
"audio/3gpp2" = [media_player];
"video/mp4" = [media_player];
"video/x-msvideo" = [media_player];
"video/mpeg" = [media_player];
"video/ogg" = [media_player];
"video/mp2t" = [media_player];
"video/webm" = [media_player];
"video/3gpp" = [media_player];
"video/3gpp2" = [media_player];
"image/png" = [image_viewer];
"image/jpeg" = [image_viewer];
"image/gif" = [image_viewer];
"image/avif" = [image_viewer];
"image/bmp" = [image_viewer];
"image/vnd.microsoft.icon" = [image_viewer];
"image/svg+xml" = [image_viewer];
"image/tiff" = [image_viewer];
"image/webp" = [image_viewer];
"text/plain" = [text_editor];
"application/pdf" = [pdf_viewer];
};
};
};
}

View file

@ -1,8 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
in {
}

View file

@ -1,22 +0,0 @@
{pkgs, ...}: {
imports = [
./hardware.nix
./wayland.nix
# ./media.nix
];
# These are some standard packages I want to have installed on every system, regardless of type or use case.
environment.systemPackages = builtins.attrValues {
inherit
(pkgs)
calc # Calculator device
coreutils-full # All of the GNU coreutils
curl # I sometimes need to curl stuff
git # take a guess
inetutils # internet stuff I need/want on every system.
wget
unzip # zipping and unzipping stuff
zip
util-linux
;
};
}

View file

@ -0,0 +1,109 @@
{
lib,
pkgs,
sources,
...
}:
let
nixfmt = pkgs.callPackage "${sources.nixfmt}/default.nix" { };
comma = pkgs.callPackage (
_:
pkgs.rustPlatform.buildRustPackage {
pname = "comma";
version = "unstable";
src = sources.comma;
cargoLock = {
allowBuiltinFetchGit = true;
lockFile = "${sources.comma}/Cargo.lock";
};
nativeBuildInputs = [ pkgs.makeBinaryWrapper ];
doInstallCheck = false;
postInstall = ''
wrapProgram $out/bin/comma \
--prefix PATH : ${
lib.makeBinPath [
pkgs.fzy
pkgs.nix-index-unwrapped
]
}
ln -s $out/bin/comma $out/bin/,
'';
}
) { };
in
{
environment.systemPackages =
with pkgs;
[
universal-android-debloater
emacs-pgtk
# better cd
zoxide
ouch
# pipe viewer
pv
# hex editor
bvi
#better ls
eza
atuin
# better cat
bat
# clipboard
# yazi
serpl
diff-so-fancy
tig
direnv
sesh
mprocs
curlie
entr
procs
sd
# mult
glow
# dua-cli
dust
iamb
kondo
# better grep
ripgrep
# IP stuff
dig
# simply the best fetch tool out there
microfetch
fzf
element
difftastic
hexyl
yazi
gnumake
asciinema
inetutils
tokei
starship
wget
cpufetch
watchman
# yt-dlp # borked check phase
tealdeer
hyperfine
imagemagick
ffmpeg-full
# catimg
timg
nmap
fd
jq
rsync
figlet
unzip
zip
]
++ [
nixfmt
comma
];
}

View file

@ -1,15 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
# These are packages I only need in wayland environments, nowhere else.
environment.systemPackages = builtins.attrValues {
inherit
(pkgs)
wl-clipboard
grimblast
;
};
}

View file

@ -0,0 +1,139 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib.meta) getExe;
toml = pkgs.formats.toml { };
jj-config = toml.generate "config.toml" {
user = {
name = "Bloxx12";
email = "charlie@charlieroot.dev";
};
ui = {
pager = [
"${getExe pkgs.bat}"
"--plain"
];
default-command = "log";
movement.edit = true;
diff.tool = [
"${getExe pkgs.difftastic}"
"--color"
"always"
"$left"
"$right"
];
};
# FIXME: do this with agenix
# "--scope" = [
# {
# "--when.repositories" = ["~/repos/projects/uni"];
# user = {
# # TODO
# name = "";
# email = "";
# };
# }
# {
# "--when.repositories" = ["~/repos/projects/uni/"];
# user = {
# # TODO
# name = "";
# email = "";
# };
# }
# ];
git.push-new-bookmarks = true;
signing = {
behaviour = "own";
backend = "ssh";
key = [
"ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw=="
];
};
aliases = {
c = [ "commit" ];
ci = [
"commit"
"--interactive"
];
e = [ "edit" ];
# "new bookmark"
nb = [
"bookmark"
"create"
"-r @-"
];
pull = [
"git"
"fetch"
];
push = [
"git"
"push"
"--allow-new"
];
r = [ "rebase" ];
s = [ "squash" ];
si = [
"squash"
"--interactive"
];
tug = [
"bookmark"
"move"
"--from"
"closest_bookmark(@-)"
"--to"
"@-"
];
};
revset-aliases = {
"closest_bookmark(to)" = "heads(::to & bookmarks())";
};
templates = {
draft_commit_description = ''
concat(
coalesce(description, "\n"),
surround(
"\nJJ: This commit contains the following changes:\n", "",
indent("JJ: ", diff.stat(72)),
),
"\nJJ: ignore-rest\n",
diff.git(),
)
'';
};
template-aliases = {
"format_short_id(id)" = "id.shortest()";
};
};
jj-wrapped = pkgs.symlinkJoin {
name = "jj-wrapped";
paths = [ pkgs.jj ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/mako --add-flags "\
--config ${jj-config}
'';
};
in
{
# environment.systemPackages = [jj-wrapped];
}

View file

@ -1,6 +0,0 @@
_: {
imports = [
./nh.nix
# ./beets.nix
];
}

View file

@ -1,21 +1,30 @@
{ {
config, config,
lib, lib,
pkgs,
sources,
... ...
}: let }:
let
cfg = config.modules.programs.nh; cfg = config.modules.programs.nh;
inherit (config.modules.other.system) username; inherit (config.modules.other.system) username;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
in { nh = (pkgs.callPackage "${sources.nh}/package.nix" { }).overrideAttrs (_: {
doInstallCheck = false;
});
in
{
options.modules.programs.nh.enable = mkEnableOption "nh"; options.modules.programs.nh.enable = mkEnableOption "nh";
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.nh = { programs.nh = {
enable = true; enable = true;
package = nh;
clean.enable = true; clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3"; clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/${username}/repos/projects/nichts"; flake = "/home/${username}/repos/projects/nichts/main";
}; };
}; };
} }

View file

@ -0,0 +1,7 @@
_: {
programs.zoxide = {
enable = true;
enableFishIntegration = true;
enableBashIntegration = true;
};
}

View file

@ -0,0 +1,35 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (config.modules.system) isGraphical;
inherit (lib.modules) mkIf;
bitwarden-desktop-wrapped = pkgs.symlinkJoin {
name = "bitwarden-desktop-wrapped";
paths = [ pkgs.bitwarden-desktop ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/bitwarden --set \
BITWARDEN_SSH_AUTH_SOCK /run/user/1000/ssh-agent.sock
'';
};
in
{
config = mkIf isGraphical {
environment = {
systemPackages = lib.attrValues {
inherit (pkgs)
bitwarden-cli
;
inherit bitwarden-desktop-wrapped;
};
# Set the ssh socket globally. This alows all applications and shells to use
# the ssh-agent.
variables."SSH_AUTH_SOCK" = "/run/user/1000/ssh-agent.sock";
};
};
}

View file

@ -0,0 +1,245 @@
{
lib,
pkgs,
...
}:
let
inherit (lib.lists) map;
inherit (lib.strings) concatStringsSep;
# https://peter.sh/experiments/chromium-command-line-switches/
flags = concatStringsSep " " [
"--no-first-run"
"--enable-gpu-rasterization"
"--force-dark-mode"
"--enable-smooth-scrolling"
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
"--user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.3'"
# https://source.chromium.org/chromium/chromium/src/+/main:headless/app/headless_shell_switches.cc;drc=3556fbff47c18193f4a39d2496596e89b8307a15;l=47-55
"--password-store=gnome-keyring"
];
brave-wrapped = pkgs.symlinkJoin {
name = "brave";
paths = [
pkgs.brave
];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/brave --append-flags "${flags}"
'';
};
in
{
environment.systemPackages = [
brave-wrapped
];
programs.chromium = {
enable = true;
# This sets a bunch of flags to make Brave usable.
# This was made possible through several similar projects,
# which facilitated this process a lot:
# https://gist.github.com/yashgorana/869542b66d7188729716379abe7464e0
# https://github.com/yashgorana/chrome-debloat
# https://chromeenterprise.google/intl/en_ca/policies
extraOpts = {
BraveRewardsDisabled = true;
BraveWalletDisabled = true;
# Setting the policy to False prevents Google Chrome from showing
# product promotional content.
PromotionsEnabled = false;
TorDisabled = true;
BraveVPNDisabled = true;
BraveAIChatEnabled = false;
SyncDisabled = true;
# Setting the policy to False stops Google Chrome from ever checking if
# it's the default and turns user controls off for this option.
DefaultBrowserSettingEnabled = false;
# In background mode, a Google Chrome process is started on OS sign-in and keeps
# running when the last browser window is closed, allowing background apps and
# the browsing session to remain active.
BackgroundModeEnabled = false;
# By default the browser will show media recommendations that are personalized to the user.
# Setting this policy to Disabled will result in these recommendations being hidden from the user.
MediaRecommendationsEnabled = false;
# This policy controls the availability of the shopping list feature.
# If enabled, users will be presented with UI to track the price of
# the product displayed on the current page. The tracked product will
# be shown in the bookmarks side panel. If this policy is set to Enabled
# or not set, the shopping list feature will be available to users.
# If this policy is set to Disabled, the shopping list feature will be unavailable.
ShoppingListEnabled = false;
BraveSyncUrl = "";
PrivacySandboxFingerprintingProtectionEnabled = true;
PrivacySandboxIpProtectionEnabled = true;
DefaultSearchProviderEnabled = true;
DefaultSearchProviderName = "Kagi";
DefaultSearchProviderSearchURL = "https://kagi.com/search?q={searchTerms}";
DefaultSearchProviderNewTabURL = "https://kagi.com";
SearchSuggestEnabled = true;
DefaultSearchProviderSuggestURL = "https://kagi.com/api/autosuggest?q={searchTerms}";
# Prevents webpage elements that aren't from the domain
# that's in the browser's address bar from setting cookies.
BlockThirdPartyCookies = true;
DnsOverHttpsMode = "automatic";
MetricsReportingEnabled = false;
SafeBrowsingExtendedReportingEnabled = false;
# Setting the policy to Enabled means URL-keyed anonymized data collection,
# which sends URLs of pages the user visits to Google to make searches and
# browsing better, is always active.
# Setting the policy to Disabled results in no URL-keyed anonymized data collection.
UrlKeyedAnonymizedDataCollectionEnabled = false;
# Google Chrome in-product surveys collect user feedback for the browser.
# Survey responses are not associated with user accounts. When this policy
# is Enabled or not set, in-product surveys may be shown to users.
# When this policy is Disabled, in-product surveys are not shown to users.
FeedbackSurveysEnabled = false;
PasswordManagerEnabled = false;
# Disable sharing user credentials with other users
PasswordSharingEnabled = false;
# Disable leak detection for entered credentials
PasswordLeakDetectionEnabled = false;
AutofillAddressEnabled = false;
AutofillCreditCardEnabled = false;
ParcelTrackingEnabled = false;
# Setting the policy to 2 denies sites tracking the users' physical locationing.
DefaultGeolocationSetting = 2;
DefaultNotificationsSetting = 2;
# Setting the policy to BlockLocalFonts (value 2) automatically denies the local fonts
# permission to sites by default. This will limit the ability of sites to see
# information about local fonts.
DefaultLocalFontsSetting = 2;
# Setting the policy to 1 lets websites access and use sensors such as motion and light.
# Setting the policy to 2 denies access to sensors.
DefaultSensorsSetting = 2;
# Setting the policy to 3 lets websites ask for access to serial ports.
# Setting the policy to 2 denies access to serial ports.
DefaultSerialGuardSetting = 2;
# This policy allows to control the Related Website Sets feature enablement.
# This policy overrides the FirstPartySetsEnabled policy.
# When this policy is set to False, the Related Website Sets feature is disabled.
RelatedWebsiteSetsEnabled = false;
# This policy controls the sign-in behavior of the browser.
# It allows you to specify if the user can sign in to Google Chrome with
# their account and use account related services like Google Chrome Sync.
BrowserSignin = 0;
QuicAllowed = true;
# Setting the policy to Enabled turns the internal PDF viewer off in Google Chrome,
# treats PDF files as a download, and lets users open PDFs with the default application.
AlwaysOpenPdfExternally = true;
SpellcheckEnabled = false;
EnableDoNotTrack = true;
# If this policy is set to Disabled, Google Chrome will not allow guest profiles to be started.
# Guest logins are Google Chrome profiles where all windows are in incognito mode.
BrowserGuestModeEnabled = false;
# This policy controls which software stack is used to communicate with the DNS server:
# the Operating System DNS client, or Google Chrome's built-in DNS client. This policy
# does not affect which DNS servers are used: if, for example, the operating system is
# configured to use an enterprise DNS server, that same server would be used by the
# built-in DNS client. It also does not control if DNS-over-HTTPS is used; Google Chrome
# will always use the built-in resolver for DNS-over-HTTPS requests.
# If this policy is set to Disabled, the built-in DNS client will only be used when DNS-over-HTTPS is in use.
BuiltinDnsClientEnabled = false;
# Control if Manifest v2 extensions can be used by browser.
ExtensionManifestV2Availability = 2;
# Setting the policy to True means Google Chrome uses alternate error
# pages built into (such as "page not found"). Setting the policy to
# False means Google Chrome never uses alternate error pages.
AlternateErrorPagesEnabled = false;
"3rdparty" = {
extensions = {
# Ublock Origin
cjpalhdlnbpafiamejdnhcphjbkeiagm = {
toOverwrite = {
filterLists = [
# Default UBlock Origin filter lists
"user-filters"
"ublock-filters"
"ublock-badware"
"ublock-privacy"
"ublock-abuse"
"ublock-unbreak"
"easylist"
"easyprivacy"
"urlhaus-1"
"plowe-0"
"https://raw.githubusercontent.com/yokoffing/filterlists/refs/heads/main/privacy_essentials.txt"
"https://raw.githubusercontent.com/hagezi/dns-blocklists/refs/heads/main/adblock/pro.plus.mini.txt"
"https://raw.githubusercontent.com/DandelionSprout/adfilt/refs/heads/master/LegitimateURLShortener.txt"
"https://raw.githubusercontent.com/yokoffing/filterlists/refs/heads/main/annoyance_list.txt"
"https://raw.githubusercontent.com/DandelionSprout/adfilt/refs/heads/master/BrowseWebsitesWithoutLoggingIn.txt"
];
};
};
};
};
};
extensions = [
# NoScript
"doojmbjmlfjjnbmnoijecmcbfeoakpjm"
# KeePassXC-Browser
# "oboonakemofpalcgghocfoadofidjkkk"
# Bitwarden Password Manager
"nngceckbapebfimnlniiiahkandclblb"
# Catppuccin Mocha
"bkkmolkhemgaeaeggcmfbghljjjoofoh"
# Dark Reader
"eimadpbcbfnmbkopoojfekhnkhdbieeh"
# UBlock Origin
"cjpalhdlnbpafiamejdnhcphjbkeiagm"
# I still don't care about cookies
"edibdbjcniadpccecjdfdjjppcpchdlm"
# Sponsorblock
"mnjggcdmjocbbbhaepdhchncahnbgone"
# Decentraleyes
"ldpochfccmkkmhdbclfhpagapcfdljkj"
# Humble new tab page
"mfgdmpfihlmdekaclngibpjhdebndhdj"
];
};
networking.extraHosts =
concatStringsSep "\n"
<| map (addr: "localhost ${addr}") [
"rewards.brave.com"
"api.rewards.brave.com"
"grant.rewards.brave.com"
"variations.brave.com"
"laptop-updates.brave.com"
"static.brave.com"
"static1.brave.com"
"crlsets.brave.com"
"ads.brave.com"
"ads-admin.brave.com"
"ads-help.brave.com"
"referrals.brave.com"
"analytics.brave.com"
"search.anonymous.ads.brave.com"
"p3a.brave.com"
"variations.brave.com"
"star-randsrv.bsg.brave.com"
"usage-ping.brave.com"
];
}

View file

@ -0,0 +1,19 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib.modules) mkIf;
inherit (config.modules.system) isGraphical;
in
{
config = mkIf isGraphical {
environment.systemPackages = with pkgs; [
kdePackages.dolphin
kdePackages.kio-fuse # to mount remote filesystems via FUSE
kdePackages.kio-extras # extra protocols support (sftp, fish and more)
];
};
}

View file

@ -0,0 +1,143 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib.modules) mkIf;
inherit (config.meta.mainUser) username;
cfg = config.modules.system.programs.terminals.foot;
theme-colors = config.modules.style.colorScheme.colors;
foot-config = pkgs.writeText "foot.ini" (
lib.generators.toINI { } {
main = {
term = "xterm-256color";
app-id = "foot";
title = "foot";
locked-title = "no";
font = "JetBrainsMono Nerd Font Mono:size=14";
font-bold = "JetBrainsMono Nerd Font Mono:size=14:style=Bold";
line-height = 20;
letter-spacing = 0;
horizontal-letter-offset = 0;
vertical-letter-offset = 0;
box-drawings-uses-font-glyphs = "no";
dpi-aware = "no";
bold-text-in-bright = "no";
word-delimiters = ",`|:\"'()[]{}<>";
selection-target = "primary";
initial-window-size-chars = "104x36";
initial-window-mode = "windowed";
pad = "8x8 center";
resize-delay-ms = 100;
};
desktop-notifications.command = "${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
bell = {
urgent = "yes";
notify = "yes";
command = "${pkgs.libnotify}/bin/notify-send bell";
command-focused = "no";
};
scrollback = {
lines = 10000;
multiplier = 10.0;
indicator-position = "relative";
indicator-format = "line";
};
url = {
launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}";
label-letters = "sadfjklewcmpgh";
osc8-underline = "always";
};
tweak = {
font-monospace-warn = "no";
sixel = "yes";
};
cursor = {
style = "beam";
blink = "no";
};
mouse = {
hide-when-typing = "yes"; # not really needed since we already enable this in Hyprland.
alternate-scroll-mode = "yes";
};
csd.preferred = "server";
key-bindings = {
scrollback-up-half-page = "Control+k";
scrollback-up-page = "Control+Shift+k";
scrollback-down-half-page = "Control+j";
scrollback-down-page = "Control+Shift+j";
};
mouse-bindings = {
selection-override-modifiers = "Shift";
primary-paste = "BTN_MIDDLE";
select-begin = "BTN_LEFT";
select-begin-block = "Control+BTN_LEFT";
select-extend = "BTN_RIGHT";
select-extend-character-wise = "Control+BTN_RIGHT";
select-word = "BTN_LEFT-2";
select-word-whitespace = "Control+BTN_LEFT-2";
};
colors = {
foreground = theme-colors.base05; # Text
background = theme-colors.base00; # Base
regular0 = theme-colors.base03; # Surface 1
regular1 = theme-colors.base08; # red
regular2 = theme-colors.base0B; # green
regular3 = theme-colors.base0A; # yellow
regular4 = theme-colors.base0D; # blue
regular5 = "f5c2e7"; # pink
regular6 = "94e2d5"; # teal
regular7 = "bac2de"; # Subtext 1
bright0 = theme-colors.base04; # Surface 2
bright1 = theme-colors.base08; # red
bright2 = theme-colors.base0B; # green
bright3 = theme-colors.base0A; # yellow
bright4 = "89b4fa"; # blue
bright5 = "f5c2e7"; # pink
bright6 = "94e2d5"; # teal
bright7 = "a6adc8"; # Subtext 0
selection-foreground = "cdd6f4";
selection-background = "414356";
search-box-no-match = "11111b f38ba8";
search-box-match = "cdd6f4 313244";
jump-labels = "11111b fab387";
urls = "89b4fa";
alpha = 0.9;
};
}
);
foot-wrapped = pkgs.symlinkJoin {
name = "foot-wrapped";
paths = [ pkgs.foot ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/foot --add-flags "--config=${foot-config} --working-directory=/home/${username}"
'';
};
in
{
config = mkIf cfg.enable {
environment.systemPackages = [ foot-wrapped ];
};
}

View file

@ -1,132 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.modules) mkIf;
inherit (config.meta.mainUser) username;
cfg = config.modules.system.programs.terminals.foot;
colours = config.modules.style.colorScheme.colors;
foot-config = pkgs.writeText "foot.ini" (lib.generators.toINI {} {
main = {
term = "xterm-256color";
app-id = "foot";
title = "foot";
locked-title = "no";
font = "valiosevka:size=14";
font-bold = "valiosevka:size=14";
# font = "Iosevka Nerd Font:size=14";
# font-bold = "Iosevka Nerd Font:size=14";
line-height = 20;
letter-spacing = 0;
horizontal-letter-offset = 0;
vertical-letter-offset = 0;
box-drawings-uses-font-glyphs = "no";
dpi-aware = "no";
bold-text-in-bright = "no";
word-delimiters = ",`|:\"'()[]{}<>";
selection-target = "primary";
initial-window-size-chars = "104x36";
initial-window-mode = "windowed";
pad = "8x8 center";
resize-delay-ms = 100;
};
desktop-notifications.command = "${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
bell = {
urgent = "yes";
notify = "yes";
command = "${pkgs.libnotify}/bin/notify-send bell";
command-focused = "no";
};
scrollback = {
lines = 10000;
multiplier = 10.0;
indicator-position = "relative";
indicator-format = "line";
};
url = {
launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}";
label-letters = "sadfjklewcmpgh";
osc8-underline = "always";
};
tweak = {
font-monospace-warn = "no";
sixel = "yes";
};
cursor = {
style = "beam";
blink = "no";
};
mouse = {
hide-when-typing = "yes"; # not really needed since we already enable this in Hyprland.
alternate-scroll-mode = "yes";
};
csd.preferred = "server";
key-bindings = {
scrollback-up-half-page = "Control+k";
scrollback-up-page = "Control+Shift+k";
scrollback-down-half-page = "Control+j";
scrollback-down-page = "Control+Shift+j";
};
mouse-bindings = {
selection-override-modifiers = "Shift";
primary-paste = "BTN_MIDDLE";
select-begin = "BTN_LEFT";
select-begin-block = "Control+BTN_LEFT";
select-extend = "BTN_RIGHT";
select-extend-character-wise = "Control+BTN_RIGHT";
select-word = "BTN_LEFT-2";
select-word-whitespace = "Control+BTN_LEFT-2";
};
colors = {
background = colours.base00; # base color
foreground = colours.base05; # text color
regular0 = colours.base03; # black
regular1 = colours.base08; # red
regular2 = colours.base0B; # green
regular3 = colours.base0A; # yellow
regular4 = colours.base0D; # blue
regular5 = colours.base0F; #magenta
regular6 = colours.base0C; #cyan
regular7 = colours.base06; #white
bright0 = colours.base04; # Surface 2
bright1 = colours.base08; # red
bright2 = colours.base0B; # green
bright3 = colours.base0A; # yellow
bright4 = colours.base0D; # blue
bright5 = colours.base0F; # pink
bright6 = colours.base0C; # teal
bright7 = colours.base07; # Subtext 0
alpha = 1.0;
};
});
foot-wrapped = pkgs.symlinkJoin {
name = "foot-wrapped";
paths = [pkgs.foot];
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/foot --add-flags "--config=${foot-config} --working-directory=/home/${username}"
'';
};
in {
config = mkIf cfg.enable {
environment.systemPackages = [foot-wrapped];
};
}

View file

@ -1,11 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
in {
environment.systemPackages = builtins.attrValues {
inherit (pkgs) fuzzel;
};
}

View file

@ -3,18 +3,20 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
cfg = config.modules.programs.minecraft; cfg = config.modules.programs.minecraft;
in { in
{
options.modules.programs.minecraft = { options.modules.programs.minecraft = {
enable = mkEnableOption "minecraft"; enable = mkEnableOption "minecraft";
wayland = mkEnableOption "wayland"; wayland = mkEnableOption "wayland";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [pkgs.prismlauncher]; environment.systemPackages = [ pkgs.prismlauncher ];
}; };
} }

View file

@ -1,9 +0,0 @@
_: {
imports = [
./foot.nix
./steam.nix
# ./schizofox.nix
./minecraft.nix
./miniflux.nix
];
}

View file

@ -0,0 +1,9 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.spotify
]
++ (with pkgs; [
sptlrx
]);
}

View file

@ -3,12 +3,14 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
cfg = config.modules.system.programs.steam; cfg = config.modules.system.programs.steam;
in { in
{
options.modules.system.programs.steam.enable = mkEnableOption "Steam games platform"; options.modules.system.programs.steam.enable = mkEnableOption "Steam games platform";
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.steam = { programs.steam = {
@ -19,16 +21,20 @@ in {
SDL_VIDEODRIVER = "x11"; SDL_VIDEODRIVER = "x11";
}; };
extraLibraries = p: extraLibraries =
p:
builtins.attrValues { builtins.attrValues {
inherit (p) atk; inherit (p) atk;
}; };
}; };
gamescopeSession.enable = true; gamescopeSession.enable = true;
extraCompatPackages = [pkgs.proton-ge-bin.steamcompattool]; extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ];
}; };
# See
services.udev.extraRules = ''
SUBSYSTEM=="input", ATTRS{idVendor}=="2dc8", ATTRS{idProduct}=="3106", MODE="0660", GROUP="input"
''; # See
# https://wiki.nixos.org/wiki/GameMode # https://wiki.nixos.org/wiki/GameMode
programs.gamemode.enable = true; programs.gamemode.enable = true;
}; };

View file

@ -0,0 +1,40 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.programs.thunar;
in
{
options.modules.programs.thunar.enable = mkEnableOption "Thunar file manager";
config = mkIf cfg.enable {
programs.thunar = {
enable = true;
plugins = builtins.attrValues {
inherit (pkgs.xfce)
thunar-volman
thunar-vcs-plugin
thunar-archive-plugin
thunar-media-tags-plugin
;
};
};
services.gvfs = {
enable = true;
package = pkgs.gvfs;
};
# Archive management
programs.file-roller = {
enable = true;
package = pkgs.file-roller;
};
# image thumbnails
services.tumbler.enable = true;
};
}

View file

@ -1,23 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
programs.thunar = {
enable = true;
plugins = builtins.attrValues {
inherit
(pkgs.xfce)
thunar-volman
thunar-vcs-plugin
thunar-archive-plugin
thunar-media-tags-plugin
;
};
};
services.gvfs = {
enable = true;
package = pkgs.gvfs;
};
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
config = { config = {
programs.direnv = { programs.direnv = {
enable = true; enable = true;
@ -10,8 +11,8 @@
# We want direnv to load in our nix dev shells # We want direnv to load in our nix dev shells
loadInNixShell = true; loadInNixShell = true;
enableBashIntegration = true; enableBashIntegration = false;
enableFishIntegration = true; enableFishIntegration = false;
}; };
}; };
} }

View file

@ -1,3 +0,0 @@
_: {
imports = [./direnv.nix ./nix-index.nix];
}

View file

@ -1,4 +1,4 @@
{pkgs, ...}: { {
programs = { programs = {
# We have to disable this and use nix-index instead. (Rust >>> Pearl) # We have to disable this and use nix-index instead. (Rust >>> Pearl)
command-not-found = { command-not-found = {

View file

@ -1,40 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib.options) mkEnableOption;
inherit (lib.modules) mkIf;
cfg = config.modules.programs.btop;
btop-settings = pkgs.writeTextDir "btop/btop.conf" ''
truecolor = True
vim_keys = True
rounded_corners = True
update_ms = 100
graph_symbol = "braille"
cpu_single_graph = True
clock_format = "%X"
use_fstab = True
io_mode = True
net_sync = True
net_iface = "enp4s0"
log_level = "ERROR"
'';
btop-wrapped = pkgs.symlinkJoin {
name = "btop-wrapped";
paths = [pkgs.btop];
buildInputs = [pkgs.makeWrapper];
postBuild = ''
wrapProgram $out/bin/btop --set XDG_CONFIG_HOME "${btop-settings}"
'';
};
in {
options.modules.programs.btop.enable = mkEnableOption "btop";
config = mkIf cfg.enable {
environment.systemPackages = [btop-wrapped];
};
}

View file

@ -1,3 +0,0 @@
_: {
imports = [./btop.nix];
}

View file

@ -0,0 +1,327 @@
// taken from https://lobste.rs/s/ft797a/why_zellij#c_4g7k3x
// Make the default layout compact and non-disturbing
default_layout "compact"
// do not pane frames
pane_frames false
// do not show startup tips
show_startup_tips false
// Choose the mode that zellij uses when starting up.
// Default: normal
//
default_mode "locked"
default_shell "fish"
theme "catppuccin-frappe"
// Toggle enabling the mouse mode. On certain configurations, or terminals this
// could potentially interfere with copying text.
// Default: true
//
mouse_mode true
// If you'd like to override the default keybindings completely, be sure to change "keybinds" to "keybinds clear-defaults=true"
keybinds clear-defaults=true {
scroll {
bind "Esc" "Ctrl s" {
SwitchToMode "Locked"
}
bind "e" {
EditScrollback
SwitchToMode "Locked"
}
bind "/" {
SwitchToMode "EnterSearch"
SearchInput 0
}
bind "Ctrl c" {
ScrollToBottom
SwitchToMode "Locked"
}
bind "j" "Down" {
ScrollDown
}
bind "k" "Up" {
ScrollUp
}
bind "Ctrl f" "PageDown" "Right" "l" {
PageScrollDown
}
bind "Ctrl b" "PageUp" "Left" "h" {
PageScrollUp
}
bind "d" {
HalfPageScrollDown
}
bind "u" {
HalfPageScrollUp
}
bind "g" {
ScrollToTop
}
bind "G" {
ScrollToBottom
}
}
search {
bind "Ctrl s" {
SwitchToMode "Locked"
}
bind "Esc" "Ctrl c" {
ScrollToBottom
SwitchToMode "Locked"
}
bind "j" "Down" {
ScrollDown
}
bind "k" "Up" {
ScrollUp
}
bind "Ctrl f" "PageDown" "Right" "l" {
PageScrollDown
}
bind "Ctrl b" "PageUp" "Left" "h" {
PageScrollUp
}
bind "d" {
HalfPageScrollDown
}
bind "u" {
HalfPageScrollUp
}
bind "n" {
Search "down"
}
bind "p" {
Search "up"
}
bind "c" {
SearchToggleOption "CaseSensitivity"
}
bind "w" {
SearchToggleOption "Wrap"
}
bind "o" {
SearchToggleOption "WholeWord"
}
}
entersearch {
bind "Ctrl c" "Esc" {
SwitchToMode "Scroll"
}
bind "Enter" {
SwitchToMode "Search"
}
}
renametab {
bind "Ctrl c" {
SwitchToMode "Locked"
}
bind "Esc" {
UndoRenameTab
SwitchToMode "Tmux"
}
}
renamepane {
bind "Ctrl c" {
SwitchToMode "Locked"
}
bind "Esc" {
UndoRenamePane
SwitchToMode "Tmux"
}
}
tmux {
bind "[" {
SwitchToMode "Scroll"
}
bind "Ctrl Space" {
Write 1
SwitchToMode "Locked"
}
bind "z" {
ToggleFocusFullscreen
SwitchToMode "Locked"
}
// manipulate tabs
bind "c" {
NewTab
SwitchToMode "Locked"
}
bind "K" {
CloseTab
SwitchToMode "Locked"
}
bind "R" {
SwitchToMode "RenameTab"
}
// switch modes
bind "/" {
SwitchToMode "EnterSearch"
SearchInput 0
}
// miscellaneous
bind "s" {
ToggleActiveSyncTab
SwitchToMode "Locked"
}
bind "m" {
ToggleMouseMode
SwitchToMode "Locked"
}
bind "y" {
Run "yazi"
SwitchToMode "Locked"
}
// create new pane
bind "Space" {
NewPane
SwitchToMode "Locked"
}
bind "-" "_" {
NewPane "Down"
SwitchToMode "Locked"
}
bind "|" "\\" {
NewPane "Right"
SwitchToMode "Locked"
}
bind "r" {
SwitchToMode "RenamePane"
}
// switch between tabs
bind "h" {
GoToPreviousTab
SwitchToMode "Locked"
}
bind "l" {
GoToNextTab
SwitchToMode "Locked"
}
bind "1" {
GoToTab 1
SwitchToMode "Locked"
}
bind "2" {
GoToTab 2
SwitchToMode "Locked"
}
bind "3" {
GoToTab 3
SwitchToMode "Locked"
}
bind "4" {
GoToTab 4
SwitchToMode "Locked"
}
bind "5" {
GoToTab 5
SwitchToMode "Locked"
}
bind "6" {
GoToTab 6
SwitchToMode "Locked"
}
bind "7" {
GoToTab 7
SwitchToMode "Locked"
}
bind "8" {
GoToTab 8
SwitchToMode "Locked"
}
bind "9" {
GoToTab 9
SwitchToMode "Locked"
}
// switch between panes
bind "Left" {
MoveFocus "Left"
}
bind "Right" {
MoveFocus "Right"
}
bind "Down" {
MoveFocus "Down"
}
bind "Up" {
MoveFocus "Up"
}
bind "Tab" {
FocusNextPane
}
// move panes
bind "H" {
MovePane "Left"
}
bind "J" {
MovePane "Down"
}
bind "K" {
MovePane "Up"
}
bind "L" {
MovePane "Right"
}
// manipulate panes
bind "W" {
CloseFocus
SwitchToMode "Locked"
}
// exit etc
bind "Enter" "Esc" {
SwitchToMode "Locked"
}
bind "d" {
Detach
SwitchToMode "Locked"
}
bind "Q" {
Quit
}
// resizing
bind "Ctrl h" {
Resize "Increase Left"
}
bind "Ctrl j" {
Resize "Increase Down"
}
bind "Ctrl k" {
Resize "Increase Up"
}
bind "Ctrl l" {
Resize "Increase Right"
}
}
shared {
bind "Alt n" {
NewPane
}
bind "Alt Ctrl h" {
MoveFocus "Left"
}
bind "Alt Ctrl j" {
MoveFocus "Down"
}
bind "Alt Ctrl l" {
MoveFocus "Right"
}
bind "Alt Ctrl k" {
MoveFocus "Up"
}
bind "Alt [" {
PreviousSwapLayout
}
bind "Alt ]" {
NextSwapLayout
}
bind "Alt =" "Alt +" {
Resize "Increase"
}
bind "Alt -" "Alt _" {
Resize "Decrease"
}
}
shared_except "tmux" {
bind "Ctrl Space" {
SwitchToMode "Tmux"
}
}
}

View file

@ -1,12 +0,0 @@
{pkgs, ...}: let
# I am patching zellij because of this issue:
# https://github.com/zellij-org/zellij/pull/2548
patched-zellij = pkgs.zellij.overrideAttrs (old: {
patches = [./zellij-good-scrolling.patch];
doCheck = false;
});
in {
environment.systemPackages = builtins.attrValues {
# inherit patched-zellij;
};
}

View file

@ -1,22 +0,0 @@
--- a/zellij-server/src/panes/grid.rs
+++ b/zellij-server/src/panes/grid.rs
@@ -271,7 +271,7 @@ fn subtract_isize_from_usize(u: usize, i: isize) -> usize {
macro_rules! dump_screen {
($lines:expr) => {{
let mut is_first = true;
- let mut buf = "".to_owned();
+ let mut buf = String::with_capacity($lines.iter().map(|l| l.len()).sum());
for line in &$lines {
if line.is_canonical && !is_first {
@@ -280,8 +280,7 @@ macro_rules! dump_screen {
let s: String = (&line.columns).into_iter().map(|x| x.character).collect();
// Replace the spaces at the end of the line. Sometimes, the lines are
// collected with spaces until the end of the panel.
- let re = Regex::new("([^ ])[ ]*$").unwrap();
- buf.push_str(&(re.replace(&s, "${1}")));
+ buf.push_str(&s.trim_end_matches(' '));
is_first = false;
}
buf

View file

@ -0,0 +1,17 @@
{ pkgs, ... }:
let
zellij-wrapped = pkgs.symlinkJoin {
name = "zellij-wrapped";
paths = [ pkgs.zellij ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/zellij --add-flags "\
--config ${./config.kdl}"
'';
};
in
{
environment.systemPackages = builtins.attrValues {
inherit zellij-wrapped;
};
}

View file

@ -0,0 +1,35 @@
{
config,
lib,
pkgs,
...
}:
let
mkAcmeCert = domain: {
# An acme system user is created. This user belongs to the acme group
# and the home directory is /var/lib/acme. This user will try to make the directory
# .well-known/acme-challenge/ under the webroot directory.
webroot = "/var/lib/acme";
# email to send updates to, we prefix "acme" and the
# name of the domain the certificate is for to it.
email = "charlie@charlieroot.dev";
group = "nginx";
};
in
{
security.acme = {
acceptTerms = true;
defaults = {
email = "charlie@charlieroot.dev";
# testing server, do not use in production, but DO use it for setting things up.
# it has much higher rate limits.
# server = "https://acme-staging-v02.api.letsencrypt.org/directory";
};
certs = {
# "copeberg.org" = mkAcmeCert "copeberg.org";
# "info.copeberg.org" = mkAcmeCert "info.copeberg.org";
# "mail.charlieroot.dev" = mkAcmeCert "mail.charlieroot.dev";
};
};
}

View file

@ -1,3 +0,0 @@
_: {
networking.nftables.enable = true;
}

View file

@ -0,0 +1,169 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (pkgs) fetchurl;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
inherit (config.services.forgejo) customDir user group;
cfg = config.modules.system.services.forgejo;
port = 3000;
domain = "copeberg.org";
img = ./img;
dataDir = "/srv/data/forgejo";
dumpDir = "/srv/data/forgejo-dump";
in
{
options.modules.system.services.forgejo.enable = mkEnableOption "forgejo";
config = mkIf cfg.enable {
modules.system.services = {
database.postgresql.enable = true;
nginx.enable = true;
};
networking.firewall.allowedTCPPorts = [
443
80
3000
];
services.nginx = {
enable = true;
virtualHosts.${domain} = {
addSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
};
};
};
# create the git user for forgejo
# NOTE: this is important and it will _not_ work otherwise.
users.users.git = {
home = dataDir;
useDefaultShell = true;
group = "git";
isSystemUser = true;
};
users.groups.git = { };
services.forgejo = {
enable = true;
package = pkgs.forgejo;
stateDir = dataDir;
user = "git";
group = "git";
database = {
createDatabase = true;
name = "git";
user = "git";
type = "postgres";
};
# Disable support for Git Large File Storage
lfs.enable = false;
settings = {
server = {
DOMAIN = domain;
# You need to specify this to remove the port from URLs in the web UI.
ROOT_URL = "https://${domain}/";
HTTP_PORT = port;
LANDING_PAGE = "home";
};
DEFAULT = {
APP_NAME = "Copeberg.org";
APP_SLOGAN = "Code and seethe.";
};
# disable registration by default.
service.DISABLE_REGISTRATION = true;
# Add support for actions, based on act: https://github.com/nektos/act
actions = {
ENABLED = false;
DEFAULT_ACTIONS_URL = "github";
};
ui = {
SHOW_USER_EMAIL = false;
THEMES = "codeberg-dark";
DEFAULT_THEME = "codeberg-dark";
};
# The glory of the old default branch name
repository = {
DEFAULT_BRANCH = "master";
};
"repository.signing" = {
SIGNING_KEY = "none";
};
};
dump = {
enable = false;
backupDir = dumpDir;
interval = "06:00";
type = "tar.xz";
};
};
systemd.tmpfiles.rules =
let
# no crawlers, thank you.
robots = pkgs.writeText "robots-txt" ''
User-agent: *
Disallow: /
'';
base-brand = fetchurl {
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/src/branch/codeberg-11/web_src/css/themes/codeberg/base-brand.css";
hash = "sha256-8gUmye/Z8H1Xe6U1CNAq907n3jt2TnPtzgpz6KhdiDU=";
};
dark-variables = fetchurl {
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-11/web_src/css/themes/codeberg/dark-variables.css";
hash = "sha256-nCSJUOU9/R1fldoKXTTZmP7vmRjYUk/OKkbgrJ/NrXQ=";
};
theme-codeberg-dark = fetchurl {
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-11/web_src/css/themes/theme-codeberg-dark.css";
hash = "sha256-KyXznH49koRGlzIDDqagN4PvFGD/zCX//wrctmtfgBs=";
};
in
[
"d '${customDir}/public' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets/img' 0750 ${user} ${group} - -"
# Copeberg logo, thanks Raf <3
"f '${customDir}/public/assets/img/logo.svg' - - - - ${img}/logo.svg"
"f '${customDir}/public/assets/img/logo.png' - - - - ${img}/logo.png"
"f '${customDir}/public/assets/img/apple-touch-icon' - - - - ${img}/logo.png"
"f '${customDir}/public/assets/img/favicon.svg' - - - - ${img}/logo.svg"
"f '${customDir}/public/assets/img/favicon.png' - - - - ${img}/logo.png"
# Theming shenanigans
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets/css' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets/css/codeberg' 0750 ${user} ${group} - -"
"f '${customDir}/public/assets/css/theme-codeberg-dark.css' - - - - ${theme-codeberg-dark}"
"f '${customDir}/public/assets/css/codeberg/base-brand.css' - - - - ${base-brand}"
"f '${customDir}/public/assets/css/codeberg/dark-variables.css' - - - - ${dark-variables}"
# Templates
"d '${customDir}/templates' 0750 ${user} ${group} - -"
"d '${customDir}/templates/repo' 0750 ${user} ${group} - -"
# Home page
"f '${customDir}/templates/home.tmpl' - - - - ${./templates}/home.tmpl"
"f '${customDir}/templates/repo/header.tmpl' - - - - ${./templates/repo}/header.tmpl"
# Fuck off scrapers
"f ${customDir}/public/robots.txt - - - - ${robots.outPath}"
];
};
}

View file

@ -1,172 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
inherit (pkgs) fetchurl;
inherit (lib.modules) mkIf;
inherit (config.services.forgejo) customDir user group;
cfg = config.modules.system.services.forgejo;
port = 3000;
domain = "copeberg.org";
img = ./img;
acmeRoot = "/var/lib/acme/challenges-forgejo";
dataDir = "/srv/data/forgejo";
in {
options.modules.system.services.forgejo.enable = lib.mkEnableOption "forgejo";
config = mkIf cfg.enable {
modules.system.services = {
database.postgresql.enable = true;
nginx.enable = true;
};
networking.firewall.allowedTCPPorts = [
443
80
3000
];
services.nginx = {
enable = true;
virtualHosts.${domain} = {
addSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
};
};
};
security.acme = let
email = "charlie@charlieroot.dev";
in {
# testing server, do not use in production, but DO use it for setting things up.
# it has much higher rate limits.
# defaults.server = "https://acme-staging-v02.api.letsencrypt.org/directory";
certs = {
${domain} = {
webroot = acmeRoot;
inherit email;
group = "nginx";
};
};
};
# create the git user for forgejo
# NOTE: this is important and it will _not_ work otherwise.
users.users.git = {
home = dataDir;
useDefaultShell = true;
group = "git";
isSystemUser = true;
};
users.groups.git = {};
services.forgejo = {
enable = true;
package = pkgs.forgejo;
stateDir = dataDir;
user = "git";
group = "git";
database = {
createDatabase = true;
name = "git";
user = "git";
type = "postgres";
};
# Disable support for Git Large File Storage
lfs.enable = false;
settings = {
server = {
DOMAIN = domain;
# You need to specify this to remove the port from URLs in the web UI.
ROOT_URL = "https://${domain}/";
HTTP_PORT = port;
LANDING_PAGE = "home";
};
DEFAULT = {
APP_NAME = "Copeberg.org";
APP_SLOGAN = "Code and seethe.";
};
# disable registration by default.
service.DISABLE_REGISTRATION = true;
# Add support for actions, based on act: https://github.com/nektos/act
actions = {
ENABLED = false;
DEFAULT_ACTIONS_URL = "github";
};
ui = {
SHOW_USER_EMAIL = false;
THEMES = "codeberg-dark";
DEFAULT_THEME = "codeberg-dark";
};
# The glory of the old default branch name
repository = {
DEFAULT_BRANCH = "master";
};
"repository.signing" = {
SIGNING_KEY = "none";
};
};
};
systemd.tmpfiles.rules = let
# no crawlers, thank you.
robots = pkgs.writeText "robots-txt" ''
User-agent: *
Disallow: /
'';
base-brand = fetchurl {
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-10/web_src/css/themes/codeberg/base-brand.css";
hash = "sha256-QJ775HpINf8klO3d/8h+tEw0vk34p19dWUCWWuVwcho=";
};
dark-variables = fetchurl {
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-10/web_src/css/themes/codeberg/dark-variables.css";
hash = "sha256-nCSJUOU9/R1fldoKXTTZmP7vmRjYUk/OKkbgrJ/NrXQ=";
};
theme-codeberg-dark = fetchurl {
url = "https://codeberg.org/Codeberg-Infrastructure/forgejo/raw/branch/codeberg-10/web_src/css/themes/theme-codeberg-dark.css";
hash = "sha256-KyXznH49koRGlzIDDqagN4PvFGD/zCX//wrctmtfgBs=";
};
in [
"d '${customDir}/public' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets/img' 0750 ${user} ${group} - -"
# Copeberg logo, thanks Raf <3
"L+ '${customDir}/public/assets/img/logo.svg' - - - - ${img}/logo.svg"
"L+ '${customDir}/public/assets/img/logo.png' - - - - ${img}/logo.png"
"L+ '${customDir}/public/assets/img/apple-touch-icon' - - - - ${img}/logo.png"
"L+ '${customDir}/public/assets/img/favicon.svg' - - - - ${img}/logo.svg"
"L+ '${customDir}/public/assets/img/favicon.png' - - - - ${img}/logo.png"
# Theming shenanigans
"d '${customDir}/public/assets' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets/css' 0750 ${user} ${group} - -"
"d '${customDir}/public/assets/css/codeberg' 0750 ${user} ${group} - -"
"L+ '${customDir}/public/assets/css/theme-codeberg-dark.css' - - - - ${theme-codeberg-dark}"
"L+ '${customDir}/public/assets/css/codeberg/base-brand.css' - - - - ${base-brand}"
"L+ '${customDir}/public/assets/css/codeberg/dark-variables.css' - - - - ${dark-variables}"
# Templates
"d '${customDir}/templates' 0750 ${user} ${group} - -"
"d '${customDir}/templates/repo' 0750 ${user} ${group} - -"
# Home page
"L+ '${customDir}/templates/home.tmpl' - - - - ${./templates}/home.tmpl"
"L+ '${customDir}/templates/repo/header.tmpl' - - - - ${./templates/repo}/header.tmpl"
# Fuck off scrapers
"L+ ${customDir}/public/robots.txt - - - - ${robots.outPath}"
];
};
}

View file

@ -7,49 +7,10 @@
<h1 class="ui icon header title"> <h1 class="ui icon header title">
{{AppDisplayName}} {{AppDisplayName}}
</h1> </h1>
<h2>A very painful Git service</h2> <h2>{{ctx.Locale.Tr "startpage.app_desc"}}</h2>
</div> </div>
</div> </div>
</div> </div>
<div class="ui stackable middle very relaxed page grid"> {{template "home_forgejo" .}}
<div class="eight wide center column">
<h1 class="hero ui icon header stackable">
<img class="logo" width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
<p>Made with copious amounts of caffeeine</p>
</h1>
<p class="large">
<b>TODO</b>: Write some funny text here
</p>
</div>
<div class="eight wide center column stackable">
<h1 class="hero ui icon header">
<img class="logo" width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
<p><it>I hate it here</it></p>
</h1>
<p class="large">
Bottom text
</p>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header stackable">
<img class="logo" width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
<p>Is this the real life?</p>
</h1>
<p class="large">
Something something fuck poettering
</p>
</div>
<div class="eight wide center column stackable">
<h1 class="hero ui icon header">
<img class="logo" width="100" height="100" src="{{AssetUrlPrefix}}/img/logo.svg" alt="{{ctx.Locale.Tr "logo"}}">
<p>Open source or something</p>
</h1>
<p class="large">
I forgor
</p>
</div>
</div>
</div> </div>
{{template "base/footer" .}} {{template "base/footer" .}}

View file

@ -0,0 +1,36 @@
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}
</h1>
<p class="large">
{{ctx.Locale.Tr "startpage.install_desc" "https://forgejo.org/download/#installation-from-binary" "https://forgejo.org/download/#container-image" "https://forgejo.org/download"}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}
</h1>
<p class="large">
{{ctx.Locale.Tr "startpage.platform_desc"}}
</p>
</div>
</div>
<div class="ui stackable middle very relaxed page grid">
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}}
</h1>
<p class="large">
{{ctx.Locale.Tr "startpage.lightweight_desc"}}
</p>
</div>
<div class="eight wide center column">
<h1 class="hero ui icon header">
{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}
</h1>
<p class="large">
{{ctx.Locale.Tr "startpage.license_desc" "https://forgejo.org/download" "https://codeberg.org/forgejo/forgejo"}}
</p>
</div>
</div>

View file

@ -0,0 +1,103 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (builtins) fetchurl;
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.system.services.grafana;
domain = "info.copeberg.org";
port = 4021;
in
{
options.modules.system.services.grafana.enable = mkEnableOption "Grafana, a graphing service";
config = mkIf cfg.enable {
networking.firewall.allowedTCPPorts = [ config.services.grafana.settings.server.http_port ];
modules.system.services.database.postgresql.enable = true;
services.grafana = {
enable = true;
package = pkgs.grafana;
settings = {
server = {
http_addr = "127.0.0.1";
http_port = port;
root_url = "https://${domain}";
inherit domain;
enforce_domain = true;
};
database = {
type = "postgres";
host = "/run/postgresql";
name = "grafana";
user = "grafana";
ssl_mode = "disable";
};
analytics = {
reporting_enabled = false;
check_for_updates = false;
};
users.allow_signup = false;
};
provision = {
enable = true;
datasources.settings = {
datasources = [
(mkIf config.modules.system.services.prometheus.enable {
name = "Prometheus";
type = "prometheus";
access = "proxy";
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
isDefault = true;
})
(mkIf config.modules.system.services.database.postgresql.enable {
name = "PostgreSQL";
type = "postgres";
access = "proxy";
url = "127.0.0.1:${toString config.services.prometheus.exporters.postgres.port}";
})
];
};
dashboards.settings.providers = [
{
# taken from https://grafana.com/grafana/dashboards/1860-node-exporter-full/
name = "system-status";
options.path = fetchurl {
url = "https://grafana.com/api/dashboards/1860/revisions/40/download";
sha256 = "sha256-zTsS/UEX6W8+qK3l2GtvdDfmwS8eVnnyZxZ++LtRLBA=";
};
}
{
# taken from https://grafana.com/grafana/dashboards/9628-postgresql-database/
name = "PostgreSQL-status";
options.path = fetchurl {
url = "https://grafana.com/api/dashboards/9628/revisions/8/download";
sha256 = "sha256-UhusNAZbyt7fJV/DhFUK4FKOmnTpG0R15YO2r+nDnMc=";
};
}
];
};
};
services.nginx = {
enable = true;
virtualHosts.${domain} = {
addSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString port}";
};
};
};
};
}

View file

@ -3,13 +3,17 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
cfg = config.modules.services.greetd; let
uwsmEnabled = config.modules.services.uwsm.enable; inherit (lib.meta) getExe getExe';
inherit (lib.modules) mkIf;
inherit (lib.options) mkOption mkEnableOption; inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) str listOf; inherit (lib.types) str listOf;
inherit (lib.modules) mkIf;
in { inherit (config.meta.mainUser) username;
cfg = config.modules.services.greetd;
in
{
options.modules.services.greetd = { options.modules.services.greetd = {
enable = mkEnableOption "greetd"; enable = mkEnableOption "greetd";
greeter = mkOption { greeter = mkOption {
@ -23,26 +27,30 @@ in {
session = mkOption { session = mkOption {
description = "Which login session to start"; description = "Which login session to start";
type = str; type = str;
default = default = "niri";
if uwsmEnabled
then "uwsm start Hyprland"
else "Hyprland";
}; };
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.greetd = { services.greetd =
enable = true; let
package = pkgs.greetd; session = {
settings.default_session = { command = ''
command = '' ${getExe pkgs.greetd.tuigreet} \
${pkgs.greetd.tuigreet}/bin/tuigreet \ -c \"${cfg.session}\" \
-c \"${cfg.session}\" \ -r
-r -t --time-format "DD.MM.YYYY"
-t --time-format "DD.MM.YYYY" --asteriks'';
--asteriks''; user = "greeter";
};
in
{
enable = true;
vt = 7;
settings = {
default_session = session;
initial_session = session;
};
}; };
vt = 7;
};
}; };
} }

View file

@ -2,24 +2,24 @@
config, config,
lib, lib,
... ...
}: let }:
let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
cfg = config.modules.services.kanata; cfg = config.modules.services.kanata;
in { in
{
options.modules.services.kanata.enable = mkEnableOption "kanata"; options.modules.services.kanata.enable = mkEnableOption "kanata";
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.kanata = { services.kanata = {
enable = true; enable = true;
keyboards.main = {
keyboards.daskeyboard = { devices = [
devices = ["/dev/input/by-id/usb-Metadot_-_Das_Keyboard_Das_Keyboard-event-kbd"]; "/dev/input/by-id/usb-Metadot_-_Das_Keyboard_Das_Keyboard-event-kbd"
config = builtins.readFile (./. + "/main.kbd"); "/dev/input/by-path/platform-i8042-serio-0-event-kbd"
}; "/dev/input/by-id/usb-Dell_Dell_USB_Keyboard-event-kbd"
];
keyboards.laptop = {
devices = ["/dev/input/by-path/platform-i8042-serio-0-event-kbd"];
config = builtins.readFile (./. + "/main.kbd"); config = builtins.readFile (./. + "/main.kbd");
}; };
}; };

View file

@ -3,14 +3,16 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
cfg = config.modules.services.locate; cfg = config.modules.services.locate;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
in { in
{
options.modules.services.locate.enable = mkEnableOption "Locate service"; options.modules.services.locate.enable = mkEnableOption "Locate service";
config = mkIf cfg.enable { config = mkIf cfg.enable {
environment.systemPackages = [pkgs.plocate]; environment.systemPackages = [ pkgs.plocate ];
services.locate = { services.locate = {
enable = true; enable = true;
interval = "hourly"; interval = "hourly";

View file

@ -1,8 +1,9 @@
{pkgs, ...}: let { pkgs, ... }:
let
mako-wrapped = pkgs.symlinkJoin { mako-wrapped = pkgs.symlinkJoin {
name = "mako-wrapped"; name = "mako-wrapped";
paths = [pkgs.mako]; paths = [ pkgs.mako ];
buildInputs = [pkgs.makeWrapper]; nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = '' postBuild = ''
wrapProgram $out/bin/mako --add-flags "\ wrapProgram $out/bin/mako --add-flags "\
--font 'Lexend 11' \ --font 'Lexend 11' \
@ -12,6 +13,7 @@
--default-timeout 4000" --default-timeout 4000"
''; '';
}; };
in { in
environment.systemPackages = [mako-wrapped]; {
environment.systemPackages = [ mako-wrapped ];
} }

View file

@ -1,11 +0,0 @@
_: {
imports = [
./pipewire.nix
./locate.nix
./ssh.nix
./greetd.nix
./mako.nix
./mpd.nix
./firewall.nix
];
}

View file

@ -0,0 +1,27 @@
{
config,
lib,
pkgs,
...
}:
let
inherit (lib.modules) mkIf;
inherit (lib.options) mkEnableOption;
cfg = config.modules.system.services.loki;
port = 4026;
dataDir = "/srv/data/loki";
in
{
options.modules.system.services.loki.enable = mkEnableOption "Grafana, a graphing service";
config = mkIf cfg.enable {
services.loki = {
enable = true;
package = pkgs.loki;
configuration = {
};
};
};
}

View file

@ -3,13 +3,15 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
cfg = config.modules.services.media.mpd; cfg = config.modules.services.media.mpd;
inherit (config.meta.mainUser) username; inherit (config.meta.mainUser) username;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (lib.types) str; inherit (lib.types) str;
inherit (lib.options) mkOption mkEnableOption; inherit (lib.options) mkOption mkEnableOption;
in { in
{
options.modules.services = { options.modules.services = {
media = { media = {
mpd = { mpd = {
@ -24,7 +26,7 @@ in {
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
# command line interface to mpd # command line interface to mpd
environment.systemPackages = [pkgs.mpc]; environment.systemPackages = [ pkgs.mpc ];
systemd.services.mpd.environment = { systemd.services.mpd.environment = {
# https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609 # https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/609

View file

@ -3,11 +3,13 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
inherit (lib.modules) mkIf mkDefault; inherit (lib.modules) mkIf mkDefault;
inherit (lib.options) mkEnableOption; inherit (lib.options) mkEnableOption;
cfg = config.modules.system.services.nginx; cfg = config.modules.system.services.nginx;
in { in
{
options.modules.system.services.nginx.enable = mkEnableOption "nginx"; options.modules.system.services.nginx.enable = mkEnableOption "nginx";
config = mkIf cfg.enable { config = mkIf cfg.enable {
security = { security = {
@ -25,7 +27,6 @@ in {
recommendedOptimisation = true; recommendedOptimisation = true;
recommendedGzipSettings = true; recommendedGzipSettings = true;
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedZstdSettings = true;
# nginx defaults to a 1MB size limit for uploads, which # nginx defaults to a 1MB size limit for uploads, which
# *definitely* isn't enough for Git LFS. # *definitely* isn't enough for Git LFS.

View file

@ -3,12 +3,14 @@
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
inherit (lib.meta) getExe'; inherit (lib.meta) getExe';
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
cfg = config.modules.system.services.owncloud; cfg = config.modules.system.services.owncloud;
in { in
{
options.modules.system.services.owncloud.enable = lib.mkEnableOption "owncloud"; options.modules.system.services.owncloud.enable = lib.mkEnableOption "owncloud";
config = { config = {
@ -16,33 +18,16 @@ in {
description = "Owncloud client service"; description = "Owncloud client service";
# makes the graphical session start this service when it starts # makes the graphical session start this service when it starts
wantedBy = ["graphical-session.target"]; wantedBy = [ "graphical-session.target" ];
# when graphical session restarts or gets stopped, this also gets restarted/stopped. # when graphical session restarts or gets stopped, this also gets restarted/stopped.
partOf = ["graphical-session.target"]; partOf = [ "graphical-session.target" ];
# gets started only after graphical session # gets started only after graphical session
after = ["graphical-session.target"]; after = [ "graphical-session.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${getExe' pkgs.owncloud-client "owncloud"}"; ExecStart = "${getExe' pkgs.owncloud-client "owncloud"}";
Restart = "always"; Restart = "always";
RestartSec = 30; RestartSec = 30;
# User = "cr";
# Group = "cr";
Keyringmode = "shared";
DevicePolicy = "closed";
PrivateDevices = true;
PrivateTmp = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectControlGroup = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectSystem = "strict";
SystemCallFilter = "~@clock @cpu-emulation @debug @obsolete @module @mount @raw-io @reboot @swap @privileged";
}; };
}; };
}; };

View file

@ -2,10 +2,12 @@
config, config,
lib, lib,
... ...
}: let }:
let
cfg = config.modules.system.sound; cfg = config.modules.system.sound;
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
in { in
{
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.pulseaudio.enable = false; services.pulseaudio.enable = false;
services.pipewire = { services.pipewire = {

Some files were not shown because too many files have changed in this diff Show more