Compare commits

...

342 commits
v1.1.0 ... main

Author SHA1 Message Date
Leon Schwarzäugl
9acfc5f934 feat[client,server]: add remote builds, confLib
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
c20f1b0b59 feat[server]: network management 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
8f833485da chore[server]: improve backup management 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
5b5ef2b9b0 fix[server]: get cache working 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
15e2355406 chore: improve formatting 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
29533d6be6 docs: update resources 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
26f324e66d feat[server]: add minecraft 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
cea2980fef chore[work]: add antigravity 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
3f1dfd5fa9 fix[client]: actually use nix-index-database 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
2538d7c279 feat: improve bootstrapping toolchain 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
118f7a2fe8 feat[client]: use dgx as remote build host 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
00340a9c01 feat[server]: add dns server 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
a8f29d26c6 chore: update flake 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
8803e130cc feat[server]: add kexec tarball for low-ram bootstrap 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
732f4fbd00 feat[server]: add mailserver 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
2cb67804d4 feat[server]: use confLib to manage services 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
e0480cb6f6 chore: cleanup flake inputs 2025-12-02 00:59:27 +01:00
Leon Schwarzäugl
ec6ae25e9b fix[work]: fix aws,cdr commands, easier git switch in emacs
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
46f2ec8b96 wip 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
6abf5ce39b chore: update flake; rename hosts; setup hintbooth 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
b78c83b575 chore[client]: reorganize sway keybinds 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
3391febda2 feat: add remote disk decryption over ssh 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
66a543abf7 feat: add quickpass 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
6b01f9d032 chore[client]: better pii management 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
ddd3dbf267 feat[server]: improve kanidm config 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
56c1f35548 feat[server]: improve nginx config 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
4473255269 feat[client]: manage zellij using nix 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
8838f98658 feat[client]: automatically create emacs org files 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
47377f7a96 feat: improve formatting 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
4a6cbd763f feat[client]: initialize syncthingtray on install 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
9252e9c546 chore: fix typos; build niri less eagerly 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
31447d9a3f chore: decomission milkywell 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
cea15be44d feat[server]: add initial router config 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
719d92c178 feat[server]: preparations for router config 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
729defa8b1 fix: bootstrap script not working with nix-plugins 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
c3b8102546 feat: build configurations dynamically for arch 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
d187cdf35f fix[wip]: navidrome jukebox 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
0caef3e587 feat: use nixos-extra-modules 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
7ef0ebf5e7 feat[server]: add garage 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
a263b4177a chore: rename hosts 2025-11-19 21:49:30 +01:00
Leon Schwarzäugl
c9e7e493d8
feat[work,server,client]: add opkssh
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-11-04 15:45:52 +01:00
Leon Schwarzäugl
3b368ec8de
feat[server]: manage kanidm tls cert
Some checks are pending
Flake check / Check flake (push) Waiting to run
2025-11-03 17:12:14 +01:00
Leon Schwarzäugl
638dc6cd95
chore[server]: update flake 2025-11-03 17:11:18 +01:00
Leon Schwarzäugl
783e381fbe
chore: update flake
Some checks are pending
Flake check / Check flake (push) Waiting to run
2025-11-02 12:29:35 +01:00
Leon Schwarzäugl
40b42028d2
feat[client]: make home-manager more convenient to use
Some checks are pending
Flake check / Check flake (push) Waiting to run
2025-11-01 23:56:37 +01:00
Leon Schwarzäugl
64e6a9c159
fix[work,client]: get home-manager working on dgx
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-10-31 15:04:59 +01:00
Leon Schwarzäugl
c8a49d4f47
feat[work]: improve git-replace 2025-10-31 15:03:52 +01:00
Leon Schwarzäugl
ed9008112b
feat[work]: improve git-replace 2025-10-31 15:02:49 +01:00
Leon Schwarzäugl
ae98f0d5df
feat[work]: mako: no disturb during presentations 2025-10-31 15:01:56 +01:00
Leon Schwarzäugl
35f108e3fc
chore[client]: map treehouse to physical host
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-10-23 14:47:00 +02:00
Leon Schwarzäugl
1519305952
chore[server]: disable u2f for ssh
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-10-22 00:47:11 +02:00
Leon Schwarzäugl
b9f5c87aa0
chore[client]: notifications persist if needed 2025-10-22 00:46:49 +02:00
Leon Schwarzäugl
4c06f00555
fix[client]: make emacs mail notifications work
Some checks are pending
Flake check / Check flake (push) Waiting to run
2025-10-21 22:19:08 +02:00
Leon Schwarzäugl
da56b4ea64
fix[work]: reply using S/MIME when appropriate 2025-10-21 21:56:00 +02:00
Leon Schwarzäugl
f5ff5d5066
docs: outline manual setup steps (WIP) 2025-10-21 21:37:59 +02:00
Leon Schwarzäugl
8813fb5117
fix[client]: stop anki from halting shutdown 2025-10-21 21:37:42 +02:00
Leon Schwarzäugl
723ce403b2
feat[work]: use s/mime certificates for mail 2025-10-21 20:37:51 +02:00
Leon Schwarzäugl
d83ff89712
chore[client]: increase tridactyl hint delay 2025-10-21 20:20:18 +02:00
Leon Schwarzäugl
baf7580e99
chore[client]: enable obsidian omnisearch keybind 2025-10-21 20:19:57 +02:00
Leon Schwarzäugl
41240db5c9
feat[client]: improve tridactyl binds
Some checks are pending
Flake check / Check flake (push) Waiting to run
2025-10-21 13:20:05 +02:00
Leon Schwarzäugl
deaa3d5889
chore[work]: disable awscli config 2025-10-21 13:20:04 +02:00
Leon Schwarzäugl
9ce9a7ec6a
feat[client]: reduce file clobbering 2025-10-21 13:20:03 +02:00
Leon Schwarzäugl
101f4d3183
fix[client]: make network config more stable 2025-10-21 13:20:02 +02:00
Leon Schwarzäugl
fb37690bc0
chore: update flake 2025-10-21 13:19:58 +02:00
Leon Schwarzäugl
e07b3c2b6e
chore[work]: improve suspend behaviour 2025-10-21 13:19:53 +02:00
Leon Schwarzäugl
9da6bd15ab
feat[work]: add git-replace 2025-10-21 13:19:48 +02:00
Leon Schwarzäugl
95fa226b9e
docs: update html config
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-10-11 23:51:07 +02:00
Leon Schwarzäugl
524b45b876
fix: try to fix readme attributions 2025-10-11 23:51:06 +02:00
Leon Schwarzäugl
18bfbeb7d4
feat[client]: manage work apps using hm 2025-10-11 23:51:05 +02:00
Leon Schwarzäugl
47b8159ff1
feat[client]: add lutris 2025-10-11 23:51:04 +02:00
Leon Schwarzäugl
acd87fca74
chore[client]: stop anki autosync 2025-10-11 23:51:03 +02:00
Leon Schwarzäugl
1c692101b9
feat[client]: use wlogout instead of custom calls 2025-10-11 23:51:02 +02:00
Leon Schwarzäugl
1a55a41d4d
style: sort program/module list alphabetically 2025-10-11 23:51:01 +02:00
Leon Schwarzäugl
870c55b889
feat[client]: add swayidle 2025-10-11 23:51:00 +02:00
Leon Schwarzäugl
116a099732
feat[client]: add spotify-player 2025-10-11 23:50:56 +02:00
Leon Schwarzäugl
04f6b7eeb9
feat[client]: add obs-studio 2025-10-11 23:50:28 +02:00
Leon Schwarzäugl
a34dd0dfd7
chore: add explicit doc options 2025-10-11 23:50:27 +02:00
Leon Schwarzäugl
5c7ae68078
feat[client]: add nix-your-shell 2025-10-11 23:50:26 +02:00
Leon Schwarzäugl
ca684173ac
feat[client]: add hexchat 2025-10-11 23:50:25 +02:00
Leon Schwarzäugl
c61bb5ba11
feat[client]: add element-desktop 2025-10-11 23:50:19 +02:00
Leon Schwarzäugl
310d7d7fbd
chore[client] add autotiling block 2025-10-11 23:37:58 +02:00
Leon Schwarzäugl
4bc06d0f07
feat[client]: add batsignal 2025-10-11 23:37:57 +02:00
Leon Schwarzäugl
ca9e922e6e
feat[client]: add swaylock 2025-10-11 23:37:52 +02:00
Leon Schwarzäugl
f02f26636e
feat[client]: add vesktop 2025-10-11 23:37:46 +02:00
Leon Schwarzäugl
f0b7b7ad7f
chore[client]: add tridactyl binds 2025-10-11 23:37:31 +02:00
Leon Schwarzäugl
4e985811fc
feat[client]: add autotiling 2025-10-11 23:37:21 +02:00
Leon Schwarzäugl
0287e9d582
feat[client]: add anki module
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-10-09 02:39:26 +02:00
Leon Schwarzäugl
dbe12c8d5e
chore: move some folder to new locations 2025-10-09 02:38:48 +02:00
Leon Schwarzäugl
49c7cae7f9
fix: stop network from being redefined 2025-10-09 02:38:47 +02:00
Leon Schwarzäugl
cc824b648b
feat[client]: add obsidian module 2025-10-09 02:38:42 +02:00
Leon Schwarzäugl
b89e63e0f2
chore[work]: make network connection consistent
Some checks are pending
Flake check / Check flake (push) Waiting to run
2025-10-07 21:23:11 +02:00
Leon Schwarzäugl
65b0c41069
chore[work]: remove documents folder from sync 2025-10-07 21:22:41 +02:00
Leon Schwarzäugl
bddc0bedc7
fix[client]: use virtualbox with kvm 2025-10-07 21:22:40 +02:00
Leon Schwarzäugl
f4d9a0e5d3
chore: update flake 2025-10-07 21:22:38 +02:00
Leon Schwarzäugl
8379703b93
fix[servers]: fix several issues
- winters: flake path was set wrongly
- spotifyd: could not connect (added hosts entry)
- nextcloud: plugins used outdated nextcloud version
- nextcloud: allow all upload sizes on proxy
- matrix: adapt to new bridge config schema
2025-10-07 21:22:37 +02:00
Leon Schwarzäugl
edf45b7be5
chore[work]: make app startup consistent 2025-10-07 21:22:33 +02:00
Leon Schwarzäugl
057e8959a0 feat: initial microvm framework 2025-10-07 18:43:15 +01:00
Leon Schwarzäugl
a896d5eb5d
chore: change fw-fanctrl to upstream module
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-09-26 08:50:06 +02:00
Leon Schwarzäugl
355cf03bd1
chore: flake maintenance
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-09-24 13:09:54 +02:00
Leon Schwarzäugl
d0f432b717
chore: update flake
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-09-16 14:24:16 +02:00
Leon Schwarzäugl
0848f04326
docs: add tips
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-08-27 03:24:30 +02:00
Leon Schwarzäugl
f3d5371320
feat: add snipe-it, homebox
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-08-25 22:52:01 +02:00
Leon Schwarzäugl
a7f24d1d67
chore: update flake 2025-08-25 22:52:00 +02:00
Leon Schwarzäugl
9f93bf814a
fix: allow moonside to build remotely
needs to read other machines pii if targeted by nginx
2025-08-25 22:51:59 +02:00
Leon Schwarzäugl
915bf256da
feat: niri, new winters ip, mail fixes 2025-08-25 22:51:54 +02:00
Leon Schwarzäugl
6ea3851e72
fix: small env related inaccuracies
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-08-10 21:37:34 +02:00
Leon Schwarzäugl
5229a4c480
feat: add swarsel-modules
Some checks are pending
Flake check / Check flake (push) Waiting to run
2025-08-10 11:35:29 +02:00
Leon Schwarzäugl
2a250deccf
feat: add spicetify 2025-08-10 11:34:30 +02:00
Leon Schwarzäugl
e6c7351094
feat: add uni profile 2025-08-10 11:33:14 +02:00
Leon Schwarzäugl
ae2126f363
feat: improve org-capture templates
Some checks are pending
Flake check / Check flake (push) Waiting to run
2025-08-09 14:31:45 +02:00
Leon Schwarzäugl
37686e3a1e
fix: marginalia not showing relevant info 2025-08-09 14:30:41 +02:00
Leon Schwarzäugl
5440fd2c8a
fix: emacs popup frames resizing other windows 2025-08-09 14:30:13 +02:00
Leon Schwarzäugl
91334e26a5
feat: work email qol changes 2025-08-09 14:29:22 +02:00
Leon Schwarzäugl
ca2d20522c
fix: waybar github-notification, nixpkgs-review 2025-08-09 14:27:42 +02:00
Leon Schwarzäugl
3957e1a4a7
chore: update flake 2025-08-09 14:25:59 +02:00
Leon Schwarzäugl
9577cdf243
docs: improve documentation
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-08-05 01:22:59 +02:00
Leon Schwarzäugl
044dbadbe1
fix: hostname not always set, typo 2025-08-05 01:21:48 +02:00
Leon Schwarzäugl
4fad38afdb
chore: update topology
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-07-23 01:16:34 +02:00
Leon Schwarzäugl
99586839c8
docs: host images on github 2025-07-23 01:15:25 +02:00
Leon Schwarzäugl
06ec1df09a
feat: improve emergency access
Some checks are pending
Flake check / Check flake (push) Waiting to run
2025-07-22 21:35:48 +02:00
Leon Schwarzäugl
a921818915
feat: add popup frame from emacs 2025-07-22 21:35:47 +02:00
Leon Schwarzäugl
ba1bba39b4
fix: inaccuracies in emacs config 2025-07-22 21:35:46 +02:00
Leon Schwarzäugl
d7f27943a5
feat: no more home-manager secrets on nixos hosts 2025-07-22 21:35:46 +02:00
Leon Schwarzäugl
708d65d696
chore: move shared options to correct header 2025-07-22 21:35:45 +02:00
Leon Schwarzäugl
1ac888d583
fix: make n[switch,boot,dry] work anywhere 2025-07-22 21:35:44 +02:00
Leon Schwarzäugl
c5c09b0358
feat: vars in _module.args instead of options 2025-07-22 21:35:43 +02:00
Leon Schwarzäugl
c3060b2be9
chore: centralize syncthing config 2025-07-22 21:35:42 +02:00
Leon Schwarzäugl
d136a3069e
chore: backup more dirs 2025-07-22 21:35:41 +02:00
Leon Schwarzäugl
6fb45a0200
fix: koillection not serving big collections 2025-07-22 21:35:40 +02:00
Leon Schwarzäugl
90efa8e67f
fix: koillection images lost in ephemeral storage 2025-07-22 21:35:39 +02:00
Leon Schwarzäugl
234a5f2a99
fix: WLAN1 password was not set correctly 2025-07-22 21:35:38 +02:00
Leon Schwarzäugl
486f8b7732
feat: add slink 2025-07-22 21:35:37 +02:00
Leon Schwarzäugl
1468f3d0fc
chore: flake cleanup 2025-07-22 21:35:36 +02:00
Leon Schwarzäugl
e7d3def830
feat: make nixosConfig work on home-manager 2025-07-22 21:35:35 +02:00
Leon Schwarzäugl
57d5ea065a
feat: share config between nixos / home-manager 2025-07-22 21:35:22 +02:00
Leon Schwarzäugl
641a0cd84d
docs: improve documentation
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-07-16 18:20:07 +02:00
Leon Schwarzäugl
51896dabea
fix: zellij not opening after reboot 2025-07-14 17:04:54 +02:00
Leon Schwarzäugl
21c1067572
feat: make yubikey pam work on all machines
Some checks failed
Flake check / Check flake (push) Has been cancelled
2025-07-14 04:15:14 +02:00
Leon Schwarzäugl
18a2a32bae
docs[flake]: more verbose documentation 2025-07-14 03:07:23 +02:00
Leon Schwarzäugl
78d028f2a5
chore: private hostnames
Some checks are pending
Flake check / Check flake (push) Waiting to run
2025-07-14 01:31:16 +02:00
Leon Schwarzäugl
e9da090c2a
chore: cleanup 2025-07-14 01:08:22 +02:00
Leon Schwarzäugl
a8daed1d10
chore: milkywell host 2025-07-07 23:37:43 +02:00
Leon Schwarzäugl
2830b98729
chore: update flake, introduce dev input 2025-07-07 23:24:33 +02:00
Leon Schwarzäugl
8f898bcb9b
fix: re-enable secrets on standalone home-manager 2025-07-05 14:23:12 +02:00
Leon Schwarzäugl
dfea676a01
fix[work]: load home on boot 2025-07-05 12:14:38 +02:00
Leon Schwarzäugl
4b439fd3e7
fix: adapt local installer script 2025-07-05 11:10:28 +02:00
Leon Schwarzäugl
b490763245
feat: remove initialSetup flag 2025-07-05 03:33:12 +02:00
Leon Schwarzäugl
de3d35a9b2
fix: adapt bootstrap script for new structure 2025-07-05 03:07:08 +02:00
Leon Schwarzäugl
49b557befa
feat: add minimal config support (WIP) 2025-07-04 21:07:42 +02:00
Leon Schwarzäugl
34badc91d5
chore: centralise folders 2025-07-04 18:26:00 +02:00
Leon Schwarzäugl
7d614f784c
feat!: switch to full flake-parts 2025-07-04 18:24:19 +02:00
Leon Schwarzäugl
7d82c3cee9
refactor: use true common config and split rest 2025-07-04 18:24:18 +02:00
Leon Schwarzäugl
6ca7717d3e
chore: clean up flake 2025-07-04 18:24:12 +02:00
Leon Schwarzäugl
178d51cde6
chore: use nix-ts in all org-src blocks 2025-07-04 18:23:56 +02:00
Leon Schwarzäugl
0115f4e806
chore: disable unused/broken components 2025-07-04 18:23:54 +02:00
Leon Schwarzäugl
bf73151817
feat: enable lsp in src-blocks; emacs nix tooling 2025-07-04 18:23:53 +02:00
Leon Schwarzäugl
f5f396db25
docs: fix topology 2025-07-04 18:23:52 +02:00
Leon Schwarzäugl
9279f3a8d3
docs: refine readme 2025-07-04 18:23:51 +02:00
Leon Schwarzäugl
157bd5d45a
docs: add flake structure section to introduction 2025-07-04 18:23:50 +02:00
Leon Schwarzäugl
2aa5e0095c
feat: add globals system 2025-07-04 18:23:45 +02:00
Leon Schwarzäugl
6cac368378
docs: add missing headlines, add a few notes 2025-06-29 15:40:15 +02:00
Leon Schwarzäugl
9075c97ce8
feat: add shlink 2025-06-29 15:39:46 +02:00
Leon Schwarzäugl
0045d0cb18
feat: add microbin 2025-06-29 15:39:45 +02:00
Leon Schwarzäugl
a21ff3228c
feat: add atuin 2025-06-29 15:39:37 +02:00
Leon Schwarzäugl
91fc0227bf
feat: add croc 2025-06-29 15:34:51 +02:00
Leon Schwarzäugl
6b44dcb023
feat: add radicale 2025-06-29 15:34:43 +02:00
Leon Schwarzäugl
e39f07eac1
chore: update flake 2025-06-29 15:27:43 +02:00
Leon Schwarzäugl
4cba57bdd8
docs: update attributions 2025-06-28 17:57:55 +02:00
Leon Schwarzäugl
b69ff8e50d
chore: general cleanup 2025-06-28 17:57:54 +02:00
Leon Schwarzäugl
266ad63ceb
refactor: cleaner nginx settings 2025-06-28 17:57:53 +02:00
Leon Schwarzäugl
057c7e9194
chore(work): stop teams from destroying laptop 2025-06-28 17:57:52 +02:00
Leon Schwarzäugl
c7132d2d85
feat: full nix-topology 2025-06-28 17:57:51 +02:00
Leon Schwarzäugl
ed15ef02bb
feat: network overhaul 2025-06-28 17:57:44 +02:00
Leon Schwarzäugl
22fe55c284
feat: add moonside 2025-06-14 00:46:50 +02:00
Leon Schwarzäugl
80d4a38a1c
feat: add koillection 2025-06-13 17:23:22 +02:00
Leon Schwarzäugl
86e1e1984b
feat: setup SSO for navidrome 2025-06-13 03:40:18 +02:00
Leon Schwarzäugl
3efa748383
feat: add firefly-iii to winters 2025-06-13 03:40:11 +02:00
Leon Schwarzäugl
2386303317
fix: load older awscli for s3 cp 2025-06-11 21:38:35 +02:00
Leon Schwarzäugl
27968d69ba
fix: remove dirchange in swarsel-deploy 2025-06-11 21:38:23 +02:00
Leon Schwarzäugl
f414735247
feat: move drom pii-repo to repo-local piis 2025-06-11 21:37:26 +02:00
Leon Schwarzäugl
85cbd5e1f6
feat: repo-local secrets implemented for yubikey 2025-06-11 04:01:07 +02:00
Leon Schwarzäugl
609bb1597f
feat: first attempt at globals (WIP) 2025-06-11 02:31:57 +02:00
Leon Schwarzäugl
e0d3dbdadc
chore(work): add azure-cli 2025-06-11 02:31:24 +02:00
Leon Schwarzäugl
f431d24f81
feat: make zsh startup more performant 2025-06-11 02:31:01 +02:00
Leon Schwarzäugl
6b33a182d8
feat: update nix config module 2025-06-11 02:30:20 +02:00
Leon Schwarzäugl
a11c7854d1
feat: new deploy system, allows for in-repo pii 2025-06-11 02:25:34 +02:00
Leon Schwarzäugl
7e11641fe7
feat: add initial oauth2-proxy and freshrss oidc 2025-06-10 00:09:05 +02:00
Leon Schwarzäugl
9d10005e35
feat: add nextcloud to kanidm 2025-06-09 19:11:46 +02:00
Leon Schwarzäugl
3e3721d44f
feat: add tika and gotenberg to paperless 2025-06-09 17:22:39 +02:00
Leon Schwarzäugl
6de42365be
feat: prepare sync for kanidm 2025-06-09 17:08:24 +02:00
Leon Schwarzäugl
f87164088f
feat: add kanidm module 2025-06-09 12:45:26 +02:00
Leon Schwarzäugl
616522bfa6
fix: stop Navidrome from importing 5000 playlists 2025-06-09 03:26:49 +02:00
Leon Schwarzäugl
155f629159
chore: prune restic repo before backup 2025-06-09 02:48:51 +02:00
Leon Schwarzäugl
69ef705820
chore: explicitly do not use jenkins on local 2025-06-09 02:21:46 +02:00
Leon Schwarzäugl
b7f739d0b0
chore: use packaged appimage version of cura 2025-06-09 02:21:33 +02:00
Leon Schwarzäugl
a4ad3b8088
fix: restic automatic pruning 2025-06-09 02:21:17 +02:00
Leon Schwarzäugl
d366887a77
fix: wrong user in kavita config, new music path 2025-06-09 02:20:45 +02:00
Leon Schwarzäugl
87baf57aa3
chore: update flake 2025-05-24 21:24:20 +02:00
Leon Schwarzäugl
2a216838ec
feat: add restic configuration for winters 2025-05-24 18:24:36 +02:00
Leon Schwarzäugl
b83c578d63
docs: update index.html 2025-05-24 17:28:18 +02:00
Leon Schwarzäugl
2fda153ede
fix: lua scripts not working in mgba, no doc sync 2025-05-24 17:16:21 +02:00
Leon Schwarzäugl
267c03f8e5
Merge pull request #1 from Swarsel/module-refactor
Module refactor
2025-05-24 17:13:36 +02:00
Leon Schwarzäugl
a2306d4a16
chore: remove obsolete comments 2025-04-30 20:04:29 +02:00
Leon Schwarzäugl
36d97926e6
feat: add profiles for all work host options 2025-04-30 19:34:28 +02:00
Leon Schwarzäugl
e15ab08adf
refactor: full module system implemented 2025-04-17 11:03:15 +02:00
Leon Schwarzäugl
cf9349168f
feat: improve zsh 2025-04-16 11:02:25 +02:00
Leon Schwarzäugl
e8c405b3f1
feat: finalize initial modules, some qol changes 2025-04-15 17:59:20 +02:00
Leon Schwarzäugl
27679d38fd
refactor: finish initial move to modules-only [WIP] 2025-04-05 02:16:21 +02:00
Leon Schwarzäugl
e7e59715d8
feat: add govc qol env 2025-04-03 17:43:15 +02:00
Leon Schwarzäugl
9034735f84
refactor: [WIP] add hm and server profiles 2025-04-03 00:20:26 +02:00
Leon Schwarzäugl
bd95ef4c9b
feat: add swayosc 2025-04-03 00:20:06 +02:00
Leon Schwarzäugl
14de7e4f7e
feat: add better tridactyl theme 2025-04-03 00:18:39 +02:00
Leon Schwarzäugl
ecd37537cc
refactor: WIP 2025-03-31 18:29:07 +02:00
Leon Schwarzäugl
289f072c13
refactor: rename old profiles->modules [part 2] 2025-03-27 01:47:14 +01:00
Leon Schwarzäugl
de9b5cf40c
refactor: eliminate old module setup [part 1] 2025-03-27 01:32:41 +01:00
Leon Schwarzäugl
da4cf4eca0
docs: update headlines and index 2025-03-26 22:15:35 +01:00
Leon Schwarzäugl
3254d748fd
feat: fix temperature ranaway; add hibernation from sway 2025-03-26 22:14:33 +01:00
Leon Schwarzäugl
9a1143d1f4
fix: prevent all accidental wakeups 2025-03-26 22:06:53 +01:00
Leon Schwarzäugl
16079c7c42
chore: better description for battery checkd 2025-03-26 21:59:26 +01:00
Leon Schwarzäugl
d9f3b84dd9
feat: [work] lock upon yubikey removal 2025-03-26 21:59:25 +01:00
Leon Schwarzäugl
411abef122
feat: pass some envvars to sudo 2025-03-26 21:59:14 +01:00
Leon Schwarzäugl
d2c0c12231
feat: enables extra repositories for fw-firmware 2025-03-26 21:48:07 +01:00
Leon Schwarzäugl
15205abbcf
feat: add proper appimage support 2025-03-26 17:45:23 +01:00
Leon Schwarzäugl
14f9bbf832
chore: remove Kagi as default search engine 2025-03-26 17:45:03 +01:00
Leon Schwarzäugl
a8e3f5887b
feat: add udev rule for screensharing 2025-03-25 02:40:04 +01:00
Leon Schwarzäugl
27b06772c2
fix: full swaylock config again 2025-03-25 02:38:52 +01:00
Leon Schwarzäugl
e312a05de0
feat: enable yubikey hardware decryption 2025-03-25 02:38:23 +01:00
Leon Schwarzäugl
a15bd220f4
chore: disable wifi-fix script
seems to make no difference
2025-03-25 02:37:04 +01:00
Leon Schwarzäugl
1e438b8eff
chore: only set defaultStrategy for fw-fanctrl 2025-03-25 02:35:55 +01:00
Leon Schwarzäugl
e679461ef3
chore: downgrade to LTS kernel
latest kernel increases idle CPU freq abnormally
2025-03-25 02:34:29 +01:00
Leon Schwarzäugl
9fe7813916
fix: gpg-agent sometimes not available 2025-03-25 02:32:37 +01:00
Leon Schwarzäugl
4a78e643f0
feat: enable fallback initrd systemd for work 2025-03-23 00:35:45 +01:00
Leon Schwarzäugl
01efa60483
feat: add yubikey ids 2025-03-22 23:40:32 +01:00
Leon Schwarzäugl
d7a7571b00
fix: properly run screenshare as user and service 2025-03-22 23:11:50 +01:00
Leon Schwarzäugl
868b8eaec5
docs: update literal config html page 2025-03-22 22:55:07 +01:00
Leon Schwarzäugl
182c394e7e
feat: expose disk-config output 2025-03-22 22:54:05 +01:00
Leon Schwarzäugl
3c441f403a
feat: better standalone home-manager support 2025-03-22 22:54:04 +01:00
Leon Schwarzäugl
c1a34d35cb
chore: WIP add workplace hop command 2025-03-22 22:54:03 +01:00
Leon Schwarzäugl
98b4f076f0
feat: add [pci,usb]-utils 2025-03-22 22:54:02 +01:00
Leon Schwarzäugl
a7e7557489
feat: add udev rule for auto-screenshare 2025-03-22 22:54:01 +01:00
Leon Schwarzäugl
1ae3be96fa
chore: remove updatechecker, lidChange apci script 2025-03-22 22:54:00 +01:00
Leon Schwarzäugl
faff8d9ee6
feat: add nixGL module 2025-03-22 22:53:59 +01:00
Leon Schwarzäugl
9c1df052a2
refactor: indirections f. user,[home,flake,xdg]Dir 2025-03-22 22:53:53 +01:00
Leon Schwarzäugl
5c207050a3
fix: chaostheatre not building after secret changes 2025-03-22 22:53:46 +01:00
Leon Schwarzäugl
1f47b46916
chore: remove more unneeded info 2025-03-21 23:24:43 +01:00
Leon Schwarzäugl
c997e9174e
style: eliminate duplicate keys 2025-03-21 20:22:16 +01:00
Leon Schwarzäugl
658d2bb7ba
style: avoid repeated keys in modules 2025-03-21 20:00:14 +01:00
Leon Schwarzäugl
34b7222665
feat: use podman docker compat 2025-03-21 19:47:29 +01:00
Leon Schwarzäugl
5b37f915d1
chore: update nextcloud on winters 2025-03-21 19:47:12 +01:00
Leon Schwarzäugl
a8ab07ed2f
chore: adjust firefox profiles in stylix 2025-03-21 19:46:53 +01:00
Leon Schwarzäugl
307ebaade9
chore: remove swarsel-navidrome 2025-03-21 19:46:29 +01:00
Leon Schwarzäugl
ee7bbc7b0d
refactor: remove obsoletions 2025-03-21 19:45:49 +01:00
Leon Schwarzäugl
f7bcd89aa2
feat: add vbc-nix input 2025-03-21 19:45:35 +01:00
Leon Schwarzäugl
431cd97efe
add kanshi, sep. wps, navidrome update, tools 2025-03-19 17:14:49 +01:00
Leon Schwarzäugl
6311d0c01e
feat: youtube-dl alias 2025-03-12 10:07:58 +01:00
Leon Schwarzäugl
8ded91166e
chore: disable firewall for gaming specialisation 2025-03-12 10:07:40 +01:00
Leon Schwarzäugl
6f58255dc2
chore: install packages 2025-03-12 10:07:25 +01:00
Leon Schwarzäugl
041c5ae4e4
feat: keep less generations to keep /boot free 2025-03-12 10:06:24 +01:00
Leon Schwarzäugl
3e3d25a279
feat: update flake 2025-03-12 10:05:07 +01:00
Leon Schwarzäugl
b43342d529
feat: update swayfx to 0.5 2025-03-12 10:04:18 +01:00
Leon Schwarzäugl
63b6bfc35d
feat: add utils 2025-02-27 16:53:12 +01:00
Leon Schwarzäugl
5698e8f7ef
chore: update html version of config 2025-02-26 01:03:02 +01:00
Leon Schwarzäugl
e6038688ae
docs: improve lib documentation (WIP) 2025-02-26 01:01:12 +01:00
Leon Schwarzäugl
b67abcce27
chore: make dynamic import usage clearer 2025-02-26 00:42:54 +01:00
Leon Schwarzäugl
b54d3ee065
chore: rename homeManagerModules -> homeModules
homeModules is the output name that can be picked up by nix flake check
2025-02-26 00:34:46 +01:00
Leon Schwarzäugl
c8089780d7
refactor: dynamically manage most imports 2025-02-26 00:32:05 +01:00
Leon Schwarzäugl
6279713ab5
style: summarize some sections 2025-02-25 22:53:12 +01:00
Leon Schwarzäugl
e3a0416a86
refactor: export home-manager options in nixos 2025-02-25 22:46:41 +01:00
Leon Schwarzäugl
8006a0abf2
fix: missing settings from nixpkgs update 2025-02-25 22:45:41 +01:00
Leon Schwarzäugl
4cef1b2727
fix: justfile indentation 2025-02-25 19:42:01 +01:00
Leon Schwarzäugl
754d475bba
feat: improve cursor hiding 2025-02-25 19:41:42 +01:00
Leon Schwarzäugl
86ef858d59
feat: roll forward stable nixpkgs 2025-02-25 19:41:14 +01:00
Leon Schwarzäugl
12c80c99ff
feat: open relevant sites in firefox dc 2025-02-25 14:05:20 +01:00
Leon Schwarzäugl
c13911c865
feat: cc alias for wl-copy 2025-02-25 14:05:08 +01:00
Leon Schwarzäugl
f195a628cf
feat: very professional banana cursor 2025-02-25 14:04:48 +01:00
Leon Schwarzäugl
383fb7022f
fix: emacs browse-url not opening links 2025-02-25 14:03:28 +01:00
Leon Schwarzäugl
c8e4493b8a
feat: work qol 2025-02-25 14:02:57 +01:00
Leon Schwarzäugl
a9eadbe2ed
chore: package changes 2025-02-25 14:02:03 +01:00
Leon Schwarzäugl
f2267de522
feat: add zellij again 2025-02-25 14:00:26 +01:00
Leon Schwarzäugl
5b591ba10b
feat: update nixpkgs 2025-02-25 13:57:00 +01:00
Leon Schwarzäugl
bba479852b
feat: add better homepages for work 2025-01-28 09:17:31 +01:00
Leon Schwarzäugl
ddfef29ac5
chore: lock adjustments 2025-01-27 19:00:13 +01:00
Leon Schwarzäugl
0c1077e59e
fix: add own mgba version with working lua scripts 2025-01-27 18:59:55 +01:00
Leon Schwarzäugl
d293d74410
feat: add work apps 2025-01-27 18:59:27 +01:00
Leon Schwarzäugl
bfe416b708
fix: some work related fixes 2025-01-15 10:27:20 +01:00
Leon Schwarzäugl
bd3e18169f
fix: minor fixes
sync: nftables force disabled
default wallpaper
remove non-existent darwin import
2025-01-07 17:55:34 +01:00
Leon Schwarzäugl
0f8051cf4a
refactor: dynamic imports 2025-01-07 17:54:46 +01:00
Leon Schwarzäugl
0da982831f
chore: address deprecation warning in substitute 2025-01-07 16:41:21 +01:00
Leon Schwarzäugl
5753eb1e11
refactor: dynamic module generation 2025-01-07 16:41:06 +01:00
Leon Schwarzäugl
c5042ac840
fix: typo in latex flake 2025-01-07 15:34:57 +01:00
Leon Schwarzäugl
c831e5f83e
feat: add evil-numbers 2025-01-07 15:34:44 +01:00
Leon Schwarzäugl
00e39fd437
feat: add mgba 2025-01-07 15:34:24 +01:00
Leon Schwarzäugl
07a99987a7
feat: improve EonTimer package 2025-01-02 13:43:51 +01:00
Leon Schwarzäugl
52c6bce5a1
chore: remove legacypackages 2025-01-01 21:50:34 +01:00
Leon Schwarzäugl
2257a42d38
refactor: more sane profile structure 2025-01-01 15:59:58 +01:00
Leon Schwarzäugl
a73f0e843a
feat: emacs: reintroduce lsp-mode lsp-bridge 2025-01-01 15:25:06 +01:00
Leon Schwarzäugl
6f6ac75754
chore: disable emacs aggressive indent 2024-12-31 21:56:51 +01:00
Leon Schwarzäugl
ae9e5a6b5d
chore: move stylix color scheme 2024-12-31 21:32:40 +01:00
Leon Schwarzäugl
68bc6f5473
feat: add latex template 2024-12-31 21:32:21 +01:00
Leon Schwarzäugl
526b9acead
feat: add general template 2024-12-31 21:32:20 +01:00
Leon Schwarzäugl
baeb65234b
feat: add cpp template 2024-12-31 17:59:25 +01:00
Leon Schwarzäugl
6da0fcbb1b
feat: add go template 2024-12-31 17:48:44 +01:00
Leon Schwarzäugl
f4f98b248d
feat: dynamic structure for templates in flake.nix 2024-12-31 17:17:42 +01:00
Leon Schwarzäugl
efd667c76a
feat: add rust template to new structure 2024-12-31 17:16:51 +01:00
Leon Schwarzäugl
ed9e8bc22e
feat: add testing to python template 2024-12-31 16:47:46 +01:00
Leon Schwarzäugl
fbc134388d
feat: expose python flake to all systems 2024-12-31 15:32:55 +01:00
Leon Schwarzäugl
5915a28ba0
docs: include Overlays section 2024-12-31 14:57:57 +01:00
Leon Schwarzäugl
c8e5be731a
feat: improve treesitter 2024-12-31 13:40:25 +01:00
Leon Schwarzäugl
11eb077113
feat: overhauled template system (WIP) 2024-12-31 13:39:03 +01:00
Leon Schwarzäugl
442b7b2e0e
chore: update flake 2024-12-31 13:36:00 +01:00
Leon Schwarzäugl
7636ee17e0
feat: add vieb 2024-12-30 15:21:29 +01:00
Leon Schwarzäugl
db61149b70
feat: central nixpkgs and nix 2024-12-30 02:36:02 +01:00
Leon Schwarzäugl
b4b0b44729
chore: generate emacs headlines, index update 2024-12-29 20:11:53 +01:00
Leon Schwarzäugl
7e6d7fea84
chore: remove unneeded Emacs packages 2024-12-29 20:08:38 +01:00
Leon Schwarzäugl
b3c492d11b
docs: fix NixOS wiki link to be the official one 2024-12-29 16:09:55 +01:00
Leon Schwarzäugl
629c39051a
feat: use main pkgs in devShells 2024-12-29 13:45:28 +01:00
Leon Schwarzäugl
114d2be756
fix: typos 2024-12-29 11:03:39 +01:00
Leon Schwarzäugl
8d8644e216
chore: reflect renamed installer command on ISO 2024-12-29 02:23:20 +01:00
Leon Schwarzäugl
530d6c4f7e
docs: reflect renamed installer commands 2024-12-29 02:20:08 +01:00
Leon Schwarzäugl
16a6aec702
chore: remove obsolete files 2024-12-29 02:16:47 +01:00
Leon Schwarzäugl
80bf7596bc
refactor: split noweb... into appendix, template 2024-12-29 01:21:10 +01:00
Leon Schwarzäugl
8a7e6102ac
refactor: add missing files to SwarselSystems.org 2024-12-29 01:03:59 +01:00
Leon Schwarzäugl
d538762c7e
refactor: inherit name from mkPackages 2024-12-29 00:36:04 +01:00
Leon Schwarzäugl
d397be861b
refactor: pkgs paths to self 2024-12-29 00:23:43 +01:00
Leon Schwarzäugl
b71bb5794a
refactor: lib, flake.nix 2024-12-28 23:59:43 +01:00
Leon Schwarzäugl
a0f4384034
docs: add some links 2024-12-28 22:41:32 +01:00
Leon Schwarzäugl
347f2e9006
docs: fix indentation error 2024-12-28 16:43:21 +01:00
Leon Schwarzäugl
e98a68e6ad
feat: sway back_and_forth 2024-12-28 16:18:36 +01:00
Leon Schwarzäugl
c93e9b1ddd
chore: fix commands in ISO 2024-12-28 16:18:35 +01:00
Leon Schwarzäugl
cb47c8e13e
feat: catchup local installer to remote 2024-12-28 16:18:20 +01:00
Swarsel
665abecc5b
chore: return toto to VM 2024-12-28 13:45:01 +01:00
Swarsel
2e15d7ed3b
fix: bootstrap: Wipe known hosts after in. install 2024-12-28 13:36:29 +01:00
Swarsel
c011c9bfdd
feat: introduce lanzaboote profile 2024-12-28 13:20:07 +01:00
Swarsel
71a9020d17
feat: make bootstrapper more secure (confirm pw) 2024-12-28 13:13:42 +01:00
Swarsel
47b99bb39d
feat: add nix-topology 2024-12-28 13:13:41 +01:00
Swarsel
dcb18d99b0
chore: attribution in cura code 2024-12-28 03:07:43 +01:00
Swarsel
670475baa4
feat: add utilities 2024-12-28 03:07:24 +01:00
Swarsel
06b5b95a8a
feat: deploy secure boot on bootstrap 2024-12-28 03:06:45 +01:00
Swarsel
9271805c26
docs: update README.md preview screenshots and links 2024-12-26 02:44:35 +01:00
Swarsel
ea6f9e9634
fix: screen flickering (disable PSR/-SU) 2024-12-26 01:36:05 +01:00
Swarsel
fbb8e23461
chore: adapt ISO /etc/issue to new structure 2024-12-24 16:11:57 +01:00
Swarsel
ae63e40f04
refactor: make bootstrap read config from flake 2024-12-24 16:03:38 +01:00
633 changed files with 81850 additions and 33334 deletions

