Compare commits

...

343 commits

Author SHA1 Message Date
fceda1ce4f update 2026-04-19 18:18:12 +02:00
fdc59d104d attempt to fix controller problems
suggested by luka
2026-04-19 18:18:12 +02:00
c2ae9319b5 gamer 2026-04-19 18:18:12 +02:00
87f92befd6 gamer 2026-04-19 18:18:12 +02:00
1f5f66fbae update 2026-04-19 18:18:12 +02:00
822920ebc7 definitely not unmaintained extensions 2026-04-19 18:18:12 +02:00
185336efe7 update 2026-04-19 18:18:12 +02:00
8f7efd276c flash 2026-04-19 18:18:12 +02:00
ff2b25159b finally mount my other disks 2026-04-19 18:18:12 +02:00
5dbdb68394 updates 2026-04-19 18:18:12 +02:00
43e9be9ed5 better paperless setup 2026-04-19 18:18:12 +02:00
297566590d update 2026-04-19 18:18:12 +02:00
83b89bf215 wtf 2026-04-19 18:18:12 +02:00
e123cebaea update 2026-04-19 18:18:12 +02:00
74e02b8615 gaming 2026-04-19 18:18:12 +02:00
6a530f9304 update 2026-04-19 18:18:12 +02:00
7f01a26735 update 2026-04-19 18:18:12 +02:00
9977663ce5 cook 2026-04-19 18:18:12 +02:00
e8311d829c wallpaper 2026-04-19 18:18:12 +02:00
37e935525e shell.nix init script 2026-04-19 18:18:12 +02:00
bc29204066 add krita to laptop 2026-04-19 18:18:12 +02:00
80cde71d31 update 2026-04-19 18:18:12 +02:00
706f196b45 don't remove client side decoration
decoration is good actually so you can mouse around and have fun
2026-04-19 18:18:12 +02:00
5d563b636e add libreoffice 2026-04-19 18:18:12 +02:00
bfc102c1b0 use new mold name
finally, it was so dumb before
2026-04-19 18:18:12 +02:00
8baae844ab remove idea
i don't need it anymore
2026-04-19 18:18:12 +02:00
812131db51 update 2026-04-19 18:18:12 +02:00
45ce9ce0aa bookmark 2026-04-19 18:18:12 +02:00
7096489f8a bookmark 2026-04-19 18:18:12 +02:00
5b8acd4c77 rctrl 2026-04-19 18:18:12 +02:00
6f1f2a520b update 2026-04-19 18:18:12 +02:00
9b7a19f1d2 Revert "remove waybar workaround"
This reverts commit 0eac1f0e65.
2026-04-19 18:18:12 +02:00
291645b76d update 2026-04-19 18:18:12 +02:00
5f1e1b00f9 start backup after mount 2026-04-19 18:18:12 +02:00
08b88fb229 update (late) 2026-04-19 18:18:12 +02:00
535194fd5c wtf 2026-04-19 18:18:12 +02:00
a588fcfdae remove waybar workaround 2026-04-19 18:18:12 +02:00
a2626a4000 update 2026-04-19 18:18:12 +02:00
dea628f798 bsod: update cades
to fix typst 0.14 breakage

```
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14912]: Regenerating the lock screen...
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]: error: cannot access fields on type string
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]:    ┌─ @preview/jogs:0.2.0/lib.typ:24:31
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]:    │
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]: 24 │   jogs-wasm.compile(bytes(code.text))
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]:    │                                ^^^^
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]: help: error occurred in this call of function `compile-js`
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]:   ┌─ @preview/cades:0.3.0/lib.typ:4:23
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]:   │
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]: 4 │ #let qrcode-bytecode = compile-js(qrcode-src)
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]:   │                        ^^^^^^^^^^^^^^^^^^^^^^
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]: help: error occurred while importing this module
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]:   ┌─ ../../nix/store/0mi8dw0404kn734mbfgk04wi7cmw5dg4-bsod.typ:1:8
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]:   │
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]: 1 │ #import "@preview/cades:0.3.0": qr-code
Oct 27 18:58:15 nixos regenerate-bsod-lockscreen[14917]:   │         ^^^^^^^^^^^^^^^^^^^^^^
```

26c16bd093
2026-04-19 18:18:12 +02:00
1fc06d1c6a update 2026-04-19 18:18:12 +02:00
d594811684 fuck 2026-04-19 18:18:12 +02:00
8729975b55 update 2026-04-19 18:18:12 +02:00
006bff55aa fix 2026-04-19 18:18:12 +02:00
984bf79036 disable chat 2026-04-19 18:18:12 +02:00
50b0aee343 wl-mirror 2026-04-19 18:18:12 +02:00
102bc0b045 appimage 2026-04-19 18:18:12 +02:00
cc20521d57 unstick 2026-04-19 18:18:12 +02:00
cf02df572b lutris 2026-04-19 18:18:12 +02:00
c35b66d2ad font stuff 2026-04-19 18:18:12 +02:00
57347537cc wtf 2026-04-19 18:18:12 +02:00
2c63c5bf29 update stuff 2026-04-19 18:18:11 +02:00
53bd1218f0 clip clip 2026-04-19 18:18:11 +02:00
c5cf67106a mpv 2026-04-19 18:18:11 +02:00
0e08d21041 gamer 2026-04-19 18:18:11 +02:00
68bba947ed fu8n 2026-04-19 18:18:11 +02:00
5d9cb9f55d stuff 2026-04-19 18:18:11 +02:00
4cff46f2d0 fix 2026-04-19 18:18:11 +02:00
ccab8c9625 updates and stuff 2026-04-19 18:18:11 +02:00
c649d7b6a7 use blueberry
overskride is broken in ways i cant be bothered to debug
2026-04-19 18:18:11 +02:00
edaa0a1fe2 updater 2026-04-19 18:18:11 +02:00
d5943ef584 update 2026-04-19 18:18:11 +02:00
42b703f297 vim in docker 2026-04-19 18:18:11 +02:00
ce1d3d3fbb configure waybar better 2026-04-19 18:18:11 +02:00
f879683d4f hello from the laptop 2026-04-19 18:18:11 +02:00
49cf91193d hm 2026-04-19 18:18:11 +02:00
9fac3b70b3 hm 2026-04-19 18:18:11 +02:00
89701424c0 prepare laptop 2026-04-19 18:18:11 +02:00
99edd53c6f prepare laptop 2026-04-19 18:18:11 +02:00
0c87284736 move 2026-04-19 18:18:11 +02:00
48905dec4c prepare laptop 2026-04-19 18:18:11 +02:00
dbc22e6e30 kernel magic 2026-04-19 18:18:11 +02:00
4bcfc772cd prepare laptop 2026-04-19 18:18:11 +02:00
8007aa9be7 fix 2026-04-19 18:18:11 +02:00
ab209064e4 prepare laptop 2026-04-19 18:18:11 +02:00
92ee281dbd update kernel 2026-04-19 18:18:11 +02:00
829c92ec37 update 2026-04-19 18:18:11 +02:00
610d2fffb9 renames 2026-04-19 18:18:11 +02:00
1df1c5122a install rust 2026-04-19 18:18:11 +02:00
0c6663c7c4 add docker images 2026-04-19 18:18:11 +02:00
4b3302b352 d 2026-04-19 18:18:11 +02:00
c616dc4277 power off 2026-04-19 18:18:11 +02:00
654a5a4859 bluetooth 2026-04-19 18:18:11 +02:00
55a4d4d94d random bsod 2026-04-19 18:18:11 +02:00
64908d55c1 p 2026-04-19 18:18:10 +02:00
da294fa9e9 fix waybar 2026-04-19 18:18:10 +02:00
e8c6aadd01 gamer 2026-04-19 18:18:10 +02:00
d6e84f3f47 remove razer
it doesn't boot and i dont care
2026-04-19 18:18:10 +02:00
3cdca803df update 2026-04-19 18:18:10 +02:00
8db9eed672 don't show pointer 2026-04-19 18:18:10 +02:00
c27ebb3431 better 2026-04-19 18:18:10 +02:00
0e952fd7ad better gradient 2026-04-19 18:18:10 +02:00
273ef9977a fancy bar 2026-04-19 18:18:10 +02:00
7d460552e8 make bar cooler 2026-04-19 18:18:10 +02:00
7c7c88a631 libsqlite 2026-04-19 18:18:10 +02:00
517a142927 make r-a wrapper better 2026-04-19 18:18:10 +02:00
18c863d25b always use nightly rust-analyzer
to avoid depending on the current toolchain
2026-04-19 18:18:10 +02:00
d82698cc0b update 2026-04-19 18:18:10 +02:00
8c8c557390 disable git
it's too slow
2026-04-19 18:18:10 +02:00
79e4115ffe stuff 2026-04-19 18:18:10 +02:00
49ef658431 paperless backup 2026-04-19 18:18:10 +02:00
6c1ccefc9b gnome-keyring 2026-04-19 18:18:10 +02:00
5dcc4f4f23 update 2026-04-19 18:18:10 +02:00
e4b53c384c add u, the most awesome program 2026-04-19 18:18:10 +02:00
87733a0f30 bar?? 2026-04-19 18:18:10 +02:00
6c0084b6d0 waybar 2026-04-19 18:18:10 +02:00
6f9967c781 niri 2026-04-19 18:18:10 +02:00
eb1f6fd01f meow 2026-04-19 18:18:10 +02:00
754c555d5c risc-v vscode highlighting 2026-04-19 18:18:10 +02:00
a7266d59eb hyfetch 2026-04-19 18:18:10 +02:00
621d6ffa0f magic config :3 2026-04-19 18:18:10 +02:00
787ee710ae update 2026-04-19 18:18:10 +02:00
90ac9d3478 provide dev shell 2026-04-19 18:18:10 +02:00
ba8bd0150f update 2026-04-19 18:18:10 +02:00
a5cdd199b0 c 2026-04-19 18:18:10 +02:00
cc91e7c335 lol 2026-04-19 18:18:10 +02:00
88efc568a2 brilliant 2026-04-19 18:18:10 +02:00
200a1e6978 fix 2026-04-19 18:18:10 +02:00
80022fe6a5 tmp-libvirtd 2026-04-19 18:18:10 +02:00
c8eaccc0eb virtualbox 2026-04-19 18:18:10 +02:00
3926313eb0 nvidia might work again? 2026-04-19 18:18:10 +02:00
5a407c501e update 2026-04-19 18:18:10 +02:00
e9eb2e49c2 novideo disater 2026-04-19 18:18:10 +02:00
19ca466ec0 update 2026-04-19 18:18:10 +02:00
06686363a5 update 2026-04-19 18:18:10 +02:00
6da84eebe8 update 2026-04-19 18:18:10 +02:00
1455e167f4 update 2026-04-19 18:18:10 +02:00
600607e122 update 2026-04-19 18:18:10 +02:00
3fc6c2ed49 gdb 2026-04-19 18:18:10 +02:00
ad675f7621 gdb init 2026-04-19 18:18:10 +02:00
07f88ae674 update 2026-04-19 18:18:10 +02:00
3c48466a1d update 2026-04-19 18:18:10 +02:00
b689e25ac7 git amend 2026-04-19 18:18:10 +02:00
59561f2b6e firefox-nightly stuff 2026-04-19 18:18:10 +02:00
9d56988605 random swap related changes without thinking 2026-04-19 18:18:10 +02:00
115fff2d02 update firefox profile name
this accidentally deleted all my browser date because i did this wrong
2026-04-19 18:18:10 +02:00
308c161a10 update (older change) 2026-04-19 18:18:10 +02:00
cc15ce04b0 make firefox the default browser 2026-04-19 18:18:10 +02:00
c1b1e6bfb7 chromium 2026-04-19 18:18:10 +02:00
6d5b6d055f update 2026-04-19 18:18:10 +02:00
c3a9d81d76 update 2026-04-19 18:18:10 +02:00
965b7978f5 Revert "maybe fix suspend"
This reverts commit af8f9d0342.
2026-04-19 18:18:10 +02:00
b7973145c5 update 2026-04-19 18:18:10 +02:00
d5aad77ba1 remove cups
it didnt work anyways lol
2026-04-19 18:18:10 +02:00
0a798863bf update 2026-04-19 18:18:10 +02:00
615b4ccaa8 binfmt it 2026-04-19 18:18:10 +02:00
b1e9b53cf2 maybe fix suspend 2026-04-19 18:18:10 +02:00
81ff8e604a update.. finally? 2026-04-19 18:18:10 +02:00
ea5d71be5d reorder keys 2026-04-19 18:18:10 +02:00
5852644ee3 ecdsa-sha2-nistp256 host key 2026-04-19 18:18:10 +02:00
ee96525778 unpem 2026-04-19 18:18:10 +02:00
92c722868f Revert "Update"
This reverts commit 9bf00e43ae.

Somehow firefox keeps crashing....
2026-04-19 18:18:10 +02:00
20e6034aef Update
Since this brings in new NVidia drivers, also update Firefox to beta
130, which fixes the bug with it.
2026-04-19 18:18:10 +02:00
cfec825c1e Revert "update"
This reverts commit 6f992fc070.

