Compare commits

...

486 commits

Author SHA1 Message Date
290623be08
chore(flake): bump inputs 2024-12-14 17:58:40 +08:00
a55f985843
spec(eientei): add minecraft greedycraft instance 2024-12-14 17:47:10 +08:00
d58dfc0b93
home(gnome): link monitors.xml 2024-11-26 22:42:49 +08:00
b7cc5e5a31
spec(shatter): initial configuration 2024-11-22 04:52:45 +08:00
def7abac0f
flake: bump inputs 2024-11-22 04:48:24 +08:00
28478ea163
flake: bump inputs 2024-11-14 11:00:55 +08:00
652691f205
flake: bump inputs 2024-11-08 14:54:30 +08:00
7e39ea38ce
flake: bump inputs 2024-10-26 01:33:16 +08:00
db34870f96
flake: bump inputs 2024-10-26 01:14:54 +08:00
250552dd6e
global(zfs): split setup depend on secret mountpoint 2024-10-26 01:02:09 +08:00
576fcf1e69
spec(chireiden): enable gnome 2024-10-26 01:01:06 +08:00
7a087d230f
spec(focus): nextcloud 29 -> 30 2024-10-24 15:08:00 +08:00
0de940a01c
spec(eientei): nextcloud 29 -> 30 2024-10-21 22:11:31 +08:00
d11a7bcc41
flake: bump inputs 2024-10-21 20:48:13 +08:00
df2678642c
spec(yume): enable android 2024-10-21 20:48:04 +08:00
7b8e5b127c
flake: bump inputs 2024-09-28 16:52:28 +08:00
e4bf89cffa
home(gnome): intellihide from focused windows 2024-09-19 09:25:48 +08:00
25e31c4883
flake: bump inputs 2024-09-18 19:23:46 +08:00
fdaa48e555
spec(hakugyokurou): remove jovian mode 2024-09-13 12:32:12 +08:00
edd7c9e0f8
flake: bump inputs 2024-09-13 12:28:17 +08:00
938b9a73be
home(gnome): update package 2024-09-13 12:14:49 +08:00
9ac6afc1a6
flake: bump inputs 2024-09-10 22:53:05 +08:00
8b9d61b7dd
home(gnome): add monitors persist 2024-09-02 22:14:26 +08:00
1ede82f47e
home(gnome): add some gnome-specific theming 2024-08-31 21:25:47 +08:00
f0ab49a1c7
flake: bump inputs 2024-08-28 22:15:58 +08:00
ea5b86ced0
spec(reimaden): disable unsandboxed minecraft 2024-08-18 13:33:29 +08:00
c9b5e5ba74
global(io): udisks ignore zvols 2024-08-17 20:08:25 +08:00
0a5f6efdbc
global(fs): add zfs option 2024-08-17 20:08:02 +08:00
4b09ba189c
spec(reimaden): enable gnome 2024-08-17 20:07:47 +08:00
3e21c71b02
home(gnome): add extensions 2024-08-15 20:50:14 +08:00
e2838b95a3
home(gnome): disable d2p multi-monitor 2024-08-15 18:26:59 +08:00
a8b8bc1f87
flake: bump inputs 2024-08-13 10:10:58 +08:00
aea66591d1
home(util): remove persist unnecessary for flatpak 2024-08-07 23:01:06 +08:00
6e6d0140b6
global(flatpak): add var persist 2024-08-07 22:49:43 +08:00
c1463c2fa5
home(gnome): set power profile toggle 2024-08-04 17:20:50 +08:00
e083bbb4af
home(gnome): add more shortcuts 2024-08-04 13:05:00 +08:00
cd6184f6df
flake: bump inputs 2024-08-04 12:28:13 +08:00
a4d0a5685c
spec(hakugyokurou): enable android 2024-08-04 12:27:11 +08:00
12d638cefb
home(gnome): add more shortcuts 2024-08-03 18:02:17 +08:00
b7b3ad7e0e
home(gnome): improve gtk3 theme consistency 2024-07-30 18:51:45 +08:00
fdabd8a917
home(gnome): add some gnome-specific theming 2024-07-30 18:45:20 +08:00
40e034b489
home(gnome): move applications to flatpak 2024-07-29 23:44:44 +08:00
ec850dac46
spec(hakugyokurou): set plymouth scale 2024-07-29 20:01:06 +08:00
c713cca55c
home(gnome): disable theme 2024-07-29 19:56:16 +08:00
5e0b6af36b
home(gnome): enable flatpak by default 2024-07-29 15:40:59 +08:00
fc3bad749a
global(flatpak): add portals and persist 2024-07-29 15:40:41 +08:00
5dbea3b124
spec(hakugyokurou): enable gnome 2024-07-29 14:43:01 +08:00
4546c08ab7
home(gnome): update gtk theme names 2024-07-29 14:19:20 +08:00
f5164d9a2c
flake: bump inputs 2024-07-28 16:06:12 +08:00
1a83df89ee
spec(koumakyou): set cursor theme 2024-07-27 23:05:13 +08:00
f5d511e3e2
spec(hakugyokurou): correct Xwayland scale value 2024-07-27 23:03:53 +08:00
3667088f4a
spec(hakugyokurou): initial configuration 2024-07-27 18:18:35 +08:00
015dfc9cde
flake: bump inputs 2024-07-26 15:46:49 +08:00
f8f76c925a
home(catppuccin): enable catppuccin module even without gui 2024-07-21 16:37:39 +08:00
34aabf0051
package(expresslrs-configurator): bump expresslrs-configurator 1.6.1 to 1.7.2 2024-07-21 10:59:09 +08:00
63f701b566
package(photoview): bump photoview 2.3.13 to 2.4.0 2024-07-21 10:54:14 +08:00
8a0131abe8
spec(chireiden): disable catppuccin for plymouth 2024-07-18 17:36:44 +08:00
638f54083f
home(catppuccin): add i3status colours 2024-07-18 17:36:24 +08:00
77582f2f44
spec(shinkirou): specialise plasma 2024-07-18 17:06:03 +08:00
ad41c2a1f5
flake: bump inputs 2024-07-18 11:01:19 +08:00
fd9dfd7f6f
global(gpu): enable 32-bit drivers 2024-07-13 21:34:25 +08:00
d6bb219bab
home(catppuccin): fix gtk theme name again 2024-07-13 21:05:28 +08:00
0760875ce3
package(tubesync): temporarily allow obsolete dependency 2024-07-12 23:42:33 +08:00
7463641af7
home(catppuccin): set qt style 2024-07-12 19:41:43 +08:00
771ccd1b9f
flake: bump inputs 2024-07-12 17:10:48 +08:00
01884f25e0
spec(yume): enable lanzaboote 2024-07-12 17:10:40 +08:00
5e0d607c8c
global(gui): add nvidia options 2024-06-24 20:28:49 +08:00
959e5e9170
global(io): switch audio system to pipewire 2024-06-24 18:22:30 +08:00
ea711a9354
flake: bump inputs 2024-06-24 16:32:20 +08:00
de66ccf07a
home(vscode): update vscode color theme 2024-06-24 10:04:43 +08:00
27a7357825
flake: bump inputs 2024-06-24 09:56:37 +08:00
76b92bdd26
home(gui): switch to catppuccin module 2024-06-24 09:56:31 +08:00
a9c37d9287
spec(koumakyou): set max-performance on power disconnect 2024-06-13 08:56:50 +08:00
5fcfb7ba07
spec(koumakyou): clean up jovian config 2024-06-11 11:53:49 +08:00
12e00b84c5
spec(koumakyou): enable jetbrains defaults 2024-06-11 08:24:40 +08:00
73c7ede489
spec(koumakyou): add gamemode and enable decky 2024-06-10 17:08:44 +08:00
a65ff342ec
flake: bump inputs 2024-06-10 10:11:39 +08:00
d627681f48
spec(eientei): remove minecraft reverse proxy 2024-06-03 16:03:15 +08:00
c70d0d3fd4
spec(eientei): add minecraft services 2024-06-03 11:05:58 +08:00
4f8379b9aa
flake: bump inputs 2024-06-02 23:01:58 +08:00
cf8a30ee09
global(fs): make syncoid delete target snapshots 2024-06-02 22:19:21 +08:00
ed2bdf9960
spec(koumakyou): minecraft retain app user 2024-05-31 14:01:32 +08:00
fd96081d8d
home(minecraft): make username configurable 2024-05-31 14:00:52 +08:00
6a3a206c0b
home(minecraft): check gui condition in home 2024-05-31 11:20:56 +08:00
6d1dea7a54
home: crop koishi profile pictures 2024-05-31 11:12:26 +08:00
b107b4f66b
home(minecraft): run minecraft under dedicated user 2024-05-31 11:09:20 +08:00
1e9cc2ede2
home: improve profile pictures 2024-05-31 11:08:29 +08:00
dac1b260af
package(tubesync): temporarily allow obsolete dependency 2024-05-30 17:21:41 +08:00
d3423066a8
spec(shinkirou): add mouse natural scrolling 2024-05-30 17:19:18 +08:00
f3db768462
spec(shinkirou): use plasma by default 2024-05-30 17:18:26 +08:00
c572c783d1
flake: bump inputs 2024-05-29 16:10:21 +08:00
1f0dfd4ec4
flake: bump inputs 2024-05-25 16:03:26 +08:00
9e2f7cc6f9
flake: bump inputs 2024-05-22 22:10:13 +08:00
f811438667
spec(koumakyou): add kodi 2024-05-22 22:10:06 +08:00
f026937f97
spec(koumakyou): set console font 2024-05-22 21:11:06 +08:00
7f73a5bb3f
home(jetbrains): add go compiler 2024-05-20 09:18:26 +08:00
f828b24649
spec(focus): nextcloud 28 -> 29 2024-05-20 09:01:46 +08:00
aa871f5d78
spec(focus): add nextcloud maintenance window 2024-05-20 09:00:57 +08:00
826268651c
spec(eientei): add nextcloud maintenance window 2024-05-20 08:59:26 +08:00
7149b20bf2
spec(eientei): nextcloud 28 -> 29 2024-05-20 08:34:37 +08:00
c73a2f27d0
flake: bump inputs 2024-05-18 21:57:57 +08:00
5eac4c8675
flake: bump inputs 2024-05-14 20:10:30 +08:00
92c37b2582
spec(yume): disable autolock 2024-05-14 20:03:10 +08:00
cdcb99a70e
spec(koumakyou): disable autolock 2024-05-14 20:02:58 +08:00
3f0d415450
home: fix profile icon installation 2024-05-14 19:59:29 +08:00
c7a6e43b00
spec(yume): enable plasma 2024-05-14 17:31:05 +08:00
082e1dd415
home(plasma): fix wallet persist 2024-05-14 17:29:54 +08:00
dd05f0b4f5
spec(koumakyou): allow network management and xwayland scale 2024-05-14 12:14:35 +08:00
57a654ac2c
home(plasma): persist wallet 2024-05-14 12:14:12 +08:00
77cff64d1a
spec(shinkirou): add Xwayland scale 2024-05-14 11:40:47 +08:00
17dc967c3b
home(plasma): do not back up gtkrc-2.0 2024-05-14 11:40:32 +08:00
2867cba660
home(plasma): persist display output config 2024-05-14 11:26:39 +08:00
cb2d81c9bb
spec(shinkirou): configure plasma inputs 2024-05-14 11:21:11 +08:00
024a7e9e0b
home(plasma): disable home-manager cursor and unify image 2024-05-14 11:20:51 +08:00
5215da3004
global(io): reduce firewall spam 2024-05-14 10:48:16 +08:00
f34569b7e5
spec(shinkirou): enable plasma specialisation 2024-05-14 10:21:10 +08:00
dcc687e743
spec(reimaden): enable plasma specialisation 2024-05-14 10:20:58 +08:00
55f6825ec0
home(plasma): add specialise option 2024-05-14 10:20:46 +08:00
6bc8709ba3
home(plasma): set wallpaper 2024-05-13 11:39:48 +08:00
ab659adf51
spec(koumakyou): add plasma session 2024-05-13 09:43:33 +08:00
a232711bf4
spec(reimaden): add plasma specialisation 2024-05-13 09:23:43 +08:00
1a9e9b3d13
home(plasma): enable home-manager auto replace 2024-05-13 09:16:06 +08:00
43245e92de
home(gui): set catppuccin iconTheme name 2024-05-13 09:15:41 +08:00
57ee24d67d
flake: bump inputs 2024-05-13 08:56:11 +08:00
5522228390
home(plasma): add plasma-manager 2024-05-13 08:55:58 +08:00
326a94df87
home(gui): cleaner defaults 2024-05-13 08:38:38 +08:00
9b39e0a355
flake: bump inputs 2024-05-11 10:30:26 +08:00
560f5f248d
home(foot): disable terminal transparency 2024-05-11 10:30:20 +08:00
062a91e022
spec(koumakyou): boot to gamescope 2024-05-11 00:03:05 +08:00
877a38cb4f
spec(koumakyou): disable decky 2024-05-08 15:22:12 +08:00
9cc3a27a8d
flake: bump inputs 2024-05-05 23:13:53 +08:00
bd1c00318e
spec(yume): enable jetbrains defaults 2024-05-05 20:52:07 +08:00
c6b0899ca9
spec(koumakyou): remove steamos cmdline 2024-05-01 01:48:58 +08:00
94cf766f37
flake: bump inputs 2024-04-30 19:50:42 +08:00
527ceab947
spec(koumakyou): init 2024-04-29 22:36:32 +08:00
1a39cf1fd8
spec(reimaden): enable jetbrains defaults 2024-04-28 11:00:10 +08:00
2cf53ca9e3
home(jetbrains): add jetbrains products and directories 2024-04-28 10:58:54 +08:00
e3400d78d3
flake: bump inputs 2024-04-28 09:36:26 +08:00
6725349ce7
home(util): add jellyfin-media-player 2024-04-22 15:59:18 +08:00
f7b6f9595b
flake: bump inputs 2024-04-22 12:54:50 +08:00
a649ee0554
spec(reimaden): disable headless due to scaling bugs 2024-04-19 09:27:33 +08:00
ea4e700a42
home(foot): enable terminal transparency 2024-04-19 09:24:37 +08:00
ab3ab5f1a2
flake: bump inputs 2024-04-19 08:15:03 +08:00
0146af46f2
flake: bump inputs 2024-04-15 10:33:03 +08:00
a43ab21673
spec(focus): update proxy address 2024-04-11 15:15:55 +08:00
adc8560d0f
global(io): add compat to hosts 2024-04-11 14:44:32 +08:00
2797a26540
spec(chireiden): move trackpad workaround to powerManagement 2024-04-11 14:26:48 +08:00
0a13066c05
spec(eientei): disable vaultwarden registration 2024-04-09 12:17:05 +08:00
8099370300
flake: bump inputs 2024-04-08 22:25:06 +08:00
e66fc46064
spec(eientei): add webauthn nextcloud app 2024-04-08 11:26:41 +08:00
74802d30f6
spec(focus): add webauthn nextcloud app 2024-04-08 11:25:24 +08:00
18df68e2b0
home(auth): float Bitwarden windows 2024-04-08 11:24:37 +08:00
772b24af1b
flake: bump inputs 2024-04-04 11:55:17 +08:00
4d9e68bcd1
spec(web): add home redirects 2024-04-01 11:00:44 +08:00
41fa6e4c52
home(auth): fix allowed_signers file generation 2024-04-01 08:30:50 +08:00
1b81939384
spec(reimaden): enable headless 2024-04-01 08:27:09 +08:00
5774642bd0
home(headless): add headless module 2024-04-01 08:26:47 +08:00
68338b6c7c
global(auth): add utility port to firewall allow 2024-04-01 08:07:29 +08:00
26612665c1
global(auth): translate key list 2024-03-30 14:09:52 +08:00
debed4ec57
global(io): update redir address 2024-03-30 14:01:48 +08:00
5b411ee7a1
spec(focus): update proxy address 2024-03-29 21:47:16 +08:00
9d866e6b9f
global(gpu): remove i915 from initrd when arc is set 2024-03-29 11:02:13 +08:00
4b0d2f17d5
global(io): add netvm to hosts 2024-03-29 10:33:23 +08:00
c5bd00bb3a
global(io): add net-priv hosts 2024-03-29 10:29:57 +08:00
d8300d12b2
flake: compact input lines 2024-03-28 08:37:04 +08:00
804d3fc33a
repo: update gitignore 2024-03-28 08:13:19 +08:00
ce4f256f52
flake: bump inputs 2024-03-28 08:01:16 +08:00
ce851957a4
package(tubesync): bump tubesync 0.13.3 to 0.13.6 2024-03-26 08:57:36 +08:00
c15a5cd45f
global(fs): add ability to customise curl args in alert 2024-03-25 13:15:25 +08:00
2f91346993
spec(focus): enable zfs alerts 2024-03-25 12:46:45 +08:00
f55856760c
spec(eientei): enable zfs alerts 2024-03-25 12:32:01 +08:00
54a4b90257
global(fs): add zfs alerts 2024-03-25 12:31:50 +08:00
df6aa3f8ec
home(util): add sedutil 2024-03-25 09:36:56 +08:00
d5d1a2a9a1
global(virtualbox): add kvm virtualbox host 2024-03-24 11:10:09 +08:00
d2206b9eaf
package(tubesync): patch ffmpeg 2024-03-21 17:11:58 +08:00
4fe84a1074
package(tubesync): patch yt-dlp options to print newlines as progress 2024-03-21 09:06:23 +08:00
b2babbe5ef
flake: bump inputs 2024-03-21 08:30:13 +08:00
43780ee0af
spec(eientei): set zfs_arc_max 2024-03-21 08:14:58 +08:00
033f4ba083
spec(eientei): enable vaultwarden 2024-03-19 09:50:08 +08:00
9a48236cea
spec(eientei): fix frigate firewall interface names 2024-03-19 09:05:57 +08:00
3916a90fa9
home(auth): add ssh ports 2024-03-19 08:56:21 +08:00
9f9e183ba9
spec(eientei): proxy matrix health endpoint 2024-03-18 11:46:47 +08:00
7e9dadf0c6
spec(web): enable uptime-kuma 2024-03-18 11:09:56 +08:00
de11c5ff97
home(gyroflow): move package to module 2024-03-18 09:38:16 +08:00
36700cb0fb
package(tubesync): patch yt-dlp options to disable continue 2024-03-14 18:51:59 +08:00
064f45c1c0
spec(eientei): fix photoprism persistence path 2024-03-14 17:41:14 +08:00
90f7f1bd2d
global(fs): ensure /var/lib/private mode 2024-03-14 17:40:56 +08:00
1ca8221e27
spec(eientei): enable photoview 2024-03-14 10:47:46 +08:00
935fdd1041
flake: bump inputs 2024-03-14 10:46:52 +08:00
3f94cf0f7b
package(tubesync): patch yt-dlp options to ensure integrity 2024-03-14 10:06:54 +08:00
391225f7fc
global(libvirt): add virtiofsd to environment 2024-03-11 21:39:46 +08:00
e88a1120d8
flake: bump inputs 2024-03-11 15:08:00 +08:00
c36f9d216d
spec(eientei): photoprism update path 2024-03-10 15:04:33 +08:00
a2e93cbbca
home(sway): redirect output to file 2024-03-08 19:33:02 +08:00
94d9032534
spec(eientei): photoprism switch to vaapi hwaccel 2024-03-07 21:54:15 +08:00
7ba20e500f
spec(eientei): photoprism remove limits 2024-03-07 08:53:58 +08:00
6434bda836
spec(eientei): photoprism use intel hwaccel 2024-03-07 08:49:53 +08:00
abe77a6b1e
spec(eientei): enable photoprism 2024-03-07 08:39:56 +08:00
91caaebdc8
spec(eientei): disable photoview 2024-03-07 07:58:42 +08:00
4febc2fe56
home(gyroflow): add qtwayland 2024-03-06 14:03:08 +08:00
8cef56dbe8
home(chrome): add ozone wayland environment variable 2024-03-06 13:48:49 +08:00
d28a34f81b
spec(shinkirou): scale login screen 2024-03-06 10:26:31 +08:00
c3f544c19b
flake: bump inputs 2024-03-06 09:09:06 +08:00
e1b94c2c89
spec(eientei): enable photoview 2024-03-05 09:39:03 +08:00
c594e525c5
spec(chireiden): enable libreoffice 2024-03-05 07:52:44 +08:00
910c22553a
global(fs): switch default zfs kernel to lts 2024-03-04 21:31:34 +08:00
6a5a26615b
spec(shinkirou): initial configuration 2024-03-04 21:28:16 +08:00
db76b13f76
package(photoview): add nixos module 2024-03-04 12:14:05 +08:00
d885d396b6
package(photoview): install model data, add ui build info 2024-03-04 12:07:20 +08:00
657dec4d41
package(photoview): package photoview 2024-03-04 09:26:16 +08:00
0d5d6892b2
flake: bump inputs 2024-03-03 21:37:51 +08:00
17c7f75cce
spec(focus): enable zfs replication 2024-03-03 15:04:49 +08:00
bacac0b85b
global(fs): add zfs replication custom ssh port 2024-03-03 15:04:33 +08:00
c962354faf
flake: bump inputs 2024-03-02 18:20:40 +08:00
7322981d7c
spec(focus): increase fastcgi read timeout 2024-02-28 08:57:47 +08:00
584ccb2c64
spec(web): about: update link to server spec 2024-02-24 22:09:39 +08:00
ee77a26af0
spec(web): convert to bundlerEnv 2024-02-24 17:19:50 +08:00
3337b5035b
home: add test password for koishi in vmVariant 2024-02-24 15:35:03 +08:00
bd724cf7b6
flake: bump inputs 2024-02-24 15:08:45 +08:00
48495e0e5e
package(tubesync): add tools called by yt-dlp to PATH 2024-02-23 10:45:54 +08:00
f94d01adb1
package(tubesync): add worker option 2024-02-22 11:24:59 +08:00
4537a35919
package(tubesync): remove umask 2024-02-22 00:45:35 +08:00
928e05d3ba
spec(eientei): enable tubesync 2024-02-22 00:45:24 +08:00
a7c613f7f0
package(tubesync): allow redis access to run directory 2024-02-22 00:01:25 +08:00
ad2afb723c
package(tubesync): create run directory pre-startup 2024-02-21 23:36:27 +08:00
5fe32a7047
package(tubesync): add tubesync application and module 2024-02-21 23:25:06 +08:00
4e5239d5e1
package: add nixos module imports 2024-02-21 21:53:08 +08:00
5d41fbdfac
spec(eientei): change replication user 2024-02-19 15:19:22 +08:00
af2dede82f
global(fs): remove replication compress flag 2024-02-19 15:19:11 +08:00
652f33c559
home(gui): improve catppuccin terminal visibility 2024-02-19 13:58:55 +08:00
e368e797d4
spec(eientei): enable gpu drivers 2024-02-19 12:55:37 +08:00
b53de95bfc
global(gpu): add session checks for session-specific options 2024-02-19 12:55:23 +08:00
8d50a503e9
spec(eientei): add jellyfin packages 2024-02-19 12:36:44 +08:00
183e62a5d8
home(btop): add btop and catppuccin colours 2024-02-18 21:48:47 +08:00
01151c86dd
spec(eientei): add jellyfin 2024-02-18 19:08:27 +08:00
22b42c6f97
spec(eientei): move hass nginx configuration 2024-02-18 18:41:27 +08:00
619fc26a19
spec(focus): enable netdata dashboard 2024-02-18 17:59:23 +08:00
78e30ba26f
spec(focus): remove grafana dashboard 2024-02-18 17:59:13 +08:00
6df07e737b
global(netdata): add netdata module and nginx wrapper 2024-02-18 17:36:49 +08:00
6cb1978191
flake: bump inputs 2024-02-18 12:49:39 +08:00
b285657e3e
spec(eientei): add hass deps 2024-02-17 23:52:50 +08:00
8528e15ee1
spec(incinerator): unlock initrd emergency access 2024-02-15 17:20:28 +08:00
d77c1a1b9a
home(gui): add catppuccin icons 2024-02-15 12:30:07 +08:00
bd265db376
home(swayidle): fix idle commands 2024-02-14 16:47:30 +08:00
8003cb43f9
home(swayidle): set up idle behaviour 2024-02-14 15:38:19 +08:00
c484638137
home(gui): theme mako 2024-02-14 14:47:48 +08:00
577d75a66f
home(gui): fix catppuccin palette 2024-02-14 14:40:48 +08:00
65ebe327ba
home(swaylock): isolate from sway 2024-02-14 13:04:17 +08:00
faf2e37e36
home(sway): switch to swaylock-effects 2024-02-14 12:33:51 +08:00
d26dce3bd8
spec(reimaden): add platform support kernel module 2024-02-14 03:23:48 +08:00
5289e182b5
home(gui): add flake background 2024-02-13 11:55:39 +08:00
ff02ebe9d4
home(sway): set default workspace 2024-02-13 11:26:48 +08:00
ee428e6555
flake: bump inputs 2024-02-13 00:42:30 +08:00
2a75fe8408
spec(chireiden): enable vscode 2024-02-12 23:30:56 +08:00
b59307ba8f
spec(reimaden): enable vscode 2024-02-12 23:30:11 +08:00
3190fb7a89
home(vscode): add vscodium and extensions 2024-02-12 23:29:13 +08:00
62575c3ba1
home(gui): theme sway with catppuccin 2024-02-12 19:25:55 +08:00
861716c4f1
home(gui): add catppuccin gtk and cursor themes 2024-02-12 17:40:58 +08:00
df71826614
global(gpu): greetd settings priority 2024-02-12 17:33:12 +08:00
65c9455aa0
spec(koumakyou): enable gnome 2024-02-12 15:18:12 +08:00
b22947ccee
home(gnome): move desktop backgrounds to share directory 2024-02-12 15:17:57 +08:00
ae8efe415d
home: add networkmanager as an adminGroup 2024-02-10 05:48:08 +08:00
aedc552497
spec(eientei): remove proxy configuration 2024-02-10 05:47:40 +08:00
447b714c35
spec(eientei): convert to global zfs replication 2024-02-10 01:03:54 +08:00
ce3228bb1a
global(fs): fix permission fix 2024-02-10 01:03:36 +08:00
9d3600095c
global(fs): add zfs replication options 2024-02-10 00:57:35 +08:00
740acdc152
spec(focus): convert to global split zfs 2024-02-10 00:32:16 +08:00
53b4aac03c
spec(eientei): convert to global split zfs 2024-02-10 00:23:47 +08:00
a8800dc4d2
global(fs): add missing fs options 2024-02-10 00:20:43 +08:00
2d8b0e4676
global(fs): add zfs split store options 2024-02-10 00:16:09 +08:00
7a6d6da7e4
flake: bump inputs 2024-02-09 22:25:17 +08:00
39d4d3d668
spec(chireiden): add trackpad driver workaround 2024-02-09 22:25:08 +08:00
b7bf44175a
spec(eientei): add replication service 2024-02-09 19:48:11 +08:00
c91fb43e75
home(util): add serial client and mbuffer 2024-02-09 12:40:02 +08:00
36c6364f18
spec(eientei): add sas driver 2024-02-07 22:32:42 +08:00
86b8f74a36
flake: bump inputs 2024-02-06 09:34:05 +08:00
520e4b45c1
flake: bump inputs 2024-02-05 14:23:14 +08:00
ca27ce4835
spec(focus): enable boot-time memory test 2024-02-05 14:17:10 +08:00
1bff6c54cc
spec(focus): pin network interfaces 2024-02-04 22:17:38 +08:00
998eb03ba9
global(boot): add memtest option 2024-02-04 22:17:19 +08:00
c679af9ad9
spec(focus): update nextcloud options 2024-02-03 22:29:38 +08:00
a8f2d68646
spec(focus): fix proxy 2024-02-03 21:47:35 +08:00
41c2d7e21a
spec(eientei): correct forgejo ssh port 2024-02-02 09:31:15 +08:00
9b92e5114a
spec(eientei): add home-assistant mqtt 2024-02-02 09:15:35 +08:00
b5d356066a
spec(eientei): add home-assistant 2024-02-02 09:13:18 +08:00
aaa16e96a2
flake: bump inputs 2024-02-02 07:33:59 +08:00
09250f359d
global(oci): add system-wide persistence 2024-02-02 07:33:48 +08:00
426ae94a2c
spec(eientei): fix proxy 2024-02-02 07:33:30 +08:00
43a16bbd97
spec(eientei): add frigate 2024-02-02 07:33:17 +08:00
1ac76fc7d8
spec(eientei): fix noProxy 2024-02-02 05:13:13 +08:00
293ae30dee
spec(eientei): migrate library configuration 2024-02-02 04:39:50 +08:00
6c82ed722d
spec(eientei): add proxy configuration 2024-02-02 01:59:11 +08:00
18178328c9
spec(eientei): initial configuration 2024-02-01 17:27:06 +08:00
3c607819f3
spec(reimaden): rename public key 2024-02-01 17:24:23 +08:00
d48d34a7ec
flake: bump inputs 2024-01-31 11:47:30 +08:00
2d7d248322
spec(reimaden): rename from eientei 2024-01-31 11:45:26 +08:00
2327b66f21
spec(focus): add grafana dashboard 2024-01-29 17:44:41 +08:00
cf7922469f
spec(focus): rename ethernet via hw address 2024-01-29 17:44:01 +08:00
b7c95aae49
home(gnome): enable tap to click, add terminal themes 2024-01-29 01:13:23 +08:00
092e6ec6bf
home(gnome): disable workspace indicator and install gnome-terminal 2024-01-29 00:48:19 +08:00
4a39ba2835
home(gnome): configure gnome user experience 2024-01-29 00:20:21 +08:00
0fd139f32a
home: add profile pictures 2024-01-29 00:19:57 +08:00
d4084d727e
spec(incinerator): remove unnecessary configuration 2024-01-28 16:52:19 +08:00
9791949795
home(gnome): add gnome desktop 2024-01-28 16:51:53 +08:00
7d36ed93f8
home(plasma): remove plasma desktop 2024-01-28 16:38:17 +08:00
ff835cacae
home(gui): disable hm qt config for plasma since it breaks the wayland session 2024-01-28 11:25:17 +08:00
65d418d211
home(plasma): add plasma desktop 2024-01-28 11:24:48 +08:00
03a59fd081
global(io): betaflight default follow gui 2024-01-28 10:38:51 +08:00
98fffc7020
home(gui): switch to papirus icon theme 2024-01-28 10:38:29 +08:00
48d5286101
home(util): separate BLHeliSuite32 state workaround from dist and add per-user state dir 2024-01-27 22:47:32 +08:00
98764dd12d
global(gpu): rename from gui 2024-01-27 22:14:03 +08:00
35f35177bb
spec(focus): set default nextcloud language 2024-01-27 15:41:25 +08:00
b308634c49
flake: bump inputs 2024-01-27 09:58:08 +08:00
f10728845c
spec(focus): enable nextcloud 2024-01-27 09:56:24 +08:00
6c790f7084
spec(focus): configure nginx 2024-01-27 09:56:16 +08:00
31ae234743
spec(focus): enable postgresql 2024-01-27 09:55:46 +08:00
29877471b0
spec(focus): enable libvirt and acme 2024-01-27 09:55:36 +08:00
831a3d2fec
spec(focus): initial configuration 2024-01-26 13:59:24 +08:00
bb73a52f35
global(fs): add bcachefs 2024-01-24 08:59:12 +08:00
fe5c6095b9
global(kernel): lower priority of default kernel to below mkDefault 2024-01-24 08:38:04 +08:00
71c5f54bf1
global(fs): adjust zfs kernelPackages priority 2024-01-24 08:34:07 +08:00
fbc8611bd3
spec(incinerator): remove postgresql 2024-01-24 08:31:59 +08:00
35477ab873
global(fs): remove btrfs 2024-01-24 08:28:48 +08:00
2c4c1d6031
home(virt-manager): add sway window commands 2024-01-22 11:32:00 +08:00
9c98d4ab67
home(sway): remove vanity options 2024-01-21 20:48:59 +08:00
06ed173b67
global(fs): add zfs external nix store 2024-01-21 20:44:12 +08:00
7e1fce0f6b
global(fs): extPersist -> external 2024-01-21 20:43:50 +08:00
4a8079b3c7
home(gui): enable blueman 2024-01-20 14:20:32 +08:00
b38050ae1b
spec(library): add noatime option 2024-01-20 12:47:00 +08:00
fa24532e09
flake: bump inputs 2024-01-20 12:36:48 +08:00
110a82f4a0
global(fs): add noatime option 2024-01-20 12:35:48 +08:00
1dd3a2ced5
global(gui): add pure nvidia flicker workaround 2024-01-19 21:59:46 +08:00
6f70dcace1
global(gui): add pure nvidia workarounds 2024-01-19 21:25:03 +08:00
eeca9f83ec
spec(yume): initial configuration 2024-01-19 21:23:31 +08:00
cc056933d3
global(auth): remove diag key 2024-01-19 15:50:50 +08:00
5f2c1a5554
flake: bump inputs 2024-01-19 15:48:24 +08:00
26cee2b943
spec(web): add nginx redirect 2024-01-19 15:47:39 +08:00
7928b6ae8a
home(util): add dnsutils and whois 2024-01-19 10:54:55 +08:00
2f6fbf7de7
global(gui): remove withArcFull specialisation since it had no use case 2024-01-17 21:39:34 +08:00
651f5ef0a4
spec(web): enable minimum utils 2024-01-17 19:33:01 +08:00
4b3d8dcc54
home(util): add minimal system option 2024-01-17 19:31:56 +08:00
50bbf32320
spec(web): update deps 2024-01-17 18:58:15 +08:00
818d4fef46
spec(web): set mastodon url 2024-01-17 18:32:51 +08:00
b5b5d6d2cc
home(sway): add --unsupported-gpu conditionally 2024-01-16 17:30:12 +08:00
3b5deb8328
home(minecraft): add floating window rules 2024-01-16 14:23:33 +08:00
7411336146
home(steam): add floating window rules 2024-01-16 14:23:25 +08:00
ff8ae80b87
home(util): add floating window rules 2024-01-16 14:16:35 +08:00
371c32313b
home(util): add ExpressLRS Configurator persistence 2024-01-16 12:12:57 +08:00
8cf7ba7008
home(util): add nvme-cli 2024-01-16 11:59:49 +08:00
db5ca4d9c0
package: deprecate home-grown gyroflow package in favour of nixpkgs 2024-01-15 22:29:23 +08:00
fec4946816
package: migrate gyroflow, expresslrs-configurator and blhelisuite32 2024-01-15 22:22:30 +08:00
e03662e5d7
spec(chireiden): change default frequency governor to powersave 2024-01-15 19:02:18 +08:00
ca8a24cc12
home(util): add BLHeliSuite32 desktop item and icon from MacOS app 2024-01-15 18:57:35 +08:00
44d2356a30
flake: bump inputs 2024-01-15 17:44:39 +08:00
31610d991e
spec(web): about: open gitea links in blank pages and improve wording of prompt tip 2024-01-15 17:15:39 +08:00
88922adaaa
spec(library): enable acme 2024-01-15 17:13:03 +08:00
a58401fd53
spec(web): post: BLHeli32 ESC Startup Music 2024-01-15 17:06:11 +08:00
f5c4f593fb
spec(web): add nginx configuration 2024-01-15 16:56:47 +08:00
c828de6da9
spec(web): enable acme 2024-01-15 15:57:40 +08:00
a8b4476589
global(acme): add acme defaults 2024-01-15 15:57:25 +08:00
55a1aa7673
spec(web): add jekyll website 2024-01-15 15:39:28 +08:00
7ba8268232
home(util): add gimp 2024-01-15 11:19:38 +08:00
8c457e80ca
spec(web): remove headless profile 2024-01-14 12:52:45 +08:00
81108228e4
spec(web): initial configuration 2024-01-14 12:41:57 +08:00
98f8839da1
global(lowmem): add swap and trusted users 2024-01-14 12:41:39 +08:00
51a4e7e426
spec(library): remove redundant configuration 2024-01-13 19:38:54 +08:00
dbc1bf2f57
global(io): improve bluetooth/audio defaults 2024-01-13 19:38:39 +08:00
4c52f76cfd
flake: bump inputs 2024-01-13 16:14:43 +08:00
d58211124f
spec(koumakyou): enable oci runtime 2024-01-12 19:33:39 +08:00
a46a1f8438
home(util): add ExpressLRS configurator 2024-01-12 19:24:57 +08:00
5d13666406
home(util): remove stdenvNoCC from BLHeliSuite32 2024-01-12 19:24:39 +08:00
da67689d66
home(util): link BLHeliSuite32 music directory 2024-01-12 18:05:03 +08:00
1daf15c2d2
home(util): add BLHeliSuite32 2024-01-12 17:50:48 +08:00
0ed1ae29ed
home(gyroflow): change mdk-sdk pname 2024-01-12 17:46:47 +08:00
3bc2b8de79
spec(incinerator): switch to ext4 2024-01-11 15:57:39 +08:00
0bb90521c1
spec(library): disable act_runner host 2024-01-11 14:34:42 +08:00
5332b4ba30
spec(library): add act_runner instance 2024-01-11 14:29:06 +08:00
3a3ca7b67f
global(gui): fix type 2024-01-11 14:15:04 +08:00
d5ea92d819
spec(library): enable oci runtime 2024-01-11 14:04:23 +08:00
016c1bd8c5
global(gui): add default null value to type 2024-01-11 14:03:36 +08:00
a5b5e8a584
spec(koumakyou): enable oci runtime 2024-01-11 14:03:17 +08:00
6421630890
spec(incinerator): enable oci runtime 2024-01-11 14:03:06 +08:00
34c1a15a6c
global(oci): add podman runtime 2024-01-11 13:59:55 +08:00
f9dc00dc6f
home(gyroflow): add enable check to persist 2024-01-11 13:26:49 +08:00
66ef95b2bc
global(fs): set kernel version when zfs is selected 2024-01-11 12:24:14 +08:00
12c0e6b80a
home(gyroflow): remove unnecessary library copies and wrapper variables 2024-01-11 12:22:52 +08:00
8effa50e80
flake: bump inputs 2024-01-11 11:44:09 +08:00
da44b8b009
global(gui): add withArcFull specialisation for always-on offload 2024-01-11 10:59:16 +08:00
db25649f7a
spec(koumakyou): enable gyroflow 2024-01-11 10:52:22 +08:00
5a9abeffb4
spec(eientei): enable gyroflow 2024-01-10 23:49:25 +08:00
2f49bf67c3
home(gyroflow): add package and module 2024-01-10 23:49:00 +08:00
46f64318eb
global(gui): add intel icd 2024-01-10 23:37:33 +08:00
2f191ab3b5
home(util): add gtk theme engines 2024-01-10 23:37:17 +08:00
b262ac5889
home(util): add file 2024-01-10 19:21:40 +08:00
cb57378078
home(util): add zip and unzip 2024-01-10 16:54:03 +08:00
4e868728f6
home(util): add nix-index persistence 2024-01-10 16:31:17 +08:00
fe8064331a
home(util): add nix-index 2024-01-10 15:58:27 +08:00
8fc52ff8b8
spec(eientei): enable libreoffice 2024-01-10 13:38:29 +08:00
d08321b0f3
home(libreoffice): add libreoffice package 2024-01-10 13:38:13 +08:00
66fe3b259a
global(gui): improve withArc specialisation 2024-01-09 19:11:05 +08:00
3d450221e2
spec(eientei): switch to powersave governor 2024-01-09 18:48:40 +08:00
70827d9e06
home(foot): configure font 2024-01-09 17:46:33 +08:00
9c2b8deb66
global(libvirt): add zfs mountpoint 2024-01-09 17:02:15 +08:00
891060bbfa
home: map home persistence to zfs mountpoints 2024-01-09 16:48:49 +08:00
b78ad089aa
global(fs): improve zfs mountpoint handling 2024-01-09 16:48:28 +08:00
9626c59288
spec(eientei): add arc id and enable bootloader timeout 2024-01-09 15:02:59 +08:00
751bc364a6
global(gui): add arc toggle specialisation 2024-01-09 15:02:40 +08:00
6751e43355
global(fs): add zfs comment regarding pool creation 2024-01-09 14:50:30 +08:00
e2ba5275c7
spec(eientei): initial configuration 2024-01-09 14:16:37 +08:00
94ec7b19a4
home(app): isolate app user configuration 2024-01-09 14:10:05 +08:00
70699fb1cf
global(fs): add f2fs and zfs 2024-01-09 13:17:47 +08:00
11ae99a6cc
global(auth): add eientei public key 2024-01-09 13:12:50 +08:00
74b792f9a7
spec(koumakyou): replace machine-id with unique value 2024-01-08 18:19:07 +08:00
ad243dfde5
spec(incinerator): replace machine-id with unique value 2024-01-08 18:18:53 +08:00
0cda0f9f55
global(gui): add specialisation for disabling nvidia under a prime configuration 2024-01-08 09:47:46 +08:00
4185843382
global: rename from faucet 2024-01-07 22:01:31 +08:00
00218778fe
spec(koumakyou): enable all-users minecraft and steam 2024-01-07 21:52:20 +08:00
d87a248675
spec(chireiden): enable app user minecraft and steam 2024-01-07 21:51:53 +08:00
57edd089e3
home: add app user capability 2024-01-07 21:51:34 +08:00
b4a26160c1
home(minecraft): add app user capability 2024-01-07 21:51:12 +08:00
782107a6cf
home(steam): port to home 2024-01-07 21:50:42 +08:00
e9110c0ddf
faucet(gui): switch to proprietary nvidia drivers 2024-01-07 18:00:10 +08:00
26b4a1531a
home(sway): source profile in sway wrapper 2024-01-07 16:14:53 +08:00
ec81beb9b4
home(gui): unify qt theme 2024-01-07 14:47:25 +08:00
489e00046b
spec(chireiden): enable power management 2024-01-07 14:09:44 +08:00
a737bdc0f7
spec(koumakyou): enable steam and power management 2024-01-07 13:58:45 +08:00
7b69fd8b02
faucet(steam): add steam program and directories 2024-01-07 13:58:29 +08:00
82b76c07f2
home(minecraft): add jdk8 package 2024-01-07 13:57:59 +08:00
81a36885c4
spec(library): add matrix and coturn service 2024-01-06 19:22:04 +08:00
ec02a276ab
flake: bump inputs 2024-01-06 17:40:14 +08:00
efd2708d82
spec(koumakyou): initial configuration 2024-01-05 22:27:04 +08:00
40223b90be
home(minecraft): add check to persistence 2024-01-05 22:26:34 +08:00
9c1663a832
home(minecraft): add prism launcher 2024-01-05 22:24:55 +08:00
ae6a095260
faucet(asusd): add asusd service 2024-01-05 22:24:35 +08:00
02bce18970
faucet(gui): improve driver selection correctness 2024-01-05 22:23:41 +08:00
15ef67ce4f
spec(library): add allowed port 2024-01-05 20:47:25 +08:00
9ec1e4ccaf
spec(chireiden): enable android tools 2024-01-05 18:02:07 +08:00
4218349fde
faucet(adb): add android tools 2024-01-05 18:00:51 +08:00
65e421b127
home(util): add helpful packages 2024-01-05 13:40:16 +08:00
697860e173
home(sway): bind pavucontrol 2024-01-05 10:59:21 +08:00
9f1c4217b1
home(mpv): enable mpv and add va configuration 2024-01-05 09:26:49 +08:00
b9b47f268e
faucet(gui): configure video acceleration 2024-01-05 09:26:14 +08:00
a901f2c503
home(imv): add gui check 2024-01-05 09:11:07 +08:00
5d1967aace
home(imv): enable imv 2024-01-05 09:10:01 +08:00
aee395adc9
home(util): add thunar 2024-01-05 09:08:15 +08:00
2857db1be2
spec(incinerator): add lib 2024-01-05 08:46:03 +08:00
44064655ad
spec(incinerator): add postgresql service 2024-01-05 08:44:41 +08:00
1488a50a06
spec(incinerator): add config loader 2024-01-05 08:44:26 +08:00
b64778a370
spec(incinerator): initial configuration 2024-01-05 08:41:30 +08:00
89cc35ec03
faucet(fs): fix bad efi partition uuid default 2024-01-05 08:41:01 +08:00
a6d79a17d6
flake: bump inputs 2024-01-05 00:39:57 +08:00
3782c18331
spec(library): add forgejo service 2024-01-05 00:37:22 +08:00
086c5c5458
spec(library): add nextcloud service 2024-01-05 00:37:06 +08:00
b3a780eebd
spec(library): add nginx service, add acme 2024-01-05 00:36:49 +08:00
e54c40691e
spec(library): add postgresql service 2024-01-05 00:35:50 +08:00
38535fa9bb
spec(library): initial configuration 2024-01-05 00:35:10 +08:00
ec7f144116
home(foot): set term variable to something sane 2024-01-04 23:53:44 +08:00
2741d8655a
faucet(auth): add diagnostic key 2024-01-04 17:28:16 +08:00
a047d81561
spec(chireiden): enable extPersist device 2024-01-04 15:37:18 +08:00
985fdf6e7b
spec(chireiden): enable secure boot 2024-01-04 15:24:09 +08:00
63c9789ce1
faucet(boot): set up sbctl unconditionally 2024-01-04 15:14:28 +08:00
7693203e92
faucet(fs): bind /tmp to on-disk storage 2024-01-04 15:03:54 +08:00
8cbaa7800c
home(virt-manager): add gui check 2024-01-04 14:22:27 +08:00
99a43b025f
home(sway): enable wrapper features 2024-01-04 14:21:47 +08:00
1e2a28bb3e
home(virt-manager): add virt-manager settings 2024-01-04 13:51:17 +08:00
53e78820ea
faucet(libvirt): add libvirtd group 2024-01-04 13:50:47 +08:00
3b7dc23b91
home(util): add helpful packages and persistence 2024-01-04 12:26:34 +08:00
db0dcd6012
faucet(util): remove irrelevant config 2024-01-04 12:19:17 +08:00
f4367119d3
home(mako): enable service 2024-01-04 11:59:51 +08:00
012d405704
home(wofi): fix sway menu command 2024-01-04 11:54:27 +08:00
0b6a5ac144
home(wofi): move sway menu command 2024-01-04 11:54:14 +08:00
a12235d3ea
home(sway): add sway configuration 2024-01-04 11:48:30 +08:00
7bbb97667d
home(i3status): add i3status setup 2024-01-04 11:48:09 +08:00
80ea913446
home(wofi): add wofi config for drun 2024-01-04 11:46:56 +08:00
76bb62afe1
home(gui): remove unrelated configuration 2024-01-04 11:46:31 +08:00
0207a7b471
home(gui): fix screenshot, customise bar, add gaps 2024-01-04 10:34:44 +08:00
fb59579563
faucet(libvirt): add service configuration and persist 2024-01-03 16:59:17 +08:00
bfbc9a462c
home(chrome): move relevant nixos configuration 2024-01-03 16:42:10 +08:00
bd6447d131
home(gui): theme gtk 2024-01-03 16:38:30 +08:00
9a54a5784a
home(gui): set cursor theme 2024-01-03 16:29:51 +08:00
1125f0be3b
faucet(gui): set regreet gtk theme 2024-01-03 16:23:25 +08:00
2beaa127c5
home(gui): add gtk themes 2024-01-03 16:23:05 +08:00
ae5e0698d4
faucet(gui): add regreet fit mode 2024-01-03 15:39:30 +08:00
e83ef935c3
home(gui): add desktop background 2024-01-03 15:38:52 +08:00
edb67df19e
home(gui): add base sway configuration 2024-01-03 15:29:21 +08:00
a4ade5b099
home(chrome): add chrome package and wayland args 2024-01-03 15:27:15 +08:00
200 changed files with 7818 additions and 244 deletions