226
.github/README.md vendored
View file

@ -1,4 +1,3 @@
[![nixos-unstable](https://img.shields.io/badge/unstable-nixos?style=flat&logo=nixos&logoColor=cdd6f4&label=NixOS&labelColor=11111b&color=b4befe)](https://github.com/NixOS/nixpkgs)
[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2FSwarsel%2F.dotfiles%2Fbadge%3Fref%3Dmain&style=flat&labelColor=11111b)](https://actions-badge.atrox.dev/Swarsel/.dotfiles/goto?ref=main)
###### Disclaimer
@ -9,43 +8,34 @@ That being said, there is a lot of general configuration that you *probably* can
# \~SwarselSystems\~
<img src="swarselsystems_preview.png"/>
| | |
|---------------|---------------------------------|
| **Shell:** | zsh |
| **DM:** | greetd |
| **WM:** | SwayFX |
| **Bar:** | Waybar |
| **Editor:** | Emacs |
| **Terminal:** | kitty |
| **Launcher:** | fuzzel |
| **Alerts:** | mako |
| **Browser:** | firefox |
| **Theme:** | city-lights (managed by stylix) |
<p align="center">
<img width="49%" title="Tiling" alt="swarselsystems_preview1" src="https://github.com/user-attachments/assets/f6021ab9-6289-497d-8747-28f5d526b75a" />
<img width="49%" title="Waybar" alt="swarselsystems_preview2" src="https://github.com/user-attachments/assets/1160d9f7-710c-4046-8fcf-476bb4a0be84" />
</p>
## Overview
- Literate configuration for Nix and Emacs ([SwarselSystems.org](../SwarselSystems.org))
- [Literate configuration](https://swarsel.github.io/.dotfiles/) defining my entire infrastructure, including Emacs
- Configuration based on flakes for personal hosts as well as servers on:
- [NixOS](https://github.com/NixOS/nixpkgs)
- [home-manager](https://github.com/nix-community/home-manager) only (no full NixOS) with support from [nixGL](https://github.com/nix-community/nixGL)
- [nix-darwin](https://github.com/LnL7/nix-darwin)
- [nix-on-droid](https://github.com/nix-community/nix-on-droid)
- Streamlined configuration and deployment pipeline:
- Framework for [packages](https://github.com/Swarsel/.dotfiles/blob/main/pkgs/default.nix), [overlays](https://github.com/Swarsel/.dotfiles/blob/main/overlays/default.nix), and [modules](https://github.com/Swarsel/.dotfiles/tree/main/modules)
- Framework for [packages](https://github.com/Swarsel/.dotfiles/blob/main/pkgs/default.nix), [overlays](https://github.com/Swarsel/.dotfiles/blob/main/overlays/default.nix), [modules](https://github.com/Swarsel/.dotfiles/tree/main/modules), and [library functions](https://github.com/Swarsel/.dotfiles/tree/main/lib/default.nix)
- Dynamically generated host configurations
- Limited local installer (no secrets handling) with a supported demo build
- Fully autonomous remote deployment using [nixos-anywhere](https://github.com/nix-community/nixos-anywhere) and [disko](https://github.com/nix-community/disko) (with secrets handling)
- Improved nix tooling
- Support for advanced features:
- Secrets handling using [sops-nix](https://github.com/Mic92/sops-nix) (pls no pwn ❤️)
- Management of non-file-based secrets using private repo
- Management of personally identifiable information using [nix-plugins](https://github.com/shlevy/nix-plugins)
- Full Yubikey support
- LUKS-encryption
- Secure boot using [Lanzaboote](https://github.com/nix-community/lanzaboote)
- BTRFS-based [Impermanence](https://github.com/nix-community/impermanence)
- Configuration shared between configurations (configuration for one nixosConfiguration can be defined in another nixosConfiguration)
- Global attributes shared between all configurations to reduce attribute redeclaration
## Documentation
@ -59,33 +49,40 @@ Otherwise, the files that are possibly of biggest interest are found here:
- [SwarselSystems.org](../SwarselSystems.org)
- [flake.nix](../flake.nix)
- [early-init.el](../programs/emacs/early-init.el)
- [init.el](../programs/emacs/init.el)
- [early-init.el](../files/emacs/early-init.el)
- [init.el](../files/emacs/init.el)
## Getting started
### Getting started
### Demo configuration
#### Demo configuration
<details>
<summary>Click here for instructions on how to install the demo system</summary>
If you just want to see if this configuration is for you, run this command on any system that has `nix` installed:
``` shell
nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles#rebuild -- -u <YOUR_USERNAME>
nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles#swarsel-rebuild -- -u <YOUR_USERNAME>
```
This will activate the `chaostheatre` configuration on your system, which is a de-facto mirror of my main configuration with secret-based settings removed.
This will activate the `hotel` configuration on your system, which is a de-facto mirror of my main configuration with secret-based settings removed.
Please keep in mind that this limited installer will make local changes to the cloned repository in order to be able to install it (otherwise the builder would fail at fetching my private secrets repository). As such, this should only be used to evaluate the system - if you want to use it longterm, you will need to create a fork and make some changes.
</details>
## Deployment
### Deployment
<details>
<summary>Click here for deployment instructions</summary>
The deployment process for this configuration is mostly automated, there are only a few steps that are needed to be done manually. You can choose between a remote deployment strategy that is also able to deploy new age keys for sops for you and a local installer that will only install the system without any secret handling.
### Remote deployment (recommended if you have at least one running system)
#### Remote deployment (recommended if you have at least one running system)
0) Fork this repo, and write your own host config at `hosts/nixos/<YOUR_CONFIG_NAME>/default.nix` (you can use one of the other configurations as a template. Also see https://github.com/Swarsel/.dotfiles/tree/main/modules for a list of all additional options). At the very least, you should replace the `secrets/` directory with your own secrets and replace the SSH public keys with your own ones (otherwise I will come visit you!🔓❤️). I personally recommend to use the literate configuration and `org-babel-tangle-file` in Emacs, but you can also simply edit the separate `.nix` files.
0) Fork this repo, and write your own host config at `hosts/nixos/<YOUR_ARCHITECTURE>/<YOUR_CONFIG_NAME>/default.nix` (you can use one of the other configurations as a template. Also see https://github.com/Swarsel/.dotfiles/tree/main/modules for a list of all additional options). At the very least, you should replace the `secrets/` directory with your own secrets and replace the SSH public keys with your own ones (otherwise I will come visit you!🔓❤️). I personally recommend to use the literate configuration and `org-babel-tangle-file` in Emacs, but you can also simply edit the separate `.nix` files.
1) Have a system with `nix` available booted (this does not need to be installed, i.e. you can use a NixOS installer image; a custom minimal installer ISO can be built by running `just iso` in the root of this repo)
2) Make sure that your Yubikey is plugged in or that you have your SSH key available (and configured)
3) Run `bootstrap -n <CONFIGURATION_NAME> -d <TARGET_IP>` on your existing system.
3) Run `swarsel-bootstrap -n <CONFIGURATION_NAME> -d <TARGET_IP>` on your existing system.
- Alternatively (if you run this on a system that is not yet running this configuration), you can also run `nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles -- -n <CONFIGURATION_NAME> -d <TARGET_IP>` (this runs the same program as the command above).
4) Follow the installers instructions:
- you will have to choose a disk encryption password (if you want that feature)
@ -93,57 +90,207 @@ The deployment process for this configuration is mostly automated, there are onl
- you will have to enter the root password once during the final system install
5) That should be it! The installer will take care of setting up disks, secrets, and the rest of the hardware configuration! You will still have to sign in manually to some webservices etc.
### Local deployment (recommended for setting up the first system)
#### Local deployment (recommended for setting up the first system)
1) Boot the latest install ISO from this repository on an UEFI system.
2) Run `swarsel-install -d <TARGET_DISK> -f <FLAKE>`
2) Run `swarsel-install -n <CONFIGURATION_NAME>`
3) Reboot
Alternatively, to install this from any NixOS live ISO, run `nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles#install -- -d <TARGET_DISK> -f <FLAKE>` at step 2.
Alternatively, to install this from any NixOS live ISO, run `nix run --experimental-features 'nix-command flakes' github:Swarsel/.dotfiles#install -- -n <CONFIGURATION_NAME>` at step 2.
</details>
## Infrastructure
<details>
<summary>Click here for a summary of my infrastructure</summary>
<img width="2202" height="2947" alt="topology" src="https://github.com/user-attachments/assets/0eb37288-47a8-40e3-9211-648eee0ed408" />
### Programs
| Topic | Program |
|---------------|---------------------------------|
|🐚 **Shell** | [zsh](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/zsh.nix) |
|🚪 **DM** | [greetd](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/common/login.nix) |
|🪟 **WM** | [SwayFX](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sway.nix) |
|⛩️ **Bar** | [Waybar](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/waybar.nix) |
|✒️ **Editor** | [Emacs](https://github.com/Swarsel/.dotfiles/tree/main/files/emacs/init.el) |
|🖥️ **Terminal**| [Kitty](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/kitty.nix) |
|🚀 **Launcher**| [Fuzzel](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/fuzzel.nix) |
|🚨 **Alerts** | [Mako](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/mako.nix) |
|🌐 **Browser** | [Firefox](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/zsh.nix) |
|🎨 **Theme** | [City-Lights (managed by stylix)](https://github.com/Swarsel/.dotfiles/tree/main/modules/home/common/sharedsetup.nix)|
### Services
| Topic | Program |
|-----------------------|---------------------------------------------------------------------------------------------------------------------|
|📖 **Books** | [Kavita](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/kavita.nix) |
|📼 **Videos** | [Jellyfin](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/jellyfin.nix) |
|🎵 **Music** | [Navidrome](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/navidrome.nix) + [Spotifyd](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/spotifyd.nix) + [MPD](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/mpd.nix) |
|🗨️ **Messaging** | [Matrix](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/matrix.nix) |
|📁 **Filesharing** | [Nectcloud](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/nextcloud.nix) |
|🎞️ **Photos** | [Immich](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/immich.nix) |
|📄 **Documents** | [Paperless](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/paperless.nix) |
|🔄 **File Sync** | [Syncthing](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/syncthing.nix) |
|💾 **Backups** | [Restic](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/restic.nix) |
|👁️ **Monitoring** | [Grafana](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/monitoring.nix) |
|🍴 **RSS** | [FreshRss](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/freshrss.nix) |
|🌳 **Git** | [Forgejo](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/forgejo.nix) |
|⚓ **Anki Sync** | [Anki Sync Server](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/ankisync.nix) |
|🪪 **SSO** | [Kanidm](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/kanidm.nix) + [oauth2-proxy](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/oauth2-proxy.nix) |
|💸 **Finance** | [Firefly-III](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/firefly-iii.nix) |
|🃏 **Collections** | [Koillection](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/koillection.nix) |
|🗃️ **Shell History** | [Atuin](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/atuin.nix) |
|📅 **CalDav/CardDav** | [Radicale](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/radicale.nix) |
|↔️ **P2P Filesharing** | [Croc](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/croc.nix) |
|✂️ **Paste Tool** | [Microbin](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/microbin.nix) |
|📸 **Image Sharing** | [Slink](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/slink.nix) |
|🔗 **Link Shortener** | [Shlink](https://github.com/Swarsel/.dotfiles/tree/main/modules/nixos/server/shlink.nix) |
### Hosts
| Name | Hardware | Use |
|---------------------|-----------------------------------------------------|-----------------------------------------------------|
|💻 **pyramid** | Framework Laptop 16, AMD 7940HS, RX 7700S, 64GB RAM | Work laptop |
|💻 **bakery** | Lenovo Ideapad 720S-13IKB | Personal laptop |
|💻 **machpizza** | MacBook Pro 2016 | MacOS reference and build sandbox |
|🏠 **treehouse** | NVIDIA DGX Spark | AI Workstation, remote builder, hm-only-reference |
|🖥️ **summers** | ASUS Z10PA-D8, 2* Intel Xeon E5-2650 v4, 128GB RAM | Homeserver (microvms), remote builder, datastorage |
|🖥️ **winters** | ASRock J4105-ITX, 32GB RAM | Homeserver (IoT server in spe) |
|🖥️ **hintbooth** | HUNSN RM02, 8GB RAM | Router |
|☁️ **stoicclub** | Cloud Server: 1 vCPUs, 8GB RAM | Authoritative dns server |
|☁️ **liliputsteps** | Cloud Server: 1 vCPUs, 8GB RAM | SSH bastion |
|☁️ **twothreetunnel**| Cloud Server: 2 vCPUs, 8GB RAM | Service proxy |
|☁️ **eagleland** | Cloud Server: 2 vCPUs, 8GB RAM | Mailserver |
|☁️ **moonside** | Cloud Server: 4 vCPUs, 24GB RAM | Gaming server, syncthing + lightweight services |
|☁️ **belchsfactory** | Cloud Server: 4 vCPUs, 24GB RAM | Hydra builder and nix binarycache |
|📱 **magicant** | Samsung Galaxy Z Flip 6 | Phone |
|💿 **drugstore** | - | NixOS-installer ISO for bootstrapping new hosts |
|💿 **brickroad** | - | Kexec tarball for bootstrapping low-memory machines |
|❔ **chaotheatre** | - | Demo config for checking out this configuration |
|❔ **toto** | - | Helper configuration for testing purposes |
</details>
## General Nix tips & useful links
<details>
<summary>Click here for a summary of nix tips & links</summary>
- Below is a small list of tips that should be helpful if you are new to the nix ecosystem:
- Once you have the experimental feature `nix-command` enabled, you can temporarily install any package using `nix shell nixpkgs#<PACKAGE_NAME>` - this can be e.g. useful if you accidentally removed home-manager from your packages on a non-NixOS machine.
- The `nix [...]` commands are generally very useful, more info can be found here: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix
- When you are trying to setup a new configuration part, GitHub code search can really help you to find a working configuration. Just filter for `.nix` files and the options you are trying to set up.
- Temporarily install any package using `nix shell nixpkgs#<PACKAGE_NAME>` - this can be e.g. useful if you accidentally removed home-manager from your packages on a non-NixOS machine.
- if you need multiple packages, you can do `nix shell nixpkgs#{<pkg1>,<pkg2>,<pkg3>}`.
- you can set `nix.registry` to add more flakes to your registry. I use this to add a `n` shorthand to `nixpkgs`, which allows me to do `nix shell n#{<pkg1>,<pkg2>,<pkg3>}`.
- Alternatively, use [comma](https://github.com/nix-community/comma)
- More info on `nix [...]` commands: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix
- some examples:
- `nix flake update <input-name>` lets you update a specific input only.
- `nix repl <your flake path>` gives quick insight into your written configuration.
- `nix eval <your flake path>#<config attribute>` quickly returns an attribute in your written configuration
- `nix fmt` formats your flake using the formatter specified under `formatter` in your `flake.nix`
- When you are trying to setup a new configuration part, [GitHub code search](https://github.com/search?q=language%3ANix&type=code) can really help you to find a working configuration. Just filter for `.nix` files and the options you are trying to set up.
- getting packages at a different version than your target (or not packaged at all) can be done in most cases easily with fetchFromGithub (https://ryantm.github.io/nixpkgs/builders/fetchers/)
- you can easily install old revisions of packages using https://lazamar.co.uk/nix-versions/. You can conveniently spawn a shell with a chosen package available using `vershell <NIXPKGS_REVISION> <PACKAGE>`. Just make sure to pick a revision that has flakes enabled, otherwise you will need the legacy way of spawning the shell (see the link for more info)
- when developing modules in a dev branch of another flake, you can use `--override-input` to temporarily use the local directory as the flake source.
- including `nixosConfig ? config` in your module arguments is a smart way of enabling a module to pull in config from NixOS or home-manager config, no matter if it is a NixOS system or not.
- you can have a quick cli evaluation for nix commands with e.g. `nixpgks.lib` available using `nix-instantiate --strict --eval --expr "let lib = import <nixpkgs/lib>; in <expression>"`.
- if you are looking for a specific library, `nix-locate` makes it easy to look for them.
- to look at the dependencies pulled in by a tool, use `nix-tree`
- to find out which derivation uses another derivation, use `nix store --query --referrers <derivation>`
- to get a neat overview of your config changes in recent generations, use `nix profile diff-closures --profile /nix/var/nix/profiles/system`
- to get instead the changes since the last boot, use `nix profile diff-closures /run/*-system`
- if you just need the generation numbers, use `sudo nix-env --list-generations --profile /nix/var/nix/profiles/system`
- to then switch to another generation, you can use `sudo nix-env --switch-generation <generation number> -p /nix/var/nix/profiles/system` followed by `sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch`
- These links are your best friends:
- The nix documentation: https://nix.dev/
- The nixpkgs reference manual: https://nixos.org/manual/nixpkgs/unstable/#buildpythonapplication-function
- the [nixpkgs repository](https://github.com/NixOS/nixpkgs) - especially useful to look at the various READMEs that are in various places in the repository (find using GitHub code search) as well as the [issues](https://github.com/Swarsel/.dotfiles/issues) and [PRs](https://github.com/Swarsel/.dotfiles/pulls) pages
- and the [nixpkgs Pull Request Tracker](https://nixpk.gs/pr-tracker.html)
- The NixOS manual: https://nixos.org/manual/nixos/stable/
- The NixOS package search: https://search.nixos.org/packages
- and the nix package version search: https://lazamar.co.uk/nix-versions/
- The NixOS option search https://search.nixos.org/options
- [mipmip](https://github.com/mipmip)'s home-manager option search: https://mipmip.github.io/home-manager-option-search/
- [Alan Pearce](https://alanpearce.eu/)'s nix-darwin search: https://searchix.alanpearce.eu/options/darwin/search (which supports all of the other versions as well :o)
- For the above, you can use the CLI tool [manix](https://github.com/mlvzk/manix)
- Nix function search: https://noogle.dev/
- Search for nix-community options: https://search.nüschtos.de/
- But that is not all:
- Some nix resources
- A tour of Nix: https://nixcloud.io/tour/
- The Nix One Pager: https://github.com/tazjin/nix-1p
- another one page introduction: https://learnxinyminutes.com/nix/
- a very short introduction to Nix features: https://zaynetro.com/explainix
- introductory nix article: https://medium.com/@MrJamesFisher/nix-by-example-a0063a1a4c55
- and another one: https://web.archive.org/web/20210121042658/https://ebzzry.io/en/nix/#nix
- How to learn nix: https://ianthehenry.com/posts/how-to-learn-nix/
- the Nix Cookbook: https://github.com/functionalops/nix-cookbook?tab=readme-ov-file
- and the Nix Pills: https://nixos.org/guides/nix-pills/
- Some resources on flakes
- Why to use flakes and introduction to flakes: https://www.tweag.io/blog/2020-05-25-flakes/
- The [NixOS & Flakes Book](https://nixos-and-flakes.thiscute.world/)
- and [Wombat's book](https://mhwombat.codeberg.page/nix-book/)
- or the [Zero to Nix series](https://zero-to-nix.com/)
- Practical nix flakes article: https://serokell.io/blog/practical-nix-flakes
- A bit on Overlays:
- Overview on overlays: [Mastering Nixpkgs overlays article](https://nixcademy.com/posts/mastering-nixpkgs-overlays-techniques-and-best-practice/)
- Some examples on best practises: [Do's and Don'ts of overlays](https://flyingcircus.io/news/detailsansicht/nixos-the-dos-and-donts-of-nixpkgs-overlays)
- Blog article about overrides: https://bobvanderlinden.me/customizing-packages-in-nix/#using-modified-packages
- Also useful is the [official NixOS Wiki](https://wiki.nixos.org/wiki/NixOS_Wiki)
- there is also the [unofficial NixOS Wiki](https://nixos.wiki/) that tends to be a bit outdated, use with care
- Some resources for specific nix tools:
- Flake output reference: https://nixos-and-flakes.thiscute.world/other-usage-of-flakes/outputs
- or more general, the [NixOS & Flakes Book](https://nixos-and-flakes.thiscute.world/)
- Also useful is the [NixOS wiki](https://nixos.wiki/wiki/Main_Page), but some pages are outdated, so use with some care
- You can find public repositories with modules at https://nur.nix-community.org/ (you should check what you are installing however):
- I like to use this for rycee's firefox extensions: https://nur.nix-community.org/repos/rycee/
- List of nerdfonts: https://github.com/NixOS/nixpkgs/blob/nixos-unstable/pkgs/data/fonts/nerd-fonts/manifests/fonts.json
- Stylix configuration options: https://danth.github.io/stylix/
- nix-on-droid options: https://nix-community.github.io/nix-on-droid/nix-on-droid-options.html#sec-options
- Very useful tools that are mostly not directly used in configuration but instead called on need:
- Convert non-NixOS machines to NixOS using [nixos-infect](https://github.com/elitak/nixos-infect)
- Create various installation media with [nixos-generators](https://github.com/nix-community/nixos-generators)
- Remotely deploy NixOS using [nixos-anywhere](https://github.com/nix-community/nixos-anywhere)
- And a few links that are not directly nix-related, but may still serve you well:
- List of pre-commit-hooks: https://devenv.sh/reference/options/#pre-commithooks
- Waybar configuration: https://github.com/Alexays/Waybar/wiki
</details>
## Attributions, Acknowledgements, Inspirations, etc.
These are in random order (also known as 'the order in which I discovered them'). I would like to express my gratitude to:
- All the great people who have contributed code for the nix-community, with special mentions for (this list is unfairly incomplete):
<details>
<summary>Click here to expand...</summary>
- [guibou](https://github.com/guibou/)
- [rycee](https://github.com/rycee)
- [adisbladis](https://github.com/adisbladis)
- [Mic92](https://github.com/Mic92/sops-nix)
- [lassulus](https://github.com/lassulus)
- [danth](https://github.com/danth/)
- [LnL7](https://github.com/LnL7)
- [t184256](https://github.com/t184256)
- [bennofs](https://github.com/bennofs)
- [Pandapip1](https://github.com/Pandapip1)
- [zowoq](https://github.com/zowoq)
- [numtide](https://github.com/numtide)
- [hsjobeki](https://github.com/hsjobeki)
- [blitz](https://github.com/blitz)
- [RaitoBezarius](https://github.com/RaitoBezarius)
- [nikstur](https://github.com/nikstur)
- [talyz](https://github.com/talyz)
- [infinisil](https://github.com/infinisil)
- [zhaofengli](https://github.com/zhaofengli)
- [Artturin](https://github.com/Artturin)
- [oddlama](https://github.com/oddlama)
</details>
- All the people who have inspired me with their configurations (sadly also highly incomplete):
<details>
<summary>Click here to expand...</summary>
- [theSuess](https://github.com/theSuess) with their [home-manager](https://code.kulupu.party/thesuess/home-manager)
- [hlissner](https://github.com/hlissner) with their [dotfiles](https://github.com/hlissner/dotfiles)
- [drduh](https://github.com/drduh/YubiKey-Guide) with their [YubiKey-Guide](https://github.com/drduh/YubiKey-Guide)
@ -154,5 +301,8 @@ These are in random order (also known as 'the order in which I discovered them')
- [0xdade](https://github.com/0xdade) with their [blog](https://0xda.de/blog/)
- [EmergentMind](https://github.com/EmergentMind) with their [nix-config](https://github.com/EmergentMind/nix-config)
- [librephoenix](https://github.com/librephoenix) with their [nixos-config](https://github.com/librephoenix/nixos-config)
- [Xe](https://github.com/Xe) with their [blog](https://xeiaso.net/blog/)
- [oddlama](https://github.com/oddlama) with their absolutely incredible [nix-config](https:/github.com/oddlama/nix-config)
</details>
If you feel that I forgot to pay you tribute for code that I used in this repository, please shoot me a message and I will fix it :)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 MiB

3
.gitignore vendored
View file

@ -1,6 +1,9 @@
secrets/keys/pubring.kbx
secrets/keys/private-keys-v1.d/
install/flake.lock
result
*.~undo-tree~
*.iso
*.bak
.pre-commit-config.yaml
.direnv

View file

@ -7,10 +7,17 @@ keys:
- &swarsel 4BE7925262289B476DBBC17B76FD3810215AE097
- &hosts
- &winters age1h72072slm2pthn9m2qwjsyy2dsazc6hz97kpzh4gksvv0r2jqecqul8w63
- &toto age1dmxw76fzr958zl23ad5h7gvtnurr8n5ajlqchgx76k6z5yj3z4zsn592fq
- &twothreetunnel age1g7atkxdlt4ymeh7v7aa2yzr2hq2qkvzrc4r49ugttm3n582ymv9qrmpk8d
- &liliputsteps age1ly2endyt0y9xyddj6yuj4nw6fa3ltvzlvew4cr4lzs6dv8dkavpqadmyxx
- &stoicclub age15klj4t7gpfp69472mne4ue62pp6m4e04dmjyw7yf30qtqd3vl3uqjmcyxm
- &belchsfactory age1k73gy5em3js9zklnnkzp5hme9k04lny32fgahmzddknjw5c295asdyr4x6
- &eagleland age1cmzh82q8k59yzceuuy2epmqu22g7m84gqvq056mhgehwpmvjadfsc3glc8
- &hintbooth age1hsumymvh5mkqlaynrp9lv2w696yk3wtjzlyfmrpeuvh9u2tlwceqh3563x
- &bakery age1mjgw3nxlnqdj04mgjz3wn7fj2nl2nxla4p2r2fn4nkvayfgp09pqllxzyh
- &toto age16vzhcvz8tyxj8e0f47fy0z4p3dsg0ak4vl52ut3l07a0tz465cxslmhevl
- &surface age1zlnxraee6tddr07xn59mx5rdexw8qxryd53eqlsajasfhfy78fkq705dfg
- &nbl age16lnmuuxfuxxtty3atnhut8wseppwnhp7rdhmxqd5tdvs9qnjffjq42sqyy
- &sync age1glge4e97vgqzh332mqs5990vteezu2m8k4wq3z35jk0q8czw3gks2d7a3h
- &moonside age18quey88vge7xytclg2nuq4ncme86dg04lxwczqxczmdchnjg3p0saehsnh
creation_rules:
- path_regex: secrets/general/[^/]+\.(yaml|json|env|ini)$
key_groups:
@ -18,33 +25,191 @@ creation_rules:
- *swarsel
age:
- *winters
- *twothreetunnel
- *liliputsteps
- *stoicclub
- *belchsfactory
- *eagleland
- *hintbooth
- *bakery
- *toto
- *surface
- *nbl
- *moonside
- path_regex: secrets/repo/[^/]+$
key_groups:
- pgp:
- *swarsel
age:
- *winters
- *twothreetunnel
- *liliputsteps
- *stoicclub
- *belchsfactory
- *eagleland
- *hintbooth
- *bakery
- *toto
- *surface
- *nbl
- *moonside
- path_regex: secrets/certs/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *swarsel
age:
- *winters
- *nbl
- *twothreetunnel
- *liliputsteps
- *stoicclub
- *belchsfactory
- *eagleland
- *hintbooth
- *bakery
- *toto
- *surface
- *winters
- path_regex: secrets/winters/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *swarsel
age:
- *winters
- *moonside
- path_regex: secrets/work/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *swarsel
age:
- *nbl
- path_regex: secrets/sync/[^/]+\.(yaml|json|env|ini)$
- path_regex: secrets/pyramid/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *swarsel
age:
- *sync
- *nbl
- path_regex: hosts/nixos/x86_64-linux/pyramid/secrets/pii.nix.enc
key_groups:
- pgp:
- *swarsel
age:
- *nbl
- path_regex: secrets/moonside/secrets.yaml
key_groups:
- pgp:
- *swarsel
age:
- *moonside
- path_regex: hosts/nixos/aarch64-linux/moonside/secrets/pii.nix.enc
key_groups:
- pgp:
- *swarsel
age:
- *moonside
- path_regex: secrets/belchsfactory/secrets.yaml
key_groups:
- pgp:
- *swarsel
age:
- *belchsfactory
- path_regex: hosts/nixos/aarch64-linux/belchsfactory/secrets/pii.nix.enc
key_groups:
- pgp:
- *swarsel
age:
- *belchsfactory
- path_regex: secrets/bakery/secrets.yaml
key_groups:
- pgp:
- *swarsel
age:
- *bakery
- path_regex: hosts/nixos/x86_64-linux/bakery/secrets/pii.nix.enc
key_groups:
- pgp:
- *swarsel
age:
- *bakery
- path_regex: secrets/winters/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *swarsel
age:
- *winters
- path_regex: hosts/nixos/x86_64-linux/winters/secrets/pii.nix.enc
key_groups:
- pgp:
- *swarsel
age:
- *winters
- path_regex: secrets/eagleland/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *swarsel
age:
- *eagleland
- path_regex: hosts/nixos/x86_64-linux/eagleland/secrets/pii.nix.enc
key_groups:
- pgp:
- *swarsel
age:
- *eagleland
- path_regex: secrets/stoicclub/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *swarsel
age:
- *stoicclub
- path_regex: hosts/nixos/aarch64-linux/stoicclub/secrets/pii.nix.enc
key_groups:
- pgp:
- *swarsel
age:
- *stoicclub
- path_regex: secrets/liliputsteps/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *swarsel
age:
- *liliputsteps
- path_regex: hosts/nixos/aarch64-linux/liliputsteps/secrets/pii.nix.enc
key_groups:
- pgp:
- *swarsel
age:
- *liliputsteps
- path_regex: secrets/twothreetunnel/[^/]+\.(yaml|json|env|ini)$
key_groups:
- pgp:
- *swarsel
age:
- *twothreetunnel
- path_regex: hosts/nixos/aarch64-linux/twothreetunnel/secrets/pii.nix.enc
key_groups:
- pgp:
- *swarsel
age:
- *twothreetunnel
- path_regex: hosts/nixos/x86_64-linux/summers/secrets/
key_groups:
- pgp:
- *swarsel
- path_regex: hosts/nixos/x86_64-linux/hintbooth/secrets/
key_groups:
- pgp:
- *swarsel
age:
- *hintbooth
- path_regex: hosts/darwin/nbm-imba-166/secrets/pii.nix.enc
key_groups:
- pgp:
- *swarsel

File diff suppressed because it is too large Load diff

View file

@ -1,39 +0,0 @@
{ self, inputs, pkgs, system, ... }:
{
pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
src = "${self}";
hooks = {
check-added-large-files.enable = true;
check-case-conflicts.enable = true;
check-executables-have-shebangs.enable = true;
check-shebang-scripts-are-executable.enable = false;
check-merge-conflicts.enable = true;
deadnix.enable = true;
detect-private-keys.enable = true;
end-of-file-fixer.enable = true;
fix-byte-order-marker.enable = true;
flake-checker.enable = true;
forbid-new-submodules.enable = true;
mixed-line-endings.enable = true;
nixpkgs-fmt.enable = true;
statix.enable = true;
trim-trailing-whitespace.enable = true;
destroyed-symlinks = {
enable = true;
entry = "${inputs.pre-commit-hooks.checks.${system}.pre-commit-hooks}/bin/destroyed-symlinks";
};
shellcheck = {
enable = true;
entry = "${pkgs.shellcheck}/bin/shellcheck --shell=bash";
};
shfmt = {
enable = true;
entry = "${pkgs.shfmt}/bin/shfmt -i 4 -sr -d -s -l";
};
};
};
}

View file

@ -1,3 +1,4 @@
;; -*- lexical-binding: t; -*-
(defvar swarsel-file-name-handler-alist file-name-handler-alist)
(defvar swarsel-vc-handled-backends vc-handled-backends)
@ -9,8 +10,6 @@
(add-hook 'emacs-startup-hook
(lambda ()
(progn
;; (setq gc-cons-threshold (* 1000 1000 8)
;; (setq gc-cons-threshold #x40000000
(setq gc-cons-threshold (* 32 1024 1024)
gc-cons-percentage 0.1
jit-lock-defer-time 0.05

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,120 @@
/* Source file https://github.com/MrOtherGuy/firefox-csshacks/tree/master/chrome/autohide_toolbox.css made available under Mozilla Public License v. 2.0
See the above repository for updates as well as full license text. */
/* Hide the whole toolbar area unless urlbar is focused or cursor is over the toolbar
* Dimensions on non-Win10 OS probably needs to be adjusted.
*/
:root{
--uc-autohide-toolbox-delay: 200ms; /* Wait 0.1s before hiding toolbars */
--uc-toolbox-rotation: 82deg; /* This may need to be lower on mac - like 75 or so */
--base00: #1D252C;
--base01: #171D23;
--base02: #5EC4FF;
--base03: #566C7D;
--base04: #5EC4FF;
--base05: #A0B3C5;
--base06: #C06ECE;
--base07: #A0B3C5;
--base08: #D95468;
--base09: #FFA880;
--base0A: #5EC4FF;
--base0B: #8BD49C;
--base0C: #008B94;
--base0D: #5EC4FF;
--base0E: #C06ECE;
--base0F: #5EC4FF;
}
:root[sizemode="maximized"]{
--uc-toolbox-rotation: 88.5deg;
}
@media (-moz-platform: windows){
:root:not([lwtheme]) #navigator-toolbox{ background-color: -moz-dialog !important; }
}
:root[sizemode="fullscreen"],
:root[sizemode="fullscreen"] #navigator-toolbox{ margin-top: 0 !important; }
#navigator-toolbox{
--browser-area-z-index-toolbox: 3;
position: fixed !important;
background-color: var(--lwt-accent-color,black) !important;
transition: transform 82ms linear, opacity 82ms linear !important;
transition-delay: var(--uc-autohide-toolbox-delay) !important;
transform-origin: top;
transform: rotateX(var(--uc-toolbox-rotation));
opacity: 0;
line-height: 0;
z-index: 1;
pointer-events: none;
width: 100vw;
}
:root[sessionrestored] #urlbar[popover]{
pointer-events: none;
opacity: 0;
transition: transform 82ms linear var(--uc-autohide-toolbox-delay), opacity 0ms calc(var(--uc-autohide-toolbox-delay) + 82ms);
transform-origin: 0px calc(0px - var(--tab-min-height) - var(--tab-block-margin) * 2);
transform: rotateX(89.9deg);
}
:root[window-modal-open] #urlbar[popover],
#mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts,#selection-shortcut-action-panel,#chat-shortcuts-options-panel,#tab-preview-panel), > #tab-group-editor > [panelopen]) ~ toolbox #urlbar[popover],
/* swarsel: removed :hover from below line */
#navigator-toolbox:is(:focus-within,[movingtab]) #urlbar[popover],
#urlbar-container > #urlbar[popover]:is([focused],[open]){
pointer-events: auto;
opacity: 1;
transition-delay: 33ms;
transform: rotateX(0deg);
}
:root[window-modal-open] #navigator-toolbox,
#mainPopupSet:has(> [panelopen]:not(#ask-chat-shortcuts,#selection-shortcut-action-panel,#chat-shortcuts-options-panel,#tab-preview-panel), > #tab-group-editor > [panelopen]) ~ toolbox,
#navigator-toolbox:has(#urlbar:is([open],[focus-within])),
/* swarsel: removed :hover from below line */
#navigator-toolbox:is(:focus-within,[movingtab]){
transition-delay: 33ms !important;
transform: rotateX(0);
opacity: 1;
}
/* This makes things like OS menubar/taskbar show the toolbox when hovered in maximized windows.
* Unfortunately it also means that other OS native surfaces (such as context menu on macos)
* and other always-on-top applications will trigger toolbox to show up. */
@media -moz-pref("userchrome.autohide-toolbox.unhide-by-native-ui.enabled"){
:root[sizemode="maximized"]:not(:hover){
#navigator-toolbox:not(:-moz-window-inactive),
#urlbar[popover]:not(:-moz-window-inactive){
transition-delay: 33ms !important;
transform: rotateX(0);
opacity: 1;
}
}
}
#navigator-toolbox > *{ line-height: normal; pointer-events: auto }
/* Don't apply transform before window has been fully created */
:root:not([sessionrestored]) #navigator-toolbox{ transform:none !important }
:root[customizing] #navigator-toolbox{
position: relative !important;
transform: none !important;
opacity: 1 !important;
}
#navigator-toolbox[inFullscreen] > #PersonalToolbar,
#PersonalToolbar:is([collapsed=""],[collapsed="true"]){ display: none }
/* This is a bit hacky fix for an issue that will make urlbar zero pixels tall after you enter customize mode */
#urlbar[breakout][breakout-extend] > .urlbar-input-container{
padding-block: calc(min(4px,(var(--urlbar-container-height) - var(--urlbar-height)) / 2) + var(--urlbar-container-padding)) !important;
}
/* Uncomment the following for compatibility with tabs_on_bottom.css - this isn't well tested though */
/*
#navigator-toolbox{ flex-direction: column; display: flex; }
*/

View file

@ -0,0 +1,160 @@
:root {
--base00: #1D252C;
--base01: #171D23;
--base02: #5EC4FF;
--base03: #566C7D;
--base04: #5EC4FF;
--base05: #A0B3C5;
--base06: #C06ECE;
--base07: #A0B3C5;
--base08: #D95468;
--base09: #FFA880;
--base0A: #5EC4FF;
--base0B: #8BD49C;
--base0C: #008B94;
--base0D: #5EC4FF;
--base0E: #C06ECE;
--base0F: #5EC4FF;
--tridactyl-def-fg: var(--base02);
--tridactyl-cmdl-bg: var(--base00);
--tridactyl-cmdl-fg: var(--base0C);
--tridactyl-font-family: "San Francisco", sans-serif;
--tridactyl-cmdl-font-size: 1.5rem;
--tridactyl-cmdl-line-height: 1.5;
--tridactyl-cmplt-option-height: 1.4em;
--tridactyl-cmplt-font-size: var(--tridactyl-small-font-size);
--tridactyl-cmplt-border-top: unset;
--tridactyl-status-font-size: 9px;
--tridactyl-status-font-family: "Fira Code", monospace;
--tridactyl-status-border: 1px var(--tridactyl-fg) solid;
--tridactyl-header-font-size: var(--tridactyl-small-font-size);
--tridactyl-header-font-weight: 200;
--tridactyl-header-border-bottom: unset;
--tridactyl-hintspan-font-size: var(--tridactyl-font-size);
--tridactyl-hint-active-fg: none;
}
:root #command-line-holder {
order: 1;
border: 2px solid var(--tridactyl-cmdl-fg);
color: var(--tridactyl-cmdl-bg);
}
:root #tridactyl-input {
width: 90%;
padding: 1rem;
color: var(--tridactyl-def-fg);
}
:root #completions table {
font-size: 0.8rem;
font-weight: 200;
border-spacing: 0;
table-layout: fixed;
padding: 1rem;
padding-top: 0;
}
:root #completions > div {
max-height: calc(20 * var(--tridactyl-cmplt-option-height));
min-height: calc(10 * var(--tridactyl-cmplt-option-height));
}
/* COMPLETIONS */
:root #completions {
font-weight: 200;
order: 2;
color: var(--tridactyl-def-fg);
background: var(--tridactyl-cmdl-bg);
}
/* Olie doesn't know how CSS inheritance works */
:root #completions .HistoryCompletionSource {
max-height: unset;
min-height: unset;
}
:root #completions .HistoryCompletionSource table {
width: 100%;
font-size: 9pt;
border-spacing: 0;
table-layout: fixed;
}
/* redundancy 2: redundancy 2: more redundancy */
:root #completions .BmarkCompletionSource {
max-height: unset;
min-height: unset;
}
:root #completions table tr { white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
:root #completions .url {
background: var(--tridactyl-cmdl-bg);
}
:root #completions .focused {
background: #44391F;
}
:root #completions .focused .url {
background: #44391F;
}
:root #completions .BufferCompletionSource table {
width: unset;
font-size: unset;
border-spacing: unset;
table-layout: unset;
}
:root #completions table tr {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
:root #completions .sectionHeader {
background: unset;
padding: 1rem !important;
padding-left: unset;
padding-bottom: 0.2rem;
}
:root #cmdline_iframe {
position: fixed !important;
bottom: unset;
top: 25% !important;
left: 10% !important;
z-index: 2147483647 !important;
width: 80% !important;
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 15px !important;
}
:root .TridactylStatusIndicator {
position: fixed !important;
bottom: 0 !important;
font-weight: 200 !important;
padding: 0.8ex !important;
}
/* #Shydactyl-normal { */
/* border-color: green !important; */
/* } */
/* #Shydactyl-insert { */
/* border-color: yellow !important; */
/* } */

View file

@ -1,6 +1,6 @@
sanitise tridactyllocal tridactylsync
colourscheme base16-codeschool
colourscheme swarsel
" General Settings
set update.lastchecktime 1720629386560
@ -12,9 +12,12 @@ set configversion 2.0
set searchurls.no https://search.nixos.org/options?query=
set searchurls.np https://search.nixos.org/packages?query=
set searchurls.hm https://home-manager-options.extranix.com/?query=
set searchurls.@c https://vbc.atlassian.net/wiki/search?text=
set searchurls.@j https://vbc.atlassian.net/issues/?jql=textfields%20~%20%22%s*%22&wildcardFlag=true
set completions.Tab.statusstylepretty true
set hintfiltermode vimperator-reflow
set hintnames numeric
unbind --mode=hint <Space>
" Binds
bind <C-m> buffer #
@ -22,12 +25,56 @@ bind gd tabdetach
bind gD composite tabduplicate; tabdetach
bind d composite tabprev; tabclose #
bind D tabclose
bind c hint
bind c hint -J
bindurl ^http(s)?://www\.google\.com c hint -Jc [class="LC20lb MBeuO DKV0Md"],[class="YmvwI"],[class="YyVfkd"],[class="fl"]
bindurl ^http(s)?://news\.ycombinator\.com c hint -Jc [class="titleline"],[class="age"]
bindurl ^http(s)?://lobste\.rs c hint -Jc [class="u-url"],[class="comments_label"]
bindurl ^http(s)?://reddit\.com c hint -Jc [class="title may-blank loggedin"],[class="bylink comments may-blank"]
bindurl ^http(s)?://github\.com c hint -Jc [class="Link--primary"],[class="AppHeader-button Button--secondary Button--medium Button p-0 color-fg-muted"],[class="UnderlineNav-item no-wrap js-responsive-underlinenav-item js-selected-navigation-item"],[class="prc-ActionList-ItemLabel-TmBhn"],[class="PRIVATE_TreeView-item-content-text prc-TreeView-TreeViewItemContentText-smZM-"]
bindurl ^http(s)?://vbc\.atlassian\.net\/wiki c hint -Jc [class="_1reo15vq _18m915vq _1bto1l2s _kqswh2mm _o5721q9c _syaz1fxt"],[class="_11c81ixg _1reo15vq _18m915vq _18s81b66 _kqswh2mm _k48p1wq8 _o5721q9c _1bto1l2s _u5f31b66"],[class="_1r04ze3t _kqswstnw"],[class="css-a61etj"],[class="jira-macro-table-underline-pdfexport"]
bindurl ^http(s)?://www\.google\.com gi composite focusinput -l ; text.end_of_line
" Work
command tab_or_tabopen jsb -p (async () => {let tabs = await browser.tabs.query({}); let tab = tabs.find(t => t.url.includes(JS_ARG)); if (tab) {browser.tabs.update(tab.id, { active: true });} else {tri.excmds.tabopen(JS_ARG);}})()
command tab_or_tabopen_local jsb -p (async () => {const currentWindow = await browser.windows.getCurrent(); const tabs = await browser.tabs.query({ windowId: currentWindow.id }); const tab = tabs.find(t => t.url.includes(JS_ARG)); if (tab) {browser.tabs.update(tab.id, { active: true });} else {tri.excmds.tabopen(JS_ARG);}})()
bind gwa tab_or_tabopen_local apic-impimba-1.m.imp.ac.at
bind gwA tab_or_tabopen_local artifactory.imp.ac.at
bind gwb tab_or_tabopen_local bitbucket.vbc.ac.at
bind gwc tab_or_tabopen_local vbc.atlassian.net/wiki
bind gwd tab_or_tabopen_local datadomain-impimba-2.imp.ac.at
bind gwe tab_or_tabopen_local exivity.vbc.ac.at
bind gwg tab_or_tabopen_local github.com
bind gwG tab_or_tabopen_local goc.egi.eu
bind gwh tab_or_tabopen_local jupyterhub.vbc.ac.at
bind gwj tab_or_tabopen_local jenkins.vbc.ac.at
bind gwJ tab_or_tabopen_local test-jenkins.vbc.ac.at
bind gwl tab_or_tabopen_local lucid.app
bind gwm tab_or_tabopen_local monitoring.vbc.ac.at/grafana
bind gwM tab_or_tabopen_local monitoring.vbc.ac.at/prometheus
bind gwn tab_or_tabopen_local netbox.vbc.ac.at
bind gwN tab_or_tabopen_local nap.imp.ac.at
bind gwo tab_or_tabopen_local outlook.office.com
bind gws tab_or_tabopen_local satellite.vbc.ac.at
bind gwt tab_or_tabopen_local tower.vbc.ac.at
bind gwv tab_or_tabopen_local vc-impimba-1.m.imp.ac.at/ui
bind gwx tab_or_tabopen_local xclarity.vbc.ac.at
unbind --mode=normal gh
bind ghp tab_or_tabopen_local https://github.com/pulls
bind ghi tab_or_tabopen_local https://github.com/issues/assigned?q=is%3Aissue%20state%3Aopen%20archived%3Afalse%20(assignee%3A%40me%20OR%20author%3A%40me)%20sort%3Aupdated-desc
bind ghv tab_or_tabopen_local github.com/orgs/vbc-it/repositories
bind ghc tab_or_tabopen_local github.com/orgs/CLIP-HPC/repositories
bind ghd tab_or_tabopen_local github.com/Swarsel/.dotfiles
bind ghni tab_or_tabopen_local github.com/NixOS/nixpkgs/issues
bind ghnp tab_or_tabopen_local github.com/NixOS/nixpkgs/pulls
unbind --mode=normal gp
bind gprn tab_or_tabopen_local www.reddit.com/r/NixOS/
bind gpd tab_or_tabopen_local discourse.nixos.org/
bind gpp tab_or_tabopen_local parkour.wien/categories
" Search in page
set findcase smart
bind / fillcmdline find
@ -77,11 +124,20 @@ set allowautofocus false
jsb browser.webRequest.onHeadersReceived.addListener(tri.request.clobberCSP,{urls:["<all_urls>"],types:["main_frame"]},["blocking","responseHeaders"])
" default is 300ms
set hintdelay 100
set hintdelay 500
" Some pages like github break on the tridactyl quick search. have this as a fallback
unbind <C-f>
" Do not let websites steal sitefocus
set allowautofocus false
" whitelist sites
" :seturl [URL regex for sites with text editors you use] allowautofocus true
" stronger blacklist for specific sites
seturl vbc.atlassian.net preventautofocusjackhammer true
" Subconfig Settings
seturl www.google.com followpagepatterns.next Next
seturl www.google.com followpagepatterns.prev Previous

View file

@ -1,4 +1,5 @@
# max. 50 chars is here: #
# <type>[optional scope]: <description>
# types: feat, fix, build, chore, ci, docs, style, refactor, perf, test

View file

@ -6,7 +6,7 @@ command_not_found_handle() {
fi
echo -n "searching nix-index..."
ATTRS=$(@nix-locate@ --minimal --no-group --type x --type s --top-level --whole-name --at-root "/bin/$1")
ATTRS=$(@nix-locate@ --minimal --no-group --type x --type s --whole-name --at-root "/bin/$1")
case $(echo -n "$ATTRS" | grep -c "^") in
0)

7
files/scripts/project.sh Normal file
View file

@ -0,0 +1,7 @@
set -euo pipefail
if [ ! -d "$(pwd)/.git" ]; then
git init
fi
nix flake init --template "$FLAKE"#"$1"
direnv allow

View file

@ -0,0 +1,12 @@
shopt -s nullglob globstar
notify-send "$(env | grep -E 'WAYLAND|SWAY')"
password="$1"
pass show "$password" | {
IFS= read -r pass
printf %s "$pass"
} | wtype -
notify-send -u critical -a pass -t 1000 "Typed Password"

11
files/scripts/sshrm.sh Normal file
View file

@ -0,0 +1,11 @@
HISTFILE="$HOME"/.histfile
last_ssh_cmd=$(grep -E "ssh " "$HISTFILE" | sed -E 's/^: [0-9]+:[0-9]+;//' | grep "^ssh " | tail -1)
host=$(echo "$last_ssh_cmd" | sed -E 's/.*ssh ([^@ ]+@)?([^ ]+).*/\2/')
if [[ -n $host ]]; then
echo "Removing SSH host key for: $host"
ssh-keygen -R "$host"
else
echo "No valid SSH command found in history."
fi

View file

@ -1,32 +1,35 @@
# highly inspired by https://github.com/EmergentMind/nix-config/blob/dev/scripts/bootstrap-nixos.sh
# highly inspired by https://github.com/EmergentMind/nix-config/blob/dev/files/scripts/bootstrap-nixos.sh
set -eo pipefail
target_hostname=""
target_destination=""
target_arch=""
target_user="swarsel"
ssh_port="22"
persist_dir=""
disk_encryption=0
disk_encryption_args=""
no_disko_deps="false"
temp=$(mktemp -d)
function help_and_exit() {
echo
echo "Remotely installs NixOS on a target machine using this nix-config."
echo "Remotely installs SwarselSystem on a target machine including secret deployment."
echo
echo "USAGE: $0 -n <target_hostname> -d <target_destination> [OPTIONS]"
echo
echo "ARGS:"
echo " -n <target_hostname> specify target_hostname of the target host to deploy the nixos config on."
echo " -d <target_destination> specify ip or url to the target host."
echo " -a <targeit_arch> specify the architecture of the target host."
echo " target during install process."
echo
echo "OPTIONS:"
echo " -u <target_user> specify target_user with sudo access. nix-config will be cloned to their home."
echo " Default='${target_user}'."
echo " --port <ssh_port> specify the ssh port to use for remote access. Default=${ssh_port}."
echo " --impermanence Use this flag if the target machine has impermanence enabled. WARNING: Assumes /persist path."
echo " --encryption Use this flag if the target machine has full disk encryption enabled."
echo " --debug Enable debug mode."
echo " --no-disko-deps Upload only disk script and not dependencies (for use on low ram)."
echo " -h | --help Print this help."
exit 0
}
@ -102,6 +105,10 @@ while [[ $# -gt 0 ]]; do
shift
target_destination=$1
;;
-a)
shift
target_arch=$1
;;
-u)
shift
target_user=$1
@ -110,15 +117,8 @@ while [[ $# -gt 0 ]]; do
shift
ssh_port=$1
;;
--temp-override)
shift
temp=$1
;;
--impermanence)
persist_dir="/persist"
;;
--encryption)
disk_encryption=1
--no-disko-deps)
no_disko_deps="true"
;;
--debug)
set -x
@ -132,6 +132,60 @@ while [[ $# -gt 0 ]]; do
shift
done
if [[ $target_arch == "" || $target_destination == "" || $target_hostname == "" ]]; then
red "error: target_arch, target_destination or target_hostname not set."
help_and_exit
fi
LOCKED="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.node.lockFromBootstrapping)"
if [[ $LOCKED == "true" ]]; then
red "THIS SYSTEM IS LOCKED FROM BOOTSTRAPPING"
exit
fi
green "~SwarselSystems~ remote installer"
green "Reading system information for $target_hostname ..."
DISK="$(nix eval --raw ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.rootDisk)"
green "Root Disk: $DISK"
CRYPTED="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.isCrypted)"
if [[ $CRYPTED == "true" ]]; then
green "Encryption: ✓"
disk_encryption=1
disk_encryption_args=(
--disk-encryption-keys
/tmp/disko-password
/tmp/disko-password
)
else
red "Encryption: X"
disk_encryption=0
fi
IMPERMANENCE="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.isImpermanence)"
if [[ $IMPERMANENCE == "true" ]]; then
green "Impermanence: ✓"
persist_dir="/persist"
else
red "Impermanence: X"
persist_dir=""
fi
SWAP="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.isSwap)"
if [[ $SWAP == "true" ]]; then
green "Swap: ✓"
else
red "Swap: X"
fi
SECUREBOOT="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.isSecureBoot)"
if [[ $SECUREBOOT == "true" ]]; then
green "Secure Boot: ✓"
else
red "Secure Boot: X"
fi
ssh_cmd="ssh -oport=${ssh_port} -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -t $target_user@$target_destination"
# ssh_root_cmd=$(echo "$ssh_cmd" | sed "s|${target_user}@|root@|") # uses @ in the sed switch to avoid it triggering on the $ssh_key value
ssh_root_cmd=${ssh_cmd/${target_user}@/root@}
@ -148,6 +202,8 @@ if [ ! -d "$FLAKE" ]; then
fi
cd "$FLAKE"
rm install/flake.lock || true
git_root=$(git rev-parse --show-toplevel)
# ------------------------
green "Wiping known_hosts of $target_destination"
@ -167,25 +223,41 @@ ssh-keyscan -p "$ssh_port" "$target_destination" >> ~/.ssh/known_hosts || true
# when using luks, disko expects a passphrase on /tmp/disko-password, so we set it for now and will update the passphrase later
# via the config
if [ "$disk_encryption" -eq 1 ]; then
green "--encryption set: Preparing a temporary password for disko."
green "[Optional] Set disk encryption passphrase:"
while true; do
green "Set disk encryption passphrase:"
read -rs luks_passphrase
if [ -n "$luks_passphrase" ]; then
$ssh_root_cmd "/bin/sh -c 'echo $luks_passphrase > /tmp/disko-password'"
green "Please confirm passphrase:"
read -rs luks_passphrase_confirm
if [[ $luks_passphrase == "$luks_passphrase_confirm" ]]; then
$ssh_root_cmd "echo '$luks_passphrase' > /tmp/disko-password"
break
else
$ssh_root_cmd "/bin/sh -c 'echo passphrase > /tmp/disko-password'"
red "Passwords do not match"
fi
else
green "--encryption not set: Not using disk encryption.."
done
fi
# ------------------------
green "Generating hardware-config.nix for $target_hostname and adding it to the nix-config."
$ssh_root_cmd "nixos-generate-config --force --no-filesystems --root /mnt"
mkdir -p "$FLAKE"/hosts/nixos/"$target_hostname"
$scp_cmd root@"$target_destination":/mnt/etc/nixos/hardware-configuration.nix "${git_root}"/hosts/nixos/"$target_hostname"/hardware-configuration.nix
mkdir -p "$FLAKE"/hosts/nixos/"$target_arch"/"$target_hostname"
$scp_cmd root@"$target_destination":/mnt/etc/nixos/hardware-configuration.nix "${git_root}"/hosts/nixos/"$target_arch"/"$target_hostname"/hardware-configuration.nix
# ------------------------
# green "Generating hostkey for ssh initrd"
# $ssh_root_cmd "mkdir -p $temp/etc/secrets/initrd /etc/secrets/initrd"
# $ssh_root_cmd "ssh-keygen -t ed25519 -N '' -f $temp/etc/secrets/initrd/ssh_host_ed25519_key"
# $ssh_root_cmd "cp $temp/etc/secrets/initrd/ssh_host_ed25519_key /etc/secrets/initrd/ssh_host_ed25519_key"
# ------------------------
green "Deploying minimal NixOS installation on $target_destination"
SHELL=/bin/sh nix run github:nix-community/nixos-anywhere -- --ssh-port "$ssh_port" --extra-files "$temp" --flake .#"$target_hostname" root@"$target_destination"
if [[ $no_disko_deps == "true" ]]; then
green "Building without disko dependencies (using custom kexec)"
nix run github:nix-community/nixos-anywhere/1.10.0 -- "${disk_encryption_args[@]}" --no-disko-deps --ssh-port "$ssh_port" --extra-files "$temp" --flake ./install#"$target_hostname" --kexec "$(nix build --print-out-paths .#packages."$target_arch".swarsel-kexec)/swarsel-kexec-$target_arch.tar.gz" root@"$target_destination"
else
green "Building with disko dependencies (using nixos-images kexec)"
nix run github:nix-community/nixos-anywhere/1.10.0 -- "${disk_encryption_args[@]}" --ssh-port "$ssh_port" --extra-files "$temp" --flake ./install#"$target_hostname" root@"$target_destination"
fi
echo "Updating ssh host fingerprint at $target_destination to ~/.ssh/known_hosts"
ssh-keyscan -p "$ssh_port" "$target_destination" >> ~/.ssh/known_hosts || true
@ -200,7 +272,18 @@ while true; do
yellow "$target_destination is not yet ready."
fi
done
# ------------------------
if [[ $SECUREBOOT == "true" ]]; then
green "Setting up secure boot keys"
$ssh_root_cmd "mkdir -p /var/lib/sbctl"
read -ra scp_call <<< "${scp_cmd}"
sudo "${scp_call[@]}" -r /var/lib/sbctl root@"$target_destination":/var/lib/
$ssh_root_cmd "sbctl enroll-keys --ignore-immutable --microsoft || true"
fi
# ------------------------
if [ -n "$persist_dir" ]; then
$ssh_root_cmd "cp /etc/machine-id $persist_dir/etc/machine-id || true"
$ssh_root_cmd "cp -R /etc/ssh/ $persist_dir/etc/ssh/ || true"
@ -235,16 +318,19 @@ if yes_or_no "Do you want to manually edit .sops.yaml now?"; then
fi
green "Updating all secrets files to reflect updates .sops.yaml"
sops updatekeys --yes --enable-local-keyservice "${git_root}"/secrets/*/secrets.yaml
sops updatekeys --yes --enable-local-keyservice "${git_root}"/hosts/nixos/"$target_arch"/"$target_hostname"/secrets/pii.nix.enc
# --------------------------
green "Making ssh_host_ed25519_key available to home-manager for user $target_user"
sed -i "/$target_hostname/d; /$target_destination/d" ~/.ssh/known_hosts
$ssh_root_cmd "mkdir -p /home/$target_user/.ssh; chown -R $target_user:users /home/$target_user/.ssh/"
$scp_cmd root@"$target_destination":/etc/ssh/ssh_host_ed25519_key root@"$target_destination":/home/"$target_user"/.ssh/ssh_host_ed25519_key
$ssh_root_cmd "chown $target_user:users /home/swarsel/.ssh/ssh_host_ed25519_key"
$ssh_root_cmd "chown $target_user:users /home/$target_user/.ssh/ssh_host_ed25519_key"
# __________________________
if yes_or_no "Add ssh host fingerprints for git upstream repositories? (This is needed for building the full config)"; then
green "Adding ssh host fingerprints for git{lab,hub}"
$ssh_cmd "mkdir -p /home/$target_user/.ssh/; ssh-keyscan -t ssh-ed25519 gitlab.com github.com swagit.swarsel.win >> /home/$target_user/.ssh/known_hosts"
$ssh_root_cmd "mkdir -p /root/.ssh/; ssh-keyscan -t ssh-ed25519 gitlab.com github.com swagit.swarsel.win >> /root/.ssh/known_hosts"
$ssh_cmd "mkdir -p /home/$target_user/.ssh/; ssh-keyscan -t ssh-ed25519 gitlab.com github.com | tee /home/$target_user/.ssh/known_hosts"
$ssh_root_cmd "mkdir -p /root/.ssh/; ssh-keyscan -t ssh-ed25519 gitlab.com github.com | tee /root/.ssh/known_hosts"
fi
# --------------------------
@ -261,10 +347,18 @@ if yes_or_no "Do you want to copy your full nix-config and nix-secrets to $targe
fi
if yes_or_no "Do you want to rebuild immediately?"; then
green "Rebuilding nix-config on $target_hostname"
$ssh_root_cmd "mkdir -p /root/.local/share/nix/; printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' > /root/.local/share/nix/trusted-settings.json"
$ssh_cmd -oForwardAgent=yes "cd .dotfiles && sudo nixos-rebuild --show-trace --flake .#$target_hostname switch"
fi
green "Building nix-config for $target_hostname"
# yellow "Reminder: The password is 'setup'"
$ssh_root_cmd "mkdir -p /root/.local/share/nix/; printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' | tee /root/.local/share/nix/trusted-settings.json"
# $ssh_cmd -oForwardAgent=yes "cd .dotfiles && sudo nixos-rebuild --show-trace --flake .#$target_hostname switch"
store_path=$(nix build --no-link --print-out-paths .#nixosConfigurations."$target_hostname".config.system.build.toplevel)
green "Copying generation to $target_hostname"
nix copy --to "ssh://root@$target_destination" "$store_path"
# prev_system=$($ssh_root_cmd " readlink -e /nix/var/nix/profiles/system")
green "Linking generation in bootloader"
$ssh_root_cmd "/run/current-system/sw/bin/nix-env --profile /nix/var/nix/profiles/system --set $store_path"
green "Setting generation to activate upon next boot"
$ssh_root_cmd "$store_path/bin/switch-to-configuration boot"
else
echo
green "NixOS was successfully installed!"
@ -274,18 +368,24 @@ else
echo "To rebuild, sign into $target_hostname and run the following command from ~/nix-config"
echo "cd nix-config"
# see above FIXME:(bootstrap)
echo "sudo nixos-rebuild --show-trace --flake .#$target_hostname switch"
echo "sudo nixos-rebuild .pre-commit-config.yaml show-trace --flake .#$target_hostname switch"
# echo "just rebuild"
echo
fi
fi
green "NixOS was successfully installed!"
if yes_or_no "You can now commit and push the nix-config, which includes the hardware-configuration.nix for $target_hostname?"; then
cd "${git_root}"
deadnix hosts/nixos/"$target_hostname"/hardware-configuration.nix -qe
nixpkgs-fmt hosts/nixos/"$target_hostname"/hardware-configuration.nix
(pre-commit run --all-files 2> /dev/null || true) &&
git add "$git_root/hosts/nixos/$target_hostname/hardware-configuration.nix" &&
deadnix hosts/nixos/"$target_arch"/"$target_hostname"/hardware-configuration.nix -qe
nixpkgs--fmt hosts/nixos/"$target_arch"/"$target_hostname"/hardware-configuration.nix
(.pre-commit-config.yaml mit run --all-files 2> /dev/null || true) &&
git add "$git_root/hosts/nixos/$target_arch/$target_hostname/hardware-configuration.nix" &&
git add "$git_root/.sops.yaml" &&
git add "$git_root/secrets" &&
(git commit -m "feat: deployed $target_hostname" || true) && git push
fi
if yes_or_no "Reboot now?"; then
$ssh_root_cmd "reboot"
fi

View file

@ -0,0 +1,2 @@
swaymsg "output * power on" > /dev/null 2>&1 || true
swaymsg "output * dpms on" > /dev/null 2>&1 || true

View file

@ -0,0 +1,188 @@
set -eo pipefail
target_config="hotel"
target_hostname="hotel"
target_user="swarsel"
target_arch=""
persist_dir=""
target_disk="/dev/vda"
disk_encryption=0
function help_and_exit() {
echo
echo "Locally installs SwarselSystem on this machine."
echo
echo "USAGE: $0 -n <target_config> -d <target_disk> [OPTIONS]"
echo
echo "ARGS:"
echo " -n <target_config> specify the nixos config to deploy."
echo " Default: hotel"
echo " -d <target_disk> specify disk to install on."
echo " Default: /dev/vda"
echo " -u <target_user> specify user to deploy for."
echo " Default: swarsel"
echo " -a <target_arch> specify target architecture."
echo " -h | --help Print this help."
exit 0
}
function red() {
echo -e "\x1B[31m[!] $1 \x1B[0m"
if [ -n "${2-}" ]; then
echo -e "\x1B[31m[!] $($2) \x1B[0m"
fi
}
function green() {
echo -e "\x1B[32m[+] $1 \x1B[0m"
if [ -n "${2-}" ]; then
echo -e "\x1B[32m[+] $($2) \x1B[0m"
fi
}
function yellow() {
echo -e "\x1B[33m[*] $1 \x1B[0m"
if [ -n "${2-}" ]; then
echo -e "\x1B[33m[*] $($2) \x1B[0m"
fi
}
while [[ $# -gt 0 ]]; do
case "$1" in
-n)
shift
target_config=$1
target_hostname=$1
;;
-u)
shift
target_user=$1
;;
-d)
shift
target_disk=$1
;;
-a)
shift
target_arch=$1
;;
-h | --help) help_and_exit ;;
*)
echo "Invalid option detected."
help_and_exit
;;
esac
shift
done
function cleanup() {
sudo rm -rf .cache/nix
sudo rm -rf /root/.cache/nix
}
trap cleanup exit
if [[ $target_arch == "" || $target_hostname == "" ]]; then
red "error: target_arch or target_hostname not set."
help_and_exit
fi
green "~SwarselSystems~ local installer"
cd /home/"$target_user"
sudo rm -rf /root/.cache/nix
sudo rm -rf .cache/nix
sudo rm -rf .dotfiles
green "Cloning repository from GitHub"
git clone https://github.com/Swarsel/.dotfiles.git
local_keys=$(ssh-add -L || true)
pub_key=$(cat /home/"$target_user"/.dotfiles/secrets/keys/ssh/yubikey.pub)
read -ra pub_arr <<< "$pub_key"
cd .dotfiles
if [[ $local_keys != *"${pub_arr[1]}"* ]]; then
yellow "The ssh key for this configuration is not available."
green "Adjusting flake.nix so that the configuration is buildable ..."
sed -i '/vbc-nix = {/,/^[[:space:]]*};/d' flake.nix
sed -i '/[[:space:]]*\/\/ (inputs.vbc-nix.overlays.default final prev)/d' overlays/default.nix
nix flake update vbc-nix
git add .
else
green "Valid SSH key found! Continuing with installation"
fi
green "Reading system information for $target_config ..."
DISK="$(nix eval --raw ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.rootDisk)"
green "Root Disk in config: $DISK - Root Disk passed in cli: $target_disk"
CRYPTED="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.isCrypted)"
if [[ $CRYPTED == "true" ]]; then
green "Encryption: ✓"
disk_encryption=1
else
red "Encryption: X"
disk_encryption=0
fi
IMPERMANENCE="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.isImpermanence)"
if [[ $IMPERMANENCE == "true" ]]; then
green "Impermanence: ✓"
persist_dir="/persist"
else
red "Impermanence: X"
persist_dir=""
fi
SWAP="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.isSwap)"
if [[ $SWAP == "true" ]]; then
green "Swap: ✓"
else
red "Swap: X"
fi
SECUREBOOT="$(nix eval ~/.dotfiles#nixosConfigurations."$target_hostname".config.swarselsystems.isSecureBoot)"
if [[ $SECUREBOOT == "true" ]]; then
green "Secure Boot: ✓"
else
red "Secure Boot: X"
fi
if [ "$disk_encryption" -eq 1 ]; then
while true; do
green "Set disk encryption passphrase:"
read -rs luks_passphrase
green "Please confirm passphrase:"
read -rs luks_passphrase_confirm
if [[ $luks_passphrase == "$luks_passphrase_confirm" ]]; then
echo "$luks_passphrase" > /tmp/disko-password
break
else
red "Passwords do not match"
fi
done
fi
green "Setting up disk ..."
if [[ $target_config == "hotel" ]]; then
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/v1.10.0 -- --mode destroy,format,mount --flake .#"$target_config" --yes-wipe-all-disks --arg diskDevice "$target_disk"
else
sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount --flake .#"$target_config" --yes-wipe-all-disks
fi
sudo mkdir -p /mnt/"$persist_dir"/home/"$target_user"/
sudo cp -r /home/"$target_user"/.dotfiles /mnt/"$persist_dir"/home/"$target_user"/
sudo chown -R 1000:100 /mnt/"$persist_dir"/home/"$target_user"
green "Generating hardware configuration ..."
sudo nixos-generate-config --root /mnt --no-filesystems --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_arch"/"$target_config"/
git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_arch"/"$target_config"/hardware-configuration.nix
sudo mkdir -p /root/.local/share/nix/
printf '{\"extra-substituters\":{\"https://nix-community.cachix.org\":true,\"https://nix-community.cachix.org https://cache.ngi0.nixos.org/\":true},\"extra-trusted-public-keys\":{\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=\":true,\"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA=\":true}}' | sudo tee /root/.local/share/nix/trusted-settings.json > /dev/null
green "Installing flake $target_config"
store_path=$(nix build --no-link --print-out-paths .#nixosConfigurationsMinimal."$target_config".config.system.build.toplevel)
green "Linking generation in bootloader"
sudo "/run/current-system/sw/bin/nix-env --profile /nix/var/nix/profiles/system --set $store_path"
green "Setting generation to activate upon next boot"
sudo "$store_path/bin/switch-to-configuration boot"
green "Installation finished! Reboot to see changes"

View file

@ -0,0 +1,72 @@
set -eo pipefail
target_config="hotel"
target_user="swarsel"
function help_and_exit() {
echo
echo "Locally installs SwarselSystem on this machine."
echo
echo "USAGE: $0 -d <disk> [OPTIONS]"
echo
echo "ARGS:"
echo " -d <disk> specify disk to install on."
echo " -n <target_config> specify the nixos config to deploy."
echo " Default: hotel"
echo " Default: hotel"
echo " -u <target_user> specify user to deploy for."
echo " Default: swarsel"
echo " -h | --help Print this help."
exit 0
}
function green() {
echo -e "\x1B[32m[+] $1 \x1B[0m"
if [ -n "${2-}" ]; then
echo -e "\x1B[32m[+] $($2) \x1B[0m"
fi
}
while [[ $# -gt 0 ]]; do
case "$1" in
-n)
shift
target_config=$1
;;
-u)
shift
target_user=$1
;;
-h | --help) help_and_exit ;;
*)
echo "Invalid option detected."
help_and_exit
;;
esac
shift
done
function cleanup() {
sudo rm -rf .cache/nix
sudo rm -rf /root/.cache/nix
}
trap cleanup exit
sudo rm -rf .cache/nix
sudo rm -rf /root/.cache/nix
green "~SwarselSystems~ remote post-installer"
cd /home/"$target_user"/.dotfiles
SECUREBOOT="$(nix eval ~/.dotfiles#nixosConfigurations."$target_config".config.swarselsystems.isSecureBoot)"
if [[ $SECUREBOOT == "true" ]]; then
green "Setting up secure boot keys"
sudo mkdir -p /var/lib/sbctl
sbctl create-keys || true
sbctl enroll-keys --ignore-immutable --microsoft || true
fi
sudo nixos-rebuild --flake .#"$target_config" switch
green "Post-install finished!"

View file

@ -1,19 +1,21 @@
set -eo pipefail
target_flake="chaostheatre"
target_config="hotel"
target_arch=""
target_user="swarsel"
function help_and_exit() {
echo
echo "Remotely installs NixOS on a target machine using this nix-config."
echo "Builds SwarselSystem configuration."
echo
echo "USAGE: $0 [OPTIONS]"
echo
echo "ARGS:"
echo " -f <target_flake> specify flake to deploy the nixos config of."
echo " Default: chaostheatre"
echo " -n <target_config> specify nixos config to build."
echo " Default: hotel"
echo " -u <target_user> specify user to deploy for."
echo " Default: swarsel"
echo " -a <target_arch> specify target architecture."
echo " -h | --help Print this help."
exit 0
}
@ -39,9 +41,13 @@ function yellow() {
while [[ $# -gt 0 ]]; do
case "$1" in
-f)
-n)
shift
target_flake=$1
target_config=$1
;;
-a)
shift
target_arch=$1
;;
-u)
shift
@ -56,6 +62,11 @@ while [[ $# -gt 0 ]]; do
shift
done
if [[ $target_arch == "" ]]; then
red "error: target_arch not set."
help_and_exit
fi
cd /home/"$target_user"
if [ ! -d /home/"$target_user"/.dotfiles ]; then
@ -67,7 +78,7 @@ else
fi
local_keys=$(ssh-add -L || true)
pub_key=$(cat /home/"$target_user"/.dotfiles/secrets/keys/ssh/nbl-imba-2.pub)
pub_key=$(cat /home/"$target_user"/.dotfiles/secrets/keys/ssh/yubikey.pub)
read -ra pub_arr <<< "$pub_key"
cd .dotfiles
@ -75,13 +86,25 @@ if [[ $local_keys != *"${pub_arr[1]}"* ]]; then
yellow "The ssh key for this configuration is not available."
green "Adjusting flake.nix so that the configuration is buildable"
sed -i '/nix-secrets = {/,/^[[:space:]]*};/d' flake.nix
git add flake.nix
sed -i '/vbc-nix = {/,/^[[:space:]]*};/d' flake.nix
sed -i '/[[:space:]]*\/\/ (inputs.vbc-nix.overlays.default final prev)/d' overlays/default.nix
rm modules/home/common/env.nix
rm modules/home/common/gammastep.nix
rm modules/home/common/git.nix
rm modules/home/common/mail.nix
rm modules/home/common/yubikey.nix
rm modules/nixos/server/restic.nix
rm hosts/nixos/aarch64-linux/milkywell/default.nix
rm -rf modules/nixos/server
rm -rf modules/home/server
nix flake update vbc-nix
git add .
else
green "Valid SSH key found! Continuing with installation"
fi
sudo nixos-generate-config --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/
git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_flake"/hardware-configuration.nix
sudo nixos-generate-config --dir /home/"$target_user"/.dotfiles/hosts/nixos/"$target_arch"/"$target_config"/
git add /home/"$target_user"/.dotfiles/hosts/nixos/"$target_arch"/"$target_config"/hardware-configuration.nix
green "Installing flake $target_flake"
sudo nixos-rebuild --show-trace --flake .#"$target_flake" boot
green "Installing flake $target_config"
sudo nixos-rebuild --show-trace --flake .#"$target_config" boot
yellow "Please keep in mind that this is only a demo of the configuration. Things might break unexpectedly."

View file

@ -0,0 +1,36 @@
while :; do
case ${1:-} in
-k | --kitty)
cmd=(sh -c 'kitty --app-id kittyterm -T kittyterm -o confirm_os_window_close=0 zellij attach --create kittyterm' '&')
searchapp="kittyterm"
;;
-e | --element)
cmd=(element-desktop)
searchapp="Element"
;;
-d | --vesktop)
cmd=(vesktop)
searchapp="vesktop"
;;
-s | --spotifyplayer)
cmd=(sh -c 'kitty --add-id spotifytui -T spotifytui -o confirm_os_window_close=0 spotify_player' '&')
searchapp="spotifytui"
;;
*) break ;;
esac
shift
done
WIN_INFO=$(niri msg -j windows | jq --arg search "$searchapp" '.[] | select (.app_id | test($search)) | { id, is_focused, workspace_id }')
ID=$(echo "$WIN_INFO" | jq -r '.id // empty')
IS_FOCUSED=$(echo "$WIN_INFO" | jq -r '.is_focused // empty')
TARGET_MONITOR=$(niri msg -j workspaces | jq --arg search "" '.[] | select (.name != null and (.name | test($search))) | { output }' | jq -r '.output // empty')
CURRENT_WORKSPACE=$(niri msg -j workspaces | jq -r '.[] | select (.is_active == true) | .output // empty')
if [ -z "$ID" ]; then
niri msg action spawn -- "${cmd[@]}"
elif [ "$IS_FOCUSED" ]; then
niri msg action move-window-to-workspace "" --window-id "$ID" --focus false
else
niri msg action focus-monitor "$TARGET_MONITOR" && niri msg action move-window-to-workspace "$CURRENT_WORKSPACE" --window-id "$ID" && niri msg action focus-floating
fi

View file

@ -25,7 +25,7 @@ if [[ $kitty -eq 1 ]]; then
STR=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.name == "__i3_scratch")' | grep kittyterm || true)
CHECK=$(swaymsg -t get_tree | grep kittyterm || true)
if [ "$CHECK" == "" ]; then
exec kitty -T kittyterm &
exec kitty --app-id kittyterm -T kittyterm -o confirm_os_window_close=0 zellij attach --create kittyterm &
sleep 1
fi
if [ "$STR" == "" ]; then
@ -51,7 +51,7 @@ elif [[ $spotifyplayer -eq 1 ]]; then
STR=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.name == "__i3_scratch")' | grep spotifytui || true)
CHECK=$(swaymsg -t get_tree | grep spotifytui || true)
if [ "$CHECK" == "" ]; then
exec kitty -T spotifytui -o confirm_os_window_close=0 spotify_player &
exec kitty --add-id spotifytui -T spotifytui -o confirm_os_window_close=0 spotify_player &
sleep 1
fi
if [ "$STR" == "" ]; then

View file

@ -0,0 +1,8 @@
# KITTIES=$(($(pgrep -P 1 kitty | wc -l) - 1))
# if ((KITTIES < 1)); then
# exec kitty -o confirm_os_window_close=0 zellij attach --create main
# else
# exec kitty -o confirm_os_window_close=0 zellij attach --create "temp $KITTIES"
# fi
exec kitty -o confirm_os_window_close=0 zellij

53
files/stylix/swarsel.yaml Normal file
View file

@ -0,0 +1,53 @@
# scheme: "better-contrast"
author: "Swarsel"
author: "Swarsel"
base00: "1d252c" #1d252c"
base01: "171d23" #171d23"
base02: "206a86" #206a86"
base03: "003a66" #003a66"
base04: "5ec4ff" #5ec4ff"
base05: "a0b3c5" #a0b3c5"
base06: "7ed4ff" #7ed4ff"
base07: "8ef4ff" #8ef4ff"
base08: "d95468" #d95468"
base09: "ffa880" #ffa880"
base0A: "6ed4ff" #6ed4ff"
base0B: "8bd49c" #8bd49c"
base0C: "008b94" #008b94"
base0D: "5ec4ff" #5ec4ff"
base0E: "c06ece" #c06ece"
base0F: "3c0044" #3c0044"
# base00: "1D252C" # #1d252c passt
# base01: "171D23" # #171d23
# base02: "5EC4FF" # #5EC4FF
# base03: "566C7D" # #566C7D passt
# base04: "5EC4FF" # #5EC4FF passt
# base05: "A0B3C5" # #A0B3C5 passt
# base06: "C06ECE" # #C06ECE passt
# base07: "A0B3C5" # #A0B3C5 passt
# base08: "D95468" # #D95468 passt
# base09: "FFA880" # #ffA880 passt
# base0A: "5EC4FF" # #5EC4FF
# base0B: "8BD49C" # #8BD49C
# base0C: "008B94" # #008B94 passt
# base0D: "5EC4FF" # #5EC4FF passt
# base0E: "C06ECE" # #C06ECE passt
# base0F: "5EC4FF" # #5EC4FF passt
# base00 - Default Background
# base01 - Lighter Background (Used for status bars)
# base02 - Selection Background
# base03 - Comments, Invisibles, Line Highlighting
# base04 - Dark Foreground (Used for status bars)
# base05 - Default Foreground, Caret, Delimiters, Operators
# base06 - Light Foreground (Not often used)
# base07 - Light Background (Not often used)
# base08 - Variables, XML Tags, Markup Link Text, Markup Lists, Diff Deleted
# base09 - Integers, Boolean, Constants, XML Attributes, Markup Link Url
# base0A - Classes, Markup Bold, Search Text Background
# base0B - Strings, Inherited Class, Markup Code, Diff Inserted
# base0C - Support, Regular Expressions, Escape Characters, Markup Quotes
# base0D - Functions, Methods, Attribute IDs, Headings
# base0E - Keywords, Storage, Selector, Markup Italic, Diff Changed
# base0F - Deprecated, Opening/Closing Embedded Language Tags, e.g. <?php ?>

3
files/swayidle/config Normal file
View file

@ -0,0 +1,3 @@
timeout 300 'swaylock -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2'
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"'
before-sleep 'swaylock -f --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2'

View file

@ -0,0 +1 @@
use flake

12
files/templates/cpp/.gitignore vendored Normal file
View file

@ -0,0 +1,12 @@
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
CMakeUserPresets.json

View file

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.20)
project(name)
set(CMAKE_CXX_STANDARD 23)
add_subdirectory(src)
install(TARGETS name DESTINATION bin)

View file

@ -0,0 +1,62 @@
# heavily inspired by https://github.com/nulladmin1/nix-flake-templates/blob/main/cpp-cmake/flake.nix
{
description = "C++ Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs =
{ self
, nixpkgs
, systems
, ...
}:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
pname = "name";
in
{
formatter = forEachSystem (system: pkgsFor.${system}.nixpgks-fmt);
devShells = forEachSystem (system: {
default = pkgsFor.${system}.mkShell {
packages = with pkgsFor.${system}; [
libllvm
cmake
gtest
cppcheck
valgrind
doxygen
clang-tools
# cudatoolkit
];
};
});
packages = forEachSystem (system: {
default = pkgsFor.${system}.stdenv.mkDerivation {
inherit pname;
version = "0.1.0";
src = ./.;
nativeBuildInputs = with pkgsFor.${system}; [
cmake
];
buildInputs = with pkgsFor.${system}; [
gtest
];
};
});
apps = forEachSystem (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/${pname}";
};
});
};
}

View file

@ -0,0 +1 @@
add_executable(name name.cpp name.cpp)

View file

@ -0,0 +1,7 @@
#include <iostream>
using namespace std;
int main() {
cout << "Hello, world!" << endl;
return 0;
}

View file

@ -0,0 +1 @@
use flake

View file

@ -0,0 +1,30 @@
{
description = "General purpose Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs =
{ nixpkgs
, systems
, ...
}:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
in
{
formatter = forEachSystem (system: pkgsFor.${system}.nixpkgs-fmt);
devShells = forEachSystem (system: {
default = pkgsFor.${system}.mkShell {
packages = with pkgsFor.${system}; [
];
};
});
};
}

View file

@ -0,0 +1 @@
use flake

View file

@ -0,0 +1,52 @@
# heavily inspired by https://github.com/nulladmin1/nix-flake-templates/blob/main/go-nix/flake.nix
{
description = "Go Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
systems.url = "github:nix-systems/default";
};
outputs =
{ self
, nixpkgs
, systems
, ...
}:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = forEachSystem (system: import nixpkgs { inherit system; });
pname = "name";
in
{
formatter = forEachSystem (system: pkgsFor.${system}.nixpkgs-fmt);
devShells = forEachSystem (system: {
default = pkgsFor.${system}.mkShell {
packages = with pkgsFor.${system}; [
go
gopls
go-tools
gotools
];
};
});
packages = forEachSystem (system: {
default = pkgsFor.${system}.buildGoModule {
inherit pname;
version = "0.1.0";
src = ./.;
vendorHash = null;
};
});
apps = forEachSystem (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/${pname}";
};
});
};
}

View file

@ -0,0 +1,3 @@
module name
go 1.22.7

View file

@ -0,0 +1,9 @@
package main
import (
"fmt"
)
func main() {
fmt.Println("Hello, World!")
}

View file

@ -0,0 +1,61 @@
{ self, config, inputs, pkgs, lib, ... }:
let
primaryUser = config.swarselsystems.mainUser;
modulesPath = "${self}/modules";
sharedOptions = {
isBtrfs = true;
};
in
{
imports = [
# ---- nixos-hardware here ----
./hardware-configuration.nix
./disk-config.nix
"${modulesPath}/nixos/optional/virtualbox.nix"
# "${modulesPath}/nixos/optional/vmware.nix"
"${modulesPath}/nixos/optional/autologin.nix"
"${modulesPath}/nixos/optional/nswitch-rcm.nix"
"${modulesPath}/nixos/optional/gaming.nix"
inputs.home-manager.nixosModules.home-manager
{
home-manager.users."${primaryUser}".imports = [
"${modulesPath}/home/optional/gaming.nix"
];
}
];
boot = {
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
};
networking = {
hostName = "TEMPLATE";
firewall.enable = true;
};
swarselsystems = lib.recursiveUpdate
{
wallpaper = self + /files/wallpaper/lenovowp.png;
hasBluetooth = true;
hasFingerprint = true;
isImpermanence = true;
isSecureBoot = true;
isCrypted = true;
isSwap = true;
swapSize = "32G";
rootDisk = "TEMPLATE";
}
sharedOptions;
home-manager.users."${primaryUser}".swarselsystems = lib.recursiveUpdate
{
isLaptop = true;
isNixos = true;
cpuCount = 16;
}
sharedOptions;
}

View file

@ -0,0 +1,122 @@
{ lib, pkgs, config, ... }:
let
type = "btrfs";
extraArgs = [ "-L" "nixos" "-f" ]; # force overwrite
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [
"subvol=root"
"compress=zstd"
"noatime"
];
};
"/home" = lib.mkIf config.swarselsystems.isImpermanence {
mountpoint = "/home";
mountOptions = [
"subvol=home"
"compress=zstd"
"noatime"
];
};
"/persist" = lib.mkIf config.swarselsystems.isImpermanence {
mountpoint = "/persist";
mountOptions = [
"subvol=persist"
"compress=zstd"
"noatime"
];
};
"/log" = lib.mkIf config.swarselsystems.isImpermanence {
mountpoint = "/var/log";
mountOptions = [
"subvol=log"
"compress=zstd"
"noatime"
];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [
"subvol=nix"
"compress=zstd"
"noatime"
];
};
"/swap" = lib.mkIf config.swarselsystems.isSwap {
mountpoint = "/.swapvol";
swap.swapfile.size = config.swarselsystems.swapSize;
};
};
in
{
disko.devices = {
disk = {
disk0 = {
type = "disk";
device = config.swarselsystems.rootDisk;
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "defaults" ];
};
};
root = lib.mkIf (!config.swarselsystems.isCrypted) {
size = "100%";
content = {
inherit type subvolumes extraArgs;
postCreateHook = lib.mkIf config.swarselsystems.isImpermanence ''
MNTPOINT=$(mktemp -d)
mount "/dev/disk/by-label/nixos" "$MNTPOINT" -o subvolid=5
trap 'umount $MNTPOINT; rm -rf $MNTPOINT' EXIT
btrfs subvolume snapshot -r $MNTPOINT/root $MNTPOINT/root-blank
'';
};
};
luks = lib.mkIf config.swarselsystems.isCrypted {
size = "100%";
content = {
type = "luks";
name = "cryptroot";
passwordFile = "/tmp/disko-password"; # this is populated by bootstrap.sh
settings = {
allowDiscards = true;
# https://github.com/hmajid2301/dotfiles/blob/a0b511c79b11d9b4afe2a5e2b7eedb2af23e288f/systems/x86_64-linux/framework/disks.nix#L36
crypttabExtraOpts = [
"fido2-device=auto"
"token-timeout=10"
];
};
content = {
inherit type subvolumes extraArgs;
postCreateHook = lib.mkIf config.swarselsystems.isImpermanence ''
MNTPOINT=$(mktemp -d)
mount "/dev/mapper/cryptroot" "$MNTPOINT" -o subvolid=5
trap 'umount $MNTPOINT; rm -rf $MNTPOINT' EXIT
btrfs subvolume snapshot -r $MNTPOINT/root $MNTPOINT/root-blank
'';
};
};
};
};
};
};
};
};
fileSystems."/persist".neededForBoot = lib.mkIf config.swarselsystems.isImpermanence true;
fileSystems."/home".neededForBoot = lib.mkIf config.swarselsystems.isImpermanence true;
environment.systemPackages = [
pkgs.yubikey-manager
];
}

View file

@ -0,0 +1 @@
use flake

292
files/templates/latex/.gitignore vendored Normal file
View file

@ -0,0 +1,292 @@
# nix build output
result
## PDF output (but not in figures/)
*.pdf
!figures/*.pdf
!figures/**/*.pdf
## Core latex/pdflatex auxiliary files:
*.aux
*.lof
*.log
*.lot
*.fls
*.out
*.toc
*.fmt
*.fot
*.cb
*.cb2
.*.lb
## Intermediate documents:
*.dvi
*.xdv
*-converted-to.*
# these rules might exclude image files for figures etc.
# *.ps
# *.eps
# *.pdf
## Generated if empty string is given at "Please type another file name for output:"
.pdf
## Bibliography auxiliary files (bibtex/biblatex/biber):
*.bbl
*.bcf
*.blg
*-blx.aux
*-blx.bib
*.run.xml
## Build tool auxiliary files:
*.fdb_latexmk
*.synctex
*.synctex(busy)
*.synctex.gz
*.synctex.gz(busy)
*.pdfsync
## Build tool directories for auxiliary files
# latexrun
latex.out/
## Auxiliary and intermediate files from other packages:
# algorithms
*.alg
*.loa
# achemso
acs-*.bib
# amsthm
*.thm
# beamer
*.nav
*.pre
*.snm
*.vrb
# changes
*.soc
# comment
*.cut
# cprotect
*.cpt
# elsarticle (documentclass of Elsevier journals)
*.spl
# endnotes
*.ent
# fixme
*.lox
# feynmf/feynmp
*.mf
*.mp
*.t[1-9]
*.t[1-9][0-9]
*.tfm
#(r)(e)ledmac/(r)(e)ledpar
*.end
*.?end
*.[1-9]
*.[1-9][0-9]
*.[1-9][0-9][0-9]
*.[1-9]R
*.[1-9][0-9]R
*.[1-9][0-9][0-9]R
*.eledsec[1-9]
*.eledsec[1-9]R
*.eledsec[1-9][0-9]
*.eledsec[1-9][0-9]R
*.eledsec[1-9][0-9][0-9]
*.eledsec[1-9][0-9][0-9]R
# glossaries
*.acn
*.acr
*.glg
*.glo
*.gls
*.glsdefs
*.lzo
*.lzs
# uncomment this for glossaries-extra (will ignore makeindex's style files!)
# *.ist
# gnuplottex
*-gnuplottex-*
# gregoriotex
*.gaux
*.gtex
# htlatex
*.4ct
*.4tc
*.idv
*.lg
*.trc
*.xref
# hyperref
*.brf
# knitr
*-concordance.tex
# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files
# *.tikz
*-tikzDictionary
# listings
*.lol
# luatexja-ruby
*.ltjruby
# makeidx
*.idx
*.ilg
*.ind
# minitoc
*.maf
*.mlf
*.mlt
*.mtc[0-9]*
*.slf[0-9]*
*.slt[0-9]*
*.stc[0-9]*
# minted
_minted*
*.pyg
# morewrites
*.mw
# nomencl
*.nlg
*.nlo
*.nls
# pax
*.pax
# pdfpcnotes
*.pdfpc
# sagetex
*.sagetex.sage
*.sagetex.py
*.sagetex.scmd
# scrwfile
*.wrt
# sympy
*.sout
*.sympy
sympy-plots-for-*.tex/
# pdfcomment
*.upa
*.upb
# pythontex
*.pytxcode
pythontex-files-*/
# tcolorbox
*.listing
# thmtools
*.loe
# TikZ & PGF
*.dpth
*.md5
*.auxlock
# todonotes
*.tdo
# vhistory
*.hst
*.ver
# easy-todo
*.lod
# xcolor
*.xcp
# xmpincl
*.xmpi
# xindy
*.xdy
# xypic precompiled matrices and outlines
*.xyc
*.xyd
# endfloat
*.ttt
*.fff
# Latexian
TSWLatexianTemp*
## Editors:
# WinEdt
*.bak
*.sav
# Texpad
.texpadtmp
# LyX
*.lyx~
# Kile
*.backup
# gummi
.*.swp
# KBibTeX
*~[0-9]*
# TeXnicCenter
*.tps
# auto folder when using emacs and auctex
./auto/*
*.el
# expex forward references with \gathertags
*-tags.tex
# standalone packages
*.sta
# Makeindex log files
*.lpz
# xwatermark package
*.xwm
# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib
# option is specified. Footnotes are the stored in a file with suffix Notes.bib.
# Uncomment the next line to have this generated file ignored.
#*Notes.bib

View file

@ -0,0 +1,3 @@
$pdf_mode = 4;
@default_files = ('000-main.tex');
$lualatex = "lualatex %O -shell-escape %S";

View file

@ -0,0 +1,75 @@
%! TEX root = **/000-main.tex
% vim: spell spelllang=en:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% PREAMBLE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{001-preamble}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% EXTRA PACKAGES / CONFIG
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% METADATA
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% remove when using \maketitle:
\renewcommand\and{\\[\baselineskip]}
\title{My title \\ \Large \normalfont My Subtitle}
\author{First Author \and Second Author}
\date{\today}
\begin{document}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TITLE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Default title or use titlepage.tex
%\maketitle
\include{005-titlepage}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% TOC & lists
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagenumbering{Roman}
%\setcounter{tocdepth}{2}
\tableofcontents \pagebreak
\listoffigures \pagebreak
\listoftables \clearpage
\pagenumbering{arabic}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SECTIONS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Paragraph spacing (placed after ToC)
\setlength{\parskip}{1em plus 0.5em minus 0.2em}
%\setlength{\parindent}{0pt}
\include{010-introduction}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% BIBLIO
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\printbibliography[heading=bibintoc]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% APPENDIX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% uncomment to add appendix section prefix to numbering
%\appendixpagenumbering
\appendix
\include{990-appendix}
\end{document}

View file

@ -0,0 +1,204 @@
%! TEX root = **/000-main.tex
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LaTeX preamble, load in main.tex with: \input{preamble}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[12pt, oneside]{article}
\usepackage[a4paper, left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}
% for debugging overfulls
%\documentclass[draft, 12pt, oneside]{article}
%\usepackage[showframe, a4paper, left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm]{geometry}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FONTS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage{microtype}
\setmonofont[Scale=MatchLowercase]{DejaVu Sans Mono}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% LANGUAGE
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{polyglossia}
\setdefaultlanguage{english}
\setotherlanguages{spanish,catalan}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% BIBLIOGRAPHY
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage[
backend=biber,
style=numeric,
]{biblatex}
\DeclareNameAlias{default}{family-given}
\addbibresource{biblio.bib}
\usepackage{fvextra} % Req by minted (must load before csquotes)
\usepackage{csquotes} % For bibliography quotations
\DeclareQuoteAlias{spanish}{catalan}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% COMMON
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{color, xcolor} % more colors
\usepackage{graphicx} % graphics
\graphicspath{{./figures/}}
\usepackage{comment}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MATHS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{mathtools} % amsmath + more
\usepackage{amsthm} % Theorem enviroment
\usepackage{amssymb} % More symbols
\usepackage{amstext} % Text inside mathenv
%\usepackage{relsize} % Bigger math with mathlarger{___}
%\usepackage{nicefrac} % nice fractions in one line
%\usepackage{IEEEtrantools} % Complex equation arrays
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% REFERENCES (load order is important)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{varioref} % reference far away (1)
\usepackage[colorlinks = true]{hyperref} % links in references (2)
\usepackage{cleveref} % smart references (3)
%hyperref configuration so that it doesn't contrast so much colorlinks,
\hypersetup{
linkcolor={black},
citecolor={black},
%linkcolor={red!50!black},
%citecolor={blue!50!black},
urlcolor={blue!80!black}
}
\usepackage[bottom]{footmisc} % Footnotes at bottom of page
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FIGURES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage[export]{adjustbox} % Adjust table size
\usepackage{float} % Force tables and images position (H and H!)
%\usepackage{wrapfig} % Wrap images like in HTML
\usepackage[justification=centering]{caption}
%\usepackage{subcaption} % Subfigures
%\usepackage[framemethod=tikz]{mdframed} % Custom frames
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TABLES
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{colortbl, booktabs} % Better tables
%\usepackage{tabularx}
%\usepackage{longtable} % Multiple page table (does not work with tabularx)
\usepackage{xltabular, colortbl, booktabs} % longtable + tabularx (has bug with booktabs: fix below)
% Split cell in lines and more formating options inside table
\usepackage{array, multirow, multicol, makecell}
%%%
% bug fix for booktabs + xltabular incompatibility
\makeatletter
\def\@BTrule[#1]{%
\ifx\longtable\undefined
\let\@BTswitch\@BTnormal
\else\ifx\hline\LT@hline
\nobreak
\let\@BTswitch\@BLTrule
\else
\let\@BTswitch\@BTnormal
\fi\fi
\global\@thisrulewidth=#1\relax
\ifnum\@thisruleclass=\tw@\vskip\@aboverulesep\else
\ifnum\@lastruleclass=\z@\vskip\@aboverulesep\else
\ifnum\@lastruleclass=\@ne\vskip\doublerulesep\fi\fi\fi
\@BTswitch}
\makeatother
%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% SIUNITX
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage[alsoload=hep]{siunitx} % SI units and uncertainties
%\sisetup{locale = FR} % Commas and so on for spanish
%\sisetup{separate-uncertainty=true}
%\sisetup{
%per-mode=fraction,
%fraction-function=\nicefrac
%}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TIKZ
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{tikz}
%\usetikzlibrary{arrows}
%\usetikzlibrary{scopes}
%\usetikzlibrary{babel}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MINTED
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{minted}
\definecolor{codeBg}{HTML}{FFFDE7}
\setminted{
%style=pastie,
frame=lines,
framesep=3mm,
linenos,
breaklines=true,
encoding=utf8,
fontsize=\footnotesize,
bgcolor=codeBg
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% CUSTOM COMMANDS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% empty whitepage without numbering
\newcommand{\whitepage}{
\clearpage\thispagestyle{empty}\addtocounter{page}{-1} \newpage \clearpage
}
% Add command before appendix section for page numbering: A-1
\newcommand{\appendixpagenumbering}{
\break
\pagenumbering{arabic}
\renewcommand{\thepage}{\thesection-\arabic{page}}
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% CUSTOM MATH OPERATORS (functions not in italic in math mode)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\DeclareMathOperator{\arcsec}{arcsec}
%\DeclareMathOperator{\arccot}{arccot}
%\DeclareMathOperator{\arccsc}{arccsc}
%\DeclareMathOperator{\cis}{cis}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% MISC
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%\usepackage{datetime} % Customize date
%% \monthyeardate\today gives the date without the day
%\newdateformat{monthyeardate}{%
%\monthname[\THEMONTH], \THEYEAR}

View file

@ -0,0 +1,28 @@
%! TEX root = **/000-main.tex
% vim: spell spelllang=en:
\thispagestyle{empty}
\clearpage
\setcounter{page}{-1}
\makeatletter
\begin{titlepage}
{
\centering
\includegraphics[width=0.9\textwidth]{institution-logo}
\null%
\vspace{3em}
{\Huge \bfseries \@title \par}
\vspace{2em}
{\large \scshape \@date \par}
\vfill
\begin{center}
% Supplementary image
\end{center}
\vspace{5em}
\vfill
{\raggedleft \large \@author \par}
}
\end{titlepage}
\makeatother

View file

@ -0,0 +1,39 @@
%! TEX root = **/000-main.tex
% vim: spell spelllang=en:
\section{Introduction}%
\label{sec:introduction}
\(E = mc^2\) \cite{einstein}
\begin{figure}[H]
\centering
\includegraphics[width=0.3\linewidth]{Professortocat_v2}
\caption{Professor OctoCat}%
\label{fig:profocto}
\end{figure}
As we can see in \cref{fig:profocto}, the professor is holding an apple.
\begin{table}[H]
\begin{center}
\caption{Table captions go on top of the tables}%
\label{tab:example}
\begin{tabular}{ccc}
\toprule
a & b & c \\
\midrule
0 & 2 & 4 \\
\bottomrule
\end{tabular}
\end{center}
\end{table}
\subsection{Lorem ipsum}%
\label{sub:lorem_ipsum}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam ultricies est sit amet interdum ornare. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut nulla lectus, bibendum ultrices dui quis, sodales suscipit quam. Donec eu finibus lectus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Etiam eu metus mattis, bibendum massa quis, eleifend libero. Interdum et malesuada fames ac ante ipsum primis in faucibus. Nunc lacinia ipsum at dolor tristique convallis. Sed dignissim malesuada nunc, nec malesuada risus sagittis eu. Nulla et erat et mi elementum scelerisque vitae at neque. Suspendisse scelerisque laoreet tellus, sit amet accumsan mauris placerat nec. Vestibulum mollis augue a odio posuere, ut gravida est lacinia. Etiam turpis ligula, molestie nec porta in, malesuada id magna. Donec elementum nulla ac tincidunt fringilla. Suspendisse porta laoreet nisl, non aliquam orci dictum egestas.
Proin euismod consequat felis ut pharetra. Maecenas auctor, nunc ac gravida pretium, metus mi fringilla lectus, auctor scelerisque nunc velit id magna. Etiam sit amet mi sit amet nunc congue ornare non hendrerit diam. Nullam consectetur lectus quis urna vehicula, nec lacinia tortor rhoncus. Vestibulum at enim aliquam, ultricies urna sit amet, porta tellus. Curabitur posuere elit orci, et rutrum nibh cursus eget. Donec ac venenatis purus. Fusce vehicula nisi erat, at tempor turpis congue vitae. Nunc auctor pellentesque malesuada. Nunc sodales, dolor ac sagittis mollis, enim ipsum mollis sem, non porttitor arcu nulla at velit. Ut non velit nec lacus sollicitudin maximus id id tortor. Sed ac aliquam lorem.
Nunc non ante ex. Curabitur lacinia euismod velit, non posuere leo bibendum non. Mauris ac orci non risus feugiat rutrum eu ac velit. Phasellus facilisis lacinia condimentum. Pellentesque vulputate nibh urna, vel varius mauris cursus quis. Aliquam vitae sem ac orci fermentum semper. Praesent est tellus, luctus sed venenatis at, bibendum id purus. Cras at mi sed lorem aliquet congue at sit amet turpis. Aliquam vestibulum tempor mauris, id aliquam ipsum scelerisque ut. In arcu turpis, dapibus ut nisi vel, luctus pellentesque felis. Aenean nisi erat, porttitor eu felis ut, imperdiet aliquam velit. Mauris vitae vehicula leo. Curabitur ut ante et ante pulvinar gravida. Donec tincidunt fringilla erat. Vivamus cursus augue et odio pharetra hendrerit.

View file

@ -0,0 +1,8 @@
%! TEX root = **/000-main.tex
% vim: spell spelllang=en:
\section{Appendix}
Appendix contents
\inputminted{cpp}{./code/P15601_en_Harrichu_y_and_the_maze.cc}

View file

@ -0,0 +1,41 @@
% vim: spell spelllang=en:
@article{einstein,
author = "Albert Einstein",
title = "{Zur Elektrodynamik bewegter K{\"o}rper}. ({German})
[{On} the electrodynamics of moving bodies]",
journal = "Annalen der Physik",
volume = "322",
number = "10",
pages = "891--921",
year = "1905",
DOI = "http://dx.doi.org/10.1002/andp.19053221004",
keywords = "physics"
}
@book{dirac,
title = {The Principles of Quantum Mechanics},
author = {Paul Adrien Maurice Dirac},
isbn = {9780198520115},
series = {International series of monographs on physics},
year = {1981},
publisher = {Clarendon Press},
keywords = {physics}
}
@online{knuthwebsite,
author = "Donald Knuth",
title = "Knuth: Computers and Typesetting",
url = "http://www-cs-faculty.stanford.edu/~uno/abcde.html",
addendum = "(accessed: 01.09.2016)",
keywords = "latex,knuth"
}
@inbook{knuth-fa,
author = "Donald E. Knuth",
title = "Fundamental Algorithms",
publisher = "Addison-Wesley",
year = "1973",
chapter = "1.2",
keywords = "knuth,programming"
}

View file

@ -0,0 +1,87 @@
# Build a reproducible latex document with latexmk, based on:
# https://flyx.org/nix-flakes-latex/
{ pkgs
# Document source
, src ? ./.
# Name of the final pdf file
, name ? "document.pdf"
# Use -shell-escape
, shellEscape ? false
# Use minted (requires shellEscape)
, minted ? false
# Additional flags for latexmk
, extraFlags ? [ ]
# Do not use the default latexmk flags. Usefull if you have a .latexmkrc or you
# don't want to use lualatex
, dontUseDefaultFlags ? false
# texlive packages needed to build the document
# you can also include other packages as a list.
, texlive ? pkgs.texlive.combined.scheme-full
# Pygments package to use (needed for minted)
, pygments ? pkgs.python39Packages.pygments
# Add system fonts
# you can specify one font directly with: pkgs.fira-code
# of join multiple fonts using symlinJoin:
# pkgs.symlinkJoin { name = "fonts"; paths = with pkgs; [ fira-code souce-code-pro ]; }
, fonts ? null
# Date for the document in unix time. You can change it
# to "$(date -r . +%s)" , "$(date -d "2022/02/22" +%s)", toString
# self.lastModified
, SOURCE_DATE_EPOCH ? "$(git log -1 --pretty=%ct)"
}:
let
inherit (pkgs) lib;
defaultFlags = [
"-interaction=nonstopmode"
"-pdf"
"-lualatex"
"-pretex='\\pdfvariable suppressoptionalinfo 512\\relax'"
"-usepretex"
];
flags = lib.concatLists [
(lib.optional (!dontUseDefaultFlags) defaultFlags)
extraFlags
(lib.optional shellEscape [ "-shell-escape" ])
];
in
assert minted -> shellEscape;
pkgs.stdenvNoCC.mkDerivation rec {
inherit src name;
buildInputs = [ texlive pkgs.git ] ++
lib.optional minted [ pkgs.which pygments ];
TEXMFHOME = "./cache";
TEXMFVAR = "./cache/var";
OSFONTDIR = lib.optionalString (fonts != null) "${fonts}/share/fonts";
buildPhase = ''
runHook preBuild
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH}" latexmk ${toString flags}
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -m644 -D *.pdf $out/${name}
runHook postInstall
'';
}

View file

@ -0,0 +1,51 @@
#include <iostream>
#include <queue>
#include <vector>
using namespace std;
struct coord {
int x,y;
coord (int xx=0, int yy=0) : x(xx), y(yy) {}
bool operator== (const coord& p) {return x==p.x and y==p.y;}
} beg, goal;
int main () {
int n;
cin >> n;
while (n--) {
int r,c;
cin >> r >> c;
vector <vector <bool> > v (r, vector <bool> (c, 0));
for (int i = 0; i < r; ++i)
for (int j = 0; j < c; ++j) {
char cc;
cin >> cc;
if (cc=='.') v[i][j]=true;
else if (cc=='b') beg = coord(i,j);
else if (cc=='g') goal = coord(i,j);
}
v[goal.x][goal.y] = v[beg.x][beg.y]=true;
vector <vector <bool> > f (v.size(),vector <bool> (v[0].size(),0));
queue <coord> q;
q.push(beg);
while (!q.empty()) {
coord p = q.front(); q.pop();
if (p.x>=v.size() or p.x<0 or p.y >= v[0].size() or p.y<0) continue;
if (!v[p.x][p.y]) continue;
if (f[p.x][p.y]) continue;
f[p.x][p.y] = true;
if (p==goal) break;
q.push(coord(p.x+1,p.y));
q.push(coord(p.x-1,p.y));
q.push(coord(p.x,p.y+1));
q.push(coord(p.x,p.y-1));
}
cout << (f[goal.x][goal.y]? "Good" : "Bad") << endl;
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

View file

@ -0,0 +1,78 @@
# This template is based on https://github.com/Leixb/latex-template/tree/master
{
description = "LaTeX Flake";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
{
lib.latexmk = import ./build-document.nix;
} // flake-utils.lib.eachDefaultSystem (system:
let
pname = "document";
pkgs = import nixpkgs { inherit system; };
latex-packages = with pkgs; [
(texlive.combine {
inherit (texlive)
scheme-medium
framed
titlesec
cleveref
multirow
wrapfig
tabu
threeparttable
threeparttablex
makecell
environ
biblatex
biber
fvextra
upquote
catchfile
xstring
csquotes
minted
dejavu
comment
footmisc
xltabular
ltablex
;
})
which
python39Packages.pygments
];
dev-packages = with pkgs; [
texlab
zathura
wmctrl
];
in
rec {
devShell = pkgs.mkShell {
buildInputs = [ latex-packages dev-packages ];
};
formatter = pkgs.nixpkgs-fmt;
packages = flake-utils.lib.flattenTree {
default = import ./build-document.nix {
inherit pkgs;
name = pname;
texlive = latex-packages;
shellEscape = true;
minted = true;
SOURCE_DATE_EPOCH = toString self.lastModified;
};
};
apps.default = flake-utils.lib.mkApp { drv = "${pkgs.texlivePackages.latexmk}"; exePath = "/bin/latexmk"; };
}
);
}

View file

@ -0,0 +1 @@
use flake

1
files/templates/python/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
__pycache__

View file

@ -0,0 +1,26 @@
# Python template using uv2nix
This template flake provides a python environment that is being managed by `uv` while still keeping the store managed by `nix`.
## Setup
1) Enter project directory
2) `project python`
3) Edit Python version in `flake.nix` and Python version + dependencies in `pyproject.toml`
4) `uv lock`
5) `direnv reload`
## Usage
### Testing
- run `nix flake check`
###### Note for Emacs users
It can happen that Emacs will not immediately pick up on the new environment after you have made your changes. In that case, perform the following steps in Emacs (this is for a setup using `envrc.el` and `eglot`):
1) `(envrc-reload)`
2) `(eglot)`

View file

@ -0,0 +1,199 @@
# based on https://github.com/pyproject-nix/uv2nix/tree/master/templates/hello-world
{
description = "Python flake using uv2nix";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
pyproject-nix = {
url = "github:pyproject-nix/pyproject.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
uv2nix = {
url = "github:pyproject-nix/uv2nix";
inputs = {
pyproject-nix.follows = "pyproject-nix";
nixpkgs.follows = "nixpkgs";
};
};
pyproject-build-systems = {
url = "github:pyproject-nix/build-system-pkgs";
inputs = {
pyproject-nix.follows = "pyproject-nix";
uv2nix.follows = "uv2nix";
nixpkgs.follows = "nixpkgs";
};
};
};
outputs =
{ nixpkgs
, uv2nix
, pyproject-nix
, pyproject-build-systems
, ...
}:
let
inherit (nixpkgs) lib;
pname = "name";
forAllSystems = lib.genAttrs lib.systems.flakeExposed;
# Load a uv workspace from a workspace root.
# Uv2nix treats all uv projects as workspace projects.
workspace = uv2nix.lib.workspace.loadWorkspace { workspaceRoot = ./.; };
overlay = workspace.mkPyprojectOverlay {
# Prefer prebuilt binary wheels as a package source.
# Sdists are less likely to "just work" because of the metadata missing from uv.lock.
# Binary wheels are more likely to, but may still require overrides for library dependencies.
sourcePreference = "wheel"; # or sourcePreference = "sdist";
# Optionally customise PEP 508 environment
# environ = {
# platform_release = "5.10.65";
# };
};
pythonSets = forAllSystems
(system:
let
inherit (pkgs) stdenv;
pkgs = nixpkgs.legacyPackages.${system};
pyprojectOverrides = final: prev: {
# Implement build fixups here.
${pname} = prev.${pname}.overrideAttrs (old: {
passthru = old.passthru // {
# Put all tests in the passthru.tests attribute set.
# Nixpkgs also uses the passthru.tests mechanism for ofborg test discovery.
#
# For usage with Flakes we will refer to the passthru.tests attributes to construct the flake checks attribute set.
tests =
let
virtualenv = final.mkVirtualEnv "${pname}-pytest-env" {
${pname} = [ "test" ];
};
in
(old.tests or { })
// {
pytest = stdenv.mkDerivation {
name = "${final.${pname}.name}-pytest";
inherit (final.${pname}) src;
nativeBuildInputs = [
virtualenv
];
dontConfigure = true;
# Because this package is running tests, and not actually building the main package
# the build phase is running the tests.
#
# We also output a HTML coverage report, which is used as the build output.
buildPhase = ''
runHook preBuild
pytest --cov tests --cov-report html
runHook postBuild
'';
# Install the HTML coverage report into the build output.
#
# If you wanted to install multiple test output formats such as TAP outputs
# you could make this derivation a multiple-output derivation.
#
# See https://nixos.org/manual/nixpkgs/stable/#chap-multiple-output for more information on multiple outputs.
installPhase = ''
runHook preInstall
mv htmlcov $out
runHook postInstall
'';
};
};
};
});
};
baseSet = pkgs.callPackage pyproject-nix.build.packages {
python = pkgs.python312;
};
in
baseSet.overrideScope
(
lib.composeManyExtensions [
pyproject-build-systems.overlays.default
overlay
pyprojectOverrides
]
));
in
{
packages = forAllSystems (system:
let
pythonSet = pythonSets.${system};
in
{ default = pythonSet.mkVirtualEnv "${pname}-env" workspace.deps.default; });
devShells = forAllSystems
(system:
let
pythonSet = pythonSets.${system};
pkgs = nixpkgs.legacyPackages.${system};
in
{
default =
let
# Create an overlay enabling editable mode for all local dependencies.
editableOverlay = workspace.mkEditablePyprojectOverlay {
# Use environment variable
root = "$REPO_ROOT";
# Optional: Only enable editable for these packages
# members = [ "hello-world" ];
};
# Override previous set with our overrideable overlay.
editablePythonSet = pythonSet.overrideScope editableOverlay;
virtualenv = editablePythonSet.mkVirtualEnv "${pname}-dev-env" {
${pname} = [ "dev" ];
};
in
pkgs.mkShell {
packages = [
virtualenv
pkgs.uv
];
shellHook = ''
# Undo dependency propagation by nixpkgs.
unset PYTHONPATH
# Don't create venv using uv
export UV_NO_SYNC=1
# Prevent uv from downloading managed Python's
export UV_PYTHON_DOWNLOADS=never
# Get repository root using git. This is expanded at runtime by the editable `.pth` machinery.
export REPO_ROOT=$(git rev-parse --show-toplevel)
'';
};
});
checks = forAllSystems (
system:
let
pythonSet = pythonSets.${system};
in
{
inherit (pythonSet.${pname}.passthru.tests) pytest;
}
);
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixpkgs-fmt);
};
}

View file

@ -0,0 +1,32 @@
[project]
name = "name"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
]
[project.scripts]
hello = "name:hello"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[dependency-groups]
dev = [
{include-group = "test"},
{include-group = "lint"},
{include-group = "lsp"},
]
lsp = [
"python-lsp-server",
]
lint = [
"ruff>=0.6.7",
]
test = [
"pytest-cov>=6.0.0",
"pytest>=8.3.3",
]

View file

@ -0,0 +1,2 @@
def hello() -> None:
print("Hello from testing!")

View file

@ -0,0 +1,8 @@
import name
def test_hello(capsys):
name.hello()
captured = capsys.readouterr()
assert captured.out == "Hello from testing!\n"
assert captured.err == ""

254
files/templates/python/uv.lock generated Normal file
View file

@ -0,0 +1,254 @@
version = 1
requires-python = ">=3.12"
[[package]]
name = "colorama"
version = "0.4.6"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335 },
]
[[package]]
name = "coverage"
version = "7.6.10"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/84/ba/ac14d281f80aab516275012e8875991bb06203957aa1e19950139238d658/coverage-7.6.10.tar.gz", hash = "sha256:7fb105327c8f8f0682e29843e2ff96af9dcbe5bab8eeb4b398c6a33a16d80a23", size = 803868 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/86/77/19d09ea06f92fdf0487499283b1b7af06bc422ea94534c8fe3a4cd023641/coverage-7.6.10-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:27c6e64726b307782fa5cbe531e7647aee385a29b2107cd87ba7c0105a5d3853", size = 208281 },
{ url = "https://files.pythonhosted.org/packages/b6/67/5479b9f2f99fcfb49c0d5cf61912a5255ef80b6e80a3cddba39c38146cf4/coverage-7.6.10-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:c56e097019e72c373bae32d946ecf9858fda841e48d82df7e81c63ac25554078", size = 208514 },
{ url = "https://files.pythonhosted.org/packages/15/d1/febf59030ce1c83b7331c3546d7317e5120c5966471727aa7ac157729c4b/coverage-7.6.10-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c7827a5bc7bdb197b9e066cdf650b2887597ad124dd99777332776f7b7c7d0d0", size = 241537 },
{ url = "https://files.pythonhosted.org/packages/4b/7e/5ac4c90192130e7cf8b63153fe620c8bfd9068f89a6d9b5f26f1550f7a26/coverage-7.6.10-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:204a8238afe787323a8b47d8be4df89772d5c1e4651b9ffa808552bdf20e1d50", size = 238572 },
{ url = "https://files.pythonhosted.org/packages/dc/03/0334a79b26ecf59958f2fe9dd1f5ab3e2f88db876f5071933de39af09647/coverage-7.6.10-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e67926f51821b8e9deb6426ff3164870976fe414d033ad90ea75e7ed0c2e5022", size = 240639 },
{ url = "https://files.pythonhosted.org/packages/d7/45/8a707f23c202208d7b286d78ad6233f50dcf929319b664b6cc18a03c1aae/coverage-7.6.10-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:e78b270eadb5702938c3dbe9367f878249b5ef9a2fcc5360ac7bff694310d17b", size = 240072 },
{ url = "https://files.pythonhosted.org/packages/66/02/603ce0ac2d02bc7b393279ef618940b4a0535b0868ee791140bda9ecfa40/coverage-7.6.10-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:714f942b9c15c3a7a5fe6876ce30af831c2ad4ce902410b7466b662358c852c0", size = 238386 },
{ url = "https://files.pythonhosted.org/packages/04/62/4e6887e9be060f5d18f1dd58c2838b2d9646faf353232dec4e2d4b1c8644/coverage-7.6.10-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:abb02e2f5a3187b2ac4cd46b8ced85a0858230b577ccb2c62c81482ca7d18852", size = 240054 },
{ url = "https://files.pythonhosted.org/packages/5c/74/83ae4151c170d8bd071924f212add22a0e62a7fe2b149edf016aeecad17c/coverage-7.6.10-cp312-cp312-win32.whl", hash = "sha256:55b201b97286cf61f5e76063f9e2a1d8d2972fc2fcfd2c1272530172fd28c359", size = 210904 },
{ url = "https://files.pythonhosted.org/packages/c3/54/de0893186a221478f5880283119fc40483bc460b27c4c71d1b8bba3474b9/coverage-7.6.10-cp312-cp312-win_amd64.whl", hash = "sha256:e4ae5ac5e0d1e4edfc9b4b57b4cbecd5bc266a6915c500f358817a8496739247", size = 211692 },
{ url = "https://files.pythonhosted.org/packages/25/6d/31883d78865529257bf847df5789e2ae80e99de8a460c3453dbfbe0db069/coverage-7.6.10-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:05fca8ba6a87aabdd2d30d0b6c838b50510b56cdcfc604d40760dae7153b73d9", size = 208308 },
{ url = "https://files.pythonhosted.org/packages/70/22/3f2b129cc08de00c83b0ad6252e034320946abfc3e4235c009e57cfeee05/coverage-7.6.10-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:9e80eba8801c386f72e0712a0453431259c45c3249f0009aff537a517b52942b", size = 208565 },
{ url = "https://files.pythonhosted.org/packages/97/0a/d89bc2d1cc61d3a8dfe9e9d75217b2be85f6c73ebf1b9e3c2f4e797f4531/coverage-7.6.10-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a372c89c939d57abe09e08c0578c1d212e7a678135d53aa16eec4430adc5e690", size = 241083 },
{ url = "https://files.pythonhosted.org/packages/4c/81/6d64b88a00c7a7aaed3a657b8eaa0931f37a6395fcef61e53ff742b49c97/coverage-7.6.10-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ec22b5e7fe7a0fa8509181c4aac1db48f3dd4d3a566131b313d1efc102892c18", size = 238235 },
{ url = "https://files.pythonhosted.org/packages/9a/0b/7797d4193f5adb4b837207ed87fecf5fc38f7cc612b369a8e8e12d9fa114/coverage-7.6.10-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:26bcf5c4df41cad1b19c84af71c22cbc9ea9a547fc973f1f2cc9a290002c8b3c", size = 240220 },
{ url = "https://files.pythonhosted.org/packages/65/4d/6f83ca1bddcf8e51bf8ff71572f39a1c73c34cf50e752a952c34f24d0a60/coverage-7.6.10-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:4e4630c26b6084c9b3cb53b15bd488f30ceb50b73c35c5ad7871b869cb7365fd", size = 239847 },
{ url = "https://files.pythonhosted.org/packages/30/9d/2470df6aa146aff4c65fee0f87f58d2164a67533c771c9cc12ffcdb865d5/coverage-7.6.10-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:2396e8116db77789f819d2bc8a7e200232b7a282c66e0ae2d2cd84581a89757e", size = 237922 },
{ url = "https://files.pythonhosted.org/packages/08/dd/723fef5d901e6a89f2507094db66c091449c8ba03272861eaefa773ad95c/coverage-7.6.10-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:79109c70cc0882e4d2d002fe69a24aa504dec0cc17169b3c7f41a1d341a73694", size = 239783 },
{ url = "https://files.pythonhosted.org/packages/3d/f7/64d3298b2baf261cb35466000628706ce20a82d42faf9b771af447cd2b76/coverage-7.6.10-cp313-cp313-win32.whl", hash = "sha256:9e1747bab246d6ff2c4f28b4d186b205adced9f7bd9dc362051cc37c4a0c7bd6", size = 210965 },
{ url = "https://files.pythonhosted.org/packages/d5/58/ec43499a7fc681212fe7742fe90b2bc361cdb72e3181ace1604247a5b24d/coverage-7.6.10-cp313-cp313-win_amd64.whl", hash = "sha256:254f1a3b1eef5f7ed23ef265eaa89c65c8c5b6b257327c149db1ca9d4a35f25e", size = 211719 },
{ url = "https://files.pythonhosted.org/packages/ab/c9/f2857a135bcff4330c1e90e7d03446b036b2363d4ad37eb5e3a47bbac8a6/coverage-7.6.10-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:2ccf240eb719789cedbb9fd1338055de2761088202a9a0b73032857e53f612fe", size = 209050 },
{ url = "https://files.pythonhosted.org/packages/aa/b3/f840e5bd777d8433caa9e4a1eb20503495709f697341ac1a8ee6a3c906ad/coverage-7.6.10-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:0c807ca74d5a5e64427c8805de15b9ca140bba13572d6d74e262f46f50b13273", size = 209321 },
{ url = "https://files.pythonhosted.org/packages/85/7d/125a5362180fcc1c03d91850fc020f3831d5cda09319522bcfa6b2b70be7/coverage-7.6.10-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2bcfa46d7709b5a7ffe089075799b902020b62e7ee56ebaed2f4bdac04c508d8", size = 252039 },
{ url = "https://files.pythonhosted.org/packages/a9/9c/4358bf3c74baf1f9bddd2baf3756b54c07f2cfd2535f0a47f1e7757e54b3/coverage-7.6.10-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e0de1e902669dccbf80b0415fb6b43d27edca2fbd48c74da378923b05316098", size = 247758 },
{ url = "https://files.pythonhosted.org/packages/cf/c7/de3eb6fc5263b26fab5cda3de7a0f80e317597a4bad4781859f72885f300/coverage-7.6.10-cp313-cp313t-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3f7b444c42bbc533aaae6b5a2166fd1a797cdb5eb58ee51a92bee1eb94a1e1cb", size = 250119 },
{ url = "https://files.pythonhosted.org/packages/3e/e6/43de91f8ba2ec9140c6a4af1102141712949903dc732cf739167cfa7a3bc/coverage-7.6.10-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:b330368cb99ef72fcd2dc3ed260adf67b31499584dc8a20225e85bfe6f6cfed0", size = 249597 },
{ url = "https://files.pythonhosted.org/packages/08/40/61158b5499aa2adf9e37bc6d0117e8f6788625b283d51e7e0c53cf340530/coverage-7.6.10-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:9a7cfb50515f87f7ed30bc882f68812fd98bc2852957df69f3003d22a2aa0abf", size = 247473 },
{ url = "https://files.pythonhosted.org/packages/50/69/b3f2416725621e9f112e74e8470793d5b5995f146f596f133678a633b77e/coverage-7.6.10-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:6f93531882a5f68c28090f901b1d135de61b56331bba82028489bc51bdd818d2", size = 248737 },
{ url = "https://files.pythonhosted.org/packages/3c/6e/fe899fb937657db6df31cc3e61c6968cb56d36d7326361847440a430152e/coverage-7.6.10-cp313-cp313t-win32.whl", hash = "sha256:89d76815a26197c858f53c7f6a656686ec392b25991f9e409bcef020cd532312", size = 211611 },
{ url = "https://files.pythonhosted.org/packages/1c/55/52f5e66142a9d7bc93a15192eba7a78513d2abf6b3558d77b4ca32f5f424/coverage-7.6.10-cp313-cp313t-win_amd64.whl", hash = "sha256:54a5f0f43950a36312155dae55c505a76cd7f2b12d26abeebbe7a0b36dbc868d", size = 212781 },
]
[[package]]
name = "docstring-to-markdown"
version = "0.15"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/7a/ad/6a66abd14676619bd56f6b924c96321a2e2d7d86558841d94a30023eec53/docstring-to-markdown-0.15.tar.gz", hash = "sha256:e146114d9c50c181b1d25505054a8d0f7a476837f0da2c19f07e06eaed52b73d", size = 29246 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/c1/cf/4eee59f6c4111b3e80cc32cf6bac483a90646f5c8693e84496c9855e8e38/docstring_to_markdown-0.15-py3-none-any.whl", hash = "sha256:27afb3faedba81e34c33521c32bbd258d7fbb79eedf7d29bc4e81080e854aec0", size = 21640 },
]
[[package]]
name = "iniconfig"
version = "2.0.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/d7/4b/cbd8e699e64a6f16ca3a8220661b5f83792b3017d0f79807cb8708d33913/iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3", size = 4646 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/ef/a6/62565a6e1cf69e10f5727360368e451d4b7f58beeac6173dc9db836a5b46/iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374", size = 5892 },
]
[[package]]
name = "jedi"
version = "0.19.2"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "parso" },
]
sdist = { url = "https://files.pythonhosted.org/packages/72/3a/79a912fbd4d8dd6fbb02bf69afd3bb72cf0c729bb3063c6f4498603db17a/jedi-0.19.2.tar.gz", hash = "sha256:4770dc3de41bde3966b02eb84fbcf557fb33cce26ad23da12c742fb50ecb11f0", size = 1231287 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/c0/5a/9cac0c82afec3d09ccd97c8b6502d48f165f9124db81b4bcb90b4af974ee/jedi-0.19.2-py2.py3-none-any.whl", hash = "sha256:a8ef22bde8490f57fe5c7681a3c83cb58874daf72b4784de3cce5b6ef6edb5b9", size = 1572278 },
]
[[package]]
name = "name"
version = "0.1.0"
source = { editable = "." }
[package.dev-dependencies]
dev = [
{ name = "pytest" },
{ name = "pytest-cov" },
{ name = "python-lsp-server" },
{ name = "ruff" },
]
lint = [
{ name = "ruff" },
]
lsp = [
{ name = "python-lsp-server" },
]
test = [
{ name = "pytest" },
{ name = "pytest-cov" },
]
[package.metadata]
[package.metadata.requires-dev]
dev = [
{ name = "pytest", specifier = ">=8.3.3" },
{ name = "pytest-cov", specifier = ">=6.0.0" },
{ name = "python-lsp-server" },
{ name = "ruff", specifier = ">=0.6.7" },
]
lint = [{ name = "ruff", specifier = ">=0.6.7" }]
lsp = [{ name = "python-lsp-server" }]
test = [
{ name = "pytest", specifier = ">=8.3.3" },
{ name = "pytest-cov", specifier = ">=6.0.0" },
]
[[package]]
name = "packaging"
version = "24.2"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/d0/63/68dbb6eb2de9cb10ee4c9c14a0148804425e13c4fb20d61cce69f53106da/packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f", size = 163950 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/88/ef/eb23f262cca3c0c4eb7ab1933c3b1f03d021f2c48f54763065b6f0e321be/packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759", size = 65451 },
]
[[package]]
name = "parso"
version = "0.8.4"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/66/94/68e2e17afaa9169cf6412ab0f28623903be73d1b32e208d9e8e541bb086d/parso-0.8.4.tar.gz", hash = "sha256:eb3a7b58240fb99099a345571deecc0f9540ea5f4dd2fe14c2a99d6b281ab92d", size = 400609 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/c6/ac/dac4a63f978e4dcb3c6d3a78c4d8e0192a113d288502a1216950c41b1027/parso-0.8.4-py2.py3-none-any.whl", hash = "sha256:a418670a20291dacd2dddc80c377c5c3791378ee1e8d12bffc35420643d43f18", size = 103650 },
]
[[package]]
name = "pluggy"
version = "1.5.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/96/2d/02d4312c973c6050a18b314a5ad0b3210edb65a906f868e31c111dede4a6/pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1", size = 67955 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/88/5f/e351af9a41f866ac3f1fac4ca0613908d9a41741cfcf2228f4ad853b697d/pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669", size = 20556 },
]
[[package]]
name = "pytest"
version = "8.3.4"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "colorama", marker = "sys_platform == 'win32'" },
{ name = "iniconfig" },
{ name = "packaging" },
{ name = "pluggy" },
]
sdist = { url = "https://files.pythonhosted.org/packages/05/35/30e0d83068951d90a01852cb1cef56e5d8a09d20c7f511634cc2f7e0372a/pytest-8.3.4.tar.gz", hash = "sha256:965370d062bce11e73868e0335abac31b4d3de0e82f4007408d242b4f8610761", size = 1445919 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/11/92/76a1c94d3afee238333bc0a42b82935dd8f9cf8ce9e336ff87ee14d9e1cf/pytest-8.3.4-py3-none-any.whl", hash = "sha256:50e16d954148559c9a74109af1eaf0c945ba2d8f30f0a3d3335edde19788b6f6", size = 343083 },
]
[[package]]
name = "pytest-cov"
version = "6.0.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "coverage" },
{ name = "pytest" },
]
sdist = { url = "https://files.pythonhosted.org/packages/be/45/9b538de8cef30e17c7b45ef42f538a94889ed6a16f2387a6c89e73220651/pytest-cov-6.0.0.tar.gz", hash = "sha256:fde0b595ca248bb8e2d76f020b465f3b107c9632e6a1d1705f17834c89dcadc0", size = 66945 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/36/3b/48e79f2cd6a61dbbd4807b4ed46cb564b4fd50a76166b1c4ea5c1d9e2371/pytest_cov-6.0.0-py3-none-any.whl", hash = "sha256:eee6f1b9e61008bd34975a4d5bab25801eb31898b032dd55addc93e96fcaaa35", size = 22949 },
]
[[package]]
name = "python-lsp-jsonrpc"
version = "1.1.2"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "ujson" },
]
sdist = { url = "https://files.pythonhosted.org/packages/48/b6/fd92e2ea4635d88966bb42c20198df1a981340f07843b5e3c6694ba3557b/python-lsp-jsonrpc-1.1.2.tar.gz", hash = "sha256:4688e453eef55cd952bff762c705cedefa12055c0aec17a06f595bcc002cc912", size = 15298 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/cb/d9/656659d5b5d5f402b2b174cd0ba9bc827e07ce3c0bf88da65424baf64af8/python_lsp_jsonrpc-1.1.2-py3-none-any.whl", hash = "sha256:7339c2e9630ae98903fdaea1ace8c47fba0484983794d6aafd0bd8989be2b03c", size = 8805 },
]
[[package]]
name = "python-lsp-server"
version = "1.12.0"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "docstring-to-markdown" },
{ name = "jedi" },
{ name = "pluggy" },
{ name = "python-lsp-jsonrpc" },
{ name = "ujson" },
]
sdist = { url = "https://files.pythonhosted.org/packages/2b/15/b7e1577b9ca358e008b06910bf23cfa0a8be130ee9f319a262a3c610ee8d/python_lsp_server-1.12.0.tar.gz", hash = "sha256:b6a336f128da03bd9bac1e61c3acca6e84242b8b31055a1ccf49d83df9dc053b", size = 114328 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/1d/49/37c9659f76dbf1018d88892c14184db36ce9df09ea7d760162584aee8a58/python_lsp_server-1.12.0-py3-none-any.whl", hash = "sha256:2e912c661881d85f67f2076e4e66268b695b62bf127e07e81f58b187d4bb6eda", size = 74782 },
]
[[package]]
name = "ruff"
version = "0.8.4"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/34/37/9c02181ef38d55b77d97c68b78e705fd14c0de0e5d085202bb2b52ce5be9/ruff-0.8.4.tar.gz", hash = "sha256:0d5f89f254836799af1615798caa5f80b7f935d7a670fad66c5007928e57ace8", size = 3402103 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/05/67/f480bf2f2723b2e49af38ed2be75ccdb2798fca7d56279b585c8f553aaab/ruff-0.8.4-py3-none-linux_armv6l.whl", hash = "sha256:58072f0c06080276804c6a4e21a9045a706584a958e644353603d36ca1eb8a60", size = 10546415 },
{ url = "https://files.pythonhosted.org/packages/eb/7a/5aba20312c73f1ce61814e520d1920edf68ca3b9c507bd84d8546a8ecaa8/ruff-0.8.4-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ffb60904651c00a1e0b8df594591770018a0f04587f7deeb3838344fe3adabac", size = 10346113 },
{ url = "https://files.pythonhosted.org/packages/76/f4/c41de22b3728486f0aa95383a44c42657b2db4062f3234ca36fc8cf52d8b/ruff-0.8.4-py3-none-macosx_11_0_arm64.whl", hash = "sha256:6ddf5d654ac0d44389f6bf05cee4caeefc3132a64b58ea46738111d687352296", size = 9943564 },
{ url = "https://files.pythonhosted.org/packages/0e/f0/afa0d2191af495ac82d4cbbfd7a94e3df6f62a04ca412033e073b871fc6d/ruff-0.8.4-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e248b1f0fa2749edd3350a2a342b67b43a2627434c059a063418e3d375cfe643", size = 10805522 },
{ url = "https://files.pythonhosted.org/packages/12/57/5d1e9a0fd0c228e663894e8e3a8e7063e5ee90f8e8e60cf2085f362bfa1a/ruff-0.8.4-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:bf197b98ed86e417412ee3b6c893f44c8864f816451441483253d5ff22c0e81e", size = 10306763 },
{ url = "https://files.pythonhosted.org/packages/04/df/f069fdb02e408be8aac6853583572a2873f87f866fe8515de65873caf6b8/ruff-0.8.4-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c41319b85faa3aadd4d30cb1cffdd9ac6b89704ff79f7664b853785b48eccdf3", size = 11359574 },
{ url = "https://files.pythonhosted.org/packages/d3/04/37c27494cd02e4a8315680debfc6dfabcb97e597c07cce0044db1f9dfbe2/ruff-0.8.4-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:9f8402b7c4f96463f135e936d9ab77b65711fcd5d72e5d67597b543bbb43cf3f", size = 12094851 },
{ url = "https://files.pythonhosted.org/packages/81/b1/c5d7fb68506cab9832d208d03ea4668da9a9887a4a392f4f328b1bf734ad/ruff-0.8.4-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e4e56b3baa9c23d324ead112a4fdf20db9a3f8f29eeabff1355114dd96014604", size = 11655539 },
{ url = "https://files.pythonhosted.org/packages/ef/38/8f8f2c8898dc8a7a49bc340cf6f00226917f0f5cb489e37075bcb2ce3671/ruff-0.8.4-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:736272574e97157f7edbbb43b1d046125fce9e7d8d583d5d65d0c9bf2c15addf", size = 12912805 },
{ url = "https://files.pythonhosted.org/packages/06/dd/fa6660c279f4eb320788876d0cff4ea18d9af7d9ed7216d7bd66877468d0/ruff-0.8.4-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e5fe710ab6061592521f902fca7ebcb9fabd27bc7c57c764298b1c1f15fff720", size = 11205976 },
{ url = "https://files.pythonhosted.org/packages/a8/d7/de94cc89833b5de455750686c17c9e10f4e1ab7ccdc5521b8fe911d1477e/ruff-0.8.4-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:13e9ec6d6b55f6da412d59953d65d66e760d583dd3c1c72bf1f26435b5bfdbae", size = 10792039 },
{ url = "https://files.pythonhosted.org/packages/6d/15/3e4906559248bdbb74854af684314608297a05b996062c9d72e0ef7c7097/ruff-0.8.4-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:97d9aefef725348ad77d6db98b726cfdb075a40b936c7984088804dfd38268a7", size = 10400088 },
{ url = "https://files.pythonhosted.org/packages/a2/21/9ed4c0e8133cb4a87a18d470f534ad1a8a66d7bec493bcb8bda2d1a5d5be/ruff-0.8.4-py3-none-musllinux_1_2_i686.whl", hash = "sha256:ab78e33325a6f5374e04c2ab924a3367d69a0da36f8c9cb6b894a62017506111", size = 10900814 },
{ url = "https://files.pythonhosted.org/packages/0d/5d/122a65a18955bd9da2616b69bc839351f8baf23b2805b543aa2f0aed72b5/ruff-0.8.4-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:8ef06f66f4a05c3ddbc9121a8b0cecccd92c5bf3dd43b5472ffe40b8ca10f0f8", size = 11268828 },
{ url = "https://files.pythonhosted.org/packages/43/a9/1676ee9106995381e3d34bccac5bb28df70194167337ed4854c20f27c7ba/ruff-0.8.4-py3-none-win32.whl", hash = "sha256:552fb6d861320958ca5e15f28b20a3d071aa83b93caee33a87b471f99a6c0835", size = 8805621 },
{ url = "https://files.pythonhosted.org/packages/10/98/ed6b56a30ee76771c193ff7ceeaf1d2acc98d33a1a27b8479cbdb5c17a23/ruff-0.8.4-py3-none-win_amd64.whl", hash = "sha256:f21a1143776f8656d7f364bd264a9d60f01b7f52243fbe90e7670c0dfe0cf65d", size = 9660086 },
{ url = "https://files.pythonhosted.org/packages/13/9f/026e18ca7d7766783d779dae5e9c656746c6ede36ef73c6d934aaf4a6dec/ruff-0.8.4-py3-none-win_arm64.whl", hash = "sha256:9183dd615d8df50defa8b1d9a074053891ba39025cf5ae88e8bcb52edcc4bf08", size = 9074500 },
]
[[package]]
name = "ujson"
version = "5.10.0"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/f0/00/3110fd566786bfa542adb7932d62035e0c0ef662a8ff6544b6643b3d6fd7/ujson-5.10.0.tar.gz", hash = "sha256:b3cd8f3c5d8c7738257f1018880444f7b7d9b66232c64649f562d7ba86ad4bc1", size = 7154885 }
wheels = [
{ url = "https://files.pythonhosted.org/packages/e8/a6/fd3f8bbd80842267e2d06c3583279555e8354c5986c952385199d57a5b6c/ujson-5.10.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:98ba15d8cbc481ce55695beee9f063189dce91a4b08bc1d03e7f0152cd4bbdd5", size = 55642 },
{ url = "https://files.pythonhosted.org/packages/a8/47/dd03fd2b5ae727e16d5d18919b383959c6d269c7b948a380fdd879518640/ujson-5.10.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:a9d2edbf1556e4f56e50fab7d8ff993dbad7f54bac68eacdd27a8f55f433578e", size = 51807 },
{ url = "https://files.pythonhosted.org/packages/25/23/079a4cc6fd7e2655a473ed9e776ddbb7144e27f04e8fc484a0fb45fe6f71/ujson-5.10.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6627029ae4f52d0e1a2451768c2c37c0c814ffc04f796eb36244cf16b8e57043", size = 51972 },
{ url = "https://files.pythonhosted.org/packages/04/81/668707e5f2177791869b624be4c06fb2473bf97ee33296b18d1cf3092af7/ujson-5.10.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:f8ccb77b3e40b151e20519c6ae6d89bfe3f4c14e8e210d910287f778368bb3d1", size = 53686 },
{ url = "https://files.pythonhosted.org/packages/bd/50/056d518a386d80aaf4505ccf3cee1c40d312a46901ed494d5711dd939bc3/ujson-5.10.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:f3caf9cd64abfeb11a3b661329085c5e167abbe15256b3b68cb5d914ba7396f3", size = 58591 },
{ url = "https://files.pythonhosted.org/packages/fc/d6/aeaf3e2d6fb1f4cfb6bf25f454d60490ed8146ddc0600fae44bfe7eb5a72/ujson-5.10.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6e32abdce572e3a8c3d02c886c704a38a1b015a1fb858004e03d20ca7cecbb21", size = 997853 },
{ url = "https://files.pythonhosted.org/packages/f8/d5/1f2a5d2699f447f7d990334ca96e90065ea7f99b142ce96e85f26d7e78e2/ujson-5.10.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a65b6af4d903103ee7b6f4f5b85f1bfd0c90ba4eeac6421aae436c9988aa64a2", size = 1140689 },
{ url = "https://files.pythonhosted.org/packages/f2/2c/6990f4ccb41ed93744aaaa3786394bca0875503f97690622f3cafc0adfde/ujson-5.10.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:604a046d966457b6cdcacc5aa2ec5314f0e8c42bae52842c1e6fa02ea4bda42e", size = 1043576 },
{ url = "https://files.pythonhosted.org/packages/14/f5/a2368463dbb09fbdbf6a696062d0c0f62e4ae6fa65f38f829611da2e8fdd/ujson-5.10.0-cp312-cp312-win32.whl", hash = "sha256:6dea1c8b4fc921bf78a8ff00bbd2bfe166345f5536c510671bccececb187c80e", size = 38764 },
{ url = "https://files.pythonhosted.org/packages/59/2d/691f741ffd72b6c84438a93749ac57bf1a3f217ac4b0ea4fd0e96119e118/ujson-5.10.0-cp312-cp312-win_amd64.whl", hash = "sha256:38665e7d8290188b1e0d57d584eb8110951a9591363316dd41cf8686ab1d0abc", size = 42211 },
{ url = "https://files.pythonhosted.org/packages/0d/69/b3e3f924bb0e8820bb46671979770c5be6a7d51c77a66324cdb09f1acddb/ujson-5.10.0-cp313-cp313-macosx_10_9_x86_64.whl", hash = "sha256:618efd84dc1acbd6bff8eaa736bb6c074bfa8b8a98f55b61c38d4ca2c1f7f287", size = 55646 },
{ url = "https://files.pythonhosted.org/packages/32/8a/9b748eb543c6cabc54ebeaa1f28035b1bd09c0800235b08e85990734c41e/ujson-5.10.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:38d5d36b4aedfe81dfe251f76c0467399d575d1395a1755de391e58985ab1c2e", size = 51806 },
{ url = "https://files.pythonhosted.org/packages/39/50/4b53ea234413b710a18b305f465b328e306ba9592e13a791a6a6b378869b/ujson-5.10.0-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67079b1f9fb29ed9a2914acf4ef6c02844b3153913eb735d4bf287ee1db6e557", size = 51975 },
{ url = "https://files.pythonhosted.org/packages/b4/9d/8061934f960cdb6dd55f0b3ceeff207fcc48c64f58b43403777ad5623d9e/ujson-5.10.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7d0e0ceeb8fe2468c70ec0c37b439dd554e2aa539a8a56365fd761edb418988", size = 53693 },
{ url = "https://files.pythonhosted.org/packages/f5/be/7bfa84b28519ddbb67efc8410765ca7da55e6b93aba84d97764cd5794dbc/ujson-5.10.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:59e02cd37bc7c44d587a0ba45347cc815fb7a5fe48de16bf05caa5f7d0d2e816", size = 58594 },
{ url = "https://files.pythonhosted.org/packages/48/eb/85d465abafb2c69d9699cfa5520e6e96561db787d36c677370e066c7e2e7/ujson-5.10.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:2a890b706b64e0065f02577bf6d8ca3b66c11a5e81fb75d757233a38c07a1f20", size = 997853 },
{ url = "https://files.pythonhosted.org/packages/9f/76/2a63409fc05d34dd7d929357b7a45e3a2c96f22b4225cd74becd2ba6c4cb/ujson-5.10.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:621e34b4632c740ecb491efc7f1fcb4f74b48ddb55e65221995e74e2d00bbff0", size = 1140694 },
{ url = "https://files.pythonhosted.org/packages/45/ed/582c4daba0f3e1688d923b5cb914ada1f9defa702df38a1916c899f7c4d1/ujson-5.10.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:b9500e61fce0cfc86168b248104e954fead61f9be213087153d272e817ec7b4f", size = 1043580 },
{ url = "https://files.pythonhosted.org/packages/d7/0c/9837fece153051e19c7bade9f88f9b409e026b9525927824cdf16293b43b/ujson-5.10.0-cp313-cp313-win32.whl", hash = "sha256:4c4fc16f11ac1612f05b6f5781b384716719547e142cfd67b65d035bd85af165", size = 38766 },
{ url = "https://files.pythonhosted.org/packages/d7/72/6cb6728e2738c05bbe9bd522d6fc79f86b9a28402f38663e85a28fddd4a0/ujson-5.10.0-cp313-cp313-win_amd64.whl", hash = "sha256:4573fd1695932d4f619928fd09d5d03d917274381649ade4328091ceca175539", size = 42212 },
]

View file

@ -0,0 +1 @@
use flake

7
files/templates/rust/Cargo.lock generated Normal file
View file

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "rust"
version = "0.1.0"

View file

@ -0,0 +1,6 @@
[package]
name = "rust"
version = "0.1.0"
edition = "2021"
[dependencies]

View file

@ -0,0 +1,70 @@
# heavily inspired by https://github.com/nulladmin1/nix-flake-templates/blob/main/rust-fenix-naersk/flake.nix
{
description = "Rust Flake using Fenix and Naersk";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
systems.url = "github:nix-systems/default";
naersk.url = "github:nix-community/naersk";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{ self
, nixpkgs
, naersk
, fenix
, systems
, ...
}:
let
forEachSystem = nixpkgs.lib.genAttrs (import systems);
pkgsFor = forEachSystem (system:
import nixpkgs {
inherit system;
overlays = [
fenix.overlays.default
];
});
rust-toolchain = forEachSystem (system: pkgsFor.${system}.fenix.stable);
in
{
formatter = forEachSystem (system: pkgsFor.${system}.nixpkgs-fmt);
devShells = forEachSystem (system: {
default = pkgsFor.${system}.mkShell {
packages = with rust-toolchain.${system}; [
cargo
rustc
clippy
rustfmt
rust-analyzer
];
env = {
RUST_BACKTRACE = "full";
};
RUST_SRC_PATH = "${rust-toolchain.${system}.rust-src}/lib/rustlib/src/rust/library";
};
});
packages = forEachSystem (system: {
default =
(pkgsFor.${system}.callPackage naersk {
inherit (rust-toolchain.${system}) cargo rustc;
}).buildPackage {
src = ./.;
};
});
apps = forEachSystem (system: {
default = {
type = "app";
program = "${self.packages.${system}.default}/bin/rust";
};
});
};
}

View file

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 393 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

196
files/vieb/viebrc Normal file
View file

@ -0,0 +1,196 @@
" Options
set adblocker=update
set adblockernotifications=all
set cache=clearonquit
set noclearcookiesonquit
set nocleardownloadsoncompleted
set nocleardownloadsonquit
set clearhistoryinterval=none
set noclearlocalstorageonquit
set noclosablepinnedtabs
set commandhist=persistuseronly
set containerkeeponreopen
set containernewtab=s:usecurrent
set containershowname=automatic
set containersplitpage=s:usecurrent
set containerstartuppage=main
set countlimit=100
" set nodarkreader
set darkreaderbg=#181a1b
set darkreaderbrightness=100
set darkreadercontrast=100
set darkreaderfg=#e8e6e3
set darkreadergrayscale=0
set darkreadermode=dark
set darkreadersepia=0
set darkreadertextstroke=0
set devtoolsposition=split
set dialogalert=notifyblock
set dialogconfirm=notifyallow
set dialogprompt=notifyblock
set downloadmethod=automatic
set downloadpath=
set encodeurlcopy=nospaces
set encodeurlext=nospaces
set explorehist=persist
set externalcommand=
set favicons=session
set followchars=numbers
set followfallbackaction=filter
set followlabelposition=outsiderighttop
set follownewtabswitch
set guifontsize=14
set guifullscreennavbar=oninput
set guifullscreentabbar=onupdate
set guihidetimeout=5000
set guinavbar=oninput
set guiscrollbar=onscroll
set guitabbar=onupdate
set historyperpage=100
set ignorecase
set incsearch
set inputfocusalignment=rememberend
set keeprecentlyclosed
set lang=en
set loadingindicator=line
set mapsuggest=9000000000000000
set mapsuggestposition=topright
set markposition=newtab
set markpositionshifted=default
set maxmapdepth=10
set menupage=elementasneeded
set menusuggest=both
set menuvieb=both
set mintabwidth=28
set mouse=all
set mousedisabledbehavior=nothing
set nomousefocus
set mousenewtabswitch
set mousevisualmode=onswitch
set nativenotification=never
set nativetheme=dark
set newtaburl=
set notificationduration=6000
set notificationforpermissions=silent
set notificationforsystemcommands=errors
set notificationlimitsmall=3
set notificationposition=bottomright
set pdfbehavior=download
set permissioncamera=ask
set permissioncertificateerror=allow
set permissionclipboardread=allow
set permissionclipboardwrite=allow
set permissionclosepage=allow
set permissiondisplaycapture=ask
set permissionfullscreen=allow
set permissiongeolocation=block
set permissionhid=block
set permissionidledetection=block
set permissionmediadevices=allowfull
set permissionmicrophone=ask
set permissionmidi=ask
set permissionmidisysex=ask
set permissionnotifications=ask
set permissionopenexternal=ask
set permissionpersistentstorage=ask
set permissionpointerlock=block
set permissionscreenwakelock=block
set permissionsensors=block
set permissionserial=block
set permissionunknown=ask
set permissionusb=allow
set permissionwindowmanagement=ask
set pointerposlocalid=domain
set pointerpostype=casing
set noquitonlasttabclose
set redirecttohttp
set noreloadtaboncrash
set replacespecial=special
set replacestartup=never
set requesttimeout=20000
set restoretabs=all
set scrollposlocalid=domain
set scrollpostype=casing
set searchemptyscope=global
set searchpointeralignment=left
set searchscope=global
set shell=
set showcmd
set smartcase
set spell
set nosplitbelow
set nosplitright
set nosponsorblock
set suggestbouncedelay=100
set suggestcommands=9000000000000000
set suggesttopsites=10
set suspendbackgroundtab
set suspendonrestore=regular
set suspendtimeout=0
set tabclosefocus=left
set tabcycle
set tabnewposition=right
set tabopenmuted=never
set taboverflow=scroll
set tabreopenmuted=remember
set tabreopenposition=right
set timeout
set timeoutlen=2000
set translateapi=auto
set translatekey=
set translatelang=en-us
set translateurl=https://api-free.deepl.com/v2/
" set nouserscript
" set nouserstyle
set useragent=%firefox
set vimcommand=gvim
set windowfullscreen=restore
set windowmaximize=restore
set windowposition=restore
set windowsize=restore
set windowtitle="%app - %title"
" Commands
colorscheme default
" Mappings
nmap o <toExploreMode>
nmap t <:tabnew><toExploreMode>
nmap b <toCommandMode>buffer<Space>
nmap g0 <:buffer 0>
nmap g^ <:buffer 0>
nmap g$ <:buffer -1>
nmap <C-m> <:buffer #>
nmap J <previousTab>
nmap K <nextTab>
nmap >> <moveTabForward>
nmap <lt><lt> <moveTabBackward>
nmap O <toExploreMode><End>
nmap gx0 <:lclose>
nmap gx$ <:rclose>
nmap x <stopLoadingPage>
nunmap [
nunmap ]
nmap [[ <previousPage>
nmap ]] <nextPage>
nmap [c <decreasePageNumber>
nmap ]c <increasePageNumber>
nmap zz <zoomReset>
nmap zi <zoomIn>
nmap zo <zoomOut>
nmap zm 5<zoomIn>
nmap zr 5<zoomOut>
nmap zM 5<zoomIn>
nmap zR 5<zoomOut>
nmap zI 7<zoomIn>
nmap zO 7<zoomOut>
" Search
set searchengine=https://kagi.com/search?q=%s
set searchwords+=no~https://search.nixos.org/options?query=%s
set searchwords+=np~https://search.nixos.org/packages?query=%s
set searchwords+=hm~https://home-manager-options.extranix.com/?query=%s
" Viebrc generated by Vieb
" vim: ft=vim

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

View file

Before

Width:  |  Height:  |  Size: 7.9 MiB

After

Width:  |  Height:  |  Size: 7.9 MiB

Before After
Before After

View file

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Before After
Before After

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