Still broken :(
2026-04-19 18:18:10 +02:00
d194467d65 update 2026-04-19 18:18:10 +02:00
3dedb1e12f gay 2026-04-19 18:18:10 +02:00
544578c6a1 cleanup 2026-04-19 18:18:10 +02:00
a26f561d16 remove typst-preview extension 2026-04-19 18:18:10 +02:00
4cd29b4d06 Update git.nix 2026-04-19 18:18:10 +02:00
afdad35272 fish: c->cargo 2026-04-19 18:18:10 +02:00
0f32440df4 Revert "Update"
This reverts commit 5834b31574.

Still the same firefox issues...
2026-04-19 18:18:10 +02:00
cf6ed4b741 Update 2026-04-19 18:18:10 +02:00
2a83b73619 new technology file system 2026-04-19 18:18:10 +02:00
e483f3a7db Revert "update"
This reverts commit ea53680b70.

Firefox crashes: https://bugzilla.mozilla.org/show_bug.cgi?id=1898476

Note that setting `MOZ_ENABLE_WAYLAND=0` would help as well.
2026-04-19 18:18:10 +02:00
2dc033c7c0 update 2026-04-19 18:18:10 +02:00
49c03a25cd nonfree! 2026-04-19 18:18:10 +02:00
973f0c51c2 autosq 2026-04-19 18:18:10 +02:00
0c1ef66795 update
remove `hardware.opengl.driSupport`
```
       error:
       Failed assertions:
       - The option definition `hardware.opengl.driSupport' in `/nix/store/f9zng9c55398x0xfxpnil2qkqq873izz-source/nixos/configuration.nix' no longer has any effect; please remove it.
       The setting can be removed.
```

rename `hardware.opengl` to `hardware.graphics`
```
trace: warning: The option `hardware.opengl.extraPackages' defined in `/nix/store/yq3k4mrsa5ns9zjf3w62pr9vpnqmyn0m-source/nixos/configuration.nix' has been renamed to `hardware.graphics.extraPackages'.
trace: warning: The option `hardware.opengl.enable' defined in `/nix/store/yq3k4mrsa5ns9zjf3w62pr9vpnqmyn0m-source/nixos/configuration.nix' has been renamed to `hardware.graphics.enable'.
```
2026-04-19 18:18:10 +02:00
c9ad917990 lower vscode scrollback 2026-04-19 18:18:10 +02:00
749337fc68 Add pipewire plugin to OBS 2026-04-19 18:18:10 +02:00
825bcc1877 update 2026-04-19 18:18:10 +02:00
450caa1154 wrap mold 2026-04-19 18:18:10 +02:00
87817d8c84 Add some more git options 2026-04-19 18:18:10 +02:00
16355fec1f Attempt to fix vscode extension
broken by https://github.com/NixOS/nixpkgs/pull/289721
2026-04-19 18:18:10 +02:00
fdd4072580 add run binary 2026-04-19 18:18:10 +02:00
3d54963a23 update home directory 2026-04-19 18:18:10 +02:00
54013a6613 change name 2026-04-19 18:18:10 +02:00
3ac1baf595 update 2026-04-19 18:18:10 +02:00
13a884deb7 update 2026-04-19 18:18:10 +02:00
76bf1efd8b Set default formatter for react TS 2026-04-19 18:18:10 +02:00
1d0fe0a7ee update 2026-04-19 18:18:10 +02:00
7d2980ab9f update 2026-04-19 18:18:10 +02:00
f721030d0b update 2026-04-19 18:18:10 +02:00
22568c1439 add some firefox extensions 2026-04-19 18:18:10 +02:00
48b702a7d9 update 2026-04-19 18:18:10 +02:00
0985b7018b some nvidia changes
aggregated from the wiki and nixos-hardware
2026-04-19 18:18:09 +02:00
3b90d380e7 go 2026-04-19 18:18:09 +02:00
0a57a1e13a update
discord was breaking with undefined errors on startup.. this seems to
help
2026-04-19 18:18:09 +02:00
061b4fd6ef Revert "update"
This reverts commit c70fb00467.

discord crashes.. multiple logins required. not sure whether it's this
one.
2026-04-19 18:18:09 +02:00
065d3c5f17 update 2026-04-19 18:18:09 +02:00
ac8fd158e5 update 2026-04-19 18:18:09 +02:00
e494db6784 vscode ext changes 2026-04-19 18:18:09 +02:00
eea656bb6d fix display 2026-04-19 18:18:09 +02:00
ef6555c40d revert nixpkgs to working version
because of nixpkgs#299944
2026-04-19 18:18:09 +02:00
5e42223a78 update 2026-04-19 18:18:09 +02:00
0c45d0f9f3 add earlyoom 2026-04-19 18:18:09 +02:00
32279b0ff0 update 2026-04-19 18:18:09 +02:00
5d3f4dbc7d novideo
https://www.reddit.com/r/NixOS/comments/pe1zkj/miniguide_nvidia_gpu_acceleration_in_docker/
https://discourse.nixos.org/t/nvidia-gpu-support-in-podman-and-cdi-nvidia-ctk/36286
2026-04-19 18:18:09 +02:00
73f4211c1f update 2026-04-19 18:18:09 +02:00
d5151e075f move 2026-04-19 18:18:09 +02:00
b7f955b93b typos 2026-04-19 18:18:09 +02:00
02f2e87273 update 2026-04-19 18:18:09 +02:00
078af825b7 st
for consistency with jj
2026-04-19 18:18:09 +02:00
418f25e9b6 fix x 2026-04-19 18:18:09 +02:00
d81f8d3ccd unset PAGER
thanks, jj
2026-04-19 18:18:09 +02:00
59afa12c26 tf 2026-04-19 18:18:09 +02:00
df42fcb04e jj 2026-04-19 18:18:09 +02:00
6790fbe3bd x 2026-04-19 18:18:09 +02:00
39a553dc78 jj 2026-04-19 18:18:09 +02:00
1bfb0fb0d3 fuck python probing 2026-04-19 18:18:09 +02:00
592b258da1 jj 2026-04-19 18:18:09 +02:00
95cf812d8b bikeshed to make x more small 2026-04-19 18:18:09 +02:00
dae35d3296 small changes 2026-04-19 18:18:09 +02:00
235658641a crates 2026-04-19 18:18:09 +02:00
9f8628bd4d git configs 2026-04-19 18:18:09 +02:00
7a511a47ef add shellcheck 2026-04-19 18:18:09 +02:00
354d89eac0 update 2026-04-19 18:18:09 +02:00
26ed00a3bb "fix" perf misompilation
https://github.com/NixOS/nixpkgs/issues/282983
2026-04-19 18:18:09 +02:00
e43f2b05a5 debug? 2026-04-19 18:18:09 +02:00
3d0eb73d72 nix flake update 2026-04-19 18:18:09 +02:00
ce6baf186a pdf 2026-04-19 18:18:09 +02:00
f2c30889c5 mount nas 2026-04-19 18:18:09 +02:00
fc302ca20c update 2026-04-19 18:18:09 +02:00
125cb9af39 update
Remove bumblebee because it causes nvidia-x11 assertions to fail by apparently calling that package weirdly.
It makes no sense to have this anyways, I don't need this.
2026-04-19 18:18:09 +02:00
fd50042edf dig 2026-04-19 18:18:09 +02:00
02ed375435 Create README.md 2026-04-19 18:18:09 +02:00
f8ce0a3686 vscode settings 2026-04-19 18:18:09 +02:00
805bf49b2e update 2026-04-19 18:18:09 +02:00
bc520b16e1 upgrade kernel to 6.6 2026-04-19 18:18:09 +02:00
2ba7e21aa7 update 2026-04-19 18:18:09 +02:00
4c6c8bcd28 always stay up to date with RA 2026-04-19 18:18:09 +02:00
ecfacacd2a update 2026-04-19 18:18:09 +02:00
8a6e49862d update 2026-04-19 18:18:09 +02:00
6d0e37f16f update 2026-04-19 18:18:09 +02:00
c179c83e50 update 2026-04-19 18:18:09 +02:00
d8b6eb8c7a vscode weirdness 2026-04-19 18:18:09 +02:00
8db94fc1d6 update 2026-04-19 18:18:09 +02:00
9de8481e61 update 2026-04-19 18:18:09 +02:00
c456dbba15 bpftrace 2026-04-19 18:18:09 +02:00
7ad150ef03 update 2026-04-19 18:18:09 +02:00
bf28eb50c5 enable qemu.swtpm 2026-04-19 18:18:09 +02:00
dcbc52e422 git aliases 2026-04-19 18:18:09 +02:00
d2201406bc update 2026-04-19 18:18:09 +02:00
ed9d281e5a Fix cargo-mommys interaction with $CARGO 2026-04-19 18:18:09 +02:00
ddc0aa1692 mommy x 2026-04-19 18:18:09 +02:00
0d2721106d vscode terminal scrollback 2026-04-19 18:18:09 +02:00
f916dd455b update 2026-04-19 18:18:09 +02:00
aed28c6aab try installing monaspace but doesnt quite work 2026-04-19 18:18:09 +02:00
02423cd795 prolog executable 2026-04-19 18:18:09 +02:00
cfbdb86bc6 vsc prolog 2026-04-19 18:18:09 +02:00
2935feac76 update 2026-04-19 18:18:09 +02:00
19dfa1ec2d Remove postman 2026-04-19 18:18:09 +02:00
f286998643 tailscale 2026-04-19 18:18:09 +02:00
8d074458d5 things 2026-04-19 18:18:09 +02:00
4149cdb268 rust analyzer 2026-04-19 18:18:09 +02:00
4cb54cbd26 make rust analyzer work 2026-04-19 18:18:09 +02:00
1975b3d138 Update rust-analyzer
TODO: automated update script for extensions!
2026-04-19 18:18:09 +02:00
aad2dd5ceb update 2026-04-19 18:18:09 +02:00
c95064d637 direnv 2026-04-19 18:18:09 +02:00
32da710aeb mandb 2026-04-19 18:18:09 +02:00
681549ded5 cleanup 2026-04-19 18:18:09 +02:00
d9129a2759 update 2026-04-19 18:18:09 +02:00
f31db2775b git sw alias 2026-04-19 18:18:09 +02:00
742ce69655 codelldb 2026-04-19 18:18:09 +02:00
215ce1c357 Add gdb 2026-04-19 18:18:09 +02:00
d62f81755f Add flamegraph abbr 2026-04-19 18:18:09 +02:00
e7ddb37a62 fmt + 7z 2026-04-19 18:18:09 +02:00
e504146d68 typst-lsp 2026-04-19 18:18:09 +02:00
824dfb0665 update 2026-04-19 18:18:09 +02:00
bf725cd997 i accept you nvidia 2026-04-19 18:18:09 +02:00
a0c95d0453 git.confirmSync = false 2026-04-19 18:18:09 +02:00
cd21ebc642 vscode. 2026-04-19 18:18:09 +02:00
d6d4cf4b76 home manager for laptop 2026-04-19 18:18:09 +02:00
a542fbed83 vscode nix settings 2026-04-19 18:18:09 +02:00
60dd1ec4ba firmware 2026-04-19 18:18:09 +02:00
8594744f53 more small things 2026-04-19 18:18:09 +02:00
c34c4758aa cleanup 2026-04-19 18:18:09 +02:00
993b4e02f4 Integrate home-manager with nixos config 2026-04-19 18:18:09 +02:00
5e506f4f27 python 2026-04-19 18:18:09 +02:00
2d47236ebe push.autoSetupRemote 2026-04-19 18:18:09 +02:00
eb39f2d59a podman-compose 2026-04-19 18:18:09 +02:00
23f076495c git-crypt 2026-04-19 18:18:09 +02:00
2fb186150d expand 2026-04-19 18:18:09 +02:00
553f102d18 unstable nixos!!! 2026-04-19 18:18:09 +02:00
9912d43e82 no rustls yet 2026-04-19 18:18:09 +02:00
c394939a22 update! 2026-04-19 18:18:09 +02:00
bfb8151bb1 add OBS 2026-04-19 18:18:09 +02:00
be253523de enable ssh 2026-04-19 18:18:09 +02:00
80019d8826 Cleanup home manager 2026-04-19 18:18:08 +02:00
366f9582d4 add tampermonkey 2026-04-19 18:18:08 +02:00
676dfcdfa0 move vscode ext 2026-04-19 18:18:08 +02:00
0219b6a48e minegrub! 2026-04-19 18:18:08 +02:00
036bd6463d reorder vscode 2026-04-19 18:18:08 +02:00
116dcc4b2c Add caddyfile vscode extension 2026-04-19 18:18:08 +02:00
9c4356456b yaml extension 2026-04-19 18:18:08 +02:00
83224e7cb2 python extension 2026-04-19 18:18:08 +02:00
7b4814c7aa ansible extension 2026-04-19 18:18:08 +02:00
39c7b465be Update 2026-04-19 18:18:08 +02:00
839fb3afa4 minecraft prism launcher 2026-04-19 18:18:08 +02:00
126193d14e update 2026-04-19 18:18:08 +02:00
049c0c14d9 update 2026-04-19 18:18:08 +02:00
b6e557f7fe Update riverdelta extension 2026-04-19 18:18:08 +02:00
582454459f update cargo-bisect-rustc 2026-04-19 18:18:08 +02:00
86033098d2 add riverdelta extension 2026-04-19 18:18:08 +02:00
edf5502d0d add vscode-eslint 2026-04-19 18:18:08 +02:00
fee00b612c update 2026-04-19 18:18:08 +02:00
d3654c97e5 wasm extension 2026-04-19 18:18:08 +02:00
623fd8db04 prettier extension 2026-04-19 18:18:08 +02:00
e2efb749bb obsidian 2026-04-19 18:18:08 +02:00
2a324b12f4 cargo-bisect-rustc 2026-04-19 18:18:08 +02:00
d4e1320f09 gh 2026-04-19 18:18:08 +02:00
b440356201 Update 2026-04-19 18:18:08 +02:00
93b5a0d802 remove the box 2026-04-19 18:18:08 +02:00
c449c94d0d add inferno 2026-04-19 18:18:08 +02:00
6d01016bd8 rustup-toolchain-install-master 2026-04-19 18:18:08 +02:00
f762443baa add funny pfush git alias 2026-04-19 18:18:08 +02:00
b71ec5dcb4 remove feh
it's unnecessary
2026-04-19 18:18:08 +02:00
5d5724bb5b podman 2026-04-19 18:18:08 +02:00
58e00c6559 postman 2026-04-19 18:18:08 +02:00
b1d782ce36 add more programs 2026-04-19 18:18:08 +02:00
60f9210e2c i have an idea 2026-04-19 18:18:08 +02:00
9c665a3826 another try for wallpapers 2026-04-19 18:18:08 +02:00
9ba32722fa remote ssh 2026-04-19 18:18:08 +02:00
b43fa049ea Revert "qemu -vga std"
This reverts commit 0c070d2b34.
2026-04-19 18:18:08 +02:00
b959a124fb qemu -vga std 2026-04-19 18:18:08 +02:00
3071be82af libvirt 2026-04-19 18:18:08 +02:00
22df6cc0af enable the box 2026-04-19 18:18:08 +02:00
db233f7b99 update to nixos 23.05 2026-04-19 18:18:08 +02:00
326a0b5446 update 2026-04-19 18:18:08 +02:00
a94b3d41c7 add some packages 2026-04-19 18:18:08 +02:00
4f317acbdd even better toml 2026-04-19 18:18:08 +02:00
1793a83394 updater 2026-04-19 18:18:08 +02:00
a469ad90bb simplify git resq 2026-04-19 18:18:08 +02:00
3770a399e6 a 2026-04-19 18:18:08 +02:00
7abe65969f remove ra as its outdated 2026-04-19 18:18:08 +02:00
fd7ccd0502 a 2026-04-19 18:18:08 +02:00
cfb4391a7a cleanup 2026-04-19 18:18:08 +02:00
f33a89c6ed more 2026-04-19 18:18:08 +02:00
429ef4744b git 2026-04-19 18:18:08 +02:00
168c4443eb more 2026-04-19 18:18:08 +02:00
6e32afc4cb more 2026-04-19 18:18:08 +02:00
33d411ea7f home 2026-04-19 18:18:08 +02:00
e7b5eca241 finish up flake 2026-04-19 18:18:08 +02:00
2f829354ea adapt config 2026-04-19 18:18:08 +02:00
48 changed files with 3679 additions and 129 deletions

3
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,3 @@
{
"tinymist.fontPaths": ["home-manager/bsod"]
}

5
README.md Normal file
View file

@ -0,0 +1,5 @@
# nixos config
## known bugs:
- $TMP pointing to a non-existing directory with direnv: https://github.com/direnv/direnv/issues/1345
broke because of a nix update, probably because direnv is using nix shell weirdly

View file

@ -0,0 +1,64 @@
diff --git a/src/toolchains.rs b/src/toolchains.rs
index a4be8cd..95e9d16 100644
--- a/src/toolchains.rs
+++ b/src/toolchains.rs
@@ -19,6 +19,49 @@ use xz2::read::XzDecoder;
use crate::{Config, GitDate};
+fn nix_patchelf(mut toolchain_path: PathBuf) -> Result<(), io::Error> {
+ toolchain_path.push("bin");
+
+ for entry in toolchain_path.read_dir()? {
+ let entry = entry?;
+ if !entry.file_type()?.is_file() {
+ continue;
+ }
+
+ eprintln!(
+ "info: you seem to be running NixOS. Attempting to patch {}",
+ entry.path().to_str().unwrap()
+ );
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
+ .arg("--set-interpreter")
+ .arg("@dynamicLinker@")
+ .arg(entry.path())
+ .output();
+ }
+
+ toolchain_path.pop();
+ toolchain_path.push("lib");
+
+ for entry in toolchain_path.read_dir()? {
+ let entry = entry?;
+ if !entry.file_type()?.is_file() {
+ continue;
+ }
+
+ eprintln!(
+ "info: you seem to be running NixOS. Attempting to patch {}",
+ entry.path().to_str().unwrap()
+ );
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
+ .arg("--set-rpath")
+ .arg("@libPath@")
+ .arg(entry.path())
+ .output();
+ }
+
+ Ok(())
+}
+
pub const YYYY_MM_DD: &str = "%Y-%m-%d";
pub(crate) const NIGHTLY_SERVER: &str = "https://static.rust-lang.org/dist";
@@ -208,7 +251,8 @@ impl Toolchain {
})?;
}
- fs::rename(tmpdir.keep(), dest).map_err(InstallError::Move)
+ fs::rename(tmpdir.into_path(), &dest).map_err(InstallError::Move)?;
+ nix_patchelf(dest).map_err(InstallError::Move)
}
pub(crate) fn remove(&self, dl_params: &DownloadParams) -> io::Result<()> {

View file

@ -0,0 +1,45 @@
pkgs: pkgs.rustPlatform.buildRustPackage {
pname = "cargo-bisect-rustc";
version = "0.6.11";
src = pkgs.fetchFromGitHub {
owner = "rust-lang";
repo = "cargo-bisect-rustc";
rev = "995147f7863377b3831f84911d21d1895437eee7";
hash = "sha256-kQmQXMiZAh2zAXkxMoxlTfjrpXMIgXlJfwOsJPIVe94=";
};
cargoHash = "sha256-WSO5LvdJkAorSwsICz9NAWKNM7x4aeNvhGLhJSO6Vi8=";
patches =
let
patchelfPatch = pkgs.runCommand "0001-patchelf.patch"
{
CC = pkgs.stdenv.cc;
patchelf = pkgs.patchelf;
libPath = "$ORIGIN/../lib:${pkgs.lib.makeLibraryPath [ pkgs.zlib ]}";
}
''
export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
substitute ${./0001-patchelf.patch} $out \
--subst-var patchelf \
--subst-var dynamicLinker \
--subst-var libPath
'';
in
pkgs.lib.optionals pkgs.stdenv.isLinux [ patchelfPatch ];
nativeBuildInputs = with pkgs; [ pkg-config ];
buildInputs = with pkgs; [ openssl xz ];
PKG_CONFIG_PATH = "${pkgs.openssl}/lib";
# Tests access the network.
doCheck = false;
meta = with pkgs.lib; {
description = "Bisects rustc, either nightlies or CI artifacts";
homepage = "https://github.com/rust-lang/cargo-bisect-rustc";
license = licenses.mit;
};
}

View file

@ -0,0 +1,23 @@
pkgs:
let
crates = import ./list.nix pkgs;
in
builtins.map
(crate: pkgs.rustPlatform.buildRustPackage {
pname = crate.pname;
version = crate.version;
src = pkgs.fetchCrate {
pname = crate.pname;
version = crate.version;
hash = crate.downloadHash;
};
cargoHash = crate.cargoHash;
meta = {
description = "${crate.pname} crate from crates.io";
homepage = "https://crates.io/crates/${crate.pname}";
};
}
)
crates

View file

@ -0,0 +1,20 @@
pkgs: [
{
pname = "cargo-dl";
version = "0.1.4";
downloadHash = "sha256-txSRmOr3tYw72xI5Dqt/y1EboaqFWEMN+lASVXLNdgQ=";
cargoHash = "sha256-bS1al2UnfUxCRjQYfvUKx19WW6sjGIwno78bORd3uBQ=";
}
{
pname = "counts";
version = "1.0.4";
downloadHash = "sha256-zLQHUHo3e/nY5UHhX03nK/gr+0rap/bSSlX7HDzr9uo=";
cargoHash = "sha256-pGrXn5/FD9RUbzt5DWM6LkEo0oHmosWy023Vd+EhcGY=";
}
{
pname = "typos-cli";
version = "1.19.0";
downloadHash = "sha256-qB0ISYBvblOGmoj1TUA9tddMHk9iDk0R3vlOWclQcMg=";
cargoHash = "sha256-ja4KrF2JdB2SVqnImdY7qdYXOJJgSftWtDCqWQ3ImYs=";
}
]

10
custom-pkgs/default.nix Normal file
View file

@ -0,0 +1,10 @@
pkgs: {
cargo-bisect-rustc = import ./cargo-bisect-rustc/default.nix pkgs;
sl = import ./sl { inherit pkgs; };
run = import ./run { inherit pkgs; };
unpem = import ./unpem { inherit pkgs; };
flash-glove80 = import ./flash-glove80 { inherit pkgs; };
u = import ./u { inherit pkgs; };
x = import ./x { inherit pkgs; };
}

View file

@ -0,0 +1,4 @@
{ pkgs }: pkgs.writeShellApplication {
name = "flash-glove80";
text = builtins.readFile ./flash.sh;
}

View file

@ -0,0 +1,65 @@
#!/usr/bin/env bash
set -euo pipefail
# shellcheck disable=SC2012
image=$(ls "$HOME"/Downloads/*.uf2 --sort time | head -n1)
image_mtime=$(stat "$image" --format "%y")
echo "flashing $image, last modified $image_mtime"
read -rp "is this correct? (y/n) "
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
echo "prompting sudo password once to avoid needing to type it again"
sudo true
wait_until_present() {
local file="$1"
local side_descr="$2"
local keys="$3"
while [ ! -e "$file" ]; do
echo "Glove80 $side_descr not connected, re-start it with $keys pressed"
sleep 5
done
echo "$side_descr is connected"
}
flash_side() {
local disk="$1"
local side_descr="$2"
if [ ! -e "$disk" ]; then
echo "$disk is missing, boot the glove80 while pressing PgDn+I"
exit 1
fi
local mountpoint
mountpoint=$(mktemp -d)
echo "mounting $disk at $mountpoint"
sudo mount "$disk" "$mountpoint"
echo "copying $image to $side_descr"
sudo cp "$image" "$mountpoint/CURRENT.UF2"
echo "done flashing $side_descr"
}
wait_and_flash() {
local side_shorthand="$1"
local side_descr="$2"
local keys="$3"
local disk="/dev/disk/by-label/GLV80${side_shorthand}BOOT"
wait_until_present "$disk" "$side_descr" "$keys"
flash_side "$disk" "$side_descr"
}
wait_and_flash "RH" "right-hand side" "PgDn+I"
wait_and_flash "LH" "left-hand side" "Magic+E"
echo "done flashing!"

View file

@ -0,0 +1,10 @@
{ pkgs ? import <nixpkgs> { } }: pkgs.writeShellScriptBin "run" ''
first="$1"
if [ -z "$first" ]; then
echo "error: must provide package name"
exit 1
fi
shift
export NIXPKGS_ALLOW_UNFREE=1
nix run --impure nixpkgs#"$first" -- "$@"
''

View file

@ -0,0 +1,9 @@
{ pkgs, ... }: pkgs.writeShellApplication {
name = "sl";
runtimeInputs = with pkgs; [ niri jq ];
derivationArgs = {
# shellcheck can't comprehend our amazingly new bash syntax
checkPhase = null;
};
text = builtins.readFile ./sl.sh;
}

30
custom-pkgs/sl/sl.sh Normal file
View file

@ -0,0 +1,30 @@
#!/usr/bin/env bash
win_id=$(niri msg --json windows | jq '.[] | select(.is_focused==true) | .id')
niri msg action move-window-to-floating
position() {
niri msg --json windows | jq ".[] | select(.id==${win_id}) | .layout.tile_pos_in_workspace_view.[0] | round"
}
while true; do
before_pos_x=${ position; }
niri msg action move-floating-window --id "$win_id" -x +50
after_pos_x=${ position; }
if [[ "$before_pos_x" == "$after_pos_x" ]]; then
break;
fi
done
while true; do
niri msg action move-floating-window --id "$win_id" -x -50
after_pos_x=${ position; }
if (( $after_pos_x <= 0 )); then
break;
fi
done
niri msg action toggle-window-floating --id "$win_id"

32
custom-pkgs/u/default.nix Normal file
View file

@ -0,0 +1,32 @@
{ pkgs, ... }: pkgs.writeShellApplication {
name = "u";
text = ''
programs=(cargo git)
if [ -z "''${1:-}" ]; then
echo "u: universial command executor"
echo "programs: ''${programs[*]}"
exit 0
fi
program_to_use=""
for program in "''${programs[@]}"; do
if PAGER=true "$program" "$1" --help >/dev/null 2>/dev/null; then
if [ -n "$program_to_use" ]; then
echo "u: conflict: $1 is provided by both $program_to_use and $program" >&2
exit 1
fi
program_to_use="$program"
fi
done
if [ -n "$program_to_use" ]; then
exec "$program_to_use" "$@"
fi
echo "error: cannot find program for $1" >&2
exit 1
'';
}

274
custom-pkgs/unpem/Cargo.lock generated Normal file
View file

@ -0,0 +1,274 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "anstream"
version = "0.6.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64e15c1ab1f89faffbf04a634d5e1962e9074f2741eef6d97f3c4e322426d526"
dependencies = [
"anstyle",
"anstyle-parse",
"anstyle-query",
"anstyle-wincon",
"colorchoice",
"is_terminal_polyfill",
"utf8parse",
]
[[package]]
name = "anstyle"
version = "1.0.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1"
[[package]]
name = "anstyle-parse"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb"
dependencies = [
"utf8parse",
]
[[package]]
name = "anstyle-query"
version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a"
dependencies = [
"windows-sys",
]
[[package]]
name = "anstyle-wincon"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5bf74e1b6e971609db8ca7a9ce79fd5768ab6ae46441c572e46cf596f59e57f8"
dependencies = [
"anstyle",
"windows-sys",
]
[[package]]
name = "base64"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "clap"
version = "4.5.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019"
dependencies = [
"clap_builder",
"clap_derive",
]
[[package]]
name = "clap_builder"
version = "4.5.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6"
dependencies = [
"anstream",
"anstyle",
"clap_lex",
"strsim",
]
[[package]]
name = "clap_derive"
version = "4.5.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "501d359d5f3dcaf6ecdeee48833ae73ec6e42723a1e52419c79abf9507eec0a0"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "clap_lex"
version = "0.7.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97"
[[package]]
name = "colorchoice"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "is_terminal_polyfill"
version = "1.70.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf"
[[package]]
name = "pem"
version = "3.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae"
dependencies = [
"base64",
"serde",
]
[[package]]
name = "proc-macro2"
version = "1.0.86"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
[[package]]
name = "serde"
version = "1.0.208"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.208"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "strsim"
version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
[[package]]
name = "syn"
version = "2.0.75"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b"
[[package]]
name = "unpem"
version = "0.1.0"
dependencies = [
"clap",
"pem",
]
[[package]]
name = "utf8parse"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
[[package]]
name = "windows-sys"
version = "0.52.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"
dependencies = [
"windows-targets",
]
[[package]]
name = "windows-targets"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
[[package]]
name = "windows_aarch64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
[[package]]
name = "windows_i686_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
[[package]]
name = "windows_i686_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
[[package]]
name = "windows_i686_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
[[package]]
name = "windows_x86_64_gnu"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
[[package]]
name = "windows_x86_64_msvc"
version = "0.52.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"

View file

@ -0,0 +1,8 @@
[package]
name = "unpem"
version = "0.1.0"
edition = "2021"
[dependencies]
clap = { version = "4.5.16", features = ["derive"] }
pem = "3.0.4"

View file

@ -0,0 +1,10 @@
{ pkgs ? import <nixpkgs> { }, ... }: pkgs.rustPlatform.buildRustPackage {
src = pkgs.lib.cleanSource ./.;
pname = "unpem";
version = "0.1.0";
cargoLock.lockFile = ./Cargo.lock;
meta = {
mainProgram = "unpem";
};
}

View file

@ -0,0 +1,34 @@
use std::{
error::Error,
io::{BufReader, Read, Write},
};
use clap::Parser;
#[derive(clap::Parser)]
struct Args {
file: Option<String>,
}
fn main() -> Result<(), Box<dyn Error>> {
let args = Args::parse();
match args.file {
None => unpem(&mut std::io::stdin().lock()),
Some(file) => {
let file = std::fs::File::open(file)?;
let mut file = BufReader::new(file);
unpem(&mut file)
}
}
}
fn unpem(input: &mut dyn Read) -> Result<(), Box<dyn Error>> {
let mut v = Vec::new();
input.read_to_end(&mut v)?;
let pem = pem::parse(v)?;
std::io::stdout().write_all(pem.contents())?;
Ok(())
}

19
custom-pkgs/x/default.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs ? import <nixpkgs> { } }: pkgs.stdenv.mkDerivation {
name = "x";
src = ./x.rs;
dontUnpack = true;
nativeBuildInputs = with pkgs; [ rustc ];
buildPhase = ''
PYTHON=${pkgs.lib.getExe pkgs.python3} rustc -Copt-level=3 --crate-name x $src --out-dir $out/bin
'';
meta = with pkgs.lib; {
description = "Helper for rust-lang/rust x.py";
homepage = "https://github.com/rust-lang/rust/blob/master/src/tools/x";
license = licenses.mit;
mainProgram = "x";
};
}

52
custom-pkgs/x/x.rs Normal file
View file

@ -0,0 +1,52 @@
// git clone https://github.com/rust-lang/rust/blob/0ea7ddcc35a2fcaa5da8a7dcfc118c9fb4a63b95/src/tools/x/src/main.rs
// patched to stop doing python probing, stop the probe, please dont, i have a python
//! Run bootstrap from any subdirectory of a rust compiler checkout.
//!
//! We prefer `exec`, to avoid adding an extra process in the process tree.
//! However, since `exec` isn't available on Windows, we indirect through
//! `exec_or_status`, which will call `exec` on unix and `status` on Windows.
//!
//! We use `powershell.exe x.ps1` on Windows, and `sh -c x` on Unix, those are
//! the ones that call `x.py`. We use `sh -c` on Unix, because it is a standard.
//! We also don't use `pwsh` on Windows, because it is not installed by default;
use std::{
env,
process::{self, Command},
os::unix::process::CommandExt,
};
fn main() {
match env::args().skip(1).next().as_deref() {
Some("--wrapper-version") => {
println!("0.1.0");
return;
}
_ => {}
}
let current = match env::current_dir() {
Ok(dir) => dir,
Err(err) => {
eprintln!("Failed to get current directory: {err}");
process::exit(1);
}
};
for dir in current.ancestors() {
let candidate = dir.join("x.py");
if candidate.exists() {
let mut cmd = Command::new(env!("PYTHON"));
cmd.arg(dir.join("x.py"));
cmd.args(env::args().skip(1)).current_dir(dir);
let error = cmd.exec();
eprintln!("Failed to invoke `{:?}`: {}", cmd, error);
}
}
eprintln!(
"x.py not found. Please run inside of a checkout of `https://github.com/rust-lang/rust`."
);
process::exit(1);
}