2
.gitignore vendored
View file

@ -1 +1,3 @@
result-*
result
repl-result-*

View file

@ -1,22 +0,0 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.faucet.fs;
in {
options.faucet.fs.btrfs = {
options = mkOption {
type = with types; listOf str;
default = [ "noatime" "compress=zstd" ];
description = "btrfs mount options";
};
};
config = mkIf (cfg.type == "btrfs") {
fileSystems."/nix" =
{ inherit (cfg.btrfs) options;
device = "/dev/disk/by-uuid/${cfg.store}";
fsType = "btrfs";
};
};
}

View file

@ -1,61 +0,0 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.faucet.gui;
in {
imports = [
./plymouth.nix
./greetd.nix
];
options.faucet.gui = {
enable = mkEnableOption "various setup required for GUI and support software";
session = mkEnableOption "software required for a graphical session" // { default = true; };
type = mkOption {
type = with types; enum [ "intel" "amdgpu" "nvidia" "prime" ];
description = "type of graphics acceleration used";
};
prime = {
integrated = mkOption {
type = with types; str;
default = "i915";
description = "integrated gpu driver";
};
};
};
config = mkIf cfg.enable {
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
services.xserver.videoDrivers =
optional ((cfg.type == "nvidia") || (cfg.type == "prime")) "nvidia" ++
optional (cfg.type == "amdgpu") "amdgpu";
# inhibits default display manager
services.xserver.displayManager.startx.enable = mkDefault true;
hardware.nvidia = mkIf ((cfg.type == "nvidia") || (cfg.type == "prime")) {
modesetting.enable = true;
nvidiaSettings = true;
prime = mkIf (cfg.type == "prime") {
offload = {
enable = true;
enableOffloadCmd = true;
};
};
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true;
};
boot.initrd.kernelModules =
optional (cfg.type == "amdgpu") "amdgpu" ++
optional (cfg.type == "prime") cfg.prime.integrated;
};
}