10
docker-images/build.sh Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
p=$(dirname "$0")
for dockerfile in "$p"/*.Dockerfile; do
imgname=$(basename "$dockerfile" .Dockerfile)
echo "Building $dockerfile"
docker build "$p" -t "$imgname:latest" -f "$dockerfile"
done

View file

@ -0,0 +1,6 @@
FROM debian:12
RUN apt-get update && apt-get install -y build-essential clang git curl vim
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup-init.sh
RUN sh rustup-init.sh -y && rm rustup-init.sh

260
flake.lock generated
View file

@ -1,61 +1,283 @@
{ {
"nodes": { "nodes": {
"clippyboard": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1770482323,
"narHash": "sha256-RFvjR94RV09DxPuYgp+tStXXJSZy9a8GkTVKdEHFAOo=",
"owner": "Noratrieb",
"repo": "clippyboard",
"rev": "91134a085402ce78238c86574d557f703715a111",
"type": "github"
},
"original": {
"owner": "Noratrieb",
"repo": "clippyboard",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nur",
"nixpkgs"
]
},
"locked": {
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1681092193, "lastModified": 1776562531,
"narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=", "narHash": "sha256-Lh5Ns9DI67E+lSMOCGK0S+mFPy0mz0yOGiJTUXiR9JI=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af", "rev": "5b56ad02dc643808b8af6d5f3ff179e2ce9593f4",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-22.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
}, },
"minegrub-theme": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1689938346,
"narHash": "sha256-uB6B1c0vFwng5SHLNxR5LgPfxOW26O8TL0hCn02uwCI=",
"owner": "Lxtharia",
"repo": "minegrub-theme",
"rev": "b6f8a3a7e2fd22d72e2dbdaf563ad0bcb5c78e45",
"type": "github"
},
"original": {
"owner": "Lxtharia",
"repo": "minegrub-theme",
"rev": "b6f8a3a7e2fd22d72e2dbdaf563ad0bcb5c78e45",
"type": "github"
}
},
"niri": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1776602954,
"narHash": "sha256-C41nazGNIM/58ISKaIirq8/z1sDgS6CVJnWBwAzhaGQ=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "c175f415488243723dc1a5514b286abbea6f93c1",
"type": "github"
},
"original": {
"owner": "sodiboo",
"repo": "niri-flake",
"type": "github"
}
},
"niri-stable": {
"flake": false,
"locked": {
"lastModified": 1756556321,
"narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"ref": "v25.08",
"repo": "niri",
"type": "github"
}
},
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1776598536,
"narHash": "sha256-7Bbp0fDBJMDRpKfdHelMXbhY51bdCa5+Qn/+XONaOwk=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "68bb942d2146cd2c8af69c0f16db18396b4388fe",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1684398685, "lastModified": 1776169885,
"narHash": "sha256-TRE62m91iZ5ArVMgA+uj22Yda8JoQuuhc9uwZ+NoX+0=", "narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1776434932,
"narHash": "sha256-gyqXNMgk3sh+ogY5svd2eNLJ6oEwzbAeaoBrrxD0lKk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c7f47036d3df2add644c46d712d14262b7d86c0c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1720535198,
"narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "628d4bb6e9f4f0c30cfd9b23d3c1cdcec9d3cb5c", "rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-22.11", "ref": "nixos-23.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1776169885,
"narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1776169885,
"narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1776614809,
"narHash": "sha256-BnQwcKSWlzpe5BdywlGkIoG4dzIDhGdtFKYn2Q+BBDs=",
"owner": "nix-community",
"repo": "NUR",
"rev": "561c40a02ec3372f469471fb8ee6e8deb91815d5",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": { "root": {
"inputs": { "inputs": {
"clippyboard": "clippyboard",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs" "minegrub-theme": "minegrub-theme",
"niri": "niri",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable_2",
"nur": "nur"
} }
}, },
"utils": { "xwayland-satellite-stable": {
"flake": false,
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1755491097,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=",
"owner": "numtide", "owner": "Supreeeme",
"repo": "flake-utils", "repo": "xwayland-satellite",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "388d291e82ffbc73be18169d39470f340707edaa",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "Supreeeme",
"repo": "flake-utils", "ref": "v0.7",
"repo": "xwayland-satellite",
"type": "github"
}
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1773622265,
"narHash": "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "a879e5e0896a326adc79c474bf457b8b99011027",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github" "type": "github"
} }
} }

View file

@ -1,44 +1,69 @@
# Adapted from https://github.com/Misterio77/nix-starter-configs
{ {
description = "Your new nix config"; description = "NixOS configuration";
inputs = { inputs = {
# Nixpkgs # Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-23.11";
nur.url = "github:nix-community/NUR";
# Home manager # Home manager
home-manager.url = "github:nix-community/home-manager/release-22.11"; home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
# TODO: Add any other flake you might need minegrub-theme.url = "github:Lxtharia/minegrub-theme/b6f8a3a7e2fd22d72e2dbdaf563ad0bcb5c78e45";
# hardware.url = "github:nixos/nixos-hardware"; minegrub-theme.inputs.nixpkgs.follows = "nixpkgs";
# Shameless plug: looking for a way to nixify your themes and make niri.url = "github:sodiboo/niri-flake";
# everything match nicely? Try nix-colors!
# nix-colors.url = "github:misterio77/nix-colors"; clippyboard.url = "github:Noratrieb/clippyboard";
clippyboard.inputs.nixpkgs.follows = "nixpkgs";
# for firefox-nightly
# firefox.url = "github:nix-community/flake-firefox-nightly";
# firefox.inputs.nixpkgs.follows = "nixpkgs";
}; };
outputs = { nixpkgs, home-manager, ... }@inputs: { outputs = { nixpkgs, home-manager, nur, ... }@inputs: {
# NixOS configuration entrypoint # NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname' # Available through 'nixos-rebuild --flake .#nixos'
nixosConfigurations = { nixosConfigurations = {
# FIXME replace with your hostname nixos = nixpkgs.lib.nixosSystem {
your-hostname = nixpkgs.lib.nixosSystem { system = "x86_64-linux";
specialArgs = { inherit inputs; }; # Pass flake inputs to our config specialArgs = { inherit inputs; };
# > Our main nixos configuration file < modules = [
modules = [ ./nixos/configuration.nix ]; ./nixos/desktop.nix
inputs.minegrub-theme.nixosModules.default
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.nora = import ./home-manager/home.nix;
home-manager.extraSpecialArgs = { inherit inputs; };
}
];
};
scrap = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./nixos/laptop.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.nora = import ./home-manager/laptop.nix;
home-manager.extraSpecialArgs = { inherit inputs; };
}
];
}; };
}; };
# Standalone home-manager configuration entrypoint devShells.${"x86_64-linux"}.c-env = import ./shells/c-env.nix {
# Available through 'home-manager --flake .#your-username@your-hostname' pkgs = import nixpkgs { system = "x86_64-linux"; };
homeConfigurations = {
# FIXME replace with your username@hostname
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
# > Our main home-manager configuration file <
modules = [ ./home-manager/home.nix ];
};
}; };
}; };
} }

View file

@ -0,0 +1,36 @@
{ pkgs, inputs, ... }:
let
customPkgs = import ../custom-pkgs pkgs;
crates = import ../custom-pkgs/crates pkgs;
in
with pkgs; [
bacon
bat
cargo-cross
cargo-expand
cargo-mommy
cargo-nextest
dig
fzf
gcc
gdb
gh
git-absorb
git-crypt
hollywood
htop
hyperfine
killall
llvmPackages_21.bintools-unwrapped
inferno
jq
jujutsu
p7zip
python3
rustup-toolchain-install-master
samply
tokei
customPkgs.u
customPkgs.sl
uwuify
] ++ crates

94
home-manager/common.nix Normal file
View file

@ -0,0 +1,94 @@
{ lib
, pkgs
, ...
}:
let
customPkgs = import ../custom-pkgs/default.nix pkgs;
in
{
programs.neovim.enable = true;
home.file.".cargo/config.toml" = {
text = ''
[target.x86_64-unknown-linux-gnu]
linker = "${lib.getExe pkgs.llvmPackages_21.clang}"
rustflags = ["-Clink-arg=-fuse-ld=${lib.getExe' pkgs.mold "mold"}", "-Ctarget-cpu=native"]
'';
};
home.file.".config/gdb/gdbinit" = {
text = ''
set disassembly-flavor intel
'';
};
home.file.".config/gdb/gdbearlyinit" = {
text = ''
set startup-quietly on
'';
};
programs.zoxide = {
enable = true;
enableFishIntegration = true;
};
programs.direnv = {
enable = true;
};
programs.eza = {
enable = true;
};
programs.ripgrep.enable = true;
programs.fd.enable = true;
programs.fish = {
enable = true;
interactiveShellInit = ''
set fish_greeting # Disable greeting
'';
shellAbbrs = {
flamegraph = "perf script | inferno-collapse-perf | inferno-flamegraph > out.svg && firefox out.svg";
c = "cargo";
g = "git";
sc = "scratch";
};
shellAliases = {
x = "CARGO_MOMMYS_ACTUAL=${lib.getExe customPkgs.x} ${lib.getExe' pkgs.cargo-mommy "cargo-mommy"}";
};
functions = {
"scratch" = {
description = "Makes a temporary directory and moves into it";
body = ''
cd "$(mktemp --tmpdir -d scratchXXXXXXXXX)"
'';
};
};
};
programs.hyfetch = {
enable = true;
settings = {
preset = "transgender";
mode = "rgb";
light_dark = "dark";
lightness = 0.65;
color_align = {
mode = "horizontal";
custom_colors = [ ];
fore_back = null;
};
backend = "fastfetch";
args = null;
distro = null;
pride_month_shown = [ ];
pride_month_disable = false;
};
};
programs.home-manager.enable = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "22.11";
}

604
home-manager/config.kdl Normal file
View file

@ -0,0 +1,604 @@
// This config is in the KDL format: https://kdl.dev
// "/-" comments out the following node.
// Check the wiki for a full description of the configuration:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
// Input device configuration.
// Find the full list of options on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
input {
keyboard {
xkb {
// You can set rules, model, layout, variant and options.
// For more information, see xkeyboard-config(7).
// For example:
layout "ch"
// options "compose:rctrl" // i need rctrl for the glove80 so lets remove this for now
// options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
}
}
// Next sections include libinput settings.
// Omitting settings disables them, or leaves them at their default values.
touchpad {
// off
tap
// dwt
// dwtp
// drag-lock
natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "two-finger"
// disabled-on-external-mouse
}
mouse {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "no-scroll"
}
trackpoint {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "on-button-down"
// scroll-button 273
// middle-emulation
}
// Uncomment this to make the mouse warp to the center of newly focused windows.
// warp-mouse-to-focus
// Focus windows and outputs automatically when moving the mouse into them.
// Setting max-scroll-amount="0%" makes it work only on windows already fully on screen.
// focus-follows-mouse max-scroll-amount="0%"
}
// You can configure outputs by their name, which you can find
// by running `niri msg outputs` while inside a niri instance.
// The built-in laptop monitor is usually called "eDP-1".
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
// Remember to uncomment the node by removing "/-"!
/-output "eDP-1" {
// Uncomment this line to disable this output.
// off
// Resolution and, optionally, refresh rate of the output.
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
// If the refresh rate is omitted, niri will pick the highest refresh rate
// for the resolution.
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
mode "1920x1080@120.030"
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
scale 2
// Transform allows to rotate the output counter-clockwise, valid values are:
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
transform "normal"
// Position of the output in the global coordinate space.
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
// The cursor can only move between directly adjacent outputs.
// Output scale and rotation has to be taken into account for positioning:
// outputs are sized in logical, or scaled, pixels.
// For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
// so to put another output directly adjacent to it on the right, set its x to 1920.
// If the position is unset or results in an overlap, the output is instead placed
// automatically.
position x=1280 y=0
}
output "Samsung Electric Company LC27G7xT H1AK500000" {
// variable-refresh-rate
}
// Settings that influence how windows are positioned and sized.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Layout
layout {
// Set gaps around windows in logical pixels.
gaps 16
// When to center a column when changing focus, options are:
// - "never", default behavior, focusing an off-screen column will keep at the left
// or right edge of the screen.
// - "always", the focused column will always be centered.
// - "on-overflow", focusing a column will center it if it doesn't fit
// together with the previously focused column.
center-focused-column "never"
// You can customize the widths that "switch-preset-column-width" (Mod+R) toggles between.
preset-column-widths {
// Proportion sets the width as a fraction of the output width, taking gaps into account.
// For example, you can perfectly fit four windows sized "proportion 0.25" on an output.
// The default preset widths are 1/3, 1/2 and 2/3 of the output.
proportion 0.33333
proportion 0.5
proportion 0.66667
// Fixed sets the width in logical pixels exactly.
// fixed 1920
}
// You can also customize the heights that "switch-preset-window-height" (Mod+Shift+R) toggles between.
// preset-window-heights { }
// You can change the default width of the new windows.
default-column-width { proportion 0.5; }
// If you leave the brackets empty, the windows themselves will decide their initial width.
// default-column-width {}
// By default focus ring and border are rendered as a solid background rectangle
// behind windows. That is, they will show up through semitransparent windows.
// This is because windows using client-side decorations can have an arbitrary shape.
//
// If you don't like that, you should uncomment `prefer-no-csd` below.
// Niri will draw focus ring and border *around* windows that agree to omit their
// client-side decorations.
//
// Alternatively, you can override it with a window rule called
// `draw-border-with-background`.
// You can change how the focus ring looks.
focus-ring {
// Uncomment this line to disable the focus ring.
// off
// How many logical pixels the ring extends out from the windows.
width 4
// Colors can be set in a variety of ways:
// - CSS named colors: "red"
// - RGB hex: "#rgb", "#rgba", "#rrggbb", "#rrggbbaa"
// - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others.
// Color of the ring on the active monitor.
active-color "#db88c5"
// Color of the ring on inactive monitors.
inactive-color "#505050"
// You can also use gradients. They take precedence over solid colors.
// Gradients are rendered the same as CSS linear-gradient(angle, from, to).
// The angle is the same as in linear-gradient, and is optional,
// defaulting to 180 (top-to-bottom gradient).
// You can use any CSS linear-gradient tool on the web to set these up.
// Changing the color space is also supported, check the wiki for more info.
//
// active-gradient from="#80c8ff" to="#bbddff" angle=45
// You can also color the gradient relative to the entire view
// of the workspace, rather than relative to just the window itself.
// To do that, set relative-to="workspace-view".
//
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
// You can also add a border. It's similar to the focus ring, but always visible.
border {
// The settings are the same as for the focus ring.
// If you enable the border, you probably want to disable the focus ring.
off
width 4
active-color "#ffc87f"
inactive-color "#505050"
// active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view"
// inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view"
}
// You can enable drop shadows for windows.
shadow {
// Uncomment the next line to enable shadows.
on
// By default, the shadow draws only around its window, and not behind it.
// Uncomment this setting to make the shadow draw behind its window.
//
// Note that niri has no way of knowing about the CSD window corner
// radius. It has to assume that windows have square corners, leading to
// shadow artifacts inside the CSD rounded corners. This setting fixes
// those artifacts.
//
// However, instead you may want to set prefer-no-csd and/or
// geometry-corner-radius. Then, niri will know the corner radius and
// draw the shadow correctly, without having to draw it behind the
// window. These will also remove client-side shadows if the window
// draws any.
//
draw-behind-window true
// You can change how shadows look. The values below are in logical
// pixels and match the CSS box-shadow properties.
// Softness controls the shadow blur radius.
softness 30
// Spread expands the shadow.
spread 5
// Offset moves the shadow relative to the window.
offset x=0 y=5
// You can also change the shadow color and opacity.
color "#0007"
}
// Struts shrink the area occupied by windows, similarly to layer-shell panels.
// You can think of them as a kind of outer gaps. They are set in logical pixels.
// Left and right struts will cause the next window to the side to always be visible.
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
// layer-shell panels and regular gaps.
struts {
// left 64
// right 64
// top 64
// bottom 64
}
}
// Add lines like this to spawn processes at startup.
// Note that running niri as a session supports xdg-desktop-autostart,
// which may be more convenient to use.
// See the binds section below for more spawn examples.
environment {
ELECTRON_OZONE_PLATFORM_HINT "auto"
}
// Uncomment this line to ask the clients to omit their client-side decorations if possible.
// If the client will specifically ask for CSD, the request will be honored.
// Additionally, clients will be informed that they are tiled, removing some client-side rounded corners.
// This option will also fix border/focus ring drawing behind some semitransparent windows.
// After enabling or disabling this, you need to restart the apps for this to take effect.
// prefer-no-csd
// You can change the path where screenshots are saved.
// A ~ at the front will be expanded to the home directory.
// The path is formatted with strftime(3) to give you the screenshot date and time.
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
// You can also set this to null to disable saving screenshots to disk.
// screenshot-path null
// Animation settings.
// The wiki explains how to configure individual animations:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Animations
animations {
// Uncomment to turn off all animations.
// off
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
}
// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
// Work around WezTerm's initial configure bug
// by setting an empty default-column-width.
window-rule {
// This regular expression is intentionally made as specific as possible,
// since this is the default config, and we want no false positives.
// You can get away with just app-id="wezterm" if you want.
match app-id=r#"^org\.wezfurlong\.wezterm$"#
default-column-width {}
}
// Open the Firefox picture-in-picture player as floating by default.
window-rule {
// This app-id regular expression will work for both:
// - host Firefox (app-id is "firefox")
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
open-floating true
}
// Example: block out two password managers from screen capture.
// (This example rule is commented out with a "/-" in front.)
/-window-rule {
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
match app-id=r#"^org\.gnome\.World\.Secrets$"#
block-out-from "screen-capture"
// Use this instead if you want them visible on third-party screenshot tools.
// block-out-from "screencast"
}
// Example: enable rounded corners for all windows.
// (This example rule is commented out with a "/-" in front.)
window-rule {
geometry-corner-radius 8
clip-to-geometry true
}
window-rule {
match app-id="Spotify"
open-on-output "Samsung Electric Company SMS24A450/460 HVMBA01140"
}
window-rule {
match app-id="discord"
open-on-output "Lenovo Group Limited LEN G25-10 U4B30R14"
}
window-rule {
match app-id="clippyboard"
open-floating true
}
binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program
// like wev.
//
// "Mod" is a special modifier equal to Super when running on a TTY, and to Alt
// when running as a winit window.
//
// Most actions that you can bind here can also be invoked programmatically with
// `niri msg action do-something`.
// Mod-Shift-/, which is usually the same as Mod-?,
// shows a list of important hotkeys.
Mod+Shift+Slash { show-hotkey-overlay; }
// Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+T { spawn "alacritty"; }
Mod+D { spawn "fuzzel"; }
Super+Alt+L { spawn "lock-and-power-off-screen"; }
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
// Note: the entire command goes as a single argument in the end.
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
Mod+Q { close-window; }
Mod+Left { focus-column-left; }
Mod+Down { focus-window-down; }
Mod+Up { focus-window-up; }
Mod+Right { focus-column-right; }
Mod+H { focus-column-left; }
Mod+J { focus-window-down; }
Mod+K { focus-window-up; }
Mod+L { focus-column-right; }
Mod+Ctrl+Left { move-column-left; }
Mod+Ctrl+Down { move-window-down; }
Mod+Ctrl+Up { move-window-up; }
Mod+Ctrl+Right { move-column-right; }
Mod+Ctrl+H { move-column-left; }
Mod+Ctrl+J { move-window-down; }
Mod+Ctrl+K { move-window-up; }
Mod+Ctrl+L { move-column-right; }
// Alternative commands that move across workspaces when reaching
// the first or last window in a column.
// Mod+J { focus-window-or-workspace-down; }
// Mod+K { focus-window-or-workspace-up; }
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
Mod+Home { focus-column-first; }
Mod+End { focus-column-last; }
Mod+Ctrl+Home { move-column-to-first; }
Mod+Ctrl+End { move-column-to-last; }
Mod+Shift+Left { focus-monitor-left; }
Mod+Shift+Down { focus-monitor-down; }
Mod+Shift+Up { focus-monitor-up; }
Mod+Shift+Right { focus-monitor-right; }
Mod+Shift+H { focus-monitor-left; }
Mod+Shift+J { focus-monitor-down; }
Mod+Shift+K { focus-monitor-up; }
Mod+Shift+L { focus-monitor-right; }
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
// Alternatively, there are commands to move just a single window:
// Mod+Shift+Ctrl+Left { move-window-to-monitor-left; }
// ...
// And you can also move a whole workspace to another monitor:
// Mod+Shift+Ctrl+Left { move-workspace-to-monitor-left; }
// ...
Mod+Page_Down { focus-workspace-down; }
Mod+Page_Up { focus-workspace-up; }
Mod+U { focus-workspace-down; }
Mod+I { focus-workspace-up; }
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
Mod+Ctrl+U { move-column-to-workspace-down; }
Mod+Ctrl+I { move-column-to-workspace-up; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
// ...
Mod+Shift+Page_Down { move-workspace-down; }
Mod+Shift+Page_Up { move-workspace-up; }
Mod+Shift+U { move-workspace-down; }
Mod+Shift+I { move-workspace-up; }
// You can bind mouse wheel scroll ticks using the following syntax.
// These binds will change direction based on the natural-scroll setting.
//
// To avoid scrolling through workspaces really fast, you can use
// the cooldown-ms property. The bind will be rate-limited to this value.
// You can set a cooldown on any bind, but it's most useful for the wheel.
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
Mod+WheelScrollRight { focus-column-right; }
Mod+WheelScrollLeft { focus-column-left; }
Mod+Ctrl+WheelScrollRight { move-column-right; }
Mod+Ctrl+WheelScrollLeft { move-column-left; }
// Usually scrolling up and down with Shift in applications results in
// horizontal scrolling; these binds replicate that.
Mod+Shift+WheelScrollDown { focus-column-right; }
Mod+Shift+WheelScrollUp { focus-column-left; }
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
// Similarly, you can bind touchpad scroll "ticks".
// Touchpad scrolling is continuous, so for these binds it is split into
// discrete intervals.
// These binds are also affected by touchpad's natural-scroll, so these
// example binds are "inverted", since we have natural-scroll enabled for
// touchpads by default.
// Mod+TouchpadScrollDown { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
// Mod+TouchpadScrollUp { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
// You can refer to workspaces by index. However, keep in mind that
// niri is a dynamic workspace system, so these commands are kind of
// "best effort". Trying to refer to a workspace index bigger than
// the current workspace count will instead refer to the bottommost
// (empty) workspace.
//
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
// will all refer to the 3rd workspace.
Mod+1 { focus-workspace 1; }
Mod+2 { focus-workspace 2; }
Mod+3 { focus-workspace 3; }
Mod+4 { focus-workspace 4; }
Mod+5 { focus-workspace 5; }
Mod+6 { focus-workspace 6; }
Mod+7 { focus-workspace 7; }
Mod+8 { focus-workspace 8; }
Mod+9 { focus-workspace 9; }
Mod+Ctrl+1 { move-column-to-workspace 1; }
Mod+Ctrl+2 { move-column-to-workspace 2; }
Mod+Ctrl+3 { move-column-to-workspace 3; }
Mod+Ctrl+4 { move-column-to-workspace 4; }
Mod+Ctrl+5 { move-column-to-workspace 5; }
Mod+Ctrl+6 { move-column-to-workspace 6; }
Mod+Ctrl+7 { move-column-to-workspace 7; }
Mod+Ctrl+8 { move-column-to-workspace 8; }
Mod+Ctrl+9 { move-column-to-workspace 9; }
// Alternatively, there are commands to move just a single window:
// Mod+Ctrl+1 { move-window-to-workspace 1; }
// Switches focus between the current and the previous workspace.
// Mod+Tab { focus-workspace-previous; }
// The following binds move the focused window in and out of a column.
// If the window is alone, they will consume it into the nearby column to the side.
// If the window is already in a column, they will expel it out.
Mod+BracketLeft { consume-or-expel-window-left; }
Mod+BracketRight { consume-or-expel-window-right; }
// Consume one window from the right to the bottom of the focused column.
Mod+Comma { consume-window-into-column; }
// Expel the bottom window from the focused column to the right.
Mod+Period { expel-window-from-column; }
Mod+R { switch-preset-column-width; }
Mod+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; }
Mod+F { maximize-column; }
Mod+Shift+F { fullscreen-window; }
// Expand the focused column to space not taken up by other fully visible columns.
// Makes the column "fill the rest of the space".
Mod+Ctrl+F { expand-column-to-available-width; }
Mod+C { center-column; }
// Finer width adjustments.
// This command can also:
// * set width in pixels: "1000"
// * adjust width in pixels: "-5" or "+5"
// * set width as a percentage of screen width: "25%"
// * adjust width as a percentage of screen width: "-10%" or "+10%"
// Pixel sizes use logical, or scaled, pixels. I.e. on an output with scale 2.0,
// set-column-width "100" will make the column occupy 200 physical screen pixels.
// requires the numpad but at least makes it possible at all
Mod+KP_Subtract { set-column-width "-10%"; }
Mod+KP_Add { set-column-width "+10%"; }
// Finer height adjustments when in column with other windows.
// requires the numpad but at least makes it possible at all
Mod+Shift+KP_Subtract { set-window-height "-10%"; }
Mod+Shift+KP_Add { set-window-height "+10%"; }
// Move the focused window between the floating and the tiling layout.
Mod+P { toggle-window-floating; }
Mod+Shift+P { switch-focus-between-floating-and-tiling; }
// move around floating windows, sadly not available via binds directly.
Mod+Alt+Up { spawn "niri" "msg" "action" "move-floating-window" "-y" "-50"; }
Mod+Alt+Down { spawn "niri" "msg" "action" "move-floating-window" "-y" "+50"; }
Mod+Alt+Right { spawn "niri" "msg" "action" "move-floating-window" "-x" "+50"; }
Mod+Alt+Left { spawn "niri" "msg" "action" "move-floating-window" "-x" "-50"; }
Mod+S { set-dynamic-cast-window; }
Mod+Shift+S { set-dynamic-cast-monitor; }
// Toggle tabbed column display mode.
// Windows in this column will appear as vertical tabs,
// rather than stacked on top of each other.
Mod+W { toggle-column-tabbed-display; }
// Actions to switch layouts.
// Note: if you uncomment these, make sure you do NOT have
// a matching layout switch hotkey configured in xkb options above.
// Having both at once on the same hotkey will break the switching,
// since it will switch twice upon pressing the hotkey (once by xkb, once by niri).
// Mod+Space { switch-layout "next"; }
// Mod+Shift+Space { switch-layout "prev"; }
Print { screenshot show-pointer=false; }
Ctrl+Print { screenshot-screen show-pointer=false; }
Alt+Print { screenshot-window; }
// Applications such as remote-desktop clients and software KVM switches may
// request that niri stops processing the keyboard shortcuts defined here
// so they may, for example, forward the key presses as-is to a remote machine.
// It's a good idea to bind an escape hatch to toggle the inhibitor,
// so a buggy application can't hold your session hostage.
//
// The allow-inhibiting=false property can be applied to other binds as well,
// which ensures niri always processes them, even when an inhibitor is active.
Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; }
// The quit action will show a confirmation dialog to avoid accidental exits.
Mod+Shift+E { quit; }
Ctrl+Alt+Delete { quit; }
// Paste from clippyboard
Mod+V { spawn "clippyboard-select"; }
Mod+Shift+V { spawn "clippyboard-clear"; }
}

View file

@ -0,0 +1,327 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, Roboto, Helvetica, Arial, sans-serif;
font-size: 13px;
}
window#waybar {
background-color: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
/*
window#waybar.empty {
background-color: transparent;
}
window#waybar.solo {
background-color: #FFFFFF;
}
*/
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: none;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
box-shadow: inset 0 -3px #ffffff;
}
/* you can set a style on hover for any module like this */
#pulseaudio:hover {
background-color: #a37800;
}
#workspaces button {
padding: 0 5px;
background-color: transparent;
color: #ffffff;
}
#workspaces button:hover {
background: rgba(0, 0, 0, 0.2);
}
#workspaces button.focused {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
box-shadow: inset 0 -3px #ffffff;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#scratchpad,
#power-profiles-daemon,
#mpd {
padding: 0 10px;
color: #ffffff;
}
#window,
#workspaces {
margin: 0 4px;
}
/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
margin-left: 0;
}
/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
margin-right: 0;
}
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: #000000;
}
#battery.charging, #battery.plugged {
color: #ffffff;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
#power-profiles-daemon {
padding-right: 15px;
}
#power-profiles-daemon.performance {
background-color: #f53c3c;
color: #ffffff;
}
#power-profiles-daemon.balanced {
background-color: #2980b9;
color: #ffffff;
}
#power-profiles-daemon.power-saver {
background-color: #2ecc71;
color: #000000;
}
label:focus {
background-color: #000000;
}
#cpu {
background-color: #2ecc71;
color: #000000;
}
#memory {
background-color: #9b59b6;
}
#disk {
background-color: #964B00;
}
#backlight {
background-color: #90b1b1;
}
#network {
background-color: #2980b9;
}
#network.disconnected {
background-color: #f53c3c;
}
#pulseaudio {
background-color: #f1c40f;
color: #000000;
}
#pulseaudio.muted {
background-color: #90b1b1;
color: #2a5c45;
}
#wireplumber {
background-color: #fff0f5;
color: #000000;
}
#wireplumber.muted {
background-color: #f53c3c;
}
#custom-media {
background-color: #66cc99;
color: #2a5c45;
min-width: 100px;
}
#custom-media.custom-spotify {
background-color: #66cc99;
}
#custom-media.custom-vlc {
background-color: #ffa000;
}
#temperature {
background-color: #f0932b;
}
#temperature.critical {
background-color: #eb4d4b;
}
#tray {
background-color: #2980b9;
}
#tray > .passive {
-gtk-icon-effect: dim;
}
#tray > .needs-attention {
-gtk-icon-effect: highlight;
background-color: #eb4d4b;
}
#idle_inhibitor {
background-color: #2d3436;
}
#idle_inhibitor.activated {
background-color: #ecf0f1;
color: #2d3436;
}
#mpd {
background-color: #66cc99;
color: #2a5c45;
}
#mpd.disconnected {
background-color: #f53c3c;
}
#mpd.stopped {
background-color: #90b1b1;
}
#mpd.paused {
background-color: #51a37a;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state > label {
padding: 0 5px;
}
#keyboard-state > label.locked {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad {
background: rgba(0, 0, 0, 0.2);
}
#scratchpad.empty {
background-color: transparent;
}
#privacy {
padding: 0;
}
#privacy-item {
padding: 0 5px;
color: white;
}
#privacy-item.screenshare {
background-color: #cf5700;
}
#privacy-item.audio-in {
background-color: #1ca000;
}
#privacy-item.audio-out {
background-color: #0069d4;
}