View file

@ -1,17 +0,0 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.faucet.gui;
in mkIf (cfg.enable && cfg.session) {
programs.regreet = {
enable = true;
cageArgs = [ "-s" "-d" "-m" "last" ];
settings = {
background.path = ../../share/54345906_p0.jpg;
gtk.application_prefer_dark_theme = true;
};
};
environment.persistence."/nix/persist/fhs".directories = [ "/var/cache/regreet" ];
}

View file

@ -1,17 +0,0 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.faucet.util;
in {
options.faucet.util = { };
config = {
programs.zsh.enable = true;
environment.shells = singleton pkgs.zsh;
environment.systemPackages = with pkgs; [
pciutils
];
};
}

204
flake.lock generated
View file

@ -1,30 +1,33 @@
{
"nodes": {
"catppuccin": {
"locked": {
"lastModified": 1734057772,
"narHash": "sha256-waF/2Y39JXJ4kG3zawmw1J1GxPHopyoOkJKJhfJ7RBs=",
"owner": "catppuccin",
"repo": "nix",
"rev": "20b6328df20ae45752c81311d225fd47cba32483",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "nix",
"type": "github"
}
},
"crane": {
"inputs": {
"flake-compat": [
"lanzaboote",
"flake-compat"
],
"flake-utils": [
"lanzaboote",
"flake-utils"
],
"nixpkgs": [
"lanzaboote",
"nixpkgs"
],
"rust-overlay": [
"lanzaboote",
"rust-overlay"
]
},
"locked": {
"lastModified": 1681177078,
"narHash": "sha256-ZNIjBDou2GOabcpctiQykEQVkI8BDwk7TyvlWlI4myE=",
"lastModified": 1717535930,
"narHash": "sha256-1hZ/txnbd/RmiBPNUs7i8UQw2N89uAK3UzrGAWdnFfU=",
"owner": "ipetkov",
"repo": "crane",
"rev": "0c9f468ff00576577d83f5019a66c557ede5acf6",
"rev": "55e7754ec31dac78980c8be45f8a28e80e370946",
"type": "github"
},
"original": {
@ -36,11 +39,11 @@
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
@ -56,11 +59,11 @@
]
},
"locked": {
"lastModified": 1704152458,
"narHash": "sha256-DS+dGw7SKygIWf9w4eNBUZsK+4Ug27NwEWmn2tnbycg=",
"lastModified": 1733312601,
"narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "88a2cd8166694ba0b6cb374700799cec53aef527",
"rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9",
"type": "github"
},
"original": {
@ -77,11 +80,11 @@
]
},
"locked": {
"lastModified": 1680392223,
"narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=",
"lastModified": 1717285511,
"narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5",
"rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8",
"type": "github"
},
"original": {
@ -95,11 +98,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@ -113,11 +116,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
@ -135,11 +138,11 @@
]
},
"locked": {
"lastModified": 1660459072,
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
@ -155,11 +158,11 @@
]
},
"locked": {
"lastModified": 1704100519,
"narHash": "sha256-SgZC3cxquvwTN07vrYYT9ZkfvuhS5Y1k1F4+AMsuflc=",
"lastModified": 1734093295,
"narHash": "sha256-hSwgGpcZtdDsk1dnzA0xj5cNaHgN9A99hRF/mxMtwS4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6e91c5df192395753d8e6d55a0352109cb559790",
"rev": "66c5d8b62818ec4c1edb3e941f55ef78df8141a8",
"type": "github"
},
"original": {
@ -170,11 +173,11 @@
},
"impermanence": {
"locked": {
"lastModified": 1703656108,
"narHash": "sha256-hCSUqdFJKHHbER8Cenf5JRzjMlBjIdwdftGQsO0xoJs=",
"lastModified": 1731242966,
"narHash": "sha256-B3C3JLbGw0FtLSWCjBxU961gLNv+BOOBC6WvstKLYMw=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "033643a45a4a920660ef91caa391fbffb14da466",
"rev": "3ed3f0eaae9fcc0a8331e77e9319c8a4abd8a71a",
"type": "github"
},
"original": {
@ -184,6 +187,25 @@
"type": "github"
}
},
"jovian": {
"inputs": {
"nix-github-actions": "nix-github-actions",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1734162608,
"narHash": "sha256-m2AX+3eiVqIK6uO7GbGY7SFnkkYOlR5fQiNI0eRvWOQ=",
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"rev": "31bdf4c7c91204d65afbde01146deee0259a8fb7",
"type": "github"
},
"original": {
"owner": "Jovian-Experiments",
"repo": "Jovian-NixOS",
"type": "github"
}
},
"lanzaboote": {
"inputs": {
"crane": "crane",
@ -197,27 +219,49 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1682802423,
"narHash": "sha256-Fb5TeRTdvUlo/5Yi2d+FC8a6KoRLk2h1VE0/peMhWPs=",
"lastModified": 1718178907,
"narHash": "sha256-eSZyrQ9uoPB9iPQ8Y5H7gAmAgAvCw3InStmU3oEjqsE=",
"owner": "nix-community",
"repo": "lanzaboote",
"rev": "64b903ca87d18cef2752c19c098af275c6e51d63",
"rev": "b627ccd97d0159214cee5c7db1412b75e4be6086",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "v0.3.0",
"ref": "v0.4.1",
"repo": "lanzaboote",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"jovian",
"nixpkgs"
]
},
"locked": {
"lastModified": 1729697500,
"narHash": "sha256-VFTWrbzDlZyFHHb1AlKRiD/qqCJIripXKiCSFS8fAOY=",
"owner": "zhaofengli",
"repo": "nix-github-actions",
"rev": "e418aeb728b6aa5ca8c5c71974e7159c2df1d8cf",
"type": "github"
},
"original": {
"owner": "zhaofengli",
"ref": "matrix-name",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1703961334,
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
"lastModified": 1733392399,
"narHash": "sha256-kEsTJTUQfQFIJOcLYFt/RvNxIK653ZkTBIs4DG+cBns=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
"rev": "d0797a04b81caeae77bcff10a9dde78bc17f5661",
"type": "github"
},
"original": {
@ -229,30 +273,65 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1678872516,
"narHash": "sha256-/E1YwtMtFAu2KUQKV/1+KFuReYPANM2Rzehk84VxVoc=",
"lastModified": 1710695816,
"narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9b8e5abb18324c7fe9f07cb100c3cd4a29cda8b8",
"rev": "614b4613980a522ba49f0d194531beddbb7220d3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1733940404,
"narHash": "sha256-Pj39hSoUA86ZePPF/UXiYHHM7hMIkios8TYG29kQT4g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5d67ea6b4b63378b9c13be21e2ec9d1afc921713",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"plasma-manager": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1733858086,
"narHash": "sha256-h2BDIDKiqgMpA6E+mu0RgMGy3FeM6k+EuJ9xgOQ1+zw=",
"owner": "pjones",
"repo": "plasma-manager",
"rev": "7e2010249529931a3848054d5ff0dbf24675ab68",
"type": "github"
},
"original": {
"owner": "pjones",
"repo": "plasma-manager",
"type": "github"
}
},
"pre-commit-hooks-nix": {
"inputs": {
"flake-compat": [
"lanzaboote",
"flake-compat"
],
"flake-utils": [
"lanzaboote",
"flake-utils"
],
"gitignore": "gitignore",
"nixpkgs": [
"lanzaboote",
@ -261,11 +340,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1681413034,
"narHash": "sha256-/t7OjNQcNkeWeSq/CFLYVBfm+IEnkjoSm9iKvArnUUI=",
"lastModified": 1717664902,
"narHash": "sha256-7XfBuLULizXjXfBYy/VV+SpYMHreNRHk9nKMsm1bgb4=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "d3de8f69ca88fb6f8b09e5b598be5ac98d28ede5",
"rev": "cc4d466cb1254af050ff7bdf47f6d404a7c646d1",
"type": "github"
},
"original": {
@ -276,12 +355,15 @@
},
"root": {
"inputs": {
"catppuccin": "catppuccin",
"flake-parts": "flake-parts",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"impermanence": "impermanence",
"jovian": "jovian",
"lanzaboote": "lanzaboote",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2",
"plasma-manager": "plasma-manager"
}
},
"rust-overlay": {
@ -296,11 +378,11 @@
]
},
"locked": {
"lastModified": 1682129965,
"narHash": "sha256-1KRPIorEL6pLpJR04FwAqqnt4Tzcm4MqD84yhlD+XSk=",
"lastModified": 1717813066,
"narHash": "sha256-wqbRwq3i7g5EHIui0bIi84mdqZ/It1AXBSLJ5tafD28=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "2c417c0460b788328220120c698630947547ee83",
"rev": "6dc3e45fe4aee36efeed24d64fc68b1f989d5465",
"type": "github"
},
"original": {

View file

@ -3,24 +3,21 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
impermanence.url = "github:nix-community/impermanence/master";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
plasma-manager.url = "github:pjones/plasma-manager";
plasma-manager.inputs.nixpkgs.follows = "nixpkgs";
plasma-manager.inputs.home-manager.follows = "home-manager";
catppuccin.url = "github:catppuccin/nix";
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.1";
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.3.0";
inputs.nixpkgs.follows = "nixpkgs";
};
# steamdeck
jovian.url = "github:Jovian-Experiments/Jovian-NixOS";
};
outputs = inputs:

20
global/acme/default.nix Normal file
View file

@ -0,0 +1,20 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.acme;
in {
options.global.acme = {
enable = mkEnableOption "ACME SSL certificates";
};
config = mkIf cfg.enable {
security.acme = {
acceptTerms = true;
defaults.email = mkDefault "koishi@514fpv.one";
defaults.group = config.services.nginx.group;
};
environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/acme" ];
};
}

View file

@ -0,0 +1,17 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.android;
in {
options.global.android = {
enable = mkEnableOption "android tools";
};
config = mkIf cfg.enable {
programs.adb.enable = true;
# allow device access by admin users
users.adminGroups = [ "adbusers" ];
};
}

18
global/asusd/default.nix Normal file
View file

@ -0,0 +1,18 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.asusd;
in {
options.global.asusd = {
enable = mkEnableOption "ASUS laptop userland support daemon";
};
config = mkIf cfg.enable {
services.asusd.enable = true;
environment.persistence."/nix/persist/fhs".directories = [
"/etc/asusd"
];
};
}

View file

@ -2,20 +2,22 @@
, lib
, config
, ... }: with lib; let
cfg = config.faucet.auth;
cfg = config.global.auth;
pub = lib.pipe ./pub [
builtins.readDir
(lib.filterAttrs (n: ty: ty == "regular"))
(lib.mapAttrsToList (n: _: builtins.readFile ./pub/${n}))
(foldr (payload: keys: (splitString "\n" payload) ++ keys) [ ])
(foldr (candidate: keys: keys ++ (if candidate == "" then [ ] else [ candidate ])) [ ])
];
in {
options.faucet.auth = {
options.global.auth = {
enable = mkEnableOption "identity authentication in various software" // { default = true; };
openssh = {
enable = mkEnableOption "openssh server";
password = mkEnableOption "password authentication";
publicKeys = mkOption {
type = with types; listOf str;
type = with types; listOf singleLineStr;
default = pub;
description = "list of trusted openssh keys";
};
@ -40,7 +42,7 @@ in {
settings.PasswordAuthentication = cfg.openssh.password;
};
networking.firewall.allowedTCPPorts = [ ] ++
networking.firewall.allowedTCPPorts = [ 1300 ] ++ # utility port
optional (cfg.openssh.enable && (cfg.openssh.port != null)) cfg.openssh.port;
environment.persistence."/nix/persist/fhs".directories = [ ] ++

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJnhMCGSLMY+QldeCTaRovmfuzKdJsllQy9XinN2JU2z koishi@eientei

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHKCA0/6dsdVyLEgzWt8+u5lWVc0o6A3MY4M2Hf2BT8h koishi@hakugyokurou

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINJOoXrfB4D8Vi6HH4E7RqHHIWhPPqEiiOeLRfggW1XZ koishi@koumakyou

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGIZq1mD3J1cgWK61okXx3hQSe+5g3UTBfAf4RHkkFVd koishi@reimaden

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDwV7Z+PDC8ARRj1LxUJlv59gJ3A84LCMMyMSqLtRtuQ koishi@shinkirou

1
global/auth/pub/yume.pub Normal file
View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPdzq2g13LEyxTZnA0HQ5hMEp4XNh0TOB/KY1bRwjsaq koishi@yume

View file

@ -2,12 +2,17 @@
, lib
, config
, ... }: with lib; let
cfg = config.faucet.boot;
cfg = config.global.boot;
in {
options.faucet.boot = {
options.global.boot = {
enable = mkEnableOption "bootloader installation and maintenance" // { default = true; };
systemd-boot = mkEnableOption "generation selection via systemd-boot" // { default = !cfg.lanzaboote; };
lanzaboote = mkEnableOption "secure boot maintenance via lanzaboote";
memtest = mkOption {
type = with types; nullOr int;
default = null;
description = "memtest passes to perform on boot";
};
};
config = let
@ -20,10 +25,11 @@ in {
loader.systemd-boot.enable = cfg.systemd-boot;
loader.efi.canTouchEfiVariables = true;
tmp.cleanOnBoot = true;
kernelParams = optional (cfg.memtest != null) "memtest=${toString cfg.memtest}";
};
# symlink for sbctl
environment.etc.secureboot = mkIf cfg.lanzaboote { source = sbPath; };
#environment.systemPackages = optional cfg.lanzaboote pkgs.sbctl;
environment.etc.secureboot.source = sbPath;
environment.systemPackages = [ pkgs.sbctl ];
};
}

View file

@ -0,0 +1,17 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.flatpak;
in {
options.global.flatpak = {
enable = mkEnableOption "flatpak sandbox";
};
config = mkIf cfg.enable {
services.flatpak.enable = true;
xdg.portal.enable = true;
users.home.persist.directories = [ ".local/share/flatpak" ".var" ];
environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/flatpak" ];
};
}

22
global/fs/bcachefs.nix Normal file
View file

@ -0,0 +1,22 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.fs;
in {
options.global.fs.bcachefs = {
options = mkOption {
type = with types; listOf str;
default = [ "noatime" "compression=zstd" ];
description = "bcachefs mount options";
};
};
config = mkIf (cfg.type == "bcachefs") {
fileSystems."/nix" =
{ inherit (cfg.bcachefs) options;
device = "/dev/disk/by-uuid/${cfg.store}";
fsType = "bcachefs";
};
};
}

View file

@ -2,34 +2,36 @@
, lib
, config
, ... }: with lib; let
cfg = config.faucet.fs;
cfg = config.global.fs;
in {
imports = [
./ext4.nix
./f2fs.nix
./xfs.nix
#./bcachefs.nix
./btrfs.nix
./bcachefs.nix
./zfs
];
options.faucet.fs = {
options.global.fs = {
type = mkOption {
type = with types; enum [ "ext4" "xfs" "bcachefs" "btrfs" ];
type = with types; enum [ "ext4" "f2fs" "xfs" "zfs" "bcachefs" ];
default = "bcachefs";
description = "filesystem type to use for persistent state storage";
};
store = mkOption {
type = with types; str;
default = config.networking.hostName;
description = "UUID/dataset of nix store backing device";
};
esp = {
enable = mkEnableOption "EFI system partition" // { default = true; };
uuid = mkOption {
type = with types; str;
default = "cafebabe";
default = "CAFE-BABE";
description = "vfat serial number of EFI system partition";
};
};
extPersist = {
external = {
enable = mkEnableOption "external persist filesystem";
# this wraps the standard fileSystems module
# since some attrs have to be unconditionally set
@ -70,10 +72,15 @@ in {
{ device = "/dev/disk/by-uuid/${cfg.esp.uuid}";
fsType = "vfat";
};
fileSystems."/nix/persist" = mkIf cfg.extPersist.enable
{ inherit (cfg.extPersist) device fsType options;
fileSystems."/nix/persist" = mkIf cfg.external.enable
{ inherit (cfg.external) device fsType options;
neededForBoot = true;
depends = "/nix";
depends = [ "/nix" ];
};
fileSystems."/tmp" =
{ device = "/nix/tmp";
options = [ "bind" ];
depends = [ "/nix/tmp" ];
};
services.fstrim.enable = mkIf ((cfg.type == "ext4") || (cfg.type == "xfs")) true;
@ -83,5 +90,10 @@ in {
inherit (cfg.cryptsetup) allowDiscards bypassWorkqueues;
device = "/dev/disk/by-uuid/${uuid}";
}) cfg.cryptsetup.uuids);
environment.persistence."/nix/persist/fhs".files = [ {
file = "/var/lib/private/mode";
parentDirectory.mode = "0700";
} ];
};
}

View file

@ -1,10 +1,11 @@
{ lib
, config
, ... }: with lib; let
cfg = config.faucet.fs;
cfg = config.global.fs;
in mkIf (cfg.type == "ext4") {
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/${cfg.store}";
fsType = "ext4";
options = [ "noatime" ];
};
}

10
global/fs/f2fs.nix Normal file
View file

@ -0,0 +1,10 @@
{ lib
, config
, ... }: with lib; let
cfg = config.global.fs;
in mkIf (cfg.type == "f2fs") {
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/${cfg.store}";
fsType = "f2fs";
};
}

View file

@ -1,11 +1,12 @@
{ lib
, config
, ... }: with lib; let
cfg = config.faucet.fs;
cfg = config.global.fs;
in mkIf (cfg.type == "xfs") {
# NOTE: -m reflink=1
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/${cfg.store}";
fsType = "xfs";
options = [ "noatime" ];
};
}

122
global/fs/zfs/alert.nix Normal file
View file

@ -0,0 +1,122 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.fs.zfs.alert;
backend = {
text = pkgs.writeShellScript "telegram-text" ''
set -e
source ${cfg.secret}
${pkgs.curl}/bin/curl -sG \
--data-urlencode "chat_id=$CHATID" \
--data-urlencode "text=$ALERT" \
$CURL_EXTRA_ARGS \
"https://api.telegram.org/bot$APIKEY/sendMessage"
'';
image = pkgs.writeShellScript "telegram-image" ''
set -e
source ${cfg.secret}
${pkgs.curl}/bin/curl -sG \
-F "chat_id=$CHATID" \
-F "caption=$ALERT" \
-F "photo=@-" \
$CURL_EXTRA_ARGS \
"https://api.telegram.org/bot$APIKEY/sendPhoto"
'';
};
zedAlert = pkgs.writeShellScript "zed-alert" ''
set -e
export BODY="$(cat)"
# add tag
ALERT="$1 #zfs"
export ALERT
echo -e "$BODY" | \
${pkgs.imagemagick}/bin/convert \
-size 1500x2000 xc:black \
-font "${pkgs.freefont_ttf}/share/fonts/truetype/FreeMono.ttf" \
-pointsize 16 \
-fill white -annotate +15+80 "@-" \
-trim -bordercolor "#000" \
-border 32 +repage \
png:- | \
${backend.image}
'';
mdadmAlert = pkgs.writeShellScript "mdadm-alert" ''
set -e
EVENT="$1"
ARRAY="$2"
DEVICE="$3"
# fallback alert
ALERT="$EVENT | $ARRAY | $DEVICE"
case $EVENT in
DegradedArray)
ALERT="Array $ARRAY is in a degraded state"
;;
DeviceDisappeared)
ALERT="Array $ARRAY disappeared"
;;
Fail)
ALERT="Array $ARRAY encountered failure of component $DEVICE"
;;
FailSpare)
ALERT="Array $ARRAY encountered failure of spare component $DEVICE during rebuild"
;;
MoveSpare)
ALERT="Spare $DEVICE moved to array $ARRAY"
;;
NewArray)
ALERT="Array $ARRAY appeared"
;;
Rebuild??)
ALERT="Array $ARRAY rebuild is now $(echo $EVENT | ${pkgs.sedutil}/bin/sed 's/Rebuild//')% complete"
;;
RebuildFinished)
ALERT="Rebuild of array $ARRAY has concluded"
;;
RebuildStarted)
ALERT="Rebuild of array $ARRAY has started"
;;
SpareActive)
ALERT="Spare $DEVICE activated in array $ARRAY"
;;
SparesMissing)
ALERT="Array $ARRAY missing one or more spares"
;;
TestMessage)
ALERT="Test message generated for array $ARRAY"
;;
esac
# add tag
ALERT="$ALERT #swraid"
export ALERT
exec ${backend.text}
'';
in mkIf (cfg.secret != null) {
services.zfs.zed = mkIf cfg.zed {
settings = {
ZED_EMAIL_ADDR = [ "root" ];
ZED_EMAIL_PROG = toString zedAlert;
ZED_EMAIL_OPTS = "'@SUBJECT@'";
ZED_NOTIFY_INTERVAL_SECS = 3600;
ZED_NOTIFY_VERBOSE = false;
ZED_USE_ENCLOSURE_LEDS = true;
ZED_SCRUB_AFTER_RESILVER = false;
};
};
global.fs.zfs.split.mdProg = mkIf cfg.swraid (toString mdadmAlert);
}

105
global/fs/zfs/default.nix Normal file
View file

@ -0,0 +1,105 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.fs;
in {
imports = [
./alert.nix
./split.nix
./replication.nix
];
# -o ashift=12
# -O encryption=on -O keyformat=passphrase -O keylocation=prompt
# -O compression=on -O mountpoint=none -O xattr=sa -O acltype=posixacl
options.global.fs.zfs = {
alert = {
zed = mkEnableOption "zfs event alerts" // { default = true; };
swraid = mkEnableOption "software raid alerts" // { default = true; };
secret = mkOption {
type = with types; nullOr str;
default = null;
description = "path to alert secrets";
};
};
persist = mkOption {
type = with types; str;
default = cfg.store;
description = ''
pool for persist dataset
defaults to nix store dataset
'';
};
mountpoints = mkOption {
type = with types; attrsOf str;
description = "zfs dataset mountpoints";
};
externalStore = mkEnableOption "external nix store filesystem";
split = {
enable = mkEnableOption "zfs state with split nix store";
mdProg = mkOption {
type = with types; str;
default = "/usr/bin/true";
description = "mdadm PROGRAM config value";
};
secret = mkOption {
type = with types; str;
description = "UUID of secret filesystem";
};
store = mkOption {
type = with types; str;
description = "UUID of store filesystem";
};
};
replication = {
enable = mkEnableOption "zfs replication to remote";
remote = mkOption {
type = with types; str;
description = "remote host as replication destination";
};
port = mkOption {
type = with types; port;
description = "ssh port of replication target";
default = 22;
};
datasets = mkOption {
type = with types; listOf str;
default = [ "persist" "service" "storage" ];
description = "list of filesystems to perform replication for";
};
sendOptions = mkOption {
type = with types; str;
default = "w";
description = "send options for all datasets";
};
};
};
config = mkIf (cfg.type == "zfs") {
fileSystems = (mapAttrs (path: dataset: {
device = "${cfg.zfs.persist}/${dataset}";
fsType = "zfs";
options = [ "zfsutil" ];
# required by impermanence
neededForBoot = true;
}) cfg.zfs.mountpoints) // {
"/nix" = (if !cfg.zfs.externalStore then
{ device = "${cfg.store}/nix";
fsType = "zfs";
} else
{ inherit (cfg.external) device fsType options; });
};
global.fs.zfs.mountpoints."/nix/persist" = "persist";
services.zfs.trim.enable = true;
services.zfs.autoSnapshot.enable = true;
services.zfs.autoScrub.enable = true;
boot.zfs.devNodes = mkDefault "/dev/disk/by-partuuid";
#boot.kernelPackages = mkDefault config.boot.zfs.package.latestCompatibleLinuxPackages;
global.kernel.lts = mkDefault true;
};
}

View file

@ -0,0 +1,30 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.fs.zfs.replication;
in mkIf cfg.enable {
services.syncoid = {
enable = mkDefault true;
interval = mkDefault "daily";
sshKey = mkDefault "/var/lib/syncoid/.ssh/id_ed25519";
commonArgs = [
"--recursive"
"--mbuffer-size=128M"
"--delete-target-snapshots"
"--sshport=${toString cfg.port}"
];
localSourceAllow = mkOptionDefault [ "mount" ];
commands = (lists.foldr (name: commands: commands // {
"${config.global.fs.store}/${name}" = {
inherit (cfg) sendOptions;
target = "${cfg.remote}/${name}";
};
}) { }) cfg.datasets;
};
users.users.syncoid.uid = 82;
users.groups.syncoid.gid = 82;
environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/syncoid" ];
}

35
global/fs/zfs/split.nix Normal file
View file

@ -0,0 +1,35 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.fs.zfs.split;
in mkIf cfg.enable {
# unconditionally enable fstrim for xfs and ext4
services.fstrim.enable = mkDefault true;
# enable swraid for split raid1 system array
boot.swraid.enable = mkDefault true;
boot.swraid.mdadmConf = mkDefault ''
PROGRAM ${cfg.mdProg}
'';
# secret filesystem backed by swraid
fileSystems."/nix/var/secret" =
{ device = "/dev/disk/by-uuid/${cfg.secret}";
fsType = "ext4";
options = [ "noatime" ];
neededForBoot = true;
depends = [ "/nix/var" ];
};
# external store backed by swraid
global.fs = {
zfs.externalStore = mkDefault true;
external.device = "/dev/disk/by-uuid/${cfg.store}";
external.fsType = "xfs";
external.options = [ "noatime" ];
};
# import system state pool after encrypted filesystems become available for key loading
boot.initrd.systemd.services."zfs-import-${config.global.fs.store}".after = [ "sysroot-nix-var-secret.mount" "cryptsetup.target" ];
}

111
global/gpu/default.nix Normal file
View file

@ -0,0 +1,111 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.gpu;
intel = cfg.type == "intel" || (cfg.type == "prime" && config.hardware.nvidia.prime.intelBusId != "");
amdgpu = cfg.type == "amdgpu" || (cfg.type == "prime" && config.hardware.nvidia.prime.amdgpuBusId != "");
nvidia = cfg.type == "nvidia" || cfg.type == "prime";
in {
imports = [
./plymouth.nix
./greetd.nix
];
options.global.gpu = {
enable = mkEnableOption "various setup required for GUI and support software";
session = mkEnableOption "software required for a graphical session" // { default = true; };
type = mkOption {
type = with types; nullOr (enum [ "intel" "amdgpu" "nvidia" "prime" ]);
default = null;
description = "type of graphics acceleration used";
};
arc = mkOption {
type = with types; nullOr str;
default = null;
description = "intel arc PCI ID if installed, enables toggling the arc before boot";
};
};
config = mkIf cfg.enable {
hardware.graphics = {
enable = true;
enable32Bit = true;
# https://nixos.wiki/wiki/Accelerated_Video_Playback
extraPackages = with pkgs; optionals intel [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
vaapiVdpau
libvdpau-va-gl
intel-compute-runtime
] ++
optional nvidia nvidia-vaapi-driver ++
optional (cfg.type == "nvidia") vulkan-validation-layers;
};
services.xserver = mkIf cfg.session {
videoDrivers =
optional nvidia "nvidia" ++
optional (cfg.type == "amdgpu") "amdgpu";
# inhibits default display manager
displayManager.startx.enable = mkDefault true;
};
hardware.nvidia = mkIf nvidia {
modesetting.enable = true;
nvidiaSettings = true;
prime = mkIf (cfg.type == "prime") {
offload = {
enable = true;
enableOffloadCmd = true;
};
};
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
};
environment.variables = {
# work around broken nvidia hw cursor on wayland
WLR_NO_HARDWARE_CURSORS = mkIf (cfg.type == "nvidia") "1";
# work around wlroots flickering on pure nvidia
#WLR_RENDERER = mkIf (cfg.type == "nvidia") "vulkan";
};
specialisation.integratedGraphics = mkIf (cfg.type == "prime") {
configuration = {
global.gpu.type = mkForce (if intel then "intel" else if amdgpu then "amdgpu" else "prime");
boot.blacklistedKernelModules = [ "nouveau" ];
};
};
specialisation.withArc = mkIf (cfg.arc != null) {
configuration = {
global.gpu.arc = mkForce null;
powerManagement.cpuFreqGovernor = mkForce "performance";
};
};
boot.initrd.kernelModules =
optional amdgpu "amdgpu" ++
optional (intel && cfg.arc == null) "i915" ++
optionals nvidia [ "nvidia" "nvidia_drm" "nvidia_modeset" "nvidia_uvm" ] ++
optional (cfg.arc != null) "vfio-pci";
boot.extraModulePackages = optional nvidia config.boot.kernelPackages.nvidia_x11;
boot.extraModprobeConfig = mkIf (cfg.arc != null) ''
softdep drm pre: vfio-pci
options vfio-pci ids=${cfg.arc}
'';
boot.kernelParams =
optional intel "i915.fastboot=1" ++
optionals nvidia [ "nvidia_drm.modeset=1" "nvidia_drm.fbdev=1" ];
};
}

24
global/gpu/greetd.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.gpu;
gui = with cfg; enable && session;
in mkIf gui {
programs.regreet = {
enable = mkDefault true;
cageArgs = [ "-s" "-d" "-m" "last" ];
settings = {
background.path = mkDefault ../../share/54345906_p0.jpg;
background.fit = "Fill";
GTK = {
application_prefer_dark_theme = mkDefault true;
cursor_theme_name = mkDefault "Bibata-Modern-Classic";
icon_theme_name = mkDefault "Papirus-Dark";
theme_name = mkDefault "WhiteSur-Dark";
};
};
};
environment.persistence."/nix/persist/fhs".directories = [ "/var/cache/regreet" ];
}

View file