51
home-manager/firefox.nix Normal file
View file

@ -0,0 +1,51 @@
{ pkgs, ... }: {
programs.firefox = {
enable = true;
profiles = {
nora = {
id = 0;
name = "nora";
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
bitwarden
tampermonkey
sidebery
darkreader
];
bookmarks = {
force = true;
settings = [
{
name = "Nix sites";
toolbar = true;
bookmarks = [
{
name = "NixOS options";
url = "https://search.nixos.org/options";
}
{
name = "home-manager options";
url = "https://rycee.gitlab.io/home-manager/options.html";
}
{
name = "nixpkgs search";
url = "https://search.nixos.org/packages";
}
{
name = "Github Notifications";
url = "https://github.com/notifications";
}
{
name = "glove80 layout";
url = "https://my.moergo.com/glove80/#/layout/user/4ade12f3-81d7-4342-8196-9c13c43ac94e";
}
];
}
];
};
};
};
};
}

56
home-manager/git.nix Normal file
View file

@ -0,0 +1,56 @@
{ pkgs, lib, ... }: {
programs.git = {
enable = true;
signing.format = null;
settings = {
user = {
name = "Noratrieb";
email = "48135649+Noratrieb@users.noreply.github.com";
};
alias = {
# simple aliases
c = "checkout";
st = "status";
p = "push";
rc = "rebase --continue";
ra = "rebase --abort";
amend = "commit --amend --no-edit";
# complex renames
hardupdate = "!git fetch && git reset --hard \"origin/$(git rev-parse --abbrev-ref HEAD)\"";
fpush = "push --force-with-lease";
resq = "rebase --autosquash -i";
autosquash = "!${lib.getExe pkgs.git-revise} -i $(git merge-base HEAD origin/HEAD) --autosquash";
autosq = "autosquash";
pfush = "!echo \"hör uf ume z'pfusche und machs richtig\"";
sw = "!git checkout $(git branch --format \"%(refname:lstrip=2)\" | ${lib.getExe' pkgs.fzf "fzf"})";
# lol
build = "!cargo build";
};
# TODO: See https://jvns.ca/blog/2024/02/16/popular-git-config-options
core.autocrlf = false;
core.editor = "${lib.getExe pkgs.neovim}";
pull.ff = "only";
push.autoSetupRemote = true;
init.defaultBranch = "main";
merge.conflictstyle = "zdiff3";
# https://github.com/rust-lang/rust/blob/a83cf567b5949691de67f06895d9fe0404c40d27/.git-blame-ignore-revs
# doesn't work cause lol its an error to not have the file
# blame.ignoreRevsFile = ".git-blame-ignore-revs";
# This makes it so that pushing always uses SSH, even if the remote was configured as HTTPS.
"url \"git@github.com:\"".pushInsteadOf = "https://github.com/";
"url \"git@gitlab.com:\"".pushInsteadOf = "https://gitlab.com/";
"url \"git@gist.github.com:\"".pushInsteadOf = "https://gist.github.com/";
};
};
programs.difftastic = {
enable = true;
git.enable = true;
};
}

View file

@ -1,7 +1,14 @@
# This is your home-manager configuration file # This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix) # Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{ inputs, lib, config, pkgs, ... }: { { pkgs
, inputs
, ...
}:
let
customPkgs = import ../custom-pkgs/default.nix pkgs;
in
{
# You can import other home-manager modules here # You can import other home-manager modules here
imports = [ imports = [
# If you want to use home-manager modules from other flakes (such as nix-colors): # If you want to use home-manager modules from other flakes (such as nix-colors):
@ -9,47 +16,72 @@
# You can also split up your configuration and import pieces of it here: # You can also split up your configuration and import pieces of it here:
# ./nvim.nix # ./nvim.nix
./common.nix
./git.nix
./firefox.nix
./vscode.nix
./waybar.nix
./wallpaper.nix
./swaylock.nix
./swaync.nix
]; ];
nixpkgs = {
# You can add overlays here
overlays = [
# If you want to use overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = (_: true);
};
};
# TODO: Set your username
home = { home = {
username = "your-username"; username = "nora";
homeDirectory = "/home/your-username"; homeDirectory = "/home/nora";
}; };
# Add stuff for your user as you see fit: programs.obs-studio = {
# programs.neovim.enable = true; enable = true;
# home.packages = with pkgs; [ steam ]; plugins = with pkgs.obs-studio-plugins; [ obs-pipewire-audio-capture ];
};
# Enable home-manager and git programs.niri = {
programs.home-manager.enable = true; config = builtins.readFile ./config.kdl;
programs.git.enable = true; };
services.playerctld.enable = true;
home.packages = with pkgs; [
audacity
customPkgs.cargo-bisect-rustc
customPkgs.run
customPkgs.unpem
customPkgs.flash-glove80
discord
obsidian
prismlauncher
spotify
libreoffice
rustup # rustup from nix for rust :)
gamescope # so i can put it in steam startup command lines
wl-clipboard
(olympus.override {
celesteWrapper = "steam-run";
})
archipelago
(pkgs.writeShellApplication {
name = "lock-and-power-off-screen";
text = ''
niri msg action power-off-monitors
exec swaylock
'';
})
(pkgs.writeShellApplication {
name = "shell.nix";
text = ''
cat > shell.nix <<EOF
{ pkgs ? import <nixpkgs> {} }: pkgs.mkShell {
buildInputs = with pkgs; [ ];
packages = with pkgs; [ ];
}
EOF
echo "use nix" > .envrc
'';
})
] ++ import ./common-packages.nix { inherit pkgs inputs; };
# Nicely reload system units when changing configs # Nicely reload system units when changing configs
systemd.user.startServices = "sd-switch"; systemd.user.startServices = "sd-switch";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "22.11";
} }