@ -2,10 +2,11 @@
, lib
, config
, ... }: with lib; let
cfg = config.faucet.gui;
in mkIf cfg.enable {
cfg = config.global.gpu;
gui = with cfg; enable && session;
in mkIf gui {
boot = {
loader.timeout = lib.mkDefault 0;
loader.timeout = mkDefault 0;
consoleLogLevel = 0;
initrd.verbose = false;
initrd.systemd.enable = true;
@ -13,7 +14,6 @@ in mkIf cfg.enable {
kernelParams = [
"quiet"
"splash"
"i915.fastboot=1"
"loglevel=3"
"rd.systemd.show_status=false"
"rd.udev.log_level=3"

View file

@ -2,9 +2,9 @@
, lib
, config
, ... }: with lib; let
cfg = config.faucet.id;
cfg = config.global.id;
in {
options.faucet.id = mkOption {
options.global.id = mkOption {
type = with types; str;
description = "systemd machine id";
};

View file

@ -2,41 +2,61 @@
, lib
, config
, ... }: with lib; let
cfg = config.faucet.io;
cfg = config.global.io;
gui = with config.global.gpu; enable && session;
in {
options.faucet.io = {
betaflight = mkEnableOption "betaflight udev rules" // { default = true; };
bluetooth = mkEnableOption "bluetooth daemons and state persistence" // { default = true; };
audio = mkEnableOption "pulseaudio server configuration" // { default = true; };
options.global.io = {
betaflight = mkEnableOption "betaflight udev rules" // { default = gui; };
bluetooth = mkEnableOption "bluetooth daemons and state persistence" // { default = gui; };
audio = mkEnableOption "pulseaudio server configuration" // { default = gui; };
coredump = mkEnableOption "save coredumps handled by systemd";
};
config = {
services.udev.extraRules = "" + (if cfg.betaflight then ''
services.udev.extraRules = ''
# ignore zvols
KERNEL=="zd*", ENV{UDISKS_IGNORE}="1"
'' + (if cfg.betaflight then ''
# DFU (Internal bootloader for STM32 and AT32 MCUs)
SUBSYSTEM=="usb", ATTRS{idVendor}=="2e3c", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="dialout"
'' else "");
networking.networkmanager.enable = mkDefault true;
networking.hosts = {
"10.5.14.0" = [ "codec" ];
"10.5.14.1" = [ "redir" ];
"10.5.14.2" = [ "compat" ];
"192.168.123.1" = [ "netvm" ];
};
networking.firewall.logRefusedConnections = true;
hardware.bluetooth.enable = mkDefault cfg.bluetooth;
hardware.pulseaudio = mkIf cfg.audio {
# rtkit is optional but recommended
security.rtkit.enable = cfg.audio;
services.pipewire = mkIf cfg.audio {
enable = true;
support32Bit = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
#nixpkgs.config.pulseaudio = mkIf cfg.audio;
security.pam.loginLimits = mkIf (!cfg.coredump) (singleton { domain = "*"; item = "core"; type = "hard"; value = "0"; });
systemd.coredump.extraConfig = mkIf (!cfg.coredump) "Storage=none";
environment.persistence."/nix/persist/fhs".directories = [
"/var/log"
"/var/lib/nixos"
"/var/lib/systemd/backlight"
] ++
optional config.networking.networkmanager.enable "/etc/NetworkManager/system-connections" ++
optional cfg.bluetooth "/var/lib/bluetooth" ++
optional cfg.coredump "/var/lib/systemd/coredump";
environment.persistence."/nix/persist/fhs".hideMounts = true;
users.home.persist.directories = [ ] ++
optional cfg.audio ".local/state/wireplumber";
};
}

View file

@ -2,9 +2,9 @@
, lib
, config
, ... }: with lib; let
cfg = config.faucet.kernel;
cfg = config.global.kernel;
in {
options.faucet.kernel = {
options.global.kernel = {
enable = mkEnableOption "kernel version and configuration" // { default = true; };
lts = mkEnableOption "longterm kernel releases";
sysctl = {
@ -23,6 +23,6 @@ in {
"kernel.dmesg_restrict" = mkIf cfg.sysctl.harden 1;
"vm.swappiness" = cfg.sysctl.swappiness;
};
boot.kernelPackages = with pkgs; mkDefault (if cfg.lts then linuxPackages else linuxPackages_latest);
boot.kernelPackages = with pkgs; mkOverride 1001 (if cfg.lts then linuxPackages else linuxPackages_latest);
};
}

View file

@ -0,0 +1,36 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.libvirt;
in {
options.global.libvirt = {
enable = mkEnableOption "libvirt virtualisation daemon" // { default = true; };
};
config = mkIf cfg.enable {
virtualisation.libvirtd = {
enable = true;
qemu.runAsRoot = false;
qemu.swtpm.enable = true;
# disable as much implicit state as possible
onBoot = "ignore";
onShutdown = "shutdown";
parallelShutdown = 5;
};
environment.systemPackages = with pkgs; [ virtiofsd ];
# USB redirection requires a setuid wrapper
virtualisation.spiceUSBRedirection.enable = true;
environment.persistence."/nix/persist/fhs".directories = [
"/var/lib/libvirt"
];
global.fs.zfs.mountpoints."/nix/persist/service/libvirt" = "service/libvirt";
# allow management by admin users
users.adminGroups = [ "libvirtd" ];
};
}

25
global/lowmem/default.nix Normal file
View file

@ -0,0 +1,25 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.lowmem;
in {
options.global.lowmem = {
enable = mkEnableOption "low memory optimisations";
swapsize = mkOption {
type = with types; int;
default = 8 * 1024;
description = "automatic swap file size";
};
};
config = mkIf cfg.enable {
# enables remote nixos-rebuild
nix.settings.trusted-users = [ "koishi" ];
swapDevices = [ {
device = "/nix/persist/secret/swap";
size = cfg.swapsize;
} ];
};
}

View file

@ -0,0 +1,52 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.netdata;
in {
options.global.netdata = {
enable = mkEnableOption "netdata";
host = mkOption {
type = with types; str;
default = "localhost";
description = "hostname of netdata web interface";
};
addSSL = mkEnableOption "add SSL to netdata proxy";
useACMEHost = mkOption {
type = with types; nullOr str;
default = null;
description = "existing acme host";
};
basicAuthFile = mkOption {
type = with types; nullOr path;
default = "/nix/persist/secret/netdata";
description = "path to passwd file";
};
};
config = mkIf cfg.enable {
services.netdata = {
enable = true;
config = {
global = {
"error log" = "syslog";
"access log" = "none";
"debug log" = "syslog";
};
web."bind to" = "unix:/var/run/netdata/netdata.sock";
};
};
users.users.netdata.uid = 287;
users.groups.netdata.gid = 287;
services.nginx.enable = mkDefault true;
services.nginx.virtualHosts.${cfg.host} = {
inherit (cfg) addSSL useACMEHost basicAuthFile;
locations."/".proxyPass = "http://unix:/var/run/netdata/netdata.sock";
};
users.users.nginx.extraGroups = [ "netdata" ];
environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/netdata" ];
};
}

21
global/oci/default.nix Normal file
View file

@ -0,0 +1,21 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.oci;
in {
options.global.oci = {
enable = mkEnableOption "oci container runtime";
};
config = mkIf cfg.enable {
virtualisation.podman = {
enable = true;
enableNvidia = with config.global.gpu; mkDefault type == "prime" || type == "nvidia";
dockerCompat = true;
};
users.home.persist.directories = [ ".local/share/containers" ];
environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/containers" ];
};
}

View file

@ -0,0 +1,34 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.global.virtualbox;
in {
options.global.virtualbox = {
enable = mkEnableOption "virtualbox host (kvm)";
};
config = mkIf cfg.enable {
virtualisation.virtualbox.host = {
enable = true;
enableKvm = true;
enableExtensionPack = true;
enableHardening = false;
addNetworkInterface = false;
};
# allow virtualbox USB passthrough
users.adminGroups = [ "vboxusers" ];
users.home.persist.directories = [
".config/VirtualBox"
];
users.homeModules = [ {
wayland.windowManager.sway.config.window.commands = [
{ criteria.class = "VirtualBox Manager"; command = "floating enable"; }
];
} ];
};
}

28
home/app/nixos.nix Normal file
View file

@ -0,0 +1,28 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.users;
in {
options.users.home.persistApp = {
files = mkOption {
type = with types; listOf (oneOf [ str (attrsOf str) ]);
default = [ ];
};
directories = mkOption {
type = with types; listOf (oneOf [ str (attrsOf str) ]);
default = [ ];
};
};
config = {
users.profiles.app = {
uid = 5800;
description = "Insecure Applications";
picture = ../picture/app.png;
};
# extra persistence specific to the app user
environment.persistence."/nix/persist".users.app = cfg.home.persistApp;
};
}

View file

@ -17,9 +17,21 @@
# compiled from trusted keys in auth module
ssh.allowedSignersFile = toString (pkgs.writeText
"allowed_signers" (foldr (key: folded:
folded + "koishi@514fpv.one ${key}") ""
folded + "koishi@514fpv.one ${key}\n") ""
config.passthrough.publicKeys));
};
};
};
programs.ssh = {
enable = true;
matchBlocks = {
"edge.514fpv.io".port = 8086;
"sf.514fpv.io".port = 8087;
};
};
wayland.windowManager.sway.config.window.commands = mkIf config.passthrough.gui [
{ criteria.title = "Bitwarden"; command = "floating enable"; }
];
}

View file

@ -2,6 +2,6 @@
, ... }: {
# this module passes openssh public keys to home-manager
users.homeModules = [ {
passthrough.publicKeys = config.faucet.auth.openssh.publicKeys;
passthrough.publicKeys = config.global.auth.openssh.publicKeys;
} ];
}

13
home/btop/home.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.btop;
in mkIf cfg.enable {
programs.btop = {
enable = true;
settings = {
theme_background = false;
};
};
}

17
home/btop/nixos.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.btop;
in {
options.home.btop = {
enable = mkEnableOption "btop" // { default = !config.home.util.minimal; };
};
config = {
users.homeModules = [
# this module passes gyroflow configuration to home-manager
{ passthrough.btop = cfg; }
];
};
}

BIN
home/catppuccin/flake.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

62
home/catppuccin/gui.nix Normal file
View file

@ -0,0 +1,62 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.catppuccin;
palette = (lib.importJSON "${config.catppuccin.sources.palette}/palette.json").${config.catppuccin.flavor}.colors;
in mkIf cfg.enable {
gtk.theme = { inherit (cfg.gtk) package name; };
qt.style.name = "kvantum";
qt.platformTheme.name = "kvantum";
home.pointerCursor = { inherit (cfg.cursor) package name; };
# sway colour palette override
wayland.windowManager.sway.config = {
colors = {
focused = { border = "$lavender"; background = "$base"; text = "$text"; indicator = "$rosewater"; childBorder = "$lavender"; };
focusedInactive = { border = "$overlay0"; background = "$base"; text = "$text"; indicator = "$rosewater"; childBorder = "$overlay0"; };
unfocused = { border = "$overlay0"; background = "$base"; text = "$text"; indicator = "$rosewater"; childBorder = "$overlay0"; };
urgent = { border = "$peach"; background = "$base"; text = "$peach"; indicator = "$overlay0"; childBorder = "$peach"; };
placeholder = { border = "$overlay0"; background = "$base"; text = "$text"; indicator = "$overlay0"; childBorder = "$overlay0"; };
background = "$base";
};
bars = mkForce [ {
colors = {
background = "$base";
statusline = "$text";
focusedStatusline = "$text";
focusedSeparator = "$base";
focusedWorkspace = { border = "$base"; background = "$base"; text = "$green"; };
activeWorkspace = { border = "$base"; background = "$base"; text = "$blue"; };
inactiveWorkspace = { border = "$base"; background = "$base"; text = "$surface1"; };
urgentWorkspace = { border = "$base"; background = "$base"; text = "$surface1"; };
bindingMode = { border = "$base"; background = "$base"; text = "$surface1"; };
};
mode = "dock";
position = "bottom";
workspaceButtons = true;
workspaceNumbers = true;
statusCommand = "${pkgs.i3status}/bin/i3status";
fonts = {
names = [ "monospace" ];
size = 8.0;
};
trayOutput = "primary";
} ];
output."*".bg = mkForce "${./flake.png} fill";
gaps.inner = 12;
gaps.outer = 5;
# dodge the status bar
gaps.bottom = 0;
};
# i3status colour palette override
programs.i3status.general = with palette; {
color_good = lavender.hex;
color_degraded = yellow.hex;
color_bad = red.hex;
};
}

9
home/catppuccin/home.nix Normal file
View file

@ -0,0 +1,9 @@
{
catppuccin = {
enable = true;
accent = "pink";
flavor = "mocha";
};
imports = [ ./gui.nix ];
}

79
home/catppuccin/nixos.nix Normal file
View file

@ -0,0 +1,79 @@
{ pkgs
, lib
, config
, ... }: with lib; let
gui = with config.global.gpu; enable && session;
cfg = config.home.catppuccin;
in {
options.home.catppuccin = {
enable = mkEnableOption "catppuccin colour scheme" // { default = gui; };
gtk = {
package = mkOption {
type = with types; package;
default = (pkgs.catppuccin-gtk.overrideAttrs {
src = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "gtk";
rev = "v1.0.3";
fetchSubmodules = true;
hash = "sha256-q5/VcFsm3vNEw55zq/vcM11eo456SYE5TQA3g2VQjGc=";
};
postUnpack = "";
}).override {
accents = [ "pink" ];
size = "compact";
#tweaks = [ "rimless" "black" ];
variant = "mocha";
};
description = "catppuccin gtk theme package";
};
name = mkOption {
type = with types; str;
default = "catppuccin-mocha-pink-compact";
description = "name of catppuccin gtk theme";
};
};
cursor = {
package = mkOption {
type = with types; package;
default = pkgs.catppuccin-cursors.mochaDark;
description = "catppuccin cursor theme package";
};
name = mkOption {
type = with types; str;
default = "catppuccin-mocha-dark-cursors";
description = "name of catppuccin cursor theme";
};
};
};
config = {
users.homeModules = [
# this module passes catppuccin configuration to home-manager
{ passthrough.catppuccin = cfg; }
];
catppuccin.enable = cfg.enable;
# gtk and cursor themes
environment.systemPackages = with cfg; mkIf enable [
gtk.package cursor.package
];
# override greetd theme
programs.regreet = mkIf cfg.enable {
theme = {
inherit (cfg.gtk) name package;
};
cursorTheme = {
inherit (cfg.cursor) name package;
};
settings = {
background.path = ./solid.png;
};
};
};
}

BIN
home/catppuccin/solid.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

13
home/chrome/home.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs
, lib
, config
, ...}: lib.mkIf config.passthrough.gui {
programs.chromium = {
enable = true;
package = pkgs.google-chrome;
commandLineArgs = [
"--enable-features=UseOzonePlatform"
"--ozone-platform=wayland"
];
};
}

10
home/chrome/nixos.nix Normal file
View file

@ -0,0 +1,10 @@
{ pkgs
, lib
, config
, ... }: with lib; let
gui = with config.global.gpu; enable && session;
in {
users.home.persist.directories = mkIf gui [ ".config/google-chrome" ];
security.chromiumSuidSandbox.enable = mkIf gui true;
environment.sessionVariables.NIXOS_OZONE_WL = "1";
}

11
home/foot/home.nix Normal file
View file

@ -0,0 +1,11 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
programs.foot = {
enable = true;
settings.main.term = "xterm-256color";
settings.main.font = "DejaVu Sans Mono:size=11";
#settings.colors.alpha = 0.8;
};
}

11
home/gnome/home.nix Normal file
View file

@ -0,0 +1,11 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.gnome;
in {
imports = [
./impl/home.nix
./impl/dconf.nix
];
}

286
home/gnome/impl/dconf.nix Normal file
View file

@ -0,0 +1,286 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.gnome;
bg = ../../../share/54345906_p0.jpg;
in mkIf cfg.enable {
dconf.settings = let
p = "org/gnome";
pd = "${p}/desktop";
ps = "${p}/shell";
pse = "${ps}/extensions";
ptl = "${p}/terminal/legacy";
ptlp = "${ptl}/profiles:";
in {
"${pd}/peripherals/mouse".natural-scroll = true;
"${pd}/peripherals/touchpad".tap-to-click = true;
"${p}/epiphany".ask-for-default = false;
"${p}/evolution-data-server".migrated = true;
"${p}/nautilus/preferences" = {
default-folder-viewer = "icon-view";
migrated-gtk-settings = true;
search-filter-time-type = "last_modified";
};
"${pd}/background" = {
color-shading-type = "solid";
picture-options = "zoom";
picture-uri = "file://${bg}";
picture-uri-dark = "file://${bg}";
primary-color = "#000000000000";
secondary-color = "#000000000000";
};
"${pd}/interface" = {
color-scheme = "prefer-dark";
cursor-theme = "Bibata-Modern-Classic";
font-antialiasing = "grayscale";
font-hinting = "slight";
gtk-theme = "adw-gtk3-dark";
icon-theme = "Papirus-Dark";
};
"${pd}/screensaver" = {
color-shading-type = "solid";
lock-enabled = false;
picture-options = "zoom";
picture-uri = "file://${bg}";
primary-color = "#000000000000";
secondary-color = "#000000000000";
};
"${pd}/wm/preferences" = {
action-double-click-titlebar = "toggle-maximize";
action-middle-click-titlebar = "minimize";
button-layout = "close:appmenu";
resize-with-right-button = true;
};
"${pd}/wm/keybindings" = {
panel-run-dialog = [ ];
begin-resize = [ "<Super>r" ];
close = [ "<Shift><Super>q" ];
minimize = [ "<Super>BackSpace" ];
move-to-workspace-1 = [ "<Shift><Super>1" ];
move-to-workspace-2 = [ "<Shift><Super>2" ];
move-to-workspace-3 = [ "<Shift><Super>3" ];
move-to-workspace-4 = [ "<Shift><Super>4" ];
move-to-workspace-left = [ "<Shift><Super>h" ];
move-to-workspace-right = [ "<Shift><Super>l" ];
switch-to-workspace-1 = [ "<Super>1" ];
switch-to-workspace-2 = [ "<Super>2" ];
switch-to-workspace-3 = [ "<Super>3" ];
switch-to-workspace-4 = [ "<Super>4" ];
toggle-maximized = [ "<Super>f" ];
};
"${ps}/keybindings" = {
switch-to-application-1 = [ ];
switch-to-application-2 = [ ];
switch-to-application-3 = [ ];
switch-to-application-4 = [ ];
switch-to-application-5 = [ ];
switch-to-application-6 = [ ];
switch-to-application-7 = [ ];
switch-to-application-8 = [ ];
switch-to-application-9 = [ ];
toggle-application-view = [ "<Super>d" ];
};
"${p}/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
];
logout = [ ];
screensaver = [ "<Control><Alt>l" ];
};
"${p}/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
binding = "<Super>Return";
command = "kgx";
name = "Launch console";
};
"${p}/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
binding = "<Super>q";
command = "google-chrome-stable";
name = "Launch Google Chrome";
};
"${ptlp}" = {
#default = "95894cfd-82f7-430d-af6e-84d168bc34f5";
list = [
"de8a9081-8352-4ce4-9519-5de655ad9361"
"71a9971e-e829-43a9-9b2f-4565c855d664"
"5083e06b-024e-46be-9cd2-892b814f1fc8"
"95894cfd-82f7-430d-af6e-84d168bc34f5"
];
};
"${ptlp}/:5083e06b-024e-46be-9cd2-892b814f1fc8" = {
background-color = "#24273a";
cursor-background-color = "#f4dbd6";
cursor-colors-set = true;
cursor-foreground-color = "#24273a";
foreground-color = "#cad3f5";
highlight-background-color = "#24273a";
highlight-colors-set = true;
highlight-foreground-color = "#5b6078";
palette = [
"#494d64" "#ed8796" "#a6da95" "#eed49f"
"#8aadf4" "#f5bde6" "#8bd5ca" "#b8c0e0"
"#5b6078" "#ed8796" "#a6da95" "#eed49f"
"#8aadf4" "#f5bde6" "#8bd5ca" "#a5adcb"
];
use-theme-colors = false;
visible-name = "Catppuccin Macchiato";
};
"${ptlp}/:71a9971e-e829-43a9-9b2f-4565c855d664" = {
background-color = "#303446";
cursor-background-color = "#f2d5cf";
cursor-colors-set = true;
cursor-foreground-color = "#303446";
default-size-columns = 150;
default-size-rows = 35;
foreground-color = "#c6d0f5";
highlight-background-color = "#303446";
highlight-colors-set = true;
highlight-foreground-color = "#626880";
palette = [
"#51576d" "#e78284" "#a6d189" "#e5c890"
"#8caaee" "#f4b8e4" "#81c8be" "#b5bfe2"
"#626880" "#e78284" "#a6d189" "#e5c890"
"#8caaee" "#f4b8e4" "#81c8be" "#a5adce"
];
use-theme-colors = false;
visible-name = "Catppuccin Frappe";
};
"${ptlp}/:95894cfd-82f7-430d-af6e-84d168bc34f5" = {
background-color = "#1e1e2e";
cursor-background-color = "#f5e0dc";
cursor-colors-set = true;
cursor-foreground-color = "#1e1e2e";
foreground-color = "#cdd6f4";
highlight-background-color = "#1e1e2e";
highlight-colors-set = true;
highlight-foreground-color = "#585b70";
palette = [
"#45475a" "#f38ba8" "#a6e3a1" "#f9e2af"
"#89b4fa" "#f5c2e7" "#94e2d5" "#bac2de"
"#585b70" "#f38ba8" "#a6e3a1" "#f9e2af"
"#89b4fa" "#f5c2e7" "#94e2d5" "#a6adc8"
];
use-theme-colors = false;
visible-name = "Catppuccin Mocha";
};
"${ptlp}/:de8a9081-8352-4ce4-9519-5de655ad9361" = {
background-color = "#eff1f5";
cursor-background-color = "#dc8a78";
cursor-colors-set = true;
cursor-foreground-color = "#eff1f5";
foreground-color = "#4c4f69";
highlight-background-color = "#eff1f5";
highlight-colors-set = true;
highlight-foreground-color = "#acb0be";
palette = [
"#5c5f77" "#d20f39" "#40a02b" "#df8e1d"
"#1e66f5" "#ea76cb" "#179299" "#acb0be"
"#6c6f85" "#d20f39" "#40a02b" "#df8e1d"
"#1e66f5" "#ea76cb" "#179299" "#bcc0cc"
];
use-theme-colors = false;
visible-name = "Catppuccin Latte";
};
"${ps}" = {
disabled-extensions = [
"light-style@gnome-shell-extensions.gcampax.github.com"
"places-menu@gnome-shell-extensions.gcampax.github.com"
"windowsNavigator@gnome-shell-extensions.gcampax.github.com"
"window-list@gnome-shell-extensions.gcampax.github.com"
"workspace-indicator@gnome-shell-extensions.gcampax.github.com"
"dash-to-dock@micxgx.gmail.com"
];
enabled-extensions = [
"user-theme@gnome-shell-extensions.gcampax.github.com"
"apps-menu@gnome-shell-extensions.gcampax.github.com"
"drive-menu@gnome-shell-extensions.gcampax.github.com"
"appindicatorsupport@rgcjonas.gmail.com"
"dash-to-panel@jderose9.github.com"
"caffeine@patapon.info"
"PrivacyMenu@stuarthayhurst"
];
last-selected-power-profile = "performance";
welcome-dialog-last-shown-version = "45.3";
};
#"${pse}/user-theme".name = "catppuccin-mocha-pink-compact";
"${pse}/caffeine" = {
screen-blank = "never";
};
"${pse}/dash-to-dock" = {
background-opacity = 0.80000000000000004;
dash-max-icon-size = 48;
dock-position = "BOTTOM";
height-fraction = 0.90000000000000002;
multi-monitor = false;
running-indicator-style = "DOTS";
custom-theme-shrink = true;
};
"${pse}/dash-to-panel" = {
animate-appicon-hover = false;
animate-appicon-hover-animation-type = "SIMPLE";
appicon-margin = 0;
appicon-padding = 4;
appicon-style= "NORMAL";
available-monitors = [ 0 ];
dot-position = "BOTTOM";
dot-style-focused = "METRO";
dot-style-unfocused = "DOTS";
group-apps = true;
hide-overview-on-startup = true;
hotkeys-overlay-combo = "TEMPORARILY";
intellihide = true;
intellihide-behaviour = "FOCUSED_WINDOWS";
intellihide-hide-from-windows = true;
isolate-workspaces = false;
leftbox-padding = -1;
overview-click-to-exit = true;
panel-anchors = ''{"0":"MIDDLE"}'';
panel-element-positions = ''{"0":[{"element":"showAppsButton","visible":true,"position":"stackedTL"},{"element":"activitiesButton","visible":true,"position":"stackedTL"},{"element":"leftBox","visible":false,"position":"stackedTL"},{"element":"taskbar","visible":true,"position":"centerMonitor"},{"element":"centerBox","visible":true,"position":"stackedBR"},{"element":"rightBox","visible":true,"position":"stackedBR"},{"element":"dateMenu","visible":true,"position":"stackedBR"},{"element":"systemMenu","visible":true,"position":"stackedBR"},{"element":"desktopButton","visible":false,"position":"stackedBR"}]}'';
panel-lengths = ''{"0":100}'';
panel-positions = ''{"0":"BOTTOM"}'';
panel-sizes = ''{"0":42}'';
primary-monitor = 0;
secondarymenu-contains-showdetails = true;
show-showdesktop-hover = true;
status-icon-padding = -1;
stockgs-force-hotcorner = false;
stockgs-keep-dash = false;
stockgs-keep-top-panel = false;
stockgs-panelbtn-click-only = false;
trans-bg-color = "#2a2a2a";
trans-dynamic-anim-target = 1.0;
trans-dynamic-behavior = "MAXIMIZED_WINDOWS";
trans-gradient-bottom-color = "#000000";
trans-gradient-bottom-opacity = 0.5;
trans-gradient-top-opacity = 0.0;
trans-panel-opacity = 0.0;
trans-use-custom-bg = true;
trans-use-custom-gradient = true;
trans-use-custom-opacity = true;
trans-use-dynamic-opacity = true;
tray-padding = -1;
window-preview-title-position = "TOP";
};
};
}