9
home-manager/laptop.nix Normal file
View file

@ -0,0 +1,9 @@
{ pkgs, ... }: {
imports = [
./home.nix
];
home.packages = with pkgs; [ krita ];
is-laptop = true;
}

View file

@ -0,0 +1,6 @@
{ ... }: {
programs.swaylock.enable = true;
programs.swaylock.settings = {
image = "/run/user/1000/lockscreen.png";
};
}

9
home-manager/swaync.nix Normal file
View file

@ -0,0 +1,9 @@
{ ... }: {
/*services.swaync = {
enable = true;
settings = {
"notification-window-preferred-output" = "Samsung Electric Company SMS24A450/460 HVMBA01140";
};
};*/
}

150
home-manager/vscode.nix Normal file
View file

@ -0,0 +1,150 @@
{ pkgs, lib, ... }: {
programs.vscode = {
enable = true;
package = pkgs.vscode;
mutableExtensionsDir = false;
profiles.default = {
enableUpdateCheck = false;
keybindings = [
{
key = "ctrl+[BracketLeft]";
command = "workbench.action.terminal.focus";
when = "terminalProcessSupported";
}
];
userSettings = {
# Note: In settings.json, `.` in a key is not equivalent to a nested object property.
# Language-specific
"rust-analyzer.server.path" = lib.getExe (pkgs.writeShellApplication {
name = "rust-analyzer-nightly-wrapper";
# Ensure that we always use rust-analyzer from the nightly toolchain
# - in case a rust-toolchain.toml doens't have rust-analyzer
# - to ensure we get the latest fixes even if an older toolchain is used
# We can't do rust-analyzer +nightly, as that would inherit use of the nightly toolchain
# to all children of r-a, including cargo, which is very bad.
text = ''
ra=$(${lib.getExe' pkgs.rustup "rustup"} +nightly which rust-analyzer)
exec "$ra"
'';
});
"[nix]"."editor.formatOnSave" = true;
"[nix]"."editor.defaultFormatter" = "jnoortheen.nix-ide";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "${lib.getExe pkgs.nil}";
"nix.serverSettings" = {
nil = {
formatting = {
command = [ "${lib.getExe pkgs.nixpkgs-fmt}" ];
};
};
};
"[typescript]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[javascript]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[json]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[jsonc]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[html]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[css]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
"[typescriptreact]"."editor.defaultFormatter" = "esbenp.prettier-vscode";
# Generic
"window.zoomLevel" = 1;
"terminal.integrated.enableMultiLinePasteWarning" = false;
"git.confirmSync" = false;
"debug.allowBreakpointsEverywhere" = false;
# "editor.fontFamily" = "'Monaspace Neon Var', Arial";
"editor.fontLigatures" = true;
"terminal.integrated.scrollback" = 5000;
"terminal.integrated.stickyScroll.enabled" = false;
"chat.agent.enabled" = false;
"workbench.secondarySideBar.defaultVisibility" = "hidden"; # fuck you for this naming, this is just ai garbage
"chat.disableAIFeatures" = true;
};
extensions = with pkgs.vscode-extensions; [
bmalehorn.vscode-fish
dbaeumer.vscode-eslint
eamodio.gitlens
esbenp.prettier-vscode
github.vscode-github-actions
golang.go
hashicorp.terraform
jnoortheen.nix-ide
timonwong.shellcheck
mads-hartmann.bash-ide-vscode
ms-azuretools.vscode-docker
ms-python.python
ms-vscode-remote.remote-ssh
ms-vscode.cmake-tools
ms-vscode.cpptools
ms-vscode.hexeditor
myriad-dreamin.tinymist
redhat.vscode-yaml
rust-lang.rust-analyzer
tamasfe.even-better-toml
tomoki1207.pdf
usernamehw.errorlens
vadimcn.vscode-lldb
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
publisher = "dtsvet";
name = "vscode-wasm";
version = "1.4.1";
sha256 = "sha256-zs7E3pxf4P8kb3J+5zLoAO2dvTeepuCuBJi5s354k0I=";
}
{
publisher = "redhat";
name = "ansible";
version = "2.7.98";
sha256 = "sha256-b3Z40IeQbtYci2LA4/OlJkfqMB78cWRNTNWd89lfhy4=";
}
{
publisher = "matthewpi";
name = "caddyfile-support";
version = "0.3.0";
sha256 = "sha256-1yiOnvC2w33kiPRdQYskee38Cid/GOj9becLadP1fUY=";
}
{
publisher = "evan-buss";
name = "font-switcher";
version = "4.1.0";
sha256 = "sha256-KkXUfA/W73kRfs1TpguXtZvBXFiSMXXzU9AYZGwpVsY=";
}
{
publisher = "polymeilex";
name = "wgsl";
version = "0.1.17";
sha256 = "sha256-vGqvVrr3wNG6HOJxOnJEohdrzlBYspysTLQvWuP0QIw=";
}
{
publisher = "sunshaoce";
name = "risc-v";
version = "1.158.12";
sha256 = "sha256-+HLAkxU9hIhP8tn0jVI2L2HcYusmHSpoaG7dHA7WgxA=";
}
{
publisher = "styled-components";
name = "vscode-styled-components";
version = "1.7.8";
sha256 = "sha256-VoLAjBcAizTxd+BHwXoNSlSxqXno3PjVxaickLCtnsw=";
}
] ++ [
((pkgs.vscode-utils.buildVscodeExtension {
pname = "riverdelta";
version = "0.1.0";
src = builtins.fetchGit {
url = "https://github.com/Noratrieb/riverdelta";
rev = "64d81b56084d9a7663517b367b4533fb8ea83a92";
};
vscodeExtPublisher = "Noratrieb";
vscodeExtName = "riverdelta";
vscodeExtUniqueId = "Noratrieb.riverdelta";
buildPhase = ''
runHook preBuild;
cd ./vscode
runHook postBuild;
'';
}).overrideAttrs
(_: { sourceRoot = null; }))
];
};
};
}

View file

@ -0,0 +1,37 @@
{ pkgs, config, ... }:
let
pkg = (import
(pkgs.fetchFromGitHub {
owner = "Noratrieb";
repo = "colouncher";
rev = "a68d0dff63c32f84354f97aed5ac52ce3e0fa284";
hash = "sha256-NhZMBKxqHCQSvvj2NjXUlCQ5JvRPdGTnftTxdciLlPQ=";
}))
{ inherit pkgs; };
in
{
systemd.user.services.colouncher = {
Unit = {
Description = "Color-based program-launching wallpaper for Wayland";
PartOf = [
config.wayland.systemd.target
];
After = [ config.wayland.systemd.target ];
ConditionEnvironment = "WAYLAND_DISPLAY";
};
Service = {
ExecStart = pkgs.lib.getExe pkg;
Restart = "on-failure";
Type = "notify";
Environment = [
"LD_LIBRARY_PATH=${pkgs.lib.makeLibraryPath [pkgs.vulkan-loader]}"
];
};
Install.WantedBy = [
config.wayland.systemd.target
];
};
}

257
home-manager/waybar.nix Normal file
View file

@ -0,0 +1,257 @@
{ config, pkgs, lib, ... }:
{
options.is-laptop = lib.mkEnableOption "whether the computer is a laptop";
config = {
home.file."${config.xdg.configHome}/waybar/config.jsonc" = {
text =
builtins.toJSON {
height = 35;
spacing = 4;
modules-left = [
"systemd-failed-units"
"custom/music-back"
"mpris"
"custom/music-next"
];
modules-center = [
"clock"
];
modules-right = [
"bluetooth"
"privacy"
"pulseaudio"
"cpu"
"memory"
"tray"
] ++
(if (config.is-laptop) then
[ "network" "power-profiles-daemon" "battery" ]
else [ ]) ++
[
"custom/power"
];
systemd-failed-units = {
hide-on-ok = true; # Hide if there are zero failed units.
format = " {nr_failed}";
# https://github.com/Alexays/Waybar/issues/4241#issuecomment-3277122575
format-ok = " there is an 'activating' unit";
system = true; # monitor sytem units
user = true; # monitor user units
};
"custom/music-back" = {
format = "";
tooltip = true;
tooltip-format = "Play previous song";
on-click = "${lib.getExe pkgs.playerctl} previous";
};
mpris = {
format = "{status_icon} {dynamic}";
dynamic-order = [ "title" "artist" ];
status-icons = {
paused = "";
};
};
"custom/music-next" = {
format = "";
tooltip = true;
tooltip-format = "Play next song";
on-click = "${lib.getExe pkgs.playerctl} next";
};
clock = {
interval = 1;
format = "{:%a %F %H:%M:%S}";
tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "year";
mode-mon-col = 3;
weeks-pos = "right";
on-scroll = 1;
format = {
months = "<span color='#ffead3'><b>{}</b></span>";
days = "<span color='#ecc6d9'><b>{}</b></span>";
weeks = "<span color='#99ffdd'><b>W{}</b></span>";
weekdays = "<span color='#ffcc66'><b>{}</b></span>";
today = "<span color='#ff6699'><b><u>{}</u></b></span>";
};
};
actions = {
on-click-right = "mode";
on-scroll-up = "shift_up";
on-scroll-down = "shift_down";
};
};
bluetooth = {
format = " {status}";
format-disabled = ""; # an empty format will hide the module
format-connected = " {num_connections} connected";
on-click = lib.getExe' pkgs.blueman "blueman";
};
pulseaudio = {
# "scroll-step": 1, // %, can be a float
"format" = "{volume}% {icon} {format_source}";
"format-bluetooth" = "{volume}% {icon} {format_source}";
"format-bluetooth-muted" = " {icon} {format_source}";
"format-muted" = " {format_source}";
"format-source" = "{volume}% ";
"format-source-muted" = "";
"format-icons" = {
"headphone" = "";
"hands-free" = "";
"headset" = "";
"phone" = "";
"portable" = "";
"car" = "";
"default" = [ "" "" "" ];
};
"on-click" = lib.getExe pkgs.pavucontrol;
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
memory = {
format = "{}% ";
};
tray = {
spacing = 10;
};
"network" = {
# "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi" = " ({signalStrength}%)";
"format-ethernet" = "{ipaddr}/{cidr} ";
"tooltip-format" = "{ifname} via {gwaddr} ({ipaddr}/{cidr})";
"format-linked" = "{ifname} (No IP) ";
"format-disconnected" = "Disconnected ";
"format-alt" = "{ifname}: {ipaddr}/{cidr}";
};
"power-profiles-daemon" = {
"format" = "{icon}";
"tooltip-format" = "Power profile: {profile}\nDriver: {driver}";
"tooltip" = true;
"format-icons" = {
"default" = "";
"performance" = "";
"balanced" = "";
"power-saver" = "";
};
};
"battery" = {
"states" = {
# "good": 95,
"warning" = 30;
"critical" = 5;
};
"format" = "{capacity}% {icon}";
"format-full" = "{capacity}% {icon}";
"format-charging" = "{capacity}% ";
"format-plugged" = "{capacity}% ";
"format-alt" = "{time} {icon}";
# "format-good": "", // An empty format will hide the module
# "format-full": "",
"format-icons" = [ "" "" "" "" "" ];
};
"custom/power" =
let
power-menu = pkgs.writeText "power_menu.xml" ''
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkMenu" id="menu">
<child>
<object class="GtkMenuItem" id="lock">
<property name="label">Lock 🔒</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="delimiter1"/>
</child>
<child>
<object class="GtkMenuItem" id="reboot">
<property name="label">Reboot </property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="poweroff">
<property name="label">Poweroff 💤</property>
</object>
</child>
</object>
</interface>
'';
in
{
"format" = "";
"tooltip" = false;
"menu" = "on-click";
"menu-file" = power-menu;
"menu-actions" = {
"lock" = "lock-and-power-off-screen";
"reboot" = "reboot";
"poweroff" = "poweroff";
};
};
};
};
home.file."${config.xdg.configHome}/waybar/style.css" = {
text = ''
${builtins.readFile ./default-waybar-style.css}
window#waybar {
background: linear-gradient(
to right,
rgb(131, 80, 117) 15%,
rgb(158, 103, 143) 30%,
rgb(131, 80, 117) 45%,
#db88c5
);
border-bottom: none;
color: black;
}
#systemd-failed-units {
padding-left: 30px;
padding-right: 30px;
background-color: red;
}
#mpris {
color: white;
}
#custom-music-back, #custom-music-next {
font-size: 20px;
color: white;
}
#custom-music-back {
padding: 0 10px 0 15px;
}
#custom-music-next {
padding: 0 10px;
}
#clock {
background: unset;
color: white;
}
#privacy *, #pulseaudio, #cpu, #memory, #tray, #network, #power-profiles-daemon, #battery {
background-color: unset;
color: black;
}
#custom-power {
padding-left: 15px;
padding-right: 15px;
font-size: 30px;
background-color: rebeccapurple;
color: white;
}
'';
};
};
}

BIN
nixos/bsod/bsod.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

46
nixos/bsod/bsod.typ Normal file
View file

@ -0,0 +1,46 @@
#import "@preview/cades:0.3.1": qr-code
#let background-color = rgb(0x00, 0x78, 0xd7)
#let url = "https://noratrieb.dev"
#let percent = sys.inputs.at("percent", default: "20");
#let stopcode = sys.inputs.at("stopcode", default: "KASAN_ENLIGHTENMENT_VIOLATION")
#set page(
flipped: true,
margin: (
top: 184pt,
right: 0pt,
left: 190pt,
bottom: 0pt,
),
width: 1080pt,
height: 1920pt,
fill: background-color,
)
#set text(font: "Segoe UI")
#set text(rgb(255, 255, 255))
// :(
#text(size: 210pt, [:(])
#place(dx: 17pt, dy: 77pt, text(size: 42pt, [Your PC ran into a problem and needs to restart. We\'re]))
#place(dx: 21pt, dy: 136pt, text(size: 42pt, [just collecting some error info, and then we\'ll restart for]))
#place(dx: 19pt, dy: 195pt, text(size: 42pt, [you.]))
#place(dx: 18pt, dy: 284pt, text(size: 42pt, [#percent% complete]))
#place(dx: 152pt, dy: 371pt, text(
size: 20pt,
[For more information about this issue and possible fixes, visit https://www.windows.com/stopcode],
))
#place(dx: 17pt, dy: 371pt, [
#rect(width: 115pt, height: 115pt, inset: 9pt, fill: white, qr-code(url, color: background-color))
])
#place(dx: 151pt, dy: 438pt, text(size: 16pt, [If you call a support person, give them this info:]))
#place(dx: 151pt, dy: 472pt, text(size: 16pt, [Stop code: #stopcode]))

379
nixos/bsod/codes.txt Normal file
View file

@ -0,0 +1,379 @@
APC_INDEX_MISMATCH
DEVICE_QUEUE_NOT_BUSY
INVALID_AFFINITY_SET
INVALID_DATA_ACCESS_TRAP
INVALID_PROCESS_ATTACH_ATTEMPT
INVALID_PROCESS_DETACH_ATTEMPT
INVALID_SOFTWARE_INTERRUPT
IRQL_NOT_DISPATCH_LEVEL
IRQL_NOT_GREATER_OR_EQUAL
IRQL_NOT_LESS_OR_EQUAL
NO_EXCEPTION_HANDLING_SUPPORT
MAXIMUM_WAIT_OBJECTS_EXCEEDED
MUTEX_LEVEL_NUMBER_VIOLATION
NO_USER_MODE_CONTEXT
SPIN_LOCK_ALREADY_OWNED
SPIN_LOCK_NOT_OWNED
THREAD_NOT_MUTEX_OWNER
TRAP_CAUSE_UNKNOWN
EMPTY_THREAD_REAPER_LIST
CREATE_DELETE_LOCK_NOT_LOCKED
LAST_CHANCE_CALLED_FROM_KMODE
CID_HANDLE_CREATION
CID_HANDLE_DELETION
REFERENCE_BY_POINTER
BAD_POOL_HEADER
MEMORY_MANAGEMENT
PFN_SHARE_COUNT
PFN_REFERENCE_COUNT
NO_SPIN_LOCK_AVAILABLE
KMODE_EXCEPTION_NOT_HANDLED
SHARED_RESOURCE_CONV_ERROR
KERNEL_APC_PENDING_DURING_EXIT
QUOTA_UNDERFLOW
FILE_SYSTEM
FAT_FILE_SYSTEM
NTFS_FILE_SYSTEM
NPFS_FILE_SYSTEM
CDFS_FILE_SYSTEM
RDR_FILE_SYSTEM
CORRUPT_ACCESS_TOKEN
SECURITY_SYSTEM
INCONSISTENT_IRP
PANIC_STACK_SWITCH
PORT_DRIVER_INTERNAL
SCSI_DISK_DRIVER_INTERNAL
DATA_BUS_ERROR
INSTRUCTION_BUS_ERROR
SET_OF_INVALID_CONTEXT
PHASE0_INITIALIZATION_FAILED
PHASE1_INITIALIZATION_FAILED
UNEXPECTED_INITIALIZATION_CALL
CACHE_MANAGER
NO_MORE_IRP_STACK_LOCATIONS
DEVICE_REFERENCE_COUNT_NOT_ZERO
FLOPPY_INTERNAL_ERROR
SERIAL_DRIVER_INTERNAL
SYSTEM_EXIT_OWNED_MUTEX
SYSTEM_UNWIND_PREVIOUS_USER
SYSTEM_SERVICE_EXCEPTION
INTERRUPT_UNWIND_ATTEMPTED
INTERRUPT_EXCEPTION_NOT_HANDLED
MULTIPROCESSOR_CONFIGURATION_NOT_SUPPORTED
NO_MORE_SYSTEM_PTES
TARGET_MDL_TOO_SMALL
MUST_SUCCEED_POOL_EMPTY
ATDISK_DRIVER_INTERNAL
NO_SUCH_PARTITION
MULTIPLE_IRP_COMPLETE_REQUESTS
INSUFFICIENT_SYSTEM_MAP_REGS
DEREF_UNKNOWN_LOGON_SESSION
REF_UNKNOWN_LOGON_SESSION
CANCEL_STATE_IN_COMPLETED_IRP
PAGE_FAULT_WITH_INTERRUPTS_OFF
IRQL_GT_ZERO_AT_SYSTEM_SERVICE
STREAMS_INTERNAL_ERROR
FATAL_UNHANDLED_HARD_ERROR
NO_PAGES_AVAILABLE
PFN_LIST_CORRUPT
NDIS_INTERNAL_ERROR
PAGE_FAULT_IN_NONPAGED_AREA
REGISTRY_ERROR
MAILSLOT_FILE_SYSTEM
NO_BOOT_DEVICE
LM_SERVER_INTERNAL_ERROR
DATA_COHERENCY_EXCEPTION
INSTRUCTION_COHERENCY_EXCEPTION
XNS_INTERNAL_ERROR
FTDISK_INTERNAL_ERROR
PINBALL_FILE_SYSTEM
CRITICAL_SERVICE_FAILED
SET_ENV_VAR_FAILED
HAL_INITIALIZATION_FAILED
UNSUPPORTED_PROCESSOR
OBJECT_INITIALIZATION_FAILED
SECURITY_INITIALIZATION_FAILED
PROCESS_INITIALIZATION_FAILED
HAL1_INITIALIZATION_FAILED
OBJECT1_INITIALIZATION_FAILED
SECURITY1_INITIALIZATION_FAILED
SYMBOLIC_INITIALIZATION_FAILED
MEMORY1_INITIALIZATION_FAILED
CACHE_INITIALIZATION_FAILED
CONFIG_INITIALIZATION_FAILED
FILE_INITIALIZATION_FAILED
IO1_INITIALIZATION_FAILED
LPC_INITIALIZATION_FAILED
PROCESS1_INITIALIZATION_FAILED
REFMON_INITIALIZATION_FAILED
SESSION1_INITIALIZATION_FAILED
SESSION2_INITIALIZATION_FAILED
SESSION3_INITIALIZATION_FAILED
SESSION4_INITIALIZATION_FAILED
SESSION5_INITIALIZATION_FAILED
ASSIGN_DRIVE_LETTERS_FAILED
CONFIG_LIST_FAILED
BAD_SYSTEM_CONFIG_INFO
CANNOT_WRITE_CONFIGURATION
PROCESS_HAS_LOCKED_PAGES
KERNEL_STACK_INPAGE_ERROR
PHASE0_EXCEPTION
MISMATCHED_HAL
KERNEL_DATA_INPAGE_ERROR
INACCESSIBLE_BOOT_DEVICE
BUGCODE_NDIS_DRIVER
INSTALL_MORE_MEMORY
SYSTEM_THREAD_EXCEPTION_NOT_HANDLED
UNEXPECTED_KERNEL_MODE_TRAP
NMI_HARDWARE_FAILURE
SPIN_LOCK_INIT_FAILURE
DFS_FILE_SYSTEM
SETUP_FAILURE
MBR_CHECKSUM_MISMATCH
KERNEL_MODE_EXCEPTION_NOT_HANDLED
PP0_INITIALIZATION_FAILED
PP1_INITIALIZATION_FAILED
UP_DRIVER_ON_MP_SYSTEM
INVALID_KERNEL_HANDLE
KERNEL_STACK_LOCKED_AT_EXIT
INVALID_WORK_QUEUE_ITEM
BOUND_IMAGE_UNSUPPORTED
END_OF_NT_EVALUATION_PERIOD
INVALID_REGION_OR_SEGMENT
SYSTEM_LICENSE_VIOLATION
UDFS_FILE_SYSTEM
MACHINE_CHECK_EXCEPTION
USER_MODE_HEALTH_MONITOR
DRIVER_POWER_STATE_FAILURE
INTERNAL_POWER_ERROR
PCI_BUS_DRIVER_INTERNAL
MEMORY_IMAGE_CORRUPT
ACPI_DRIVER_INTERNAL
CNSS_FILE_SYSTEM_FILTER
ACPI_BIOS_ERROR
BAD_EXHANDLE
HAL_MEMORY_ALLOCATION
VIDEO_DRIVER_DEBUG_REPORT_REQUEST
BGI_DETECTED_VIOLATION
VIDEO_DRIVER_INIT_FAILURE
ATTEMPTED_SWITCH_FROM_DPC
CHIPSET_DETECTED_ERROR
SESSION_HAS_VALID_VIEWS_ON_EXIT
NETWORK_BOOT_INITIALIZATION_FAILED
NETWORK_BOOT_DUPLICATE_ADDRESS
INVALID_HIBERNATED_STATE
ATTEMPTED_WRITE_TO_READONLY_MEMORY
MUTEX_ALREADY_OWNED
SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION
BAD_POOL_CALLER
DRIVER_VERIFIER_DETECTED_VIOLATION
DRIVER_CORRUPTED_EXPOOL
DRIVER_CAUGHT_MODIFYING_FREED_POOL
TIMER_OR_DPC_INVALID
IRQL_UNEXPECTED_VALUE
DRIVER_VERIFIER_IOMANAGER_VIOLATION
PNP_DETECTED_FATAL_ERROR
DRIVER_LEFT_LOCKED_PAGES_IN_PROCESS
PAGE_FAULT_IN_FREED_SPECIAL_POOL
PAGE_FAULT_BEYOND_END_OF_ALLOCATION
DRIVER_UNLOADED_WITHOUT_CANCELLING_PENDING_OPERATIONS
TERMINAL_SERVER_DRIVER_MADE_INCORRECT_MEMORY_REFERENCE
DRIVER_CORRUPTED_MMPOOL
DRIVER_IRQL_NOT_LESS_OR_EQUAL
BUGCODE_ID_DRIVER
DRIVER_PORTION_MUST_BE_NONPAGED
SYSTEM_SCAN_AT_RAISED_IRQL_CAUGHT_IMPROPER_DRIVER_UNLOAD
DRIVER_PAGE_FAULT_IN_FREED_SPECIAL_POOL
DRIVER_PAGE_FAULT_BEYOND_END_OF_ALLOCATION
DRIVER_UNMAPPING_INVALID_VIEW
DRIVER_USED_EXCESSIVE_PTES
LOCKED_PAGES_TRACKER_CORRUPTION
SYSTEM_PTE_MISUSE
DRIVER_CORRUPTED_SYSPTES
DRIVER_INVALID_STACK_ACCESS
POOL_CORRUPTION_IN_FILE_AREA
IMPERSONATING_WORKER_THREAD
ACPI_BIOS_FATAL_ERROR
WORKER_THREAD_RETURNED_AT_BAD_IRQL
MANUALLY_INITIATED_CRASH
RESOURCE_NOT_OWNED
WORKER_INVALID
DRIVER_VERIFIER_DMA_VIOLATION
INVALID_FLOATING_POINT_STATE
INVALID_CANCEL_OF_FILE_OPEN
ACTIVE_EX_WORKER_THREAD_TERMINATION
THREAD_STUCK_IN_DEVICE_DRIVER
DIRTY_MAPPED_PAGES_CONGESTION
SESSION_HAS_VALID_SPECIAL_POOL_ON_EXIT
UNMOUNTABLE_BOOT_VOLUME
CRITICAL_PROCESS_DIED
STORAGE_MINIPORT_ERROR
SCSI_VERIFIER_DETECTED_VIOLATION
HARDWARE_INTERRUPT_STORM
DISORDERLY_SHUTDOWN
CRITICAL_OBJECT_TERMINATION
FLTMGR_FILE_SYSTEM
PCI_VERIFIER_DETECTED_VIOLATION
DRIVER_OVERRAN_STACK_BUFFER
RAMDISK_BOOT_INITIALIZATION_FAILED
DRIVER_RETURNED_STATUS_REPARSE_FOR_VOLUME_OPEN
HTTP_DRIVER_CORRUPTED
ATTEMPTED_EXECUTE_OF_NOEXECUTE_MEMORY
DIRTY_NOWRITE_PAGES_CONGESTION
BUGCODE_USB_DRIVER
RESERVE_QUEUE_OVERFLOW
LOADER_BLOCK_MISMATCH
CLOCK_WATCHDOG_TIMEOUT
DPC_WATCHDOG_TIMEOUT
MUP_FILE_SYSTEM
AGP_INVALID_ACCESS
AGP_GART_CORRUPTION
AGP_ILLEGALLY_REPROGRAMMED
THIRD_PARTY_FILE_SYSTEM_FAILURE
CRITICAL_STRUCTURE_CORRUPTION
APP_TAGGING_INITIALIZATION_FAILED
FSRTL_EXTRA_CREATE_PARAMETER_VIOLATION
WDF_VIOLATION
VIDEO_MEMORY_MANAGEMENT_INTERNAL
RESOURCE_MANAGER_EXCEPTION_NOT_HANDLED
RECURSIVE_NMI
MSRPC_STATE_VIOLATION
VIDEO_DXGKRNL_FATAL_ERROR
VIDEO_SHADOW_DRIVER_FATAL_ERROR
AGP_INTERNAL
VIDEO_TDR_FAILURE
VIDEO_TDR_TIMEOUT_DETECTED
VIDEO_SCHEDULER_INTERNAL_ERROR
EM_INITIALIZATION_FAILURE
DRIVER_RETURNED_HOLDING_CANCEL_LOCK
ATTEMPTED_WRITE_TO_CM_PROTECTED_STORAGE
EVENT_TRACING_FATAL_ERROR
TOO_MANY_RECURSIVE_FAULTS
INVALID_DRIVER_HANDLE
BITLOCKER_FATAL_ERROR
DRIVER_VIOLATION
WHEA_INTERNAL_ERROR
CRYPTO_SELF_TEST_FAILURE
WHEA_UNCORRECTABLE_ERROR
NMR_INVALID_STATE
NETIO_INVALID_POOL_CALLER
PAGE_NOT_ZERO
WORKER_THREAD_RETURNED_WITH_BAD_IO_PRIORITY
WORKER_THREAD_RETURNED_WITH_BAD_PAGING_IO_PRIORITY
MUI_NO_VALID_SYSTEM_LANGUAGE
FAULTY_HARDWARE_CORRUPTED_PAGE
EXFAT_FILE_SYSTEM
VOLSNAP_OVERLAPPED_TABLE_ACCESS
INVALID_MDL_RANGE
VHD_BOOT_INITIALIZATION_FAILED
DYNAMIC_ADD_PROCESSOR_MISMATCH
INVALID_EXTENDED_PROCESSOR_STATE
RESOURCE_OWNER_POINTER_INVALID
DPC_WATCHDOG_VIOLATION
DRIVE_EXTENDER
REGISTRY_FILTER_DRIVER_EXCEPTION
VHD_BOOT_HOST_VOLUME_NOT_ENOUGH_SPACE
WIN32K_HANDLE_MANAGER
GPIO_CONTROLLER_DRIVER_ERROR
KERNEL_SECURITY_CHECK_FAILURE
KERNEL_MODE_HEAP_CORRUPTION
PASSIVE_INTERRUPT_ERROR
INVALID_IO_BOOST_STATE
CRITICAL_INITIALIZATION_FAILURE
STORAGE_DEVICE_ABNORMALITY_DETECTED
PROCESSOR_DRIVER_INTERNAL
BUGCODE_USB3_DRIVER
SECURE_BOOT_VIOLATION
ABNORMAL_RESET_DETECTED
REFS_FILE_SYSTEM
KERNEL_WMI_INTERNAL
SOC_SUBSYSTEM_FAILURE
FATAL_ABNORMAL_RESET_ERROR
EXCEPTION_SCOPE_INVALID
SOC_CRITICAL_DEVICE_REMOVED
PDC_WATCHDOG_TIMEOUT
TCPIP_AOAC_NIC_ACTIVE_REFERENCE_LEAK
UNSUPPORTED_INSTRUCTION_MODE
INVALID_PUSH_LOCK_FLAGS
KERNEL_LOCK_ENTRY_LEAKED_ON_THREAD_TERMINATION
UNEXPECTED_STORE_EXCEPTION
OS_DATA_TAMPERING
KERNEL_THREAD_PRIORITY_FLOOR_VIOLATION
ILLEGAL_IOMMU_PAGE_FAULT
HAL_ILLEGAL_IOMMU_PAGE_FAULT
SDBUS_INTERNAL_ERROR
WORKER_THREAD_RETURNED_WITH_SYSTEM_PAGE_PRIORITY_ACTIVE
WIN32K_ATOMIC_CHECK_FAILURE
KERNEL_AUTO_BOOST_INVALID_LOCK_RELEASE
WORKER_THREAD_TEST_CONDITION
WIN32K_CRITICAL_FAILURE
INVALID_RUNDOWN_PROTECTION_FLAGS
INVALID_SLOT_ALLOCATOR_FLAGS
ERESOURCE_INVALID_RELEASE
CLUSTER_CSV_CLUSSVC_DISCONNECT_WATCHDOG
CRYPTO_LIBRARY_INTERNAL_ERROR
COREMSGCALL_INTERNAL_ERROR
COREMSG_INTERNAL_ERROR
ELAM_DRIVER_DETECTED_FATAL_ERROR
PROFILER_CONFIGURATION_ILLEGAL
MICROCODE_REVISION_MISMATCH
VIDEO_DWMINIT_TIMEOUT_FALLBACK_BDD
BAD_OBJECT_HEADER
SECURE_KERNEL_ERROR
HYPERGUARD_VIOLATION
SECURE_FAULT_UNHANDLED
KERNEL_PARTITION_REFERENCE_VIOLATION
PF_DETECTED_CORRUPTION
KERNEL_AUTO_BOOST_LOCK_ACQUISITION_WITH_RAISED_IRQL
LOADER_ROLLBACK_DETECTED
WIN32K_SECURITY_FAILURE
KERNEL_STORAGE_SLOT_IN_USE
WORKER_THREAD_RETURNED_WHILE_ATTACHED_TO_SILO
TTM_FATAL_ERROR
WIN32K_POWER_WATCHDOG_TIMEOUT
TTM_WATCHDOG_TIMEOUT
WIN32K_CALLOUT_WATCHDOG_BUGCHECK
EXCEPTION_ON_INVALID_STACK
UNWIND_ON_INVALID_STACK
FAST_ERESOURCE_PRECONDITION_VIOLATION
STORE_DATA_STRUCTURE_CORRUPTION
MANUALLY_INITIATED_POWER_BUTTON_HOLD
SYNTHETIC_WATCHDOG_TIMEOUT
INVALID_SILO_DETACH
INVALID_CALLBACK_STACK_ADDRESS
INVALID_KERNEL_STACK_ADDRESS
HARDWARE_WATCHDOG_TIMEOUT
CPI_FIRMWARE_WATCHDOG_TIMEOUT
WORKER_THREAD_INVALID_STATE
WFP_INVALID_OPERATION
DRIVER_PNP_WATCHDOG
WORKER_THREAD_RETURNED_WITH_NON_DEFAULT_WORKLOAD_CLASS
EFS_FATAL_ERROR
UCMUCSI_FAILURE
HAL_IOMMU_INTERNAL_ERROR
HAL_BLOCKED_PROCESSOR_INTERNAL_ERROR
IPI_WATCHDOG_TIMEOUT
DMA_COMMON_BUFFER_VECTOR_ERROR
BUGCODE_MBBADAPTER_DRIVER
BUGCODE_WIFIADAPTER_DRIVER
PROCESSOR_START_TIMEOUT
VIDEO_DXGKRNL_SYSMM_FATAL_ERROR
ILLEGAL_ATS_INITIALIZATION
SECURE_PCI_CONFIG_SPACE_ACCESS_VIOLATION
DAM_WATCHDOG_TIMEOUT
HANDLE_ERROR_ON_CRITICAL_THREAD
KASAN_ENLIGHTENMENT_VIOLATION
KASAN_ILLEGAL_ACCESS
XBOX_ERACTRL_CS_TIMEOUT
BC_BLUETOOTH_VERIFIER_FAULT
BC_BTHMINI_VERIFIER_FAULT
HYPERVISOR_ERROR
SYSTEM_THREAD_EXCEPTION_NOT_HANDLED_M
UNEXPECTED_KERNEL_MODE_TRAP_M
KERNEL_MODE_EXCEPTION_NOT_HANDLED_M
THREAD_STUCK_IN_DEVICE_DRIVER_M
THREAD_TERMINATE_HELD_MUTEX
STATUS_CANNOT_LOAD_REGISTRY_FILE
WINLOGON_FATAL_ERROR
STATUS_IMAGE_CHECKSUM_MISMATCH
MANUALLY_INITIATED_CRASH1