32
home/gnome/impl/home.nix Normal file
View file

@ -0,0 +1,32 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.gnome;
in mkIf cfg.enable {
home.packages =
with pkgs;
with gnome;
with gnomeExtensions; [
# gtk3 theme
adw-gtk3
# gnomeExtensions
caffeine
dash-to-panel
dash-to-dock
appindicator
privacy-settings-menu
];
catppuccin.enable = mkForce false;
home.pointerCursor = mkForce null;
gtk.enable = false;
home.persistence."/nix/persist/home/${config.home.username}" = {
removePrefixDirectory = true;
files = [
(if config.specialisation != {} then "gnome/.config/monitors.xml" else "extern/.config/monitors.xml")
];
};
}

49
home/gnome/impl/nixos.nix Normal file
View file

@ -0,0 +1,49 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.gnome;
in mkIf cfg.enable {
global.flatpak.enable = mkDefault true;
home.catppuccin.enable = mkDefault false;
catppuccin.enable = false;
programs.regreet.enable = false;
services.xserver.enable = true;
services.xserver.displayManager.startx.enable = false;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
services.udev.packages = with pkgs; [ gnome-settings-daemon ];
services.hardware.bolt.enable = true;
xdg.portal.configPackages = with pkgs; [ gnome-session ];
hardware.pulseaudio.enable = false;
environment.gnome.excludePackages = (with pkgs; [
snapshot
gnome-tour
] ++ optionals config.global.flatpak.enable [
baobab
simple-scan
evince
file-roller
geary
loupe
seahorse
totem
epiphany
gnome-calculator
gnome-calendar
gnome-connections
gnome-font-viewer
gnome-text-editor
gnome-characters
gnome-clocks
gnome-contacts
gnome-logs
gnome-maps
gnome-music
gnome-weather
]) ++ (with pkgs.gnome; [ ] ++ optionals config.global.flatpak.enable [
]);
users.home.persist.directories = [ ".config/dconf" ];
}

25
home/gnome/nixos.nix Normal file
View file

@ -0,0 +1,25 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.gnome;
in {
imports = [ ./impl/nixos.nix ];
options.home.gnome = {
enable = mkEnableOption "GNOME desktop environment";
};
config = {
users.homeModules = [
# this module passes gnome configuration to home-manager
{ passthrough.gnome = cfg; }
];
specialisation.nognome = with cfg; mkIf enable {
configuration = {
home.gnome.enable = mkForce false;
};
};
};
}

35
home/gui/home.nix Normal file
View file

@ -0,0 +1,35 @@
{ pkgs
, lib
, config
, ... }: with lib; let
catppuccin = config.passthrough.catppuccin.enable;
in {
config = mkIf config.passthrough.gui {
# cursor theme
home.pointerCursor = {
package = mkDefault pkgs.bibata-cursors;
name = mkDefault "Bibata-Modern-Classic";
size = 24;
x11.enable = true;
gtk.enable = true;
};
# gtk theme
gtk.theme = mkDefault {
package = pkgs.whitesur-gtk-theme;
name = "WhiteSur-Dark";
};
# gtk icons
gtk.iconTheme = mkDefault {
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
# unify qt theme
qt.platformTheme.name = mkDefault "gtk";
gtk.enable = mkDefault true;
qt.enable = mkDefault true;
};
}

36
home/gui/nixos.nix Normal file
View file

@ -0,0 +1,36 @@
{ pkgs
, lib
, config
, ... }: with lib; let
gui = with config.global.gpu; enable && session;
catppuccin = config.home.catppuccin;
in {
config = {
users.homeModules = [
# this module passes gui configuration to home-manager
{ passthrough.gui = gui; }
];
users.adminGroups = mkIf gui [ "video" ];
# themes and icons
environment.systemPackages = with pkgs; mkIf gui ([
papirus-icon-theme
] ++ optionals (!catppuccin.enable) [
whitesur-gtk-theme
whitesur-icon-theme
bibata-cursors
]);
fonts.enableDefaultPackages = mkIf gui true;
security = mkIf gui {
polkit.enable = true;
};
programs = mkIf gui {
dconf.enable = true;
};
services = mkIf gui {
blueman.enable = !config.global.flatpak.enable;
};
};
}

13
home/gyroflow/home.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.gyroflow;
in mkIf cfg.enable {
# temporarily gone until regression is fixed
#home.packages = [ cfg.package ];
wayland.windowManager.sway.config.window.commands = [
{ criteria.app_id = "xyz.gyroflow.gyroflow"; command = "floating enable"; }
];
}

26
home/gyroflow/nixos.nix Normal file
View file

@ -0,0 +1,26 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.gyroflow;
in {
options.home.gyroflow = {
enable = mkEnableOption "gyroflow stabilisation software";
package = mkOption {
type = with types; package;
default = pkgs.gyroflow.overrideAttrs (finalAttrs: previousAttrs: {
buildInputs = previousAttrs.buildInputs ++ [ pkgs.qt6Packages.qtwayland ];
});
description = "gyroflow package";
};
};
config = {
users.homeModules = [
# this module passes gyroflow configuration to home-manager
{ passthrough.gyroflow = cfg; }
];
users.home.persist.directories = mkIf cfg.enable [ ".config/Gyroflow" ];
};
}

24
home/headless/home.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.headless;
in mkIf (cfg.enable != null) {
wayland.windowManager.sway.config = {
output = {
${cfg.enable}.pos = "0 0";
HEADLESS-1 = cfg.output;
};
startup = [ { command = "swaymsg create_output && swaymsg output HEADLESS-1 disable"; } ];
};
home.packages = [ (pkgs.writeShellScriptBin "headless" ''
swaymsg output HEADLESS-1 enable
${pkgs.wayvnc}/bin/wayvnc \
--output=HEADLESS-1 \
${cfg.extraArgs} \
${cfg.host} ${toString cfg.port}
swaymsg output HEADLESS-1 disable
'') ];
}

51
home/headless/nixos.nix Normal file
View file

@ -0,0 +1,51 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.headless;
in {
options.home.headless = {
enable = mkOption {
type = with types; nullOr str;
default = null;
description = "a headless, remotely viewed sway display";
};
output = mkOption {
type = with types; attrsOf str;
default = {
# pixel tablet
mode = "2560x1600";
scale = "2";
pos = "1920 0";
};
description = "headless display configuration";
};
host = mkOption {
type = with types; str;
default = "0.0.0.0";
description = "wayvnc listen host";
};
port = mkOption {
type = with types; port;
# utility port
default = 1300;
description = "wayvnc listen port";
};
extraArgs = mkOption {
type = with types; str;
default = "--max-fps=60";
description = "extra wayvnc args";
};
};
config = {
users.homeModules = [
# this module passes headless configuration to home-manager
{ passthrough.headless = cfg; }
];
};
}

77
home/i3status/home.nix Normal file
View file

@ -0,0 +1,77 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
programs.i3status = {
enable = true;
enableDefault = false;
general.colors = true;
general.interval = 1;
modules = {
"ethernet _first_" = {
position = 1;
settings = {
format_up = "%ip at %speed";
format_down = "";
};
};
"wireless _first_" = {
position = 2;
settings = {
format_up = ''%ip at %bitrate (\"%essid\"%quality @ %frequency)'';
format_down = "";
};
};
"disk /nix/persist" = {
position = 3;
settings = {
format = "%avail (%percentage_avail)";
threshold_type = "percentage_free";
low_threshold = 25;
};
};
memory = {
position = 4;
settings = {
format = "%used / %total";
threshold_degraded = "10%";
threshold_critical = "5%";
format_degraded = ">>> %used / %total <<<";
};
};
load = {
position = 5;
settings = {
format = "%1min %5min %15min";
max_threshold =
removeSuffix "\n" (builtins.readFile (pkgs.runCommandLocal "nproc" { } "nproc > $out"));
};
};
"battery all" = {
position = 6;
settings = {
format = "%status%percentage @ %consumption ~ %remaining";
format_down = "";
status_chr = "^";
status_full = "";
status_unk = "?";
status_bat = "";
last_full_capacity = true;
threshold_type = "percentage";
low_threshold = "15";
};
};
"tztime local" = {
position = 127;
settings = { format = "%Y-%m-%d %H:%M:%S"; };
};
};
};
}

6
home/imv/home.nix Normal file
View file

@ -0,0 +1,6 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
programs.imv.enable = true;
}

11
home/jetbrains/home.nix Normal file
View file

@ -0,0 +1,11 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.jetbrains;
in mkIf cfg.enable {
home.packages = with pkgs.jetbrains; [ pkgs.go ] ++
optional cfg.idea idea-community ++
optional cfg.clion clion ++
optional cfg.goland goland;
}

27
home/jetbrains/nixos.nix Normal file
View file

@ -0,0 +1,27 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.jetbrains;
in {
options.home.jetbrains = {
enable = mkEnableOption "jetbrains text editor";
idea = mkEnableOption "intellij idea";
clion = mkEnableOption "clion ide";
goland = mkEnableOption "goland ide" // { default = true; };
};
config = {
users.homeModules = [
# this module passes jetbrains configuration to home-manager
{ passthrough.jetbrains = cfg; }
];
users.home.persist.directories = mkIf cfg.enable [
"go"
".java/.userPrefs"
".config/JetBrains"
".local/share/JetBrains"
];
};
}

View file

@ -0,0 +1,9 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.libreoffice;
enable = cfg.enable && (cfg.allUsers || (config.home.username == "app"));
in mkIf enable {
home.packages = with pkgs; [ libreoffice ];
}

View file

@ -0,0 +1,22 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.libreoffice;
persist = [ ".config/libreoffice" ];
in {
options.home.libreoffice = {
enable = mkEnableOption "open source office suite";
allUsers = mkEnableOption "set up for all users";
};
config = {
users.homeModules = [
# this module passes minecraft configuration to home-manager
{ passthrough.libreoffice = cfg; }
];
users.home.persist.directories = with cfg; mkIf (enable && allUsers) persist;
users.home.persistApp.directories = with cfg; mkIf (enable && !allUsers) persist;
};
}

10
home/mako/home.nix Normal file
View file

@ -0,0 +1,10 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
services.mako = {
enable = true;
defaultTimeout = 5000;
anchor = "bottom-center";
};
}

16
home/minecraft/home.nix Normal file
View file

@ -0,0 +1,16 @@
{ pkgs
, lib
, config
, ... }: with lib; let
inherit (config.passthrough) gui;
cfg = config.passthrough.minecraft;
enable = cfg.enable && config.home.username == cfg.user;
in mkIf enable {
home.packages = with pkgs; [
jdk8
] ++ optional gui prismlauncher;
wayland.windowManager.sway.config.window.commands = mkIf gui [
{ criteria.app_id = "org.prismlauncher.PrismLauncher"; command = "floating enable"; }
];
}

33
home/minecraft/nixos.nix Normal file
View file

@ -0,0 +1,33 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.minecraft;
gui = with config.global.gpu; enable && session;
in {
options.home.minecraft = {
enable = mkEnableOption "minecraft game launcher and jvm";
user = mkOption {
type = with types; str;
default = "minecraft";
description = "username which minecraft game client runs under";
};
};
config = {
users.homeModules = [
# this module passes minecraft configuration to home-manager
{ passthrough.minecraft = cfg; }
];
users.profiles.minecraft = mkIf (cfg.enable && cfg.user == "minecraft") {
uid = 5801;
description = "Minecraft";
picture = ../picture/aux.png;
};
environment.persistence."/nix/persist".users.${cfg.user} = mkIf (cfg.enable && gui) {
directories = [ ".local/share/PrismLauncher" ];
};
};
}

14
home/mpv/home.nix Normal file
View file

@ -0,0 +1,14 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
programs.mpv = {
enable = true;
config = {
hwdec = "auto-safe";
vo = "gpu";
profile = "gpu-hq";
gpu-context = "wayland";
};
};
}

BIN
home/picture/app.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
home/picture/aux.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

BIN
home/picture/koishi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

BIN
home/picture/staging.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

13
home/plasma/config.nix Normal file
View file

@ -0,0 +1,13 @@
{
programs.plasma = {
workspace = {
lookAndFeel = "org.kde.breezedark.desktop";
#clickItemTo = "select";
};
configFile = {
baloofilerc."Basic Settings"."Indexing-Enabled" = false;
kcminputrc.Libinput."2362"."597"."UNIW0001:00 093A:0255 Touchpad".NaturalScroll = true;
};
};
}

51
home/plasma/home.nix Normal file
View file

@ -0,0 +1,51 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.plasma;
image = ../../share/54345906_p0.jpg;
in mkIf cfg.enable {
programs.plasma = {
# https://github.com/pjones/plasma-manager
enable = true;
#overrideConfig = true;
workspace = {
lookAndFeel = "org.kde.breezedark.desktop";
wallpaper = image;
};
hotkeys.commands = {
launch-konsole = {
name = "Launch Konsole";
key = "Meta+Enter";
command = "konsole";
};
};
configFile = {
baloofilerc."Basic Settings"."Indexing-Enabled" = false;
kscreenlockerrc.Greeter.Wallpaper."org.kde.image".General.Image = image;
kscreenlockerrc.Greeter.Wallpaper."org.kde.image".General.PreviewImage = image;
};
} // cfg.extraConfig;
home.activation.gtkCleanup = hm.dag.entryAfter [ "writeBoundary" ] ''
$DRY_RUN_CMD rm -f $HOME/.gtkrc-2.0.old
'';
qt.enable = false;
qt.platformTheme.name = null;
# gtk theme
gtk.theme = {
package = pkgs.kdePackages.breeze-gtk;
name = "Breeze-Dark";
};
# gtk icons
gtk.iconTheme = {
package = pkgs.kdePackages.breeze-icons;
name = "breeze-dark";
};
}

52
home/plasma/nixos.nix Normal file
View file

@ -0,0 +1,52 @@
{ pkgs
, lib
, config
, plasma-manager
, ... }: with lib; let
cfg = config.home.plasma;
in {
options.home.plasma = {
enable = mkEnableOption "plasma desktop and configuration";
specialise = mkEnableOption "enable plasma in a specialisation";
extraConfig = mkOption {
type = with types; anything;
default = { };
description = "extra plasma-manager configuration";
};
};
config = {
users.homeModules = [
# this module passes plasma configuration to home-manager
{ passthrough.plasma = cfg; }
];
users.home.persist.files = mkIf cfg.enable [
".config/kwinoutputconfig.json"
];
users.home.persist.directories = mkIf cfg.enable [
".local/share/kwalletd"
];
services.desktopManager.plasma6 = mkIf cfg.enable {
enable = true;
};
home-manager.backupFileExtension = mkIf cfg.enable "old";
home-manager.sharedModules = [
plasma-manager.homeManagerModules.plasma-manager
];
services.blueman = mkIf cfg.enable {
enable = mkForce false;
};
home = mkIf cfg.enable {
catppuccin.enable = mkForce false;
};
specialisation.plasma = mkIf cfg.specialise {
configuration.home.plasma.enable = true;
};
};
}

View file

@ -1,6 +1,7 @@
{ pkgs
, lib
, config
, inputs
, ... }: with lib; let
cfg = config.users;
in {
@ -28,6 +29,11 @@ in {
default = false;
description = "enable ssh authorized keys for user";
};
picture = mkOption {
type = with types; nullOr path;
default = null;
description = "path to user profile picture";
};
};
});
description = "preconfigured users with profile options";
@ -67,9 +73,9 @@ in {
users = mapAttrs (name: opts: {
inherit (opts) uid;
description = with opts; mkIf (description != null) description;
extraGroups = mkIf opts.admin cfg.adminGroups;
extraGroups = [ "dialout" ] ++ optionals opts.admin cfg.adminGroups;
openssh.authorizedKeys.keys = mkIf (opts.sshLogin && config.services.openssh.enable)
config.faucet.auth.openssh.publicKeys;
config.global.auth.openssh.publicKeys;
hashedPasswordFile = "/nix/persist/shadow/${name}";
shell = pkgs.zsh;
isNormalUser = mkIf (name != "root") true;
@ -79,8 +85,9 @@ in {
# base groups
adminGroups = [
"wheel" "dialout" "kvm"
"wheel" "kvm"
"systemd-journal"
"networkmanager"
];
# base home modules in current directory
@ -124,25 +131,64 @@ in {
neededForBoot = true;
}) cfg.profiles;
global.fs.zfs.mountpoints = mapAttrs'
(name: opts: nameValuePair
"/nix/persist/home/${name}"
"home/${name}")
(filterAttrs (n: _: n != "root") config.users.profiles);
home-manager.users = mapAttrs (name: opts: {
imports = cfg.homeModules;
imports = with inputs; cfg.homeModules ++ [
impermanence.homeManagerModules.impermanence
catppuccin.homeManagerModules.catppuccin
];
home.file.".face" = mkIf (opts.picture != null) {
source = opts.picture;
};
home.stateVersion = "23.11";
}) cfg.profiles;
system.activationScripts = mapAttrs'
(name: opts: nameValuePair
"${name}-profile-icon"
{
deps = [ "users" ];
text = let
iconDest = "/var/lib/AccountsService/icons/${name}";
userConf = pkgs.writeText "${name}-config" ''
[User]
Session=
Icon=${iconDest}
SystemAccount=false
'';
in ''
install -Dm 0444 ${opts.picture} ${iconDest}
install -Dm 0400 ${userConf} /var/lib/AccountsService/users/${name}
'';
})
(filterAttrs (n: _: n != "root") config.users.profiles);
# set up standard persistence for users
# this is registered internally for each software's configuration
environment.persistence."/nix/persist" = {
users = mapAttrs (name: _: cfg.home.persist // {
users = (mapAttrs (name: _: cfg.home.persist // {
# root workaround, ugly but necessary
# cannot get it properly for the same reason
# mentioned above in fileSystems
home = mkIf (name == "root") "/root";
}) cfg.profiles;
}) cfg.profiles);
hideMounts = true;
};
# enable passwordless sudo
security.sudo.wheelNeedsPassword = false;
# enable access in build-vm
virtualisation.vmVariant = {
users.users.koishi.password = "passwd";
users.users.koishi.hashedPasswordFile = mkForce null;
};
};
# this is for home components that need to extend nixos

14
home/steam/config.nix Normal file
View file

@ -0,0 +1,14 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.steam;
in mkIf cfg.enable {
hardware.steam-hardware.enable = true;
networking.firewall = {
allowedTCPPorts = [ 27015 27036 ];
allowedUDPPorts = [ 27015 ];
allowedUDPPortRanges = [ { from = 27031; to = 27036; } ];
};
}

17
home/steam/home.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.steam;
enable = cfg.enable && (cfg.allUsers || (config.home.username == "app"));
package = config.programs.steam.package;
in mkIf enable {
home.packages = with pkgs; [
cfg.package
cfg.package.run
];
wayland.windowManager.sway.config.window.commands = [
{ criteria.class = "steam"; command = "floating enable"; }
];
}

29
home/steam/nixos.nix Normal file
View file

@ -0,0 +1,29 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.steam;
persist = [ ".steam" ".local/share/Steam" ];
in {
imports = [ ./config.nix ];
options.home.steam = {
enable = mkEnableOption "steam software and environment";
package = mkOption {
type = with types; package;
default = config.programs.steam.package;
description = "steam package";
};
allUsers = mkEnableOption "set up for all users";
};
config = {
users.homeModules = [
# this module passes steam configuration to home-manager
{ passthrough.steam = cfg; }
];
users.home.persist.directories = with cfg; mkIf (enable && allUsers) persist;
users.home.persistApp.directories = with cfg; mkIf (enable && !allUsers) persist;
};
}

48
home/sway/home.nix Normal file
View file

@ -0,0 +1,48 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.base = true;
wrapperFeatures.gtk = true;
swaynag.enable = true;
config = {
defaultWorkspace = "workspace number 1";
modifier = "Mod4";
keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
in mkOptionDefault {
XF86MonBrightnessUp = "light -A 5";
XF86MonBrightnessDown = "light -U 5";
"Control+Alt+l" = "exec swaylock -f --grace 0";
"Print" = "exec ${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy";
"${modifier}+Print" = "exec ${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.wl-clipboard}/bin/wl-copy";
"${modifier}+q" = "exec google-chrome-stable";
"${modifier}+Home" = "exec ${pkgs.pavucontrol}/bin/pavucontrol";
};
bars = [ {
mode = "dock";
position = "bottom";
workspaceButtons = true;
workspaceNumbers = true;
statusCommand = "${pkgs.i3status}/bin/i3status";
fonts = {
names = [ "monospace" ];
size = 8.0;
};
trayOutput = "primary";
# sets transparency
colors.background = "00000000";
} ];
input."*".natural_scroll = "enabled";
input."type:touchpad".tap = "enabled";
output."*".bg = "#000000 solid_color";
};
};
}

37
home/sway/nixos.nix Normal file
View file

@ -0,0 +1,37 @@
{ pkgs
, lib
, config
, ... }: with lib; let
gui = with config.global.gpu; enable && session;
nvidia = with config.global.gpu; type == "nvidia" || type == "prime";
in mkIf gui {
services.displayManager.sessionPackages = [
(pkgs.writeTextFile {
name = "sway-session";
destination = "/share/wayland-sessions/sway.desktop";
text = ''
[Desktop Entry]
Name=Sway
Comment=An i3-compatible Wayland compositor
Exec=${pkgs.writeTextFile {
name = "sway-wrapper";
executable = true;
text = ''
#!${pkgs.zsh}/bin/zsh
SHLVL=0
for profile in ''${(z)NIX_PROFILES}; do
fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
done
exec sway${if nvidia then " --unsupported-gpu" else ""} 2>&1 >> $XDG_CACHE_HOME/sway
'';
checkPhase = ''
${pkgs.stdenv.shellDryRun} "$target"
'';
}}
Type=Application
'';
} // { providedSessions = [ pkgs.sway.meta.mainProgram ]; })
];
programs.light.enable = true;
}

24
home/swayidle/home.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
services.swayidle = let
sway = config.wayland.windowManager.sway.package;
swaymsg = "${sway}/bin/swaymsg";
swaylock = "${config.programs.swaylock.package}/bin/swaylock";
in {
enable = true;
systemdTarget = "sway-session.target";
timeouts = [
{ timeout = 600; command = "${swaymsg} 'output * dpms off'"; resumeCommand = "${swaymsg} 'output * dpms on'"; }
];
events = [
{ event = "before-sleep"; command = "${swaylock} -f --grace 0"; }
];
};
# fullscreen as simple idle inhibitor shortcut
wayland.windowManager.sway.config.window.commands = [
{ criteria.shell = ".*"; command = "inhibit_idle fullscreen"; }
];
}

24
home/swaylock/home.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
programs.swaylock = {
enable = true;
package = pkgs.swaylock-effects;
settings = {
indicator-caps-lock = true;
font-size = 20;
ignore-empty-password = true;
show-failed-attempts = true;
color = mkDefault "#00000000";
# Ring
indicator-radius = 115;
# Swaylock-effects specific settings
clock = true;
timestr = "%r";
grace = 2;
};
};
}

8
home/swaylock/nixos.nix Normal file
View file

@ -0,0 +1,8 @@
{ pkgs
, lib
, config
, ... }: with lib; let
gui = with config.global.gpu; enable && session;
in mkIf gui {
security.pam.services.swaylock = { };
}

View file

@ -5,11 +5,13 @@
description = "Koishi";
admin = true;
sshLogin = true;
picture = ./picture/koishi.png;
};
staging = {
uid = 1000;
description = "Staging Environment";
picture = ./picture/staging.png;
};
root.uid = 0;

33
home/util/home.nix Normal file
View file

@ -0,0 +1,33 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.util;
in {
home.packages = with pkgs; [
pv file wget e2fsprogs
] ++ optionals (!cfg.minimal) [
tio mbuffer sedutil
lsscsi zip unzip
nix-index dnsutils whois
pciutils usbutils nvme-cli
] ++ optionals config.passthrough.gui [
gtk-engine-murrine
gnome-themes-extra
mission-planner
inav-configurator
inav-blackbox-tools
(blhelisuite32.override { workdir = "${config.home.homeDirectory}/.blhelisuite32"; })
] ++ optionals (config.passthrough.gui && !config.passthrough.flatpak.enable) [
xfce.thunar gimp
jellyfin-media-player
betaflight-configurator
expresslrs-configurator
];
wayland.windowManager.sway.config.window.commands = mkIf config.passthrough.gui [
{ criteria.class = "BLHeliSuite32xl"; command = "floating enable"; }
{ criteria.app_id = "thunar"; command = "floating enable"; }
];
}

44
home/util/nixos.nix Normal file
View file

@ -0,0 +1,44 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.util;
gui = with config.global.gpu; enable && session;
in {
options.home.util = {
minimal = mkEnableOption "minimal system environment with less packages";
};
config = {
users.homeModules = [
# this module passes util configuration to home-manager
{ passthrough.util = cfg; }
# this module passes flatpak configuration to home-manager
{ passthrough.flatpak = config.global.flatpak; }
];
programs.zsh.enable = true;
environment.shells = singleton pkgs.zsh;
users.home.persist.directories = [ ] ++
optionals (!cfg.minimal) [
".cache/nix-index"
] ++
optionals gui [
# mission-planner
".local/share/Mission Planner"
# inav-configurator
".config/inav-configurator"
] ++
optionals (gui && !config.global.flatpak.enable) [
# jellyfin-media-player
".config/jellyfin.org"
".local/share/jellyfinmediaplayer"
".local/share/Jellyfin Media Player"
# expresslrs-configurator
".config/ExpressLRS Configurator"
# betaflight-configurator
".config/betaflight-configurator"
];
};
}

View file

@ -0,0 +1,58 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
dconf.settings = let
p = "org/virt-manager/virt-manager";
in {
${p} = {
xmleditor-enabled = true;
# swaybar tray doesn't really work
system-tray = false;
};
"${p}/details".show-toolbar = true;
"${p}/console" = {
scaling = 0;
auto-redirect = false;
resize-guest = 1;
};
"${p}/stats" = {
enable-memory-poll = true;
enable-disk-poll = true;
enable-net-poll = true;
};
"${p}/vmlist-fields" = {
host-cpu-usage = true;
memory-usage = true;
disk-usage = true;
network-traffic = true;
};
"${p}/new-vm" = {
firmware = "uefi";
graphics-type = "system";
};
"${p}/confirm" = {
unapplied-dev = true;
removedev = true;
delete-storage = true;
forcepoweroff = false;
};
"${p}/connections" = let
uri = "qemu:///system";
in {
uris = [ uri ];
autoconnect = [ uri ];
};
"${p}/conns/qemu:system".pretty-name = "KVM";
};
# floating other than main window
wayland.windowManager.sway.config.window.commands = [
{ criteria.app_id = "virt-manager"; command = "floating enable"; }
{ criteria.app_id = "virt-manager"; criteria.title = "Virtual Machine Manager"; command = "floating disable"; }
];
}

View file

@ -0,0 +1,8 @@
{ pkgs
, lib
, config
, ... }: with lib; let
gui = with config.global.gpu; enable && session;
in mkIf gui {
programs.virt-manager.enable = true;
}

24
home/vscode/home.nix Normal file
View file

@ -0,0 +1,24 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.passthrough.vscode;
theme = config.passthrough.catppuccin.enable;
in mkIf cfg.enable {
programs.vscode = {
enable = true;
mutableExtensionsDir = false;
enableUpdateCheck = false;
enableExtensionUpdateCheck = false;
package = pkgs.vscodium;
extensions = with pkgs.vscode-extensions; [
catppuccin.catppuccin-vsc catppuccin.catppuccin-vsc-icons
bbenoist.nix golang.go rust-lang.rust-analyzer
];
userSettings = {
"workbench.colorTheme" = mkIf theme "Catppuccin Mocha";
"workbench.iconTheme" = mkIf theme "catppuccin-mocha";
"[nix]"."editor.tabSize" = 2;
};
};
}

19
home/vscode/nixos.nix Normal file
View file

@ -0,0 +1,19 @@
{ pkgs
, lib
, config
, ... }: with lib; let
cfg = config.home.vscode;
in {
options.home.vscode = {
enable = mkEnableOption "vscode text editor";
};
config = {
users.homeModules = [
# this module passes vscode configuration to home-manager
{ passthrough.vscode = cfg; }
];
users.home.persist.directories = mkIf cfg.enable [ ".config/VSCodium" ];
};
}

12
home/wofi/home.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs
, lib
, config
, ... }: with lib; mkIf config.passthrough.gui {
programs.wofi = {
enable = true;
settings.mode = "drun";
settings.allow_images = true;
};
wayland.windowManager.sway.config.menu = "wofi -show drun -modi drun";
}

View file

@ -0,0 +1,92 @@
{ lib
, libicns
, p7zip
, fetchzip
, stdenvNoCC
, makeDesktopItem
, buildFHSUserEnv
, workdir ? "/tmp/blhelisuite32" }: let
name = "BLHeliSuite32";
pname = "blhelisuite32";
version = "32.10";
suffix = "1044";
dist = fetchzip {
name = "${pname}-dist";
url = "https://github.com/bitdump/BLHeli/releases/download/Rev${version}/${name}xLinux64_${suffix}.zip";
hash = "sha256-y4S824s9Ipxb1M1IeD6Lo6k7hmm8CEmPflvhaqZz+84=";
};
desktopItem = makeDesktopItem {
name = pname;
exec = pname;
icon = pname;
comment = "This Application may flash and configure BLHeli_32 based ESCs";
desktopName = name;
genericName = "BLHeli for brushless ESC firmware";
};
icons = stdenvNoCC.mkDerivation {
pname = "${pname}-icons";
inherit version;
src = fetchzip {
name = "${pname}-macos";
url = "https://github.com/bitdump/BLHeli/releases/download/Rev${version}/${name}xm_MacOS64_${suffix}.zip";
hash = "sha256-StRnrVI8p51vNsTMO1LtaZvENbG7XZ1V/mKHe4pO7kU=";
};
nativeBuildInputs = [ libicns p7zip ];
configurePhase = ''
7z x *.dmg
'';
buildPhase = ''
icns2png -x ${name}xm_MacOS64_${suffix}/${name}xm.app/Contents/Resources/${name}xm.icns
'';
installPhase = ''
mkdir -p "$out"
cp -r ${name}*.png "$out"
'';
};
linked = stdenvNoCC.mkDerivation {
inherit pname version;
phases = [ "unpackPhase" "patchPhase" "installPhase" ];
src = dist;
installPhase = ''
cp -r . "$out"
# BLHeliSuite32 tries to write next to its binary
ln -s ${workdir}/settings $out/Settings
ln -s ${workdir}/music $out/Music
'';
};
in buildFHSUserEnv {
inherit pname version;
targetPkgs = pkgs: (with pkgs; [
glib libGL curl
libgcc gtk3
zlib systemdLibs
]);
extraInstallCommands = let
mkIconScale = scale:
"install -m 444 -D ${icons}/${name}xm_${scale}x${scale}x32.png $out/share/icons/hicolor/${scale}x${scale}/apps/${pname}.png";
in ''
${mkIconScale "16"}
${mkIconScale "32"}
${mkIconScale "64"}
${mkIconScale "128"}
${mkIconScale "256"}
${mkIconScale "512"}
${mkIconScale "1024"}
cp -r ${desktopItem}/share/applications $out/share/
'';
runScript = "sh -c '" +
"mkdir -p ${workdir}/settings && " +
"mkdir -p ${workdir}/music && " +
"exec ${linked}/${name}xl'";
}

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