9
nixos/bsod/default.nix Normal file
View file

@ -0,0 +1,9 @@
{ pkgs, lib }: pkgs.writeShellApplication {
name = "regenerate-bsod-lockscreen";
text = ''
echo "Regenerating the lock screen..."
stopcode=$(shuf -n 1 < "${./codes.txt}")
percent=$(shuf -i 0-101 -n1)
${lib.getExe pkgs.typst} compile --input "stopcode=$stopcode" --input "percent=$percent" --font-path ${./fonts} ${./bsod.typ} --format png --ppi 200 "/run/user/$(id -u)/lockscreen.png"
'';
}

Binary file not shown.

View file

@ -8,30 +8,26 @@
# inputs.hardware.nixosModules.common-cpu-amd # inputs.hardware.nixosModules.common-cpu-amd
# inputs.hardware.nixosModules.common-ssd # inputs.hardware.nixosModules.common-ssd
# You can also split up your configuration and import pieces of it here: inputs.niri.nixosModules.niri
# ./users.nix inputs.clippyboard.nixosModules.default
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
]; ];
nixpkgs = { nixpkgs = {
# You can add overlays here
overlays = [ overlays = [
# If you want to use overlays exported from other flakes: # If you want to use overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default # neovim-nightly-overlay.overlays.default
inputs.nur.overlays.default
# Or define it inline, for example: inputs.niri.overlays.niri
# (final: prev: { # final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: { # curl = prev.curl.override {
# patches = [ ./change-hello-to-hi.patch ]; # # vquic is sad right now.
# }); # # http3Support = true;
# }) # };
# )
]; ];
# Configure your nixpkgs instance
config = { config = {
# Disable if you don't want unfree packages
allowUnfree = true; allowUnfree = true;
nvidia.acceptLicense = true;
}; };
}; };
@ -52,41 +48,277 @@
}; };
}; };
# FIXME: Add the rest of your current configuration networking.networkmanager.enable = true;
# TODO: Set your hostname time.timeZone = "Europe/Zurich";
networking.hostName = "your-hostname";
# TODO: This is just an example, be sure to use whatever bootloader you prefer i18n.defaultLocale = "en_US.UTF-8";
boot.loader.systemd-boot.enable = true;
# TODO: Configure your system-wide user settings (groups, etc), add more users as needed. # Bootloader.
users.users = { # boot.loader.systemd-boot.enable = true;
# FIXME: Replace with your username
your-username = { boot.binfmt = {
# TODO: You can set an initial password for your user. emulatedSystems = [ /*"wasm32-wasi"*/ "aarch64-linux" ]; # https://github.com/NixOS/nixpkgs/issues/444423
# If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install. preferStaticEmulators = true; # required to work with podman (apparently)
# Be sure to change it (using passwd) after rebooting! };
initialPassword = "correcthorsebatterystaple";
isNormalUser = true; boot.kernelPackages = pkgs.linuxPackages_latest;
openssh.authorizedKeys.keys = [
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect boot.kernel.sysctl = {
]; "net.ipv4.ip_forward" = 1;
# TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc) "net.ipv6.conf.all.forwarding" = 1;
extraGroups = [ "wheel" ]; # 100 seems to be a good value for SSDs https://chrisdown.name/2018/01/02/in-defence-of-swap.html,
# as anon and file pages are equally expensive so 100 balances them out.
"vm.swappiness" = 100;
# 340 is 0x154, which enables Rqs
# - n (denice RT tasks)
# - e (SIGTERM everyone but PID 1)
# - i (same but SIGKILL)
# - f (hallucinate OOM and kill one unlucky motherfucker)
# - s (Sync Em All 1989)
# - k (ghetto Ctrl+Alt+Del-to-log-in)
# - r (unraw)
"kernel.sysrq" = 340;
};
# Enable the Wayland windowing system.
services.displayManager.gdm.enable = true;
services.desktopManager = {
gnome = {
enable = true;
extraGSettingsOverrides = ''
[org.gnome.mutter]
experimental-features=['scale-monitor-framebuffer']
'';
extraGSettingsOverridePackages = [ pkgs.mutter ];
};
};
services.xserver = {
enable = true;
desktopManager.wallpaper.mode = "fill";
# Configure keymap in X11
xkb = {
layout = "ch";
variant = "";
};
# mouse settings
# https://unix.stackexchange.com/questions/58900/how-to-scroll-the-screen-using-the-middle-click
#libinput.mouse = {
# scrollMethod = "button";
# # 2=middle mouse button
# scrollButton = 2;
#};
};
hardware.graphics = {
enable = true;
enable32Bit = true; # for games stores??
extraPackages = with pkgs; [
libva-vdpau-driver # i have no idea what this is doing lol
];
};
niri-flake.cache.enable = false;
programs.niri = {
enable = true;
package = pkgs.niri;
};
services.displayManager.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome pkgs.gnome-keyring ];
services.gnome = {
gcr-ssh-agent.enable = true;
};
programs.waybar.enable = true;
# something is wrong https://github.com/NixOS/nixpkgs/issues/477219
services.speechd.enable = lib.mkForce false;
# lol what https://github.com/NixOS/nixpkgs/issues/462935
systemd.user.services.orca.wantedBy = lib.mkForce [ ];
services.clippyboard.enable = true;
services.flatpak.enable = true;
programs.appimage = {
enable = true;
binfmt = true;
};
console.keyMap = "sg";
# do you even print bro? have you ever printed bro? don't cups me bro.
services.printing.enable = false;
services.earlyoom = {
enable = true;
enableNotifications = true;
# as soon as it starts swapping its SO over (hm)
freeSwapThreshold = 90;
};
# Shows notification for `net.nuetzlich.SystemNotifications.Notify` D-Bus messages
services.systembus-notify.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [ fira-code monaspace font-awesome ];
};
users = {
users = {
nora = {
uid = 1000;
isNormalUser = true;
home = "/home/nora";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG0n1ikUG9rYqobh7WpAyXrqZqxQoQ2zNJrFPj12gTpP"
];
extraGroups = [ "wheel" "networkmanager" "audio" "libvirtd" "docker" ];
packages = with pkgs; [
vscode
chromium
];
shell = pkgs.fish;
};
};
extraGroups = {
vboxusers = {
members = [ "nora" ];
};
}; };
}; };
# This setups a SSH server. Very important if you're setting up a headless system. systemd.user = {
# Feel free to remove if you don't need it. services.regenerate-bsod-lockscreen = {
services.openssh = { description = "Regenerate the lock screen image";
enable = true; serviceConfig = {
# Forbid root login through SSH. Type = "oneshot";
permitRootLogin = "no"; ExecStart = lib.getExe (import ./bsod { inherit pkgs lib; });
# Use keys only. Remove if you want to SSH using password (not recommended) };
passwordAuthentication = false; };
timers.regenerate-bsod-lockscreen = {
description = "Regenerate the lock screen image";
wantedBy = [ "timers.target" ];
timerConfig = {
Unit = "regenerate-bsod-lockscreen.service";
OnBootSec = "10s";
OnUnitActiveSec = "60s";
AccuracySec = "5s";
};
};
}; };
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion xdg.mime.defaultApplications = {
system.stateVersion = "22.11"; "text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
};
# This is apparently used by Electron? Maybe not anymore.
environment.sessionVariables.DEFAULT_BROWSER = lib.getExe pkgs.firefox;
environment.enableDebugInfo = true;
environment.systemPackages = with pkgs; [
vim
wget
curl
# for firefox-nightly
# inputs.firefox.packages.${pkgs.system}.firefox-nightly-bin
firefox
git
perf
fish
unzip
(steam.override {
extraPkgs = pkgs: [ mesa-demos ]; # i have no idea what this is doing lol
}).run
# Wine for 32 and 64 bit applications
wineWow64Packages.stable
lutris
virt-manager
podman
fastfetch
podman-compose
man-pages
man-pages-posix
bpftrace
file
comma
alacritty
fuzzel
xwayland-satellite
mpv
wl-mirror
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
extest.enable = true; # for potentially working controllers
};
programs.fish = {
enable = true;
};
programs.java.enable = true;
programs.nix-ld = {
# i love programs that work
enable = true;
};
virtualisation = {
libvirtd = {
enable = true;
qemu = {
# enable TPM emulation
swtpm.enable = true;
};
};
podman = {
enable = true;
defaultNetwork.settings.dns_enabled = true;
};
docker.enable = true;
virtualbox.host = {
enable = false; # failed to build?
};
};
hardware.enableAllFirmware = true;
# Open ports in the firewall.
networking.firewall = {
enable = true;
};
system.nixos.distroName = "🏳";
} }

View file

@ -1,11 +1,12 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { config, lib, modulesPath, ... }:
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
@ -14,18 +15,31 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/32d0dca2-de5c-4512-8be3-ab7a75ac4a20"; {
device = "/dev/disk/by-uuid/32d0dca2-de5c-4512-8be3-ab7a75ac4a20";
fsType = "ext4";
};
fileSystems."/mnt/1" =
{
device = "/dev/disk/by-uuid/8ceed88b-8e66-403e-a0f3-16907c228c6b";
fsType = "ext4";
};
fileSystems."/mnt/2" =
{
device = "/dev/disk/by-uuid/070623af-08eb-4496-b16b-018063336b0a";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot/efi" = fileSystems."/boot/efi" =
{ device = "/dev/disk/by-uuid/2027-FC69"; {
device = "/dev/disk/by-uuid/2027-FC69";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/7052ef54-be53-48bf-8b3e-9d24d5f34d5f"; } [{ device = "/dev/disk/by-uuid/7052ef54-be53-48bf-8b3e-9d24d5f34d5f"; }];
];
# 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

110
nixos/desktop.nix Normal file
View file

@ -0,0 +1,110 @@
{ pkgs, config, ... }: {
imports = [
./desktop-hardware-configuration.nix
./paperless.nix
./configuration.nix
];
networking = {
hostName = "nixos";
extraHosts =
''
192.168.122.44 illumos-vm
'';
};
# Windows sets the hardware clock in local time by default.
time.hardwareClockInLocalTime = true;
boot.loader.grub = {
enable = true;
device = "nodev";
efiSupport = true;
useOSProber = true;
minegrub-theme = {
enable = true;
};
};
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.supportedFilesystems = [ "ntfs" ];
fileSystems."/mnt/nas" = {
device = "192.168.178.47:/volume1/homes";
fsType = "nfs";
};
services.xserver = {
# ndivia drivers
# long story short night light mode is currently broken with nvidia drivers. LMAO
# - https://forums.developer.nvidia.com/t/screen-freezes-at-random-intervals-with-rtx-4060-max-q-mobile-multiple-driver-versions-tested/295811/6?u=mirao
videoDrivers = [ "nvidia" ];
};
hardware.nvidia = {
# https://github.com/NixOS/nixpkgs/issues/299944#issuecomment-2027246826
modesetting.enable = true;
open = true;
};
programs.coolercontrol.enable = true;
services.tailscale = {
enable = true;
useRoutingFeatures = "both";
};
services.openssh = {
enable = true;
hostKeys = [
{
path = "/etc/ssh/ssh_host_ed25519_key";
type = "ed25519";
}
{
# P256
path = "/etc/ssh/ssh_host_ecdsa_key";
type = "ecdsa";
}
{
bits = 4096;
path = "/etc/ssh/ssh_host_rsa_key";
type = "rsa";
}
];
settings.PermitRootLogin = "no";
settings.PasswordAuthentication = false;
};
environment.systemPackages = with pkgs; [
tailscale
os-prober
usbutils # steam client logs complain about lsusb
kdiskmark
];
networking.firewall = {
trustedInterfaces = [ "tailscale0" ];
allowedUDPPorts = [ config.services.tailscale.port ];
allowedTCPPorts = [ /*SSH*/ 22 ];
# https://github.com/tailscale/tailscale/issues/4432#issuecomment-1112819111
checkReversePath = "loose";
};
# TODO: ENABLE NVIDIA DRIVERS WHEN THEY STOP BEING READY
#hardware.nvidia-container-toolkit.enable = true;
networking.interfaces.enp39s0.wakeOnLan.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "22.11";
}

View file

@ -0,0 +1,40 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/646dc4c1-53aa-4fce-9328-f7c42a5b5ea8";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-c16da30d-5953-4ce9-995a-f4acd77dcaf7".device = "/dev/disk/by-uuid/c16da30d-5953-4ce9-995a-f4acd77dcaf7";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/E494-B917";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
# 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
# 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`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

15
nixos/laptop.nix Normal file
View file

@ -0,0 +1,15 @@
{ ... }: {
imports = [
./laptop-hardware-configuration.nix
./configuration.nix
];
networking = {
hostName = "scrap";
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
system.stateVersion = "25.11";
}

46
nixos/paperless.nix Normal file
View file

@ -0,0 +1,46 @@
{ lib, pkgs, ... }:
let localDir = "/home/nora/.local/share/paperless-ngx"; nasDir = "/mnt/nas/HEY/_Nora/paperless"; in {
services.paperless = {
enable = true;
dataDir = "${localDir}/data";
mediaDir = "${localDir}/media";
consumptionDir = "${nasDir}/consume";
address = "0.0.0.0";
port = 8010;
user = "nora";
environmentFile = "${localDir}/secrets-environment";
settings = {
PAPERLESS_TIME_ZONE = "Europe/Zurich";
PAPERLESS_ADMIN_USER = "nora";
PAPERLESS_OCR_LANGUAGE = "deu+eng";
};
exporter = {
enable = true;
directory = "${nasDir}/export";
};
};
systemd.services.paperless-ngx-backup = {
description = "paperless-ngx data backup to NAS";
serviceConfig = {
Type = "oneshot";
User = "nora";
ExecStart = ''
${lib.getExe pkgs.rsync} -a -v --delete --exclude=redis ${localDir}/ ${nasDir}/backup
'';
};
};
systemd.timers.paperless-ngx-backup = {
description = "paperless-ngx data backup to NAS";
wantedBy = [ "timers.target" ];
after = [ "mnt-nas.mount" ];
timerConfig = {
Unit = "paperless-ngx-backup.service";
OnCalendar = "daily UTC";
RandomizedDelaySec = 1800;
FixedRandomDelay = true;
Persistent = true; # ensure it still runs if the computer was down at the timer of trigger
};
};
}

11
shells/c-env.nix Normal file
View file

@ -0,0 +1,11 @@
{ pkgs }: pkgs.mkShell {
buildInputs = with pkgs; [ openssl zlib libpq sqlite ];
nativeBuildInputs = with pkgs; [
pkg-config
cmake
ninja
llvmPackages_21.clang
llvmPackages_21.lld
llvmPackages_21.bintools-unwrapped
];
}