Compare commits

...

439 Commits

Author SHA1 Message Date
650c50889e
nixy: remove f2fs from initramfs 2025-01-15 11:55:21 +01:00
9f78cde62f
nixy: add global USER variable 2025-01-15 11:41:32 +01:00
1240d5d3a2
nixy/dnscyrpt-proxy2: add full path for public-resolvers.md 2025-01-15 11:35:21 +01:00
9b8aa0c6b2
home_packages: add rizin 2025-01-15 11:33:53 +01:00
77e24e385a
all: format .nix filex with nixfmt-rfc 2025-01-10 18:11:42 +01:00
e571ae07c0
flake: update 2025-01-10 18:11:13 +01:00
89841d00aa
home/sway: replace viber and zapzap keybindings 2025-01-06 15:15:04 +01:00
9513508d3d
flake: update 2025-01-02 02:11:58 +01:00
f2015b81da
home/zsh: update pure prompt, format 2025-01-02 02:10:45 +01:00
8791c104e1
home/zsh: syntax-highlighting -> fast-syntax-highlighting 2025-01-02 02:09:53 +01:00
9fac7fdac3
nixy: disable coredump 2024-12-31 15:03:26 +01:00
1829280f14
magpie: add virtio-gpu as initrd module 2024-12-26 13:31:57 +01:00
6c3b0aa239
magpie: set console=tty as boot param 2024-12-26 13:31:10 +01:00
17da0a855c
home-manager: switch to 24.11 version 2024-12-26 13:25:01 +01:00
c75a967110
nixy: use nftables 2024-12-26 13:24:20 +01:00
350bcfed05
nixy: switch to default nixos kernel 2024-12-26 13:24:03 +01:00
378ff6c9fd
packages: add ethtool 2024-12-26 13:22:58 +01:00
09bf9a3b17
flake: update nvim 2024-12-04 16:36:26 +01:00
0b069d7277
home/git: set defaultbranch to master 2024-12-04 15:22:01 +01:00
e3673902e2
home_packages: add typst 2024-12-03 23:13:07 +01:00
a9f02a8462
magpie/gitea: use unix socket for local connection 2024-12-03 16:02:53 +01:00
3f5747d8e0
nixy/fonts: update and add more fonts 2024-12-03 16:01:21 +01:00
da2c2dcd8c
nixy/avahi: enable service 2024-12-03 16:01:05 +01:00
fca1cd048e
home/zsh: add pay-respects alias; remove fast_syntax_highlight plugin 2024-12-03 15:59:57 +01:00
d1f26e838d
home_packages: add sbcl, pay-respects; libreoffice -> libreoffice-qt6-fresh 2024-12-02 22:20:12 +01:00
5440679d16
switch nixpkgs to 24.11 2024-12-02 22:16:51 +01:00
fa1392dce8
home_packages: add weechat 2024-11-11 16:20:56 +01:00
0751e0ac30
nixy/fonts: noto-fonts-cjk -> noto-fonts-cjk-sans 2024-11-07 12:33:55 +01:00
a2cf986bc4
nixy/virtualisation: enable spice usb redirection 2024-11-07 12:33:17 +01:00
0a95372a68
nixy: iproute -> iproute2 2024-11-05 17:19:40 +01:00
ecf5065588
home_packages: add tectonic 2024-10-29 17:40:27 +01:00
bb6f0ab772
env/firejail: add qutebrowser.local profile 2024-10-15 04:20:40 +02:00
90f939e056
home/sway: bin/<name> -> lib.getExe 2024-10-15 04:16:58 +02:00
8740cc57fe
home/sway: add tessen shortcut 2024-10-15 04:03:50 +02:00
f7eda08683
home_packages: add wrapper to qcad to use xcb as QT_QPA_PLATFORM 2024-10-08 11:56:47 +02:00
15e60767b6
flake: update 2024-10-07 16:07:09 +02:00
d9d0ccaed5
home_packages: add fpga, cad related and other utils 2024-10-07 16:05:28 +02:00
2818f61e28
all: pkgs.chromium -> pkgs.ungoogled-chromium 2024-09-14 16:29:56 +02:00
b1d4994f92
home/sway: format 2024-09-09 00:35:59 +02:00
4b6e99130b
home/env: set NIXOS_OZONE_WL to 1 2024-09-03 11:48:53 +02:00
a2458211e3
magpie/nextcloud: disable 2024-09-02 22:59:14 +02:00
1f15bf221b
magpie/initrd: fix networking with systemd-enabled initrd 2024-09-02 22:59:00 +02:00
908c352932
magpie/goatcounter: move to builting nixos module 2024-09-02 22:57:53 +02:00
db9139a08c
flake: update 2024-09-02 21:50:43 +02:00
54e4e82dc7
magpie: use systemd in initrd, enable switchNg for nix 2024-09-02 21:50:34 +02:00
30560f07cd
nixy: select dbus-broker as default dbus daemon 2024-08-26 13:06:15 +02:00
91a9568828
nixy: enable systemd at initrd, remove amdgpu from initrd modules 2024-08-25 10:56:41 +02:00
472105eb8a
nixy: luks allow discards 2024-08-25 10:51:15 +02:00
3d46b03022
nixy: enable switchNg 2024-08-25 10:50:34 +02:00
dbd3e323f8
nixy/home_manager: backup files before switching configuration 2024-08-25 10:49:33 +02:00
af9b6b9177
home_packages: add dualsensectl 2024-08-18 11:53:04 +02:00
4673549042
nixy/wg: add nx 2024-08-15 17:36:00 +02:00
b06f2546d6
home_packages: temp disable zeal and cura 2024-08-14 17:14:19 +02:00
3d774357fd
home_packages: add pwvucontrol 2024-08-14 17:13:44 +02:00
29e7cfbc65
nixy: enable steam client 2024-08-14 17:13:09 +02:00
793d778428
nixy/wireguard: add nx pubkey 2024-08-14 16:47:42 +02:00
d272b50176
common/packages: add adwaita-icon-theme, gnomeExtensions.appindicator 2024-08-06 18:07:25 +02:00
27d3561623
home_packages: add swayimg, tessen 2024-08-06 14:45:21 +02:00
467daedae4
flake: update 2024-08-05 17:32:28 +02:00
1dc699e5b1
viber: update 2024-07-31 12:15:06 +02:00
df3e54c1ca
viber: update 2024-07-31 12:14:17 +02:00
0d2dd68933
change syntax for microcode update 2024-07-21 10:10:45 +02:00
2641287a1c
nixy: rename config opengl -> graphics 2024-07-20 12:09:04 +02:00
f854e137cb
flake: update 2024-07-20 12:08:22 +02:00
e62d5f62b8
nixy: remove sound.enable 2024-07-15 15:39:55 +02:00
9551d72d8d
nixy: remove hardware.opengl.driSupport 2024-07-15 15:39:06 +02:00
6eb21658dd
nixy: disable nextcloud and seafile services 2024-07-06 21:07:51 +02:00
bdc019547e
flake: update 2024-06-19 10:14:22 +02:00
c7ac111ca4
home/qutebrowser: avoid issue with firejail full path 2024-06-15 15:43:06 +02:00
3576d4081a
home: use lib.getExe where applicable 2024-06-15 15:25:39 +02:00
097357e838
nixy: remove btrfs services/configs 2024-06-15 12:36:48 +02:00
289ab74ca6
home/mimeapps: add default-web-browser 2024-06-15 12:28:57 +02:00
ef20f44154
home_packages: add steam-run 2024-06-13 14:34:10 +02:00
cc92ccc52c
home_packages: add lsix 2024-06-13 13:20:20 +02:00
d6ac321923
nixy/hardware: update /nix uuid 2024-06-13 12:56:29 +02:00
fbbd2e3c8a
home_packages: add lsix 2024-06-07 11:50:23 +02:00
7c135d2291
home/kanshi: update config syntax format 2024-06-01 19:14:23 +02:00
4b114f6f51
nixy/appimage: add binfmt 2024-06-01 13:32:50 +02:00
d32fcecea1
packages: add binwalk, busybox, dnsutils, f2fstools, fio, iw, nvme-cli, xfsprogs 2024-06-01 13:28:16 +02:00
fed978a9b6
home/packages: add chromium_stackfield, nom 2024-06-01 13:12:23 +02:00
d4bae9aa7a
nixy/filesystem: update uuid for nix_store 2024-05-31 19:34:09 +02:00
15c7f6e3b5
nixy/seafile: disable 2024-05-31 18:32:38 +02:00
784477f82f
nixy: add luks config 2024-05-31 12:47:06 +02:00
7755c92d27
nixy/i3status: add /nix and /home disk block 2024-05-31 11:42:14 +02:00
f26f27355a
nixy: update filesystem hierarchy 2024-05-30 22:43:23 +02:00
6984ee4446
nixy: remove btrfs features 2024-05-30 22:42:43 +02:00
064a2e6554
nixy/seafile: update initial config 2024-05-17 16:14:52 +02:00
e90f05bf99
magpie/seafile: add initial config 2024-05-15 11:37:45 +02:00
8509f81135
nixy/wireguard/proton: add service dependency relations 2024-05-12 23:12:29 +02:00
6d08a3883f
nixy/dnscrypt2: add separate service for wg netns 2024-05-12 15:44:59 +02:00
466dbc574d
nixy/sops: add vpn endpoint 2024-05-12 15:43:37 +02:00
cfc66a92cb
nixy/wireguard: add proton vpn with network namespace 2024-05-12 15:43:03 +02:00
390d3a3ddb
nixy/wireguard: add proton vpn free tier 2024-05-12 10:48:28 +02:00
7a647287bb
nixy: cleanup config 2024-05-11 09:26:49 +02:00
82efa133b3
nixy: remove nfs deps 2024-05-11 09:21:07 +02:00
0e58c0a65f
nixy/zremap: add udev triggered service 2024-05-10 23:50:54 +02:00
d1da1f149b
nixy/rtl-sdr: set rtl-sdr.enable to add plugdev group 2024-05-10 22:52:39 +02:00
58d1ee5a4c
nixy: update config options 2024-05-10 22:51:29 +02:00
3fa43bff25
nixy/dnscrypt2: require nolog, nofilter; enable http3; set relative path for cache file 2024-05-10 22:34:10 +02:00
5ed8aedf41
nixy: enable dev doc 2024-05-09 22:47:10 +02:00
4ae136ea6d
packages: add man pages 2024-05-09 22:46:26 +02:00
cb38433656
flake: update 2024-05-07 16:35:59 +02:00
4f35747f51
flake: set new zremap repo 2024-05-07 16:35:50 +02:00
99ddee1f5e
nixy/podman: set mkForce for storage driver 2024-05-07 16:35:10 +02:00
5630b394f0
all: pkgs.nixUnstable -> pkgs.nixVersion.latest 2024-05-07 11:30:55 +02:00
1a6ab2840a
nixy/zremap: add temporary fix for external kbd 2024-05-07 11:21:51 +02:00
bf948813da
home: add kanshi with new profiles for multi-monitor 2024-05-06 10:30:49 +02:00
059cfef98a
home/sway: dmenu-wl -> bemenu, remove wallpaper, add output focus shortcuts 2024-04-29 13:15:45 +02:00
e7632ff743
home/i3status-rust: add net interface for thinkpad dock 2024-04-29 13:14:43 +02:00
f6105ac717
magpie/meta: compact sops file list 2024-04-22 20:17:39 +02:00
654432249a
{nixy,mediabox}/wireguard: remove unneeded listenPort setting 2024-04-22 20:05:17 +02:00
282cac1b70
magpie/sops: add workstation wg key 2024-04-22 18:12:49 +02:00
a3948bc9a7
common: add workstation wg pubkey 2024-04-22 18:11:52 +02:00
7eb54d5293
magpie: add workstation wg 2024-04-22 18:10:24 +02:00
7cb3e2aae4
mediabox/initrd: remove sops ssh key 2024-04-21 16:16:37 +02:00
511aee2794
magpie/initrd: remove sops ssh key 2024-04-21 16:15:46 +02:00
a418ea4145
magpie: add ssh service to initrd 2024-04-21 13:53:46 +02:00
e1cfb9032c
magpie/sops: rename dummy key 2024-04-21 13:13:25 +02:00
7024f0e216
mediabox: add ssh service to initrd 2024-04-21 13:10:33 +02:00
4e83712fc0
mediabox/sops: fix key file name 2024-04-21 11:11:57 +02:00
79d2d3b623
mediabox/sops: add nixy recipient to all keys 2024-04-21 11:06:56 +02:00
d7d806be2e
magpie/sops: add nixy recipient to all keys 2024-04-21 10:45:16 +02:00
aa2f2a8d47
magpie/wireguard: remove unused preshared key from sops 2024-04-21 10:44:45 +02:00
f090202ffe
magpie/3proxy/sops: remove unused key 2024-04-21 10:41:27 +02:00
a939121996
nixy/sops: remove unused key recipients 2024-04-21 10:22:23 +02:00
32c97343f7
sops: remove unused config files 2024-04-20 23:27:55 +02:00
de451c8490
magpie/wireguard: add mediabox preshared key 2024-04-20 23:22:49 +02:00
a6c4dbcd4b
sops: make root sops connfig universal 2024-04-20 23:12:13 +02:00
871df5a514
all: wireguard add preshared keys and update hierarchy 2024-04-20 20:44:36 +02:00
dab24f0302
sops/wireguard: update key hierarchy 2024-04-20 20:40:32 +02:00
370d0089a2
all/sops/wireguard: add common preshared key file 2024-04-20 20:36:36 +02:00
b578f250e1
sops: add common file 2024-04-20 20:36:03 +02:00
d7096e4051
magpie/wireguard: add preshared key 2024-04-20 20:18:06 +02:00
a3017e3f8c
magpie/sops: add wireguard preshared key 2024-04-20 20:15:33 +02:00
75987df524
magpie/sops: fix config 2024-04-20 20:15:04 +02:00
1f065c29be
nixy/wireguard: add preshared key 2024-04-20 20:13:27 +02:00
05fbfc7c70
nixy/sops/wireguard: update preshared key 2024-04-20 20:12:54 +02:00
2da4bf2f0c
{magpie,nixy}/sops: add config 2024-04-20 19:01:55 +02:00
9c156ddd7e
nixy/sops/wireguard: add preshared key 2024-04-20 18:58:33 +02:00
e96ebdf63d
packages: add sops 2024-04-20 18:51:42 +02:00
572ce078be
mediabox/ssh: add auth key 2024-04-17 23:03:00 +02:00
80e506a047
flake: update nvim 2024-04-17 22:57:49 +02:00
633cbf0be1
magpie/nfs: disable nfs 2024-04-17 22:57:41 +02:00
a3ea0c7182
magpie/ssh: change auth pubkey 2024-04-17 22:54:34 +02:00
104e078d17
nixy: add ssh public key 2024-04-17 22:25:35 +02:00
f9a8f9af1e
{nixy,mediabox}/wireguard: add ip range for allowedIPs 2024-04-14 22:23:08 +02:00
494d0da9d0
mediabox/wireguard: change sops target keys 2024-04-14 21:27:26 +02:00
33ee0686d9
mediabox: add sops config 2024-04-14 21:26:46 +02:00
a0a6acf280
all: remove dead code 2024-04-12 21:50:51 +02:00
84b6e74e7b
home/zsh: format, remove dead code 2024-04-12 21:48:25 +02:00
3a6d18e507
mediabox: add wireguard 2024-04-09 15:08:34 +02:00
85203ce57d
mediabox/wireguard: add keys 2024-04-09 15:04:32 +02:00
5b41c1a3c2
magpie/wireguard: add mediabox 2024-04-09 14:52:04 +02:00
0ec61332d0
mediabox: remove restya 2024-04-09 14:21:16 +02:00
21dc8dcd63
mediabox: add nvim overlay 2024-04-09 14:20:54 +02:00
c21478e241
nixy/secrets: add ssh and enc keys 2024-04-06 23:08:17 +02:00
4179492ab3
nixy/borgbackup: add service 2024-04-06 23:07:41 +02:00
4438328d31
magpie/nfs: add service, open firewall port 2049 2024-04-05 23:03:49 +02:00
522e5d4fa9
magpie/borgbackup: add periodic backup service 2024-04-05 23:03:01 +02:00
7b07ab31e0
magpie/sops/borgbase: add ssh and enc keys 2024-04-05 22:53:33 +02:00
9fd4bb35f2
nixy/nfs: enable rpcbind, add nfs to initrd 2024-04-05 22:52:20 +02:00
5ae8a40f5c
magpie/ssh: listen to wiregurad address 2024-04-04 22:48:21 +02:00
f557176504
magpie/sops/wireguard: add privkey 2024-04-04 22:02:49 +02:00
02a4d33e79
magpie/wireguard: add server 2024-04-04 21:58:53 +02:00
f0a5174494
nixy/wireguard: add pubkey 2024-04-04 21:41:02 +02:00
0800300c41
magpie/wireguard: add pubkey 2024-04-04 21:34:39 +02:00
0a901f8a7c
nixy/sops/wireguard: add privkey 2024-04-04 21:34:17 +02:00
1645789022
nixy/wireguard: add client 2024-04-04 21:31:53 +02:00
e5412509cb
flake: update 2024-04-01 12:27:34 +02:00
4026db64a9
home/zsh: add RPS1 info for bubblewrap 2024-04-01 11:31:40 +02:00
4ba5fdb24e
home_packages: add wrap.sh script 2024-04-01 11:31:11 +02:00
3cabb1a700
packages: add wol 2024-04-01 01:05:05 +02:00
6bdd7be056
home_packages: add ssh proxy script 2024-04-01 01:00:33 +02:00
9e9d70785b
home/qutebrowser: wrap in firejail 2024-04-01 00:59:16 +02:00
3d6b1cdd84
nextcloud: services.nextcloud.{extraOptions -> settings} 2024-03-30 20:01:52 +01:00
d70ef970ce
nextcloud 27 -> 28 2024-03-30 19:50:12 +01:00
b07404b152
disable 3proxy, set http3 on virtual hosts 2024-03-30 19:49:13 +01:00
b0c9edaddf
flake: update 2024-03-30 13:50:28 +01:00
59edd24e18
home_packages: add anydesk 2024-03-30 13:50:18 +01:00
312df469d6
sway: re-enable WLR_RENDERER vulkan 2024-03-30 13:50:00 +01:00
9e945035ca
packages: add proxychains-ng 2024-03-30 13:49:20 +01:00
bcf1b737b0
zapzap: move to upstream package 2024-03-23 17:50:07 +01:00
8c29c37f5a
flake: update nvim_flake 2024-03-23 17:43:19 +01:00
ec5f4c8250
packages: add wirelesstools 2024-03-23 10:55:15 +01:00
41cac22148
zapzap: 5.1-2 -> 5.2.1 2024-03-18 14:56:41 +01:00
24ba8e8843
magpie/3proxy: add credentials 2024-03-17 19:33:24 +01:00
d9ae2d4e69
magpie: remove restya, add 3proxy 2024-03-17 19:33:03 +01:00
c66a23bf94
home/zsh: update pure_prompt 2024-03-16 21:55:03 +01:00
5d1b0ed1c1
home_packages: add nix-prefetch-git 2024-03-16 21:36:01 +01:00
1ecc618d97
magpie: aarch64-linux -> ${system} 2024-03-16 17:21:46 +01:00
923aedc475
magpie: arm64-linux -> aarch64-linux 2024-03-16 17:15:58 +01:00
ea00c89620
flake: fix nvim_flake source 2024-03-16 15:31:38 +01:00
f1d4ffd261
magpie: add nvim overylan and package 2024-03-16 15:27:40 +01:00
dee5594c1c
flake: update nvim_flake 2024-03-16 14:32:06 +01:00
f4c64548de
Merge branch 'overlay' 2024-03-16 14:28:11 +01:00
2f241099e7
home_packages: remove dev packages now found in nvim_flake overlay 2024-03-16 14:25:32 +01:00
5830babf44
packages: add nvim from nvim_flake overlay 2024-03-16 14:24:42 +01:00
49687a41bc
nixy/overlays: add nvim 2024-03-16 11:22:01 +01:00
bea0ce89ad
home_packages: remove packages meant for nvim overlay 2024-03-16 11:18:49 +01:00
78f748f19d
home: unset pinentry flavor 2024-03-14 21:59:54 +01:00
60efcc31d1
home_packages: re-enable west 2024-03-14 21:52:07 +01:00
3d3b3b6445
home_packages: add chromium{,_teams,_discord} 2024-03-14 21:46:51 +01:00
ba319a2cdc
nixy: add v4l2loopback module 2024-03-14 15:07:47 +01:00
bb9cb50afb
home_packages: add wine, discord, teamsf-for-linux 2024-03-14 14:29:18 +01:00
d29767cf01
flake: update 2024-03-14 14:25:22 +01:00
64d2afbd67
home/sway: add clipboard screenshot script 2024-02-13 14:19:52 +01:00
f1c9506d1e
mediabox: set tmpfsSize to 80% 2024-02-11 09:56:51 +01:00
2233cd378a
home/packages: temporary disable west due to build failure 2024-01-28 21:16:10 +01:00
5e1408491a
flake: update 2024-01-28 21:15:44 +01:00
59bdec72c9
packages: x86_64-linux -> ${system} 2024-01-28 16:50:52 +01:00
fa711b0d77
flake: add system to arguments 2024-01-28 16:48:53 +01:00
d30413ece7
nixy: x86_64-linux -> ${system} 2024-01-28 16:48:17 +01:00
148706b881
mediabox: x86_64-linux -> ${system} 2024-01-28 16:47:59 +01:00
963dfaa9f6
home/sway: add term variable 2024-01-28 15:47:24 +01:00
2d72cd5d7f
home/packages: set generic ${system}, remove cemu, pass -> pass-wayland 2024-01-28 15:24:30 +01:00
c0bb1e00fd
home/sway: set full command path for exec calls
home/sway: set full command path for exec calls
2024-01-28 15:24:26 +01:00
21a44c285c
flake: add system to home-manager arguments 2024-01-28 15:00:45 +01:00
1ffa293354
home/sway: add cliphist script 2024-01-28 12:53:43 +01:00
3459bcaf39
home/services: enable cliphist 2024-01-28 01:34:27 +01:00
9a670e730f
goatcounter: add flake input
goatcounter: change repo

syntax fix
2024-01-21 23:00:23 +01:00
01e080f91b Merge pull request 'goatcounter' (#1) from goatcounter into master
Reviewed-on: #1
2024-01-21 22:50:10 +01:00
cf269a5d19
magpie: add goatcounter 2024-01-21 22:45:06 +01:00
f317de51e9
goatcounter: add flake input
goatcounter: change repo
2024-01-21 22:45:04 +01:00
899a2cea17
packages: remove stm32cubemx 2024-01-21 13:37:00 +01:00
703b542d15
flake: update 2024-01-21 13:33:30 +01:00
b1c7cf6914
home_packages: re-add glaxnimate, use mainstream stm32cubemx 2024-01-21 13:03:04 +01:00
a1e6e9bfa6
nixy/hosts: add ender.lan 2024-01-19 20:03:33 +01:00
5f78152967
packages/viber: 21.0.0.1 -> 21.8.0.11 2024-01-19 20:02:11 +01:00
7e41ce1049
home/zsh: run tmux in systemd user instead of session scope 2024-01-15 15:53:44 +01:00
ccd346efdb
home/packages: add nixpkgs-fmt 2024-01-15 14:49:54 +01:00
c791de683b
packages/zapzap: cleanup 2024-01-14 21:09:56 +01:00
4cb8d8ba39
packages/zapzap: update 2024-01-14 19:54:59 +01:00
d9caa08da5
packages/stm32cubemx: update to reflect upstream 2024-01-14 13:37:52 +01:00
0a1cf9b0ca
nixy/udev: add permissions for arduino uno r4 2024-01-14 13:36:44 +01:00
523ace6324
home/tmux: add initial config 2023-12-25 18:46:34 +01:00
47181c9fc6
nixy: reenable xserver 2023-12-25 18:46:11 +01:00
5b1bb35ee2
home/zsh: disable extendedglob 2023-12-25 18:45:49 +01:00
252f37b7ed
packages: add hcxdumptool 2023-12-25 12:36:45 +01:00
935e2a9255
home_packages: add stm32cubemx 2023-12-08 18:44:00 +01:00
b3dba22907
package: add stm32cubemx 2023-12-08 18:42:24 +01:00
c79e8bb097
home/zsh: add full nix path for tmux 2023-11-19 12:43:44 +01:00
a756a9fa7e
home/zsh: execute tmux on ssh 2023-11-19 12:09:51 +01:00
30fe47b03d
home/packages: add blender, freecad, openscad 2023-11-18 21:22:37 +01:00
9e04dca9ce
nixy: append openocd udev rules 2023-11-16 19:44:37 +01:00
781ba05fb6
flake: update 2023-11-15 21:07:36 +01:00
04fb1d30ba
home/packages add krita 2023-11-15 17:54:57 +01:00
0dd29f6dcf
magpie/restya: add uri 2023-11-14 23:08:45 +01:00
adb7517bb6
magpie: set correct project-cloud out path for nginx 2023-11-14 17:06:26 +01:00
c7b53551f3
magpie/nextcloud: change url, nginx: add next-cloud virtualhost 2023-11-14 14:42:20 +01:00
9b0f6ef2fc
flake: add project-cloud input 2023-11-14 14:41:06 +01:00
08b97f204f
home/swayidle: switch swaylock for swaylock_fancy script 2023-11-13 16:50:38 +01:00
ee50755eea
magpie/miniflux: disable 2023-11-12 19:32:23 +01:00
ee6ee13736
magpie/gitea: move LANDING_PAGE setting to server group 2023-11-12 19:18:17 +01:00
174e0c84d7
home/swayidle: change locker to swaylock 2023-11-12 18:08:33 +01:00
19cb0ea72f
magpie/boot: set configuration limit to 2 2023-11-12 18:05:03 +01:00
a19c3c63aa
magpie/packages: add pcieutils, usbutils, tmux 2023-11-12 17:58:32 +01:00
22cb91b369
magpie/gitea: set landing page to explore 2023-11-12 17:43:02 +01:00
c6959a2a91
all: set nix.registry to input 2023-11-12 14:08:22 +01:00
5ed8a048e8
nixy: add suspend.nix module 2023-11-12 13:54:16 +01:00
94ec38ffa7
nixy: disable xserver and i3 2023-11-12 13:47:36 +01:00
bb498d7771
nixy: enable battery notifier 2023-11-12 13:47:10 +01:00
48db29c420
flake: update 2023-11-11 23:08:22 +01:00
fa038743d9
packages: htop -> htop-vim 2023-11-11 23:07:53 +01:00
96dbf3682a
home: set qutebrowser as default in xdg 2023-11-11 23:07:11 +01:00
040d840620
Revert "Revert "home/qutebrowser: temporary fix where qutebrowser hangs with vulkan enabled""
This reverts commit 70d3c338c8.
2023-11-08 13:59:58 +01:00
c9bbb59f12
mediabox/sysctl: set BRR congestion control 2023-11-06 22:34:11 +01:00
c7b8b486ea
mediabox/sysctl: set BRR congestion control 2023-11-06 22:31:06 +01:00
3c3c3dab6e
nixy/sysctl: set BRR congestion control 2023-11-06 22:30:39 +01:00
a2daa8e145
magpie/sysctl: set BRR congestion control 2023-11-06 22:26:03 +01:00
2f3c3f3f0c
magpie/systemd: disable sleep, emergencymode; setup watchdog 2023-11-06 22:16:41 +01:00
bca4baf226 Merge remote-tracking branch 'origin/master' 2023-11-06 19:26:08 +01:00
eccdb771ce magpie/nextcloud: tune php interpreter 2023-11-06 19:25:49 +01:00
3d7385616b
Revert "mediabox/kernel: temporary fix for console issue"
This reverts commit 5025dd2571.
2023-11-06 19:24:34 +01:00
2f0bc3ef58
Revert "flake: update"
This reverts commit bb306d3145.
2023-11-06 19:24:19 +01:00
9c2f2a932f
Revert "nixy/kernel: temporary fix for console issue"
This reverts commit b432b209c3.
2023-11-06 19:24:05 +01:00
70d3c338c8
Revert "home/qutebrowser: temporary fix where qutebrowser hangs with vulkan enabled"
This reverts commit 2cc745ea26.
2023-11-06 19:23:55 +01:00
e4c0207bd3
magpie/firewall: do not log refused connections, enable ping 2023-11-06 19:23:21 +01:00
5025dd2571
mediabox/kernel: temporary fix for console issue 2023-11-04 10:26:23 +01:00
bb306d3145
flake: update 2023-11-04 10:23:49 +01:00
b432b209c3
nixy/kernel: temporary fix for console issue 2023-11-04 10:23:36 +01:00
2cc745ea26
home/qutebrowser: temporary fix where qutebrowser hangs with vulkan enabled 2023-11-03 12:39:24 +01:00
3d2d8ea274
viber: wrap with bubblewrap to disable $HOME access 2023-11-03 00:38:02 +01:00
70efe40a80
packages: add bubblewrap with overlay patches 2023-11-03 00:37:32 +01:00
4ce7d3fc89
Revert "flake: update"
This reverts commit 3106fe565d.
2023-11-02 17:01:04 +01:00
747d488bfb
packages/viber: add direct link as archive.org is slow atm 2023-11-02 16:28:16 +01:00
d720a9cefb
home/packages: temporary disable glaxnimate 2023-11-02 15:44:10 +01:00
3106fe565d
flake: update 2023-11-02 14:32:57 +01:00
ef5dd97e8f
flake: update nvim 2023-11-02 13:48:09 +01:00
641bed9cad
packages: add dtach, tmux 2023-11-02 13:47:55 +01:00
036ffda2f8
nixy/fs: change fs uuid 2023-11-02 13:46:30 +01:00
b2b5a9564c
nixy/environment: remove SSH_ASKPASS from env 2023-10-31 21:23:16 +01:00
9f958a5643
home/gpg: set pinentry to curses 2023-10-31 21:22:47 +01:00
ee5102e959
home/zsh: update prompt 2023-10-31 19:41:46 +01:00
fb4cf11448
nixy/nix: enable sandbox 2023-10-30 23:58:49 +01:00
139b48e84b
home/packages: add tea 2023-10-30 23:58:31 +01:00
9c77a6775b
home/packages: add ghostscript and poppler_utils 2023-10-30 20:24:43 +01:00
6ddeed17ac
home/packages: add inkscape 2023-10-30 17:18:33 +01:00
99699ca2de
Revert "home/sway: replace swaybar with waybar"
This reverts commit 65caa07dc0.
2023-10-29 18:41:23 +01:00
60e18856a7
packages/viber: add webarchive url instead of direct link 2023-10-29 14:34:52 +01:00
9d7436939b
home/packages: add viber 2023-10-29 14:34:21 +01:00
65caa07dc0
home/sway: replace swaybar with waybar 2023-10-29 14:34:10 +01:00
5f57ca4b79
packages/viber: add derivation 2023-10-29 12:15:51 +01:00
4613b26503
home/sway: switch whatsapp-for-linux with zapzap 2023-10-29 00:59:12 +02:00
b7b2d5fc72
home/packages: add zapzap 2023-10-29 00:42:00 +02:00
33fffd5f92
packages/zapzap: add derivation 2023-10-29 00:41:39 +02:00
2c015fc1e6
packages/zapzap: remove flake from repo 2023-10-29 00:41:21 +02:00
5275d7a226
packages: add zapzap flake 2023-10-28 23:45:13 +02:00
f4a7213057
home/git: add sign key and enable signing by default 2023-10-28 18:11:08 +02:00
d5fbf61c34
blue: remove header from configuration 2023-10-28 16:55:04 +02:00
cc74cb1484
nixy/configuration remove header 2023-10-28 16:33:45 +02:00
d0fb21119f readme: remove md escapes 2023-10-28 15:47:25 +02:00
b7c578c304 readme: change format from md to txt 2023-10-28 15:46:58 +02:00
27691ecf66 readme: Add main repo URL 2023-10-28 15:44:17 +02:00
Asmir A
a307927cf3 mediabox: add inputs to home-manager 2023-10-28 15:39:32 +02:00
77190240a5 mediabox: limit systemd journal size 2023-10-28 14:51:13 +02:00
4ef5ab21a8 magpie/nextcloud: add php optimizations 2023-10-27 20:46:40 +02:00
9c6df06d38 Merge remote-tracking branch 'origin/master' 2023-10-27 20:43:20 +02:00
1b00de0f01 magpie/nextcloud: add php optimizations 2023-10-27 20:42:23 +02:00
780646d2fc packages: add mosh, socat, optipng 2023-10-27 14:20:50 +02:00
47a78f866d home/vim: remove local files since utilizing nvim_flake 2023-10-27 14:19:00 +02:00
a7ddf03de6 flake: update swaysw input 2023-10-27 12:42:56 +02:00
e822f08a6e home/sway: add swaysw shortcut 2023-10-27 12:42:07 +02:00
eb40751a7b flake: add nvim_flake input 2023-10-27 12:40:58 +02:00
142db429ec home/packages: add nvim flake and additional utils 2023-10-27 12:40:33 +02:00
c3a51a524a home-manager/nvim: remove settings from home.nix 2023-10-27 12:40:04 +02:00
ff1333ac48 nvim: add flake input 2023-10-27 01:46:36 +02:00
d8e200de3a nixy/home_packages: add swaysw 2023-10-26 22:48:15 +02:00
a0ba9ec680 nixy/sway: change def wallpaper location 2023-10-26 22:48:15 +02:00
91bbc1e360 home/packages: add go 2023-10-26 22:48:15 +02:00
c21c7751e2 flake.lock: Update
Flake lock file updates:

• Updated input 'home-manager':
    'github:nix-community/home-manager/68f7d8c0fb0bfc67d1916dd7f06288424360d43a' (2023-10-04)
  → 'github:nix-community/home-manager/09587fbbc6a669f7725613e044c2577dc5d43ab5' (2023-10-25)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/fdd898f8f79e8d2f99ed2ab6b3751811ef683242' (2023-10-01)
  → 'github:nixos/nixpkgs/7c9cc5a6e5d38010801741ac830a3f8fd667a7a0' (2023-10-19)
• Updated input 'simple-nixos-mailserver':
    'gitlab:simple-nixos-mailserver/nixos-mailserver/c63f6e7b053c18325194ff0e274dba44e8d2271e' (2023-07-21)
  → 'gitlab:simple-nixos-mailserver/nixos-mailserver/84783b661ecf33927c534b6476beb74ea3308968' (2023-09-28)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/746c7fa1a64c1671a4bf287737c27fdc7101c4c2' (2023-10-03)
  → 'github:Mic92/sops-nix/30a0ba4a20703b4bfe047fe5def1fc24978e322c' (2023-10-22)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/dbe90e63a36762f1fbde546e26a84af774a32455' (2023-10-01)
  → 'github:NixOS/nixpkgs/fb000224952bf7749a9e8b3779104ef7ea4465c8' (2023-10-21)
2023-10-25 20:57:34 +02:00
95f0e95b56 magpie/mail: enable imap 2023-10-25 20:56:34 +02:00
447dca1927 magpie/programs: add alejandra, neovim alias 2023-10-20 22:09:44 +02:00
ae2c9694c5 magpie/programs: enable mosh 2023-10-20 21:41:23 +02:00
91b0c91c9c magpie/mail: add account "asmir" 2023-10-20 21:38:28 +02:00
4daf2f851b magpie/mail: add account "asmir" 2023-10-20 21:37:04 +02:00
8a40c727e0 magpie/nextcloud: add admin account/pass 2023-10-20 21:35:43 +02:00
93c6ae5f9c magpie/mail: add account "asmir" 2023-10-20 21:10:56 +02:00
f0fca6c74e magpie: remove config header 2023-10-18 00:16:52 +02:00
7514c94880 magpie/gitea: remove unused postgres password 2023-10-18 00:00:51 +02:00
ae58ed03cb magpie/gitea: remove unused pass 2023-10-17 23:51:56 +02:00
fdc36b2708 magpie/gitea: switch to sqlite3 2023-10-17 23:51:20 +02:00
a5000b9889 magpie/gitea: disable registration and ssh 2023-10-17 23:14:06 +02:00
8492b26016 magpie/mailserver: update configuration syntax 2023-10-17 22:51:43 +02:00
f2dcdb6d5c magpie/gitea: update configuration syntax 2023-10-17 22:50:31 +02:00
cadaede0ee magpie/gitea: replace smtp with sendmail, fix pass reset bug 2023-10-17 22:41:22 +02:00
eb43638c3b magpie/gitea: remove unneeded pass 2023-10-17 22:40:26 +02:00
f0e7c5bed7 magpie/gitea: add mail pass 2023-10-17 20:35:55 +02:00
1afa53239a magpie/sops: rename gitea secrets file 2023-10-14 23:24:16 +02:00
805e72c516 magpie/sops: rename gitea secrets file 2023-10-14 23:21:59 +02:00
fc45fdf0a5 magpie/gitea: change mail pass 2023-10-14 23:19:24 +02:00
9e90599099 magpie/miniflux: export url, add https cert 2023-10-13 13:29:25 +02:00
b467130209 magpie/sops: update minflux secrets format 2023-10-13 13:28:48 +02:00
dcf7736468 magpie/sops: update minflux secrets format 2023-10-13 13:13:00 +02:00
5ac247d951 magpie: add miniflux credentials 2023-10-13 12:52:26 +02:00
fb25519cdb magpie: enable miniflux 2023-10-13 12:44:20 +02:00
edd421eb45 packages: add hdparm 2023-10-07 11:05:41 +02:00
c600fe8663 nixy/hosts: add jellyseerr.mediabox.lan 2023-10-05 22:53:56 +02:00
4b2db9f1b4 mediabox: enable jellyseerr 2023-10-05 22:52:30 +02:00
0561f3d1b4 magpie/restya: set different local and remote host name 2023-10-05 21:28:28 +02:00
a73ad5f3b7 magpie/restya: remove duplicate nginx config 2023-10-05 19:53:08 +02:00
d5a2b982cc magpie/restya: change local port and listenHost 2023-10-05 19:13:19 +02:00
695157c354 magpie/gitea: update config syntax 2023-10-05 19:04:23 +02:00
48e0a3c06d flake: update 2023-10-05 19:00:12 +02:00
fc96961fc3 packages: add curlHTTP3 2023-10-05 19:00:03 +02:00
622d8ce02b magpie: enable quic/http3 on nginx 2023-10-05 18:59:43 +02:00
f4276fdf04 mediabox: select correct peerix priv key 2023-10-03 23:55:54 +02:00
283f1c297e nixy: set mem_sleep_default to deep in kernel cmd line; enable wasi and x64-windows binfmt emulation 2023-10-03 23:55:01 +02:00
880d6e9aed mediabox: update nix options naming 2023-10-01 21:26:33 +02:00
469146da60 all systems: enable memtest86; blue/nix_store: set read only 2023-10-01 21:14:30 +02:00
Asmir A
a379efdf01 mediabox: disable undervolt 2023-10-01 21:10:27 +02:00
09612ae44e mediabox: enable intel microcode update 2023-10-01 21:07:17 +02:00
d5468f6b67 magpie: format new files 2023-10-01 16:16:25 +02:00
d6bef987c4 magpie: fix simple-nixos-mailserver 2023-10-01 16:11:38 +02:00
1368873bdf magpie: add base files 2023-10-01 16:03:02 +02:00
Asmir A
e21f69439a flake: nix-xilinx follows nixpkgs 2023-09-30 20:13:43 +02:00
Asmir A
271570605b mediabox: add peerix secrets file 2023-09-30 16:19:55 +02:00
Asmir A
8e14ba0fe4 flake/shell: add age to buildInputs 2023-09-30 16:16:21 +02:00
Asmir A
e0e30163ed mediabox: add qbitsotrrents as module 2023-09-30 16:12:03 +02:00
b0a16b44c2 flake/shell: add ssh-to-age to buildInputs 2023-09-30 16:10:36 +02:00
4daf6275dc mediabox: update configuration to match nixy 2023-09-30 14:31:03 +02:00
2a2824e6e9 nixy: remove dead code 2023-09-30 14:30:28 +02:00
9f279bfe8d modules: add nextcloud and qbittorrent 2023-09-30 14:11:42 +02:00
46609fff8d modules: add suspend 2023-09-30 14:11:16 +02:00
53fbdb1e85 mediabox: add base file structure 2023-09-30 14:10:53 +02:00
f0a9569507 meta: format files with alejandra 2023-09-30 12:45:55 +02:00
cd678803fd flake: move packages.nix to separate directory 2023-09-30 12:38:13 +02:00
e8fe3d3f8f nixy/peerix: move public key file into own folder 2023-09-30 12:36:02 +02:00
ddb76ace37 home/sway: use correct sway syntax for input device type config 2023-09-29 22:51:22 +02:00
de7f060142 home/i3status-rust: reenable network interfaces for nixy 2023-09-29 22:43:34 +02:00
ad25a3cfe1 meta: move config to separate file 2023-09-29 22:39:06 +02:00
fcc0f05167 flake: set nix-xillinx to not follow nixpkgs 2023-09-29 22:38:49 +02:00
c7353452ee meta: format blue/configuration.nix 2023-09-29 21:13:48 +02:00
5500b7f633 flake: update 2023-09-29 21:03:10 +02:00
3368f755f5 nixy: move nixy secrets directory to nixy folder 2023-09-29 21:01:40 +02:00
de81dc1f58 flake: adjust paths for new layout, add packages followin nixpkgs 2023-09-29 20:59:39 +02:00
1f8440a351 nixy: move hw config into own directory 2023-09-29 20:56:23 +02:00
f86e8d9ce7 home_packages: reenable openocd and kicad 2023-09-29 20:55:18 +02:00
d30100c70e sway: add wallpaper 2023-09-29 20:54:23 +02:00
0b32c60d8e flake: restore lock file from master before merge 2023-09-29 20:51:15 +02:00
46209f2a68 Merge branch 'blue' 2023-09-29 20:49:16 +02:00
74b009b816 meta: start amalgamization of all configs 2023-09-29 20:09:11 +02:00
c7dce9e6b7 flake: update 2023-09-29 19:53:16 +02:00
f869966b60 home/qutebrowser: update package name, open hints directly in mpv 2023-09-20 19:44:52 +02:00
874cc98c11 flake: update 2023-09-20 19:44:14 +02:00
83e23db173 filesystem: btrfs change compression from zstd to lzo on all subvolumes 2023-09-20 19:43:53 +02:00
794e304ab8 flake: add zremap, hosts: update 2023-09-20 19:43:01 +02:00
2d8a742ed1 blue: add skelet for blue host 2023-09-07 10:57:18 +02:00
a16f26e597 flake.lock: update 2023-08-27 19:22:28 +02:00
296b227382 sops-nix: add input.nixpkgs follows nixpkgs 2023-08-27 19:22:13 +02:00
7b119977bc packages: add lm_sensors 2023-08-27 19:21:32 +02:00
3fcf854c2d services/caps2esc: add second delay before starting intercepting to avoid enter beeing stuck 2023-08-27 19:20:53 +02:00
55a2150b03 blue: start flake migration 2023-08-11 20:41:58 +02:00
c003245bb5 home/mpv: select dmabuf_wayland as vo, diasble sway vulkan renderer 2023-08-10 20:24:24 +02:00
52d493a1d2 flake: update 2023-08-10 20:23:43 +02:00
3bf4127203 meta: update flake 2023-08-08 16:08:01 +02:00
cc32a2e506 home/packages: temporary disable openocd because of build failure 2023-08-08 16:07:42 +02:00
9a11bc0a12 reemove openocd udev rules, update fonts.fonts to fonts.packages 2023-08-08 16:07:01 +02:00
8f6bf7544a home/mpv: remove default config 2023-08-08 16:06:23 +02:00
cac3f1f301 home/packages: add cmake 2023-08-05 21:31:59 +02:00
d3fa790243 home/packages: add meson and ninja 2023-08-05 21:30:27 +02:00
d7da18132b meta: add nixd config 2023-08-04 21:04:34 +02:00
e2a7d6b2ca packages: add traceroute 2023-08-04 21:03:49 +02:00
c93d2186d9 home/packages: add qemu_kvm 2023-07-30 16:10:52 +02:00
282cd51542 home/packages: add yewtube 2023-07-29 21:35:19 +02:00
46100007da flake: update 2023-07-29 21:34:23 +02:00
4f5cc851de sops/peerix: change key 2023-07-29 21:33:28 +02:00
e63a197299 home/mps: use yt-dlp instead of youtube-dl 2023-07-29 21:32:54 +02:00
82e5645493 sops: use ssh key 2023-07-29 21:32:14 +02:00
c1d5993f7e home_packages: add birdtray, nix-init 2023-07-26 20:37:46 +02:00
a61e978631 packages add dfu-util 2023-07-20 17:25:36 +02:00
eb43190b7c vim: add zls, do keybind cleanup 2023-07-10 10:50:42 +02:00
7a54d9fa15 vim: disable lus_ls telemetry, don't call setup twice 2023-07-09 12:38:01 +02:00
020fcdc0ab vim: remove unused pkgs 2023-07-09 12:02:50 +02:00
c6fd52e0c0 vim: lua_ls fix vim global not found 2023-07-09 12:02:21 +02:00
e7e79986ad vim: update and cleanup 2023-07-08 22:09:45 +02:00
4d52dcadc7 vim: add ultisnips as cmp source, cleanup 2023-07-07 11:12:48 +02:00
2a9bcf2f24 vim: experiment with nixd, add ultisnips to nvim-cmp 2023-07-06 22:30:52 +02:00
4630720d82 flake: add formater 2023-07-06 22:29:34 +02:00
f0d881de5d nix flake: add devShell 2023-07-03 23:10:39 +02:00
57 changed files with 3807 additions and 790 deletions

1
.nixd.json Normal file
View File

@ -0,0 +1 @@
{"formatting":{"command":"alejandra"}}

30
.sops.yaml Normal file
View File

@ -0,0 +1,30 @@
keys:
- &magpie age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
- &mediabox age19yrl6pr73cv067ksfz0txp3zm2au25jfyjeerw23ml55ps5cyyfqtm3kmt
- &nixy age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
creation_rules:
- path_regex: common/secrets/[^/]+\.yaml$
key_groups:
- age:
- *magpie
- *mediabox
- *nixy
- path_regex: magpie/secrets/[^/]+\.yaml$
key_groups:
- age:
- *magpie
- *nixy
- path_regex: mediabox/secrets/[^/]+\.yaml$
key_groups:
- age:
- *mediabox
- *nixy
- path_regex: nixy/secrets/[^/]+\.yaml$
key_groups:
- age:
- *nixy

View File

@ -1 +0,0 @@
NixOS configuration using nix flakes and home-manager

3
README.txt Normal file
View File

@ -0,0 +1,3 @@
NixOS configuration using nix flakes and home-manager
Main repository found at: https://git.project-cloud.net/asmir/nixos_flake_config

View File

@ -1,56 +1,45 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ {
config, config,
pkgs, pkgs,
lib,
caps2esc,
nix-xilinx,
sops-nix,
... ...
}: { }:
imports = []; {
imports = [
];
system.stateVersion = "23.05"; system.stateVersion = "23.05";
system.autoUpgrade.enable = false; system.autoUpgrade.enable = true;
sops.age.keyFile = config.users.users.akill.home + "/.config/sops/age/keys.txt";
sops.secrets."peerix/private" = {
sopsFile = ./secrets/peerix.yaml;
};
nix = { nix = {
optimise.automatic = true; optimise.automatic = true;
gc.automatic = true; gc.automatic = true;
gc.options = "--delete-older-than 7d"; gc.options = "--delete-older-than 7d";
package = pkgs.nixUnstable; package = pkgs.nixVersions.latest;
settings = { settings.experimental-features = [
experimental-features = ["nix-command" "flakes"]; "nix-command"
trusted-public-keys = [ "flakes"
"binarycache.mediabox.lan:3vZwbCaCuOK5fc92rKknvyU7e5fDbnKEKLb/VTaICoU="
]; ];
}; };
};
boot = { boot = {
extraModulePackages = with config.boot.kernelPackages; [usbip];
initrd.compressor = "zstd";
initrd.kernelModules = ["amdgpu"];
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
kernelParams = ["psmouse.synaptics_intertouch=0"]; kernelParams = [ "msr.allow_writes=on" ];
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot.editor = false;
loader.systemd-boot.enable = true;
readOnlyNixStore = true;
supportedFilesystems = [ "btrfs" ]; supportedFilesystems = [ "btrfs" ];
tmp.useTmpfs = true; tmpOnTmpfs = true;
initrd.compressor = "zstd";
loader.systemd-boot = {
enable = true;
editor = false;
memtest86.enable = true;
};
loader.efi.canTouchEfiVariables = true;
readOnlyNixStore = true;
}; };
security = { security = {
rtkit.enable = true; rtkit.enable = true;
allowSimultaneousMultithreading = true; allowSimultaneousMultithreading = true;
sudo.enable = true; sudo.enable = false;
doas.enable = true; doas.enable = true;
doas.extraRules = [ doas.extraRules = [
{ {
@ -66,45 +55,24 @@
}; };
networking = { networking = {
firewall = { firewall.enable = true;
enable = true; hostName = "blue";
allowedTCPPorts = [80 443]; nameservers = [
}; "127.0.0.1"
"::1"
hostName = "nixy"; ];
nameservers = ["127.0.0.1" "::1"];
dhcpcd.extraConfig = "nohook resolv.conf"; dhcpcd.extraConfig = "nohook resolv.conf";
extraHosts = ''
192.168.88.230 mediabox.lan
192.168.88.230 jellyfin.mediabox.lan
192.168.88.230 deluge.mediabox.lan
192.168.88.230 binarycache.mediabox.lan
192.168.88.231 workstation.lan
192.168.88.1 router.lan
'';
networkmanager = { networkmanager = {
enable = true; enable = true;
dns = "none"; dns = "none";
wifi.backend = "iwd"; # wifi.backend = "iwd";
};
wireless.iwd = {
enable = true;
settings = {
General = {
AddressRandomization = "network";
#EnableNetworkConfiguration = true;
};
};
}; };
}; };
time.timeZone = "Europe/Sarajevo"; time.timeZone = "Europe/Sarajevo";
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [nix-xilinx.overlay];
environment = { environment = {
homeBinInPath = true; homeBinInPath = true;
variables = { variables = {
@ -134,9 +102,9 @@
serviceConfig.Nice = -20; serviceConfig.Nice = -20;
script = '' script = ''
${pkgs.interception-tools}/bin/intercept \ ${pkgs.interception-tools}/bin/intercept \
-g /dev/input/by-path/platform-i8042-serio-0-event-kbd | \ -g /dev/input/by-path/*-kbd | \
${caps2esc.defaultPackage.x86_64-linux}/bin/caps2esc | ${pkgs.interception-tools}/bin/uinput \ /opt/caps2esc | ${pkgs.interception-tools}/bin/uinput \
-d /dev/input/by-path/platform-i8042-serio-0-event-kbd \ -d /dev/input/by-path/*-kbd \
''; '';
}; };
}; };
@ -154,9 +122,21 @@
fstrim.enable = true; fstrim.enable = true;
fwupd.enable = true; fwupd.enable = true;
ntp.enable = true; ntp.enable = true;
openssh.enable = true; openssh.enable = false;
printing.enable = true; printing.enable = true;
nextcloud = {
enable = true;
hostName = "localhost";
config.adminpassFile = "${pkgs.writeText "adminpass" "test123"}";
};
jellyfin = {
enable = false;
user = "akill";
openFirewall = false;
};
pipewire = { pipewire = {
enable = true; enable = true;
alsa.enable = true; alsa.enable = true;
@ -177,17 +157,10 @@
windowManager.i3.enable = true; windowManager.i3.enable = true;
}; };
udev = { udev.packages = [
packages = [pkgs.openocd pkgs.rtl-sdr pkgs.openhantek6022]; pkgs.rtl-sdr
extraRules = '' pkgs.openhantek6022
#Xilinx FTDI ];
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Xilinx", MODE:="666"
#Xilinx Digilent
ATTR{idVendor}=="1443", MODE:="666"
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Digilent", MODE:="666"
'';
};
tlp = { tlp = {
enable = true; enable = true;
@ -204,13 +177,19 @@
{ {
keys = [ 114 ]; keys = [ 114 ];
events = ["key" "rep"]; events = [
"key"
"rep"
];
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'"; command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%- unmute'";
} }
{ {
keys = [ 115 ]; keys = [ 115 ];
events = ["key" "rep"]; events = [
"key"
"rep"
];
command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'"; command = "/run/current-system/sw/bin/runuser -l akill -c 'amixer -q set Master 5%+ unmute'";
} }
@ -228,6 +207,18 @@
]; ];
}; };
mpd = {
musicDirectory = "/home/mpd/music";
enable = false;
extraConfig = ''
audio_output {
type "pulse"
name "pulsee srv"
server "127.0.0.1"
}
'';
};
dnscrypt-proxy2 = { dnscrypt-proxy2 = {
enable = true; enable = true;
settings = { settings = {
@ -245,11 +236,6 @@
}; };
}; };
nix-serve = {
enable = false;
secretKeyFile = "/var/cache-priv-key.pem";
};
journald.extraConfig = '' journald.extraConfig = ''
SystemMaxUse=50M SystemMaxUse=50M
''; '';
@ -301,7 +287,6 @@
}; };
podman = { podman = {
enable = true; enable = true;
autoPrune.enable = true;
dockerCompat = true; dockerCompat = true;
}; };
}; };
@ -322,7 +307,8 @@
enable = true; enable = true;
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
extraPackages = with pkgs; []; extraPackages = with pkgs; [
];
}; };
}; };
@ -334,6 +320,14 @@
users.users.akill = { users.users.akill = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = ["wireshark" "kvm" "tty" "audio" "sound" "adbusers" "dialout" "wheel"]; extraGroups = [
"wireshark"
"kvm"
"tty"
"audio"
"sound"
"adbusers"
"dialout"
];
}; };
} }

View File

@ -0,0 +1,100 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
fsType = "btrfs";
options = [
"subvol=root"
"compress=zstd"
"noatime"
];
};
boot.initrd.luks.devices."enc_root".device =
"/dev/disk/by-uuid/8eb8ac22-d89d-4406-bfbd-ce43e283649f";
fileSystems."/home" = {
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
fsType = "btrfs";
options = [
"subvol=home"
"compress=zstd"
"noatime"
];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
fsType = "btrfs";
options = [
"subvol=nix"
"compress=zstd"
"noatime"
];
};
fileSystems."/var/log" = {
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
fsType = "btrfs";
options = [
"subvol=log"
"compress=zstd"
"noatime"
];
neededForBoot = true;
};
fileSystems."/persist" = {
device = "/dev/disk/by-uuid/0af4dcb9-6e59-4946-87b2-0d2f14b808d4";
fsType = "btrfs";
options = [
"subvol=persist"
"compress=zstd"
"noatime"
];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/6C85-D29B";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,50 +1,81 @@
{ {
config,
pkgs, pkgs,
nix-xilinx, nix-xilinx,
system,
... ...
}: { }:
environment.systemPackages = with pkgs; {
environment.systemPackages =
with pkgs;
[ [
acpi acpi
binutils binutils
binwalk
bluez bluez
bluez-tools bluez-tools
btop btop
busybox
curlHTTP3
dfu-util
dhcpcd dhcpcd
direnv direnv
dmidecode dmidecode
dnsmasq dnsmasq
dnsutils
dtach
ethtool
f2fs-tools
fd fd
file file
fio
fzf fzf
fzy fzy
git git
adwaita-icon-theme
gnomeExtensions.appindicator
gnupg gnupg
gptfdisk gptfdisk
htop hcxdumptool
hdparm
htop-vim
interception-tools interception-tools
iw
jq jq
lm_sensors
man-pages
man-pages-posix
meson
mosh
msmtp msmtp
nano nano
neovim neovim
ninja
nix-index nix-index
nixos-option nixos-option
nmap nmap
ntfs3g ntfs3g
ntfsprogs ntfsprogs
nvim
nvme-cli
openhantek6022 openhantek6022
optipng
pax-utils pax-utils
pciutils pciutils
proxychains-ng
pstree pstree
psutils psutils
qemu_kvm
ripgrep ripgrep
rsync rsync
silver-searcher silver-searcher
socat
sops
sshfs sshfs
strace strace
swaylock swaylock
tig tig
tmux
traceroute
unrar unrar
unzip unzip
usbutils usbutils
@ -56,9 +87,18 @@
vulkan-tools-lunarg vulkan-tools-lunarg
vulkan-validation-layers vulkan-validation-layers
wget wget
wirelesstools
wol
xdg-utils xdg-utils
xfsprogs
zip zip
z-lua z-lua
] ]
++ (with nix-xilinx.packages.x86_64-linux; [vivado vitis vitis_hls model_composer xilinx-shell]); ++ (with nix-xilinx.packages.${system}; [
vivado
vitis
vitis_hls
model_composer
xilinx-shell
]);
} }

View File

@ -0,0 +1,42 @@
wg_preshared:
nixy: ENC[AES256_GCM,data:kP+Vt48NMpdBSGjpWzzxt+nqxPNXrofV4kLwgU4o62riB9rxU1CZ4Ddr17k=,iv:xCqR/rbGrJYBkxOpsAg1qxxEGXRD+577JGTNDqshcOQ=,tag:9rAdg6Zw6kVzLxwF1U+pNg==,type:str]
mediabox: ENC[AES256_GCM,data:BL9vCUE6wWtmTNPMCvJNZjiAMUWRmLLHOk73v1Z8EOJWcsZ5G3U+08TxBBg=,iv:XTZnF2kMVurTD+TPL0T7uDDu1gGjOdO7AWHXsZS5yO8=,tag:6RIAsbe0Ue4MX28VxzbPCg==,type:str]
workstation: ENC[AES256_GCM,data:x60PMdgihMjtvQagphdO0uft7LLU2grdgeTrO5oSRiqOtb23P5S5SxDQ3Js=,iv:CB8QldIZ8/FjbcAkLxekygUo5luHig7FnH7wyrgZEuk=,tag:E3XWxPH5/fHyFmGimQ4tLg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAzQ3JGNWRMeGhwM1dIOU5T
ZEt4WVhFa2lSaklpM3hmR04wY213TGd6K1FvCnltWFpqNHdrQ2V1V2ZDdTVOYlhP
M0x2TVRJbUtZK2xaOGE5Ri93YmV6R1UKLS0tIDQ3VkNrYjFNTjNrRTNFRmhYaENt
ZkRpMnZ3ZldOdWJ3VGw1T1RnRG15WDQKeZ9VBkcu2j83Hjofy1AAtBBqM9Tk3uFi
F/wgzV7mBXiBB/4w17iJsU5mB6s/JXXnGq11pu9QXC5tu072huCNYQ==
-----END AGE ENCRYPTED FILE-----
- recipient: age19yrl6pr73cv067ksfz0txp3zm2au25jfyjeerw23ml55ps5cyyfqtm3kmt
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBheWtsbnArT3BwSVJ4QTJB
ZENTK2ZpS0lLUmJ1d1VaUVVGNnNXMEZ4RFJvCmFueFNiQjk5MkdnTVkvVVk1TkVV
M2Izamo0M1lGaVRPaGFOQUhkNGpmSmsKLS0tIGxtSXVackdsTTN1cTIvSEo4bGg3
a0dVL2FmL05TRllrZjBuOStPNTBHcU0KOaJFNhr0emSiAJFOFsaJ4sdUwjzg5TOW
Mh3JvRJINefiBUsFnFx8d3gn0+jHn+kXw22WMGRcbGgZTxJbFylmeA==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5UVJiMENSeFdGWHRVVkt0
UEI4ek9jRFdYYkN5Nlc5Qi85MDhPRTA2bGt3CnZJcThNU1huczJGaEF6WWpzcHdV
dWhIczMzWSt0ZEVXeXdVQlBOZTZsN3cKLS0tIHRBQlhPT1FDcEZWU3JyNEZ0UWxC
eDhXVWo2UHVCaFUrak9aVEU5N0FxRVEKDKBpbHWwTkW3BFAXQ213/glZyTz88OjZ
JHh0phDzFZG0+nzBz3TAi0ZyYnlbOYAuEvQh1uUg9MI1XUCr8GC9Qw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-22T16:06:34Z"
mac: ENC[AES256_GCM,data:BRgF+L22FuN/v+Vi57JLaTxtAe4Gr8UtY4QIYRUeigpHCkxza+pUd5qyGTIsHeaRFWNy726u9+PlX3uy0MlOt9lzQ1Zlmc+hDthUIHRWX9mqO+j5+klmDvVug5yqr2f7HMtBD+tnEwDr65FuPNKqJjmg1Tbk0RD12yt/gkEAy7w=,iv:aTWVlHEQGNgnIIoJ2IpnppU6lo7g0kI7gxtPM1ZqXvM=,tag:PhZypRZAlmxnKz1Kxtppzg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

72
common/suspend.nix Normal file
View File

@ -0,0 +1,72 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.services.batteryNotifier;
in
{
options = {
services.batteryNotifier = {
enable = mkOption {
default = false;
description = ''
Whether to enable battery notifier.
'';
};
device = mkOption {
default = "BAT0";
description = ''
Device to monitor.
'';
};
notifyCapacity = mkOption {
default = 10;
description = ''
Battery level at which a notification shall be sent.
'';
};
suspendCapacity = mkOption {
default = 5;
description = ''
Battery level at which a suspend unless connected shall be sent.
'';
};
};
};
config = mkIf cfg.enable {
systemd.user.timers."lowbatt" = {
description = "check battery level";
timerConfig.OnBootSec = "1m";
timerConfig.OnUnitInactiveSec = "1m";
timerConfig.Unit = "lowbatt.service";
wantedBy = [ "timers.target" ];
};
systemd.user.services."lowbatt" = {
description = "battery level notifier";
serviceConfig.PassEnvironment = "DISPLAY";
script = ''
export battery_capacity=$(${pkgs.coreutils}/bin/cat /sys/class/power_supply/${cfg.device}/capacity)
export battery_status=$(${pkgs.coreutils}/bin/cat /sys/class/power_supply/${cfg.device}/status)
if [[ $battery_capacity -le ${builtins.toString cfg.notifyCapacity} && $battery_status = "Discharging" ]]; then
${pkgs.libnotify}/bin/notify-send --urgency=critical --hint=int:transient:1 --icon=battery_empty "Battery Low" "You should probably plug-in."
fi
if [[ $battery_capacity -le ${builtins.toString cfg.suspendCapacity} && $battery_status = "Discharging" ]]; then
${pkgs.libnotify}/bin/notify-send --urgency=critical --hint=int:transient:1 --icon=battery_empty "Battery Critically Low" "Computer will suspend in 60 seconds."
sleep 60s
battery_status=$(${pkgs.coreutils}/bin/cat /sys/class/power_supply/${cfg.device}/status)
if [[ $battery_status = "Discharging" ]]; then
systemctl suspend
fi
fi
'';
};
};
}

1
common/wg_pubkey_proton Normal file
View File

@ -0,0 +1 @@
g6DkXWKI/68RsLjROIwCEcyB/ZhyK5Q7OWcz1TtqER0=

View File

@ -0,0 +1 @@
kbmzzQc3bBpkjE7K/ohycZtx+ml+dzVYOQ2xM0/bzzQ=

289
flake.lock generated
View File

@ -1,31 +1,29 @@
{ {
"nodes": { "nodes": {
"caps2esc": { "blobs": {
"inputs": { "flake": false,
"nixpkgs": "nixpkgs"
},
"locked": { "locked": {
"lastModified": 1684616473, "lastModified": 1604995301,
"narHash": "sha256-e8/7jWl2EA1UROhd9L+D9kLdd5SoFYWi+56n2jer7g4=", "narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=",
"owner": "asmir.abdulahovic", "owner": "simple-nixos-mailserver",
"repo": "caps2esc", "repo": "blobs",
"rev": "4ebc36bef4f4548566df14d94c9c9907e7a76e78", "rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
"owner": "asmir.abdulahovic", "owner": "simple-nixos-mailserver",
"repo": "caps2esc", "repo": "blobs",
"type": "gitlab" "type": "gitlab"
} }
}, },
"flake-compat": { "flake-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1673956053, "lastModified": 1732722421,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", "narHash": "sha256-HRJ/18p+WoXpWJkcdsk9St5ZiukCqSDgbOGFa8Okehg=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", "rev": "9ed2ac151eada2306ca8c418ebd97807bb08f6ac",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -50,6 +48,22 @@
"type": "github" "type": "github"
} }
}, },
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -75,15 +89,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1688220547, "lastModified": 1736373539,
"narHash": "sha256-cNKKLPaEOxd6t22Mt3tHGubyylbKGdoi2A3QkMTKes0=", "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "89d10f8adce369a80e046c2fd56d1e7b7507bb5b", "rev": "bd65bc3cde04c16755955630b344bc9e35272c56",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -91,14 +106,16 @@
"nix-xilinx": { "nix-xilinx": {
"inputs": { "inputs": {
"flake-compat": "flake-compat", "flake-compat": "flake-compat",
"nixpkgs": "nixpkgs_2" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1685780173, "lastModified": 1732892167,
"narHash": "sha256-K18JYyCHrnb05Odb7N9FpU30az7QOV8uL9ch0RgU7i0=", "narHash": "sha256-AZ0rgM9xj+Bf2C8RfGMUvuVdcqkvQU5/Wm8u6A5xYJg=",
"owner": "asmir.abdulahovic", "owner": "asmir.abdulahovic",
"repo": "nix-xilinx", "repo": "nix-xilinx",
"rev": "cc5ab958d31c58481b1f7f3a2c0a4db7c22006e9", "rev": "3071f40914fe2db3837a40a72a97af6f0a442f16",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -109,100 +126,62 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1684585791, "lastModified": 1736200483,
"narHash": "sha256-lYPboblKrchmbkGMoAcAivomiOscZCjtGxxTSCY51SM=", "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "eea79d584eff53bf7a76aeb63f8845da6d386129",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1688256355,
"narHash": "sha256-/E+OSabu4ii5+ccWff2k4vxDsXYhpc4hwnm0s6JOz7Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f553c016a31277246f8d3724d3b1eee5e8c0842c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1685677062,
"narHash": "sha256-zoHF7+HNwNwne2XEomphbdc4Y8tdWT16EUxUTXpOKpQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "95be94370d09f97f6af6a1df1eb9649b5260724e",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1688231357,
"narHash": "sha256-ZOn16X5jZ6X5ror58gOJAxPfFLAQhZJ6nOUeS4tfFwo=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "645ff62e09d294a30de823cb568e9c6d68e92606", "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-unstable", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_4": { "nixpkgs-24_11": {
"locked": { "locked": {
"lastModified": 1684668519, "lastModified": 1734083684,
"narHash": "sha256-KkVvlXTqdLLwko9Y0p1Xv6KQ9QTcQorrU098cGilb7c=", "narHash": "sha256-5fNndbndxSx5d+C/D0p/VF32xDiJCJzyOqorOYW4JEo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "85340996ba67cc02f01ba324e18b1306892ed6f5", "rev": "314e12ba369ccdb9b352a4db26ff419f7c49fa84",
"type": "github" "type": "github"
}, },
"original": { "original": {
"id": "nixpkgs", "id": "nixpkgs",
"ref": "nixpkgs-unstable", "ref": "nixos-24.11",
"type": "indirect" "type": "indirect"
} }
}, },
"nixpkgs_5": { "nvim": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": { "locked": {
"lastModified": 1688188316, "lastModified": 1736528609,
"narHash": "sha256-CXuQllDKCxtZaB/umnZOvoJ/d4kJguYgffeTA9l1B3o=", "narHash": "sha256-p0tYmTVnnFghamXEXD4w/lldCi604zIWDV4Ol9ubQ5g=",
"owner": "NixOS", "ref": "refs/heads/master",
"repo": "nixpkgs", "rev": "8245a48cc75cc74dea1b3ca89cb58f24f8e14f85",
"rev": "8277b539d371bf4308fc5097911aa58bfac1794f", "revCount": 42,
"type": "github" "type": "git",
"url": "https://git.project-cloud.net/asmir/nvim_flake"
}, },
"original": { "original": {
"owner": "NixOS", "type": "git",
"ref": "nixpkgs-unstable", "url": "https://git.project-cloud.net/asmir/nvim_flake"
"repo": "nixpkgs",
"type": "github"
} }
}, },
"peerix": { "peerix": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": "nixpkgs_4" "nixpkgs": [
"nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1684706914, "lastModified": 1684706914,
@ -218,27 +197,77 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"project-cloud": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"theme_anemone": "theme_anemone",
"theme_deepthought": "theme_deepthought"
},
"locked": {
"lastModified": 1729077289,
"narHash": "sha256-z5LEPxOJq2LjhPhY4QE1IOt0lBD39cipR6Lw8vRTNlI=",
"ref": "refs/heads/master",
"rev": "eab712e42139d33911ba767c2ff1bfbdf05c254d",
"revCount": 27,
"type": "git",
"url": "https://git.project-cloud.net/asmir/project-cloud"
},
"original": {
"type": "git",
"url": "https://git.project-cloud.net/asmir/project-cloud"
}
},
"root": { "root": {
"inputs": { "inputs": {
"caps2esc": "caps2esc",
"home-manager": "home-manager", "home-manager": "home-manager",
"nix-xilinx": "nix-xilinx", "nix-xilinx": "nix-xilinx",
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs",
"nvim": "nvim",
"peerix": "peerix", "peerix": "peerix",
"sops-nix": "sops-nix" "project-cloud": "project-cloud",
"simple-nixos-mailserver": "simple-nixos-mailserver",
"sops-nix": "sops-nix",
"swaysw": "swaysw",
"zremap": "zremap"
}
},
"simple-nixos-mailserver": {
"inputs": {
"blobs": "blobs",
"flake-compat": "flake-compat_3",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-24_11": "nixpkgs-24_11"
},
"locked": {
"lastModified": 1735230346,
"narHash": "sha256-zgR8NTiNDPVNrfaiOlB9yHSmCqFDo7Ks2IavaJ2dZo4=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "dc0569066e79ae96184541da6fa28f35a33fbf7b",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"type": "gitlab"
} }
}, },
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_5", "nixpkgs": [
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs"
]
}, },
"locked": { "locked": {
"lastModified": 1688268466, "lastModified": 1736515725,
"narHash": "sha256-fArazqgYyEFiNcqa136zVYXihuqzRHNOOeVICayU2Yg=", "narHash": "sha256-4P99yL8vGehwzytkpP87eklBePt6aqeEC5JFsIzhfUs=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "5ed3c22c1fa0515e037e36956a67fe7e32c92957", "rev": "f214c1b76c347a4e9c8fb68c73d4293a6820d125",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -247,6 +276,26 @@
"type": "github" "type": "github"
} }
}, },
"swaysw": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1711800706,
"narHash": "sha256-VuClUfWEmuv6Ysf6g42rfIm4cRZ/DWYZJxlNd9f1IL4=",
"ref": "refs/heads/master",
"rev": "7422c005ffdd282c389d21c5f8a4ea835bc1a0f0",
"revCount": 4,
"type": "git",
"url": "https://git.project-cloud.net/asmir/swaysw"
},
"original": {
"type": "git",
"url": "https://git.project-cloud.net/asmir/swaysw"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,
@ -261,6 +310,58 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"theme_anemone": {
"flake": false,
"locked": {
"lastModified": 1699399376,
"narHash": "sha256-u2baLVhc/tWd9h9+g9vKBN1m4qG23uL1HUizFigOJXw=",
"owner": "Speyll",
"repo": "anemone",
"rev": "565a6e84e3054a45ec31729125801ab1f403c936",
"type": "github"
},
"original": {
"owner": "Speyll",
"repo": "anemone",
"type": "github"
}
},
"theme_deepthought": {
"flake": false,
"locked": {
"lastModified": 1681035730,
"narHash": "sha256-dzhfGmhuNCbloqknM7lVnFbNYmf2/ue7az6DQok44yM=",
"owner": "RatanShreshtha",
"repo": "DeepThought",
"rev": "430c1d5085dd6bea4cd6bd2d55003db67ba6bea0",
"type": "github"
},
"original": {
"owner": "RatanShreshtha",
"repo": "DeepThought",
"type": "github"
}
},
"zremap": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1721120316,
"narHash": "sha256-CaAMnU6LKqJrsZmR9k0/2brpULnAekpgG5S0BjtFhaQ=",
"ref": "refs/heads/master",
"rev": "8a7923bd4e5d36b186408d5432568a91ac67b695",
"revCount": 21,
"type": "git",
"url": "https://git.project-cloud.net/asmir/zremap"
},
"original": {
"type": "git",
"url": "https://git.project-cloud.net/asmir/zremap"
}
} }
}, },
"root": "root", "root": "root",

163
flake.nix
View File

@ -2,41 +2,91 @@
description = "NixOS configuration"; description = "NixOS configuration";
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
caps2esc.url = "gitlab:asmir.abdulahovic/caps2esc";
nix-xilinx.url = "gitlab:asmir.abdulahovic/nix-xilinx"; nix-xilinx = {
peerix.url = "gitlab:asmir.abdulahovic/peerix"; url = "gitlab:asmir.abdulahovic/nix-xilinx";
sops-nix.url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs";
};
peerix = {
url = "gitlab:asmir.abdulahovic/peerix";
inputs.nixpkgs.follows = "nixpkgs";
};
zremap = {
url = "git+https://git.project-cloud.net/asmir/zremap";
inputs.nixpkgs.follows = "nixpkgs";
};
swaysw = {
url = "git+https://git.project-cloud.net/asmir/swaysw";
inputs.nixpkgs.follows = "nixpkgs";
};
nvim = {
url = "git+https://git.project-cloud.net/asmir/nvim_flake";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
simple-nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
inputs.nixpkgs.follows = "nixpkgs";
};
project-cloud = {
url = "git+https://git.project-cloud.net/asmir/project-cloud";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
outputs = inputs @ { outputs =
self, inputs@{
nixpkgs,
caps2esc,
home-manager, home-manager,
nixpkgs,
nix-xilinx, nix-xilinx,
nvim,
peerix, peerix,
project-cloud,
simple-nixos-mailserver,
sops-nix, sops-nix,
swaysw,
zremap,
... ...
}: { }:
let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in
{
nixosConfigurations = rec { nixosConfigurations = rec {
nixy = nixpkgs.lib.nixosSystem { nixy = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
{ _module.args = inputs; } { _module.args = inputs; }
./configuration.nix { _module.args.system = system; }
./packages.nix { nix.registry.nixpkgs.flake = nixpkgs; }
./hardware-configuration.nix ./common/packages.nix
./common/suspend.nix
./nixy/configuration.nix
./nixy/hardware-configuration.nix
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.akill = import ./home/home.nix; home-manager.users.akill = import ./home/home.nix;
home-manager.extraSpecialArgs = { inherit inputs system; };
home-manager.backupFileExtension = "home_backup";
} }
peerix.nixosModules.peerix peerix.nixosModules.peerix
{ {
@ -46,12 +96,91 @@
package = peerix.packages.x86_64-linux.peerix; package = peerix.packages.x86_64-linux.peerix;
openFirewall = true; # UDP/12304 openFirewall = true; # UDP/12304
privateKeyFile = nixy.config.sops.secrets."peerix/private".path; privateKeyFile = nixy.config.sops.secrets."peerix/private".path;
publicKeyFile = ./peerix-public; publicKeyFile = ./nixy/peerix-public;
publicKey = "peerix-mediabox:UDgG3xdQYv7bmx2l4ZPNRPJtp2zMmY++H/fnGeJ9BQw="; publicKey = "peerix-mediabox:UDgG3xdQYv7bmx2l4ZPNRPJtp2zMmY++H/fnGeJ9BQw=";
}; };
} }
]; ];
}; };
};
mediabox = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
{ _module.args = inputs; }
{ _module.args.system = system; }
{ nix.registry.nixpkgs.flake = nixpkgs; }
./common/packages.nix
./common/suspend.nix
./mediabox/configuration.nix
./mediabox/hardware-configuration.nix
./modules/qbittorrent.nix
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.akill = import ./home/home.nix;
home-manager.extraSpecialArgs = { inherit inputs system; };
}
peerix.nixosModules.peerix
{
services.peerix = {
enable = true;
globalCacheTTL = 10;
package = peerix.packages.x86_64-linux.peerix;
openFirewall = true; # UDP/12304
privateKeyFile = mediabox.config.sops.secrets."peerix/private".path;
publicKeyFile = ./mediabox/peerix-public;
publicKey = "peerix-nixy:8THqS0R2zWF/47ai0RFmqJnieYTZ1jaWOD9tnzpvA6s=";
};
}
];
};
blue = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
{ _module.args = inputs; }
{ _module.args.system = system; }
{ nix.registry.nixpkgs.flake = nixpkgs; }
./blue/configuration.nix
./blue/hardware-configuration.nix
./common/packages.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.akill = import ./home/home.nix;
home-manager.extraSpecialArgs = { inherit inputs system; };
}
];
};
magpie = nixpkgs.lib.nixosSystem rec {
system = "aarch64-linux";
modules = [
{ _module.args = inputs; }
{ _module.args.system = system; }
{ nix.registry.nixpkgs.flake = nixpkgs; }
./magpie/configuration.nix
./magpie/hardware-configuration.nix
simple-nixos-mailserver.nixosModule
sops-nix.nixosModules.sops
(builtins.toPath "${nixpkgs}/nixos/modules/profiles/qemu-guest.nix")
];
};
};
devShell.x86_64-linux = pkgs.mkShell {
buildInputs = with pkgs; [
sops
ssh-to-age
age
];
shellHook = ''
echo "Configuring NixOS!"
'';
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
}; };
} }

View File

@ -1,78 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "ehci_pci" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd" "amdgpu"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
fsType = "btrfs";
options = ["subvol=root" "compress=zstd" "noatime"];
};
boot.initrd.luks.devices."sys_enc".device = "/dev/disk/by-uuid/682d030d-189e-4b47-a60a-62cf1f3729d3";
fileSystems."/home" = {
device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
fsType = "btrfs";
options = ["subvol=home" "compress=zstd" "noatime"];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
fsType = "btrfs";
options = ["subvol=nix" "compress=zstd" "noatime"];
};
fileSystems."/persist" = {
device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
fsType = "btrfs";
options = ["subvol=persist" "compress=zstd" "noatime"];
};
fileSystems."/var/log" = {
device = "/dev/disk/by-uuid/f06ac545-07c1-4b2b-8c0b-eeac43892933";
fsType = "btrfs";
options = ["subvol=log" "compress=zstd" "noatime"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/3F3E-9833";
fsType = "vfat";
};
fileSystems."/opt/xilinx" = {
device = "/dev/disk/by-uuid/09912fb9-0284-4b4e-add1-d4a27329539f";
fsType = "erofs";
};
swapDevices = [
/*
{
device = "/dev/disk/by-uuid/ee1792c9-098b-40c1-b760-20def16ba67f";
encrypted = {
enable = true;
keyFile = "/mnt-root/swap.key";
label = "swap_encr";
blkDev = "/dev/disk/by-uuid/aee12e27-b45a-4291-be78-db0a903071b3";
};
}
*/
];
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nix.settings.max-jobs = lib.mkDefault 8;
}

View File

@ -1,13 +1,22 @@
{ {
pkgs,
config,
lib, lib,
pkgs,
... ...
}: }:
with lib; let let
vimrc = import ./vimrc.nix {inherit pkgs vimUtils fetchFromGitHub;}; qutebrowser_firejail = pkgs.writeShellScriptBin "qutebrowser" ''
in { firejail -- ${lib.getExe pkgs.qutebrowser} "$@"
imports = [./zsh.nix ./i3status-rust.nix ./sway.nix ./i3.nix ./home_packages.nix ./whatsapp-for-linux.nix]; '';
in
{
imports = [
./zsh.nix
./i3status-rust.nix
./sway.nix
./i3.nix
./home_packages.nix
./whatsapp-for-linux.nix
];
home.stateVersion = "22.11"; home.stateVersion = "22.11";
home.username = "akill"; home.username = "akill";
@ -17,23 +26,33 @@ in {
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = true;
defaultApplications = { defaultApplications = {
"application/pdf" = ["sioyek.desktop"]; "application/pdf" = "sioyek.desktop";
"default-web-browser" = "org.qutebrowser.qutebrowser.desktop";
"text/html" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/about" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/http" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/https" = "org.qutebrowser.qutebrowser.desktop";
"x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop";
}; };
}; };
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
home.sessionVariables = { home.sessionVariables = rec {
BROWSER = "qutebrowser"; BROWSER = lib.getExe qutebrowser_firejail;
DEFAULT_BROWSER = "${BROWSER}";
EDITOR = "nvim"; EDITOR = "nvim";
_JAVA_AWT_WM_NONREPARENTING = "1"; _JAVA_AWT_WM_NONREPARENTING = "1";
MOZ_ENABLE_WAYLAND = "1"; MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1"; QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SUDO_EDITOR = "nvim"; SUDO_EDITOR = "nvim";
WLR_RENDERER = "vulkan"; WLR_RENDERER = "vulkan";
}; };
wayland.windowManager.sway = {enable = true;}; wayland.windowManager.sway = {
enable = true;
};
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;
@ -47,16 +66,27 @@ in {
}; };
}; };
tmux = {
enable = true;
clock24 = true;
keyMode = "vi";
terminal = "screen-256color";
plugins = with pkgs.tmuxPlugins; [
sysstat
net-speed
gruvbox
];
};
mpv = { mpv = {
enable = true; enable = true;
package = pkgs.mpv;
config = { config = {
slang = "eng,en"; slang = "eng,en";
alang = "eng,en"; alang = "eng,en";
hwdec = "auto"; hwdec = "auto";
vo = "gpu-next"; vo = "gpu-next";
ao = "pipewire"; ao = "pipewire";
script-opts-set = "sponsorblock-local_database=no,sponsorblock-skip_categories=[sponsor,intro,selfpromo]"; script-opts-set = "ytdl_hook-ytdl_path=yt-dlp,sponsorblock-local_database=no,sponsorblock-skip_categories=[sponsor,intro,selfpromo]";
ytdl-format = "bestvideo[height<=?1080]+bestaudio/best"; ytdl-format = "bestvideo[height<=?1080]+bestaudio/best";
}; };
@ -122,19 +152,21 @@ in {
font = "JetBrainsMono:size=10"; font = "JetBrainsMono:size=10";
dpi-aware = "yes"; dpi-aware = "yes";
}; };
mouse = {hide-when-typing = "yes";}; mouse = {
hide-when-typing = "yes";
};
}; };
}; };
qutebrowser = { qutebrowser = {
enable = true; enable = true;
package = pkgs.qutebrowser-qt6; package = qutebrowser_firejail;
keyBindings = { keyBindings = {
normal = { normal = {
"j" = "scroll-px 0 25"; "j" = "scroll-px 0 25";
"k" = "scroll-px 0 -25"; "k" = "scroll-px 0 -25";
"u" = "undo --window"; "u" = "undo --window";
";v" = "hint links userscript view_in_mpv"; ";v" = "hint links spawn mpv {hint-url}";
}; };
}; };
@ -167,23 +199,28 @@ in {
userName = "Asmir A"; userName = "Asmir A";
userEmail = "asmir.abdulahovic@gmail.com"; userEmail = "asmir.abdulahovic@gmail.com";
extraConfig = { extraConfig = {
pull = {rebase = true;}; init.defaultBranch = "master";
credential = {helper = "store";}; pull = {
rebase = true;
};
credential = {
helper = "store";
}; };
}; };
signing.key = "020C42B7A9ABA3E2";
neovim = { signing.signByDefault = true;
enable = true;
vimAlias = true;
vimdiffAlias = true;
plugins = vimrc.plugins;
extraConfig = "";
extraPackages = vimrc.extraPackages;
}; };
obs-studio = { obs-studio = {
enable = true; enable = true;
plugins = with pkgs.obs-studio-plugins; [obs-vkcapture input-overlay obs-multi-rtmp obs-pipewire-audio-capture wlrobs obs-vaapi]; plugins = with pkgs.obs-studio-plugins; [
obs-vkcapture
input-overlay
obs-multi-rtmp
obs-pipewire-audio-capture
wlrobs
obs-vaapi
];
}; };
i3status-rust.enable = true; i3status-rust.enable = true;
@ -191,14 +228,10 @@ in {
zsh.enable = true; zsh.enable = true;
}; };
xdg.configFile."nvim/init.lua" = {
source = ./vimrc.lua;
recursive = true;
};
services = { services = {
lorri.enable = false; lorri.enable = false;
mako.enable = true; mako.enable = true;
cliphist.enable = true;
gammastep = { gammastep = {
enable = true; enable = true;
latitude = "44.53"; latitude = "44.53";
@ -215,26 +248,66 @@ in {
enableSshSupport = true; enableSshSupport = true;
}; };
swayidle = { swayidle =
let
locker = pkgs.writeShellScriptBin "swaylock_fancy" ''
TMP_FILE=$(${pkgs.coreutils}/bin/mktemp /tmp/.swaylock_ss_XXXXXX.jpg)
${lib.getExe pkgs.grim} -t ppm - | ${pkgs.imagemagick}/bin/convert - -blur 0x12 "$TMP_FILE"
${lib.getExe pkgs.swaylock} -f -i "$TMP_FILE"
${pkgs.coreutils}/bin/rm "$TMP_FILE"
'';
in
{
enable = true; enable = true;
events = [ events = [
{ {
event = "before-sleep"; event = "before-sleep";
command = "swaylock_bg_blur.sh"; command = "${locker}/bin/swaylock_fancy";
} }
{ {
event = "lock"; event = "lock";
command = "swaylock_bg_blur.sh"; command = "${locker}/bin/swaylock_fancy";
} }
{ {
event = "after-resume"; event = "after-resume";
command = "pkill -USR1 i3status-rs"; command = "${pkgs.procps}/bin/pkill -USR1 i3status-rs";
} }
]; ];
timeouts = [ timeouts = [
{ {
timeout = 15 * 60; timeout = 15 * 60;
command = "swaylock_bg_blur.sh"; command = "${locker}/bin/swaylock_fancy";
}
];
};
kanshi = {
enable = true;
settings = [
{
profile.name = "undocked";
profile.outputs = [
{
criteria = "eDP-1";
}
];
}
{
profile.name = "docked";
profile.outputs = [
{
criteria = "eDP-1";
}
{
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026536";
mode = "1920x1080@74.973Hz";
}
{
criteria = "Philips Consumer Electronics Company PHL 272S1 UHB2347026535";
mode = "1920x1080@74.973Hz";
}
];
} }
]; ];
}; };

View File

@ -1,79 +1,177 @@
{ {
config, lib,
pkgs, pkgs,
inputs,
system,
... ...
}: { }:
home.packages = with pkgs; [ let
alejandra chromium_teams = pkgs.writeShellScriptBin "chromium_teams" ''
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://teams.microsoft.com/
'';
chromium_discord = pkgs.writeShellScriptBin "chromium_discord" ''
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://discordapp.com/channels/@me
'';
chromium_stackfield = pkgs.writeShellScriptBin "chromium_stackfield" ''
${lib.getExe pkgs.ungoogled-chromium} --socket=wayland org.chromium.Chromium --app=https://stackfield.com/
'';
qcad = pkgs.writeShellScriptBin "qcad" ''
QT_QPA_PLATFORM=xcb ${lib.getExe pkgs.qcad} $@
'';
ssh_proxy = pkgs.writeShellScriptBin "ssh_proxy" ''
if ${pkgs.coreutils}/bin/test $# -ne 1; then
echo "Usage: $0 <user>@<ssh_host>"
exit
fi
PROXY_PORT="1337"
${lib.getExe pkgs.openssh} -D "$PROXY_PORT" -q -N "$@"
'';
wrap_sh =
let
bubblewrap = pkgs.callPackage ../packages/bubblewrap/default.nix { };
in
pkgs.writeShellScriptBin "wrap.sh" ''
if ${pkgs.coreutils-full}/bin/test $# -ne 1; then
echo "Usage: $0 <directory>"
exit
fi
FULL_PATH=$(${pkgs.coreutils-full}/bin/realpath "$1")
BUBBLEWRAP_DIR="$1" ${bubblewrap}/bin/bwrap \
--bind / / \
--dev /dev \
--overlay-src "$FULL_PATH" \
--tmp-overlay "$FULL_PATH" \
"$SHELL"
'';
in
{
home.packages =
with pkgs;
[
anydesk
appimage-run appimage-run
arp-scan arp-scan
birdtray
blackmagic blackmagic
blender
btop btop
cached-nix-shell cached-nix-shell
caddy caddy
cargo cargo
ccls ungoogled-chromium
cemu cmake
compsize compsize
cura # cura
deluge deluge
dfu-util
discord
dmenu-wayland
drawio
dualsensectl
ffmpeg-full ffmpeg-full
firefox firefox
freecad
gcc gcc
gdb gdb
ghostscript
glab glab
glaxnimate glaxnimate
gnumake gnumake
go
grim grim
heimdall
hyperfine hyperfine
icestorm
imagemagick imagemagick
imv imv
inkscape
jellyfin-media-player jellyfin-media-player
kdenlive kdenlive
kicad kicad
kodi-wayland kodi-wayland
krita
libnotify libnotify
libreoffice libreoffice-qt6-fresh
libva-utils libva-utils
linuxPackages_latest.perf
lsix
lsix
mediainfo mediainfo
ncdu ncdu
neovide neovide
nextpnr
ngspice ngspice
nix-init
nixpkgs-fmt
nix-prefetch-git
nodePackages.peerflix nodePackages.peerflix
nom
openems
openocd openocd
openscad
pandoc pandoc
pass paraview
pass-wayland
patchelf patchelf
pavucontrol pavucontrol
pay-respects
pirate-get pirate-get
poppler_utils
powertop powertop
pulsemixer pulsemixer
pwvucontrol
python3 python3
python3Packages.west python3Packages.west
remmina remmina
river river
rizin
rtorrent rtorrent
rustc sbcl
screen screen
seer seer
sioyek sioyek
skypeforlinux skypeforlinux
slurp slurp
steam-run
stm32cubemx
swayimg
tea
teams-for-linux
tectonic
tessen
texlive.combined.scheme-full texlive.combined.scheme-full
thunderbird thunderbird
typst
upx upx
waybar waybar
wdisplays wdisplays
weechat
whatsapp-for-linux whatsapp-for-linux
wine
wireshark wireshark
wl-clipboard wl-clipboard
wlr-randr wlr-randr
wofi wofi
x2goclient x2goclient
yewtube
yosys
yt-dlp yt-dlp
zapzap
zathura zathura
zeal-qt6 # zeal-qt6
zig zig
zls ]
++ [
chromium_discord
chromium_stackfield
chromium_teams
ssh_proxy
wrap_sh
qcad
]
++ [
inputs.swaysw.packages.${system}.swaysw
(pkgs.callPackage ../packages/viber/default.nix { })
(pkgs.callPackage ../packages/bubblewrap/default.nix { })
]; ];
} }

View File

@ -1,11 +1,12 @@
{ {
config,
lib, lib,
pkgs, pkgs,
... ...
}: let }:
let
scratchpad_cmd = "floating enable, resize set 1502 845, move position center, move scratchpad, scratchpad show"; scratchpad_cmd = "floating enable, resize set 1502 845, move position center, move scratchpad, scratchpad show";
in { in
{
xsession.windowManager.i3 = { xsession.windowManager.i3 = {
enable = true; enable = true;
package = pkgs.i3; package = pkgs.i3;
@ -54,24 +55,28 @@ in {
"${modifier}+Escape" = "workspace back_and_forth"; "${modifier}+Escape" = "workspace back_and_forth";
"${modifier}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run"; "${modifier}+p" = "exec ${pkgs.dmenu}/bin/dmenu_run";
"Mod4+l" = "exec i3-msg [instance=\"python3_scr\"] scratchpad show || exec alacritty --class python3_scr -e python3"; "Mod4+l" =
"exec i3-msg [instance=\"python3_scr\"] scratchpad show || exec alacritty --class python3_scr -e python3";
"Mod4+j" = "exec i3-msg [class=\"ViberPC\"] scratchpad show || exec viber"; "Mod4+j" = "exec i3-msg [class=\"ViberPC\"] scratchpad show || exec viber";
"Mod4+m" = "exec i3-msg [class=\"Thunderbird\"] scratchpad show || exec thunderbird"; "Mod4+m" = "exec i3-msg [class=\"Thunderbird\"] scratchpad show || exec thunderbird";
"Mod4+y" = "exec i3-msg [instance=\"pulsemixer_scr\"] scratchpad show || exec alacritty --class pulsemixer_scr -e pulsemixer"; "Mod4+y" =
"exec i3-msg [instance=\"pulsemixer_scr\"] scratchpad show || exec alacritty --class pulsemixer_scr -e pulsemixer";
}; };
window = { window = {
/* # border = 4;
border = 4;
*/
commands = [ commands = [
{ {
command = scratchpad_cmd; command = scratchpad_cmd;
criteria = {instance = "pulsemixer_scr|python3_scr";}; criteria = {
instance = "pulsemixer_scr|python3_scr";
};
} }
{ {
command = scratchpad_cmd; command = scratchpad_cmd;
criteria = {class = "Thunderbird";}; criteria = {
class = "Thunderbird";
};
} }
{ {
command = scratchpad_cmd; command = scratchpad_cmd;
@ -82,7 +87,9 @@ in {
} }
{ {
command = "focus child, layout tabbed, focus"; command = "focus child, layout tabbed, focus";
criteria = {class = "qutebrowser";}; criteria = {
class = "qutebrowser";
};
} }
]; ];
}; };
@ -91,7 +98,10 @@ in {
{ {
position = "top"; position = "top";
fonts = { fonts = {
names = ["DejaVu Sans Mono" "FontAwesome5Free"]; names = [
"DejaVu Sans Mono"
"FontAwesome5Free"
];
style = "Fixed Bold SemiCondensed"; style = "Fixed Bold SemiCondensed";
size = 7.0; size = 7.0;
}; };

View File

@ -1,9 +1,5 @@
{ ... }:
{ {
config,
lib,
pkgs,
...
}: {
programs.i3status-rust = { programs.i3status-rust = {
bars.top = { bars.top = {
icons = "awesome5"; icons = "awesome5";
@ -23,7 +19,15 @@
} }
{ {
block = "disk_space"; block = "disk_space";
path = "/"; path = "/nix";
info_type = "available";
interval = 20;
warning = 20.0;
alert = 10.0;
}
{
block = "disk_space";
path = "/home";
info_type = "available"; info_type = "available";
interval = 20; interval = 20;
warning = 20.0; warning = 20.0;
@ -39,6 +43,16 @@
device = "enp5s0"; device = "enp5s0";
interval = 2; interval = 2;
} }
{
block = "net";
device = "enp7s0f3u1u1";
interval = 2;
}
{
block = "net";
device = "eno1";
interval = 2;
}
{ {
block = "memory"; block = "memory";
} }

View File

@ -1,12 +1,30 @@
{ {
config,
lib,
pkgs, pkgs,
inputs,
system,
lib,
... ...
}: { }:
let
cliphist_sway = pkgs.writeShellScriptBin "cliphist_sway" ''
${lib.getExe pkgs.cliphist} list | \
${lib.getExe pkgs.wofi} --dmenu --insensitive | \
${lib.getExe pkgs.cliphist} decode | \
${pkgs.wl-clipboard}/bin/wl-copy
'';
screenshot_clip = pkgs.writeShellScriptBin "screenshot_clip" ''
GEOM="$(${lib.getExe pkgs.slurp} -d)"
${lib.getExe pkgs.grim} -g "$GEOM" - | ${pkgs.wl-clipboard}/bin/wl-copy
'';
swaysw = inputs.swaysw.packages.${system}.swaysw;
viber = pkgs.callPackage ../packages/viber/default.nix { };
term = "${pkgs.foot}/bin/footclient";
in
{
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
extraSessionCommands = ""; extraSessionCommands = "";
extraConfigEarly = '''';
config = { config = {
fonts = { fonts = {
@ -18,49 +36,71 @@
window.commands = [ window.commands = [
{ {
command = "move scratchpad, resize set 1152 648"; command = "move scratchpad, resize set 1152 648";
criteria = {app_id = "pulsemixer|python3|whatsapp-for-linux|com.viber.Viber";}; criteria = {
app_id = "pulsemixer|python3|com.rtosta.zapzap|whatsapp-for-linux|com.viber";
};
} }
{ {
command = "move scratchpad, resize set 1502 845"; command = "move scratchpad, resize set 1502 845";
criteria = {class = "ViberPC";}; criteria = {
app_id = "com.viber";
};
} }
{ {
command = "floating enable"; command = "floating enable";
criteria = {app_id = "sws_cli";}; criteria = {
app_id = "sws_cli";
};
} }
]; ];
modifier = "Mod4"; modifier = "Mod4";
output = { output = {
eDP-1 = { eDP-1 = {
bg = "~/pic/weird_dragon.jpg stretch";
/* /*
bg = "~/pic/wallpaper stretch";
scale = "1.4"; scale = "1.4";
*/ */
}; };
HDMI-A-4 = {
res = "1920x1080";
}; };
};
input = { input = {
"1:1:AT_Translated_Set_2_keyboard" = {repeat_delay = "150";}; "type:keyboard" = {
"1:1:AT_Translated_Set_2_keyboard" = {repeat_rate = "70";}; repeat_delay = "150";
"2:7:SynPS/2_Synaptics_TouchPad" = {tap = "enabled";}; };
"type:keyboard" = {
repeat_rate = "70";
};
"type:touchpad" = {
tap = "enabled";
};
}; };
bars = [ bars = [
{ {
position = "top"; position = "top";
fonts = { fonts = {
names = ["Iosevka" "FontAwesome"]; names = [
"Iosevka"
"FontAwesome"
];
style = "Bold Semi-Condensed"; style = "Bold Semi-Condensed";
size = 12.0; size = 12.0;
}; };
statusCommand = "i3status-rs ~/.config/i3status-rust/config-top.toml"; statusCommand = "${lib.getExe pkgs.i3status-rust} ~/.config/i3status-rust/config-top.toml";
} }
]; ];
keybindings = { keybindings = {
"Alt+Shift+q" = "kill"; "Alt+Shift+q" = "kill";
"Alt+Shift+Return" = "exec ${pkgs.foot}/bin/footclient"; "Alt+Shift+Return" = "exec ${term}";
"Alt+p" = "exec ${pkgs.dmenu-wayland}/bin/dmenu-wl_run -fn \"mono 14\""; "Alt+p" = "exec ${pkgs.bemenu}/bin/bemenu-run";
"Alt+c" = "exec ${pkgs.moreutils}/bin/lckdo cliphist_sway ${cliphist_sway}/bin/cliphist_sway";
"Print" = "exec ${pkgs.moreutils}/bin/lckdo screenshot_clip ${screenshot_clip}/bin/screenshot_clip";
"Alt+Shift+space" = "floating toggle"; "Alt+Shift+space" = "floating toggle";
"Alt+space" = "focus mode_toggle"; "Alt+space" = "focus mode_toggle";
@ -95,21 +135,21 @@
"Alt+j" = "focus down"; "Alt+j" = "focus down";
"Alt+k" = "focus up"; "Alt+k" = "focus up";
"Alt+l" = "focus right"; "Alt+l" = "focus right";
"Alt+slash" = "exec lckdo /tmp/.sws_cli_lock footclient -a sws_cli -- sws_cli.sh"; "Alt+slash" = "exec ${pkgs.moreutils}/bin/lckdo swaysw ${swaysw}/bin/swaysw";
"Alt+Escape" = "workspace back_and_forth"; "Alt+Escape" = "workspace back_and_forth";
"Alt+f" = "fullscreen enable"; "Alt+f" = "fullscreen enable";
"Alt+bracketright" = "focus output right";
"Alt+bracketleft" = "focus output left";
"Mod4+l" = '' "Mod4+l" =
exec swaymsg [app_id="python3"] scratchpad show || exec foot -a python3 python3''; ''exec ${pkgs.sway}/bin/swaymsg [app_id="python3"] scratchpad show || exec ${term} -a python3 ${lib.getExe pkgs.python3}'';
"Mod4+h" = "exec swaymsg [app_id=whatsapp-for-linux] scratchpad show || exec whatsapp-for-linux"; "Mod4+j" =
"Mod4+j" = "exec swaymsg [app_id=com.viber.Viber] scratchpad show"; "exec ${pkgs.sway}/bin/swaymsg [app_id=com.rtosta.zapzap] scratchpad show || exec ${lib.getExe pkgs.zapzap}";
"Mod4+y" = '' "Mod4+h" =
exec swaymsg [app_id="pulsemixer"] scratchpad show || exec foot -a pulsemixer pulsemixer''; "exec ${pkgs.sway}/bin/swaymsg [app_id=com.viber] scratchpad show || exec ${viber}/bin/viber";
"Mod4+y" =
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%"; ''exec ${pkgs.sway}/bin/swaymsg [app_id="pulsemixer"] scratchpad show || exec ${term} -a pulsemixer ${lib.getExe pkgs.pulsemixer}'';
"XF86AudioLowerVolume" = "exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%"; "Mod4+p" = "exec ${lib.getExe pkgs.tessen} -a copy";
"XF86AudioMute" = "exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle";
"XF86AudioMicMute" = "exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle";
}; };
}; };
}; };

View File

@ -1,195 +0,0 @@
-- Basic settings
vim.g.loaded_matchparen = true
vim.g.netrw_liststyle = 3
vim.go.background = 'dark'
vim.go.belloff = 'all'
vim.go.breakindent = true
vim.go.hlsearch = false
vim.go.laststatus = 0
vim.go.lazyredraw = true
vim.go.showcmd = true
vim.go.synmaxcol = 800
vim.go.syntax = 'on'
vim.go.termguicolors = true
vim.go.titleold = vim.fn.getcwd()
vim.go.title = true
vim.go.wildmenu = true
vim.go.wrap = true
vim.wo.number = true
vim.cmd([[colorscheme gruvbox]])
-- Defines a read-write directory for treesitters in nvim's cache dir
local parser_install_dir = vim.fn.stdpath("cache") .. "/treesitters"
if vim.fn.isdirectory(parser_install_dir) == 0 then
vim.fn.mkdir(parser_install_dir, "p")
end
-- Adding runtime needed for Nix setup on non NixOS
vim.o.runtimepath = vim.o.runtimepath .. "," .. parser_install_dir
require 'nvim-treesitter.install'.compilers = { 'gcc' }
require 'nvim-treesitter.configs'.setup {
ensure_installed = { "c", "cpp", "zig", "python", "verilog", "nix", "lua", "latex" },
parser_install_dir = parser_install_dir,
highlight = { enable = true, disable = {} },
indent = { enable = false, disable = {} },
rainbow = {
enable = true,
extended_mode = true, -- Highlight also non-parentheses delimiters, boolean or table: lang -> boolean
max_file_lines = 1000, -- Do not enable for files with more than 1000 lines, int
colors = {
'#ff0000', '#ffa500', '#ffff00', '#008000', '#0051a0', '#8003f2'
} -- table of hex strings
}
}
-- Mappings.
-- See `:help vim.diagnostic.*` for documentation on any of the below functions
local opts = { noremap = true, silent = true }
vim.api.nvim_set_keymap('n', '<space>e',
'<cmd>lua vim.diagnostic.open_float()<CR>', opts)
vim.api.nvim_set_keymap('n', '<space>q',
'<cmd>lua vim.diagnostic.setloclist()<CR>', opts)
vim.api.nvim_set_keymap('n', 'Q', '<cmd>nohl<CR>', opts)
vim.api.nvim_set_keymap('n', 'j', 'gj', opts)
vim.api.nvim_set_keymap('n', 'k', 'gk', opts)
vim.api.nvim_set_keymap('v', 'j', 'gj', opts)
vim.api.nvim_set_keymap('v', 'k', 'gk', opts)
vim.api.nvim_set_keymap('n', '<C-J>', '<C-W><C-J>', opts)
vim.api.nvim_set_keymap('n', '<C-K>', '<C-W><C-K>', opts)
vim.api.nvim_set_keymap('n', '<C-L>', '<C-W><C-L>', opts)
vim.api.nvim_set_keymap('n', '<C-H>', '<C-W><C-H>', opts)
vim.api.nvim_create_autocmd('LspAttach', {
desc = 'LSP actions',
callback = function()
local bufmap = function(mode, lhs, rhs)
vim.keymap.set(mode, lhs, rhs, { buffer = true })
end
-- Displays hover information about the symbol under the cursor
bufmap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<cr>')
-- Jump to the definition
bufmap('n', 'gd', '<cmd>lua vim.lsp.buf.definition()<cr>')
-- Jump to declaration
bufmap('n', 'gD', '<cmd>lua vim.lsp.buf.declaration()<cr>')
-- Lists all the implementations for the symbol under the cursor
bufmap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<cr>')
-- Jumps to the definition of the type symbol
bufmap('n', 'go', '<cmd>lua vim.lsp.buf.type_definition()<cr>')
-- Lists all the references
bufmap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<cr>')
-- Displays a function's signature information
bufmap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<cr>')
-- Renames all references to the symbol under the cursor
bufmap('n', 'rn', '<cmd>lua vim.lsp.buf.rename()<cr>')
-- Selects a code action available at the current cursor position
bufmap('n', '<F4>', '<cmd>lua vim.lsp.buf.code_action()<cr>')
bufmap('x', '<F4>', '<cmd>lua vim.lsp.buf.range_code_action()<cr>')
-- Show diagnostics in a floating window
bufmap('n', 'gl', '<cmd>lua vim.diagnostic.open_float()<cr>')
-- Move to the previous diagnostic
bufmap('n', '[d', '<cmd>lua vim.diagnostic.goto_prev()<cr>')
-- Move to the next diagnostic
bufmap('n', ']d', '<cmd>lua vim.diagnostic.goto_next()<cr>')
-- Format current buffer
bufmap('n', '<space>f', function() vim.lsp.buf.format { async = true } end)
end
})
-- Use a loop to conveniently call 'setup' on multiple servers and
-- map buffer local keybindings when the language server attaches
local cmp = require 'cmp'
cmp.setup({
sources = cmp.config.sources({
{ name = 'nvim_lsp' },
{ name = 'buffer' },
{ name = 'path' },
}),
mapping = {
["<Tab>"] = cmp.mapping({
i = function(fallback)
if cmp.visible() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Insert })
else
fallback()
end
end,
}),
["<S-Tab>"] = cmp.mapping({
i = function(fallback)
if cmp.visible() then
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Insert })
else
fallback()
end
end,
}),
['<Down>'] = cmp.mapping(cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Select }), { 'i' }),
['<Up>'] = cmp.mapping(cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Select }), { 'i' }),
['<C-n>'] = cmp.mapping({
i = function(fallback)
if cmp.visible() then
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
else
fallback()
end
end
}),
['<C-p>'] = cmp.mapping({
i = function(fallback)
if cmp.visible() then
cmp.select_prev_item({ behavior = cmp.SelectBehavior.Select })
else
fallback()
end
end
}),
['<C-b>'] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }),
['<C-f>'] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }),
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }),
['<C-e>'] = cmp.mapping({ i = cmp.mapping.close(), c = cmp.mapping.close() }),
['<CR>'] = cmp.mapping({
i = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }),
}),
}
})
local servers = { 'pyright', 'rust_analyzer', 'ccls', 'lua_ls', 'rnix', 'texlab', 'verible' }
local capabilities = require('cmp_nvim_lsp').default_capabilities()
for _, lsp in pairs(servers) do
require('lspconfig')[lsp].setup {
capabilities = capabilities
}
end
require('lspconfig').lua_ls.setup({
single_file_support = true,
})
require('lspconfig').verible.setup({
root_dir = function() return vim.loop.cwd() end
})
if vim.fn.exists('+undofile') ~= 0 then
local undo_dir = vim.env.HOME .. '/.config/nvim/undo'
if vim.fn.isdirectory(undo_dir) == 0 then vim.fn.mkdir(undo_dir, 'p') end
vim.o.undodir = undo_dir
vim.o.undofile = true
end
vim.cmd([[syntax sync minlines=100]])
vim.cmd([[syntax sync maxlines=140]])

View File

@ -1,44 +0,0 @@
{
pkgs,
vimUtils,
fetchFromGitHub,
}: {
extraPackages = [
pkgs.ccls
pkgs.clang
pkgs.luaformatter
pkgs.nil
pkgs.pyright
pkgs.rnix-lsp
pkgs.rust-analyzer
pkgs.sumneko-lua-language-server
pkgs.svls
pkgs.texlab
pkgs.tree-sitter
pkgs.zls
pkgs.verible
];
plugins = with pkgs.vimPlugins; [
colorizer
fugitive
fzf-vim
gruvbox
nvim-lspconfig
nvim-treesitter
nvim-ts-rainbow
repeat
targets-vim
UltiSnips
vim-addon-nix
vim-signify
vim-slime
vim-snippets
zig-vim
cmp-nvim-lsp
cmp-buffer
cmp-path
cmp-cmdline
nvim-cmp
];
}

View File

@ -1,10 +1,6 @@
{ lib, ... }:
with lib;
{ {
config,
pkgs,
lib,
...
}:
with lib; {
xdg.configFile."whatsapp-for-linux/settings.conf".source = builtins.toFile "settings.conf" ( xdg.configFile."whatsapp-for-linux/settings.conf".source = builtins.toFile "settings.conf" (
generators.toINI { } { generators.toINI { } {
General = { General = {

View File

@ -1,9 +1,5 @@
{ pkgs, ... }:
{ {
config,
lib,
pkgs,
...
}: {
programs.z-lua = { programs.z-lua = {
enableAliases = true; enableAliases = true;
enableZshIntegration = true; enableZshIntegration = true;
@ -12,7 +8,6 @@
programs.zsh = { programs.zsh = {
autocd = true; autocd = true;
enableCompletion = false; enableCompletion = false;
syntaxHighlighting.enable = true;
defaultKeymap = "viins"; defaultKeymap = "viins";
shellAliases = { shellAliases = {
@ -22,6 +17,7 @@
cp = "cp -v"; cp = "cp -v";
rm = "rm -v"; rm = "rm -v";
ip = "ip --color=auto"; ip = "ip --color=auto";
f = "''$(pay-respects zsh)";
}; };
history = { history = {
@ -42,18 +38,13 @@
src = pkgs.nix-zsh-completions; src = pkgs.nix-zsh-completions;
file = "share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh"; file = "share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh";
} }
{
name = "fast_syntax_highlight";
src = pkgs.zsh-fast-syntax-highlighting;
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
}
{ {
name = "pure_prompt"; name = "pure_prompt";
src = pkgs.fetchFromGitHub { src = pkgs.fetchFromGitHub {
owner = "sindresorhus"; owner = "sindresorhus";
repo = "pure"; repo = "pure";
rev = "47c0c881f0e7cfdb5eaccd335f52ad17b897c060"; rev = "92b8e9057988566b37ff695e70e2e9bbeb7196c8";
sha256 = "15xdhi72pq88ls5gx1h0k23jvb41j6kq6ar17dqmd5d38zsgwl3v"; hash = "sha256-TbOrnhLHgOvcfsgmL0l3bWY33yLIhG1KSi4ITIPq1+A=";
}; };
file = "pure.plugin.zsh"; file = "pure.plugin.zsh";
} }
@ -72,6 +63,11 @@
}; };
file = "sudo.plugin.zsh"; file = "sudo.plugin.zsh";
} }
{
name = "zsh-fast-syntax-highlighting";
src = pkgs.zsh-fast-syntax-highlighting;
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
}
]; ];
envExtra = ''''; envExtra = '''';
@ -86,7 +82,6 @@
setopt c_bases setopt c_bases
setopt completeinword setopt completeinword
setopt completealiases setopt completealiases
setopt extendedglob
setopt notify setopt notify
# #
@ -99,6 +94,15 @@
eval "$(direnv hook zsh)" eval "$(direnv hook zsh)"
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
if [[ -n "$PS1" ]] && [[ -z "$TMUX" ]] && [[ -n "$SSH_CONNECTION" ]]; then
TMUX_EXE="${pkgs.tmux}/bin/tmux"
systemd-run --scope --user $TMUX_EXE attach-session -t $USER || systemd-run --scope --user $TMUX_EXE new-session -s $USER
fi
if [[ -n "$BUBBLEWRAP_DIR" ]]; then
RPS1="{{$BUBBLEWRAP_DIR}}"
fi
''; '';
}; };
} }

409
magpie/configuration.nix Normal file
View File

@ -0,0 +1,409 @@
{
config,
pkgs,
lib,
project-cloud,
nvim,
system,
...
}:
{
imports = [ ];
nix.optimise.automatic = true;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
system.switch = {
enable = false;
enableNg = true;
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 2;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [
"ip=dhcp"
"console=tty"
];
boot.kernel.sysctl = {
"net.core.default_qdisc" = "fq";
"net.ipv4.tcp_congestion_control" = "bbr";
};
boot.initrd = {
compressor = "zstd";
availableKernelModules = [
"virtio-pci"
"virtio-gpu"
];
systemd.enable = true;
network = {
enable = true;
ssh = {
enable = true;
hostKeys = [ /etc/ssh_dummy_ed25519_key ];
authorizedKeyFiles = [ ../nixy/ssh_pubkey ];
};
};
};
# Set your time zone.
time.timeZone = "Europe/Berlin";
users.users.root.initialHashedPassword = "";
users.users.root.openssh.authorizedKeys.keys = [
(builtins.readFile ../nixy/ssh_pubkey)
];
environment.systemPackages = with pkgs; [
curl
fd
file
fzf
fzy
git
nvim.packages.${system}.nvim
htop-vim
nvim
pciutils
tig
tmux
unzip
usbutils
wget
zip
];
programs.mosh.enable = true;
mailserver = {
enable = true;
debug = false;
fqdn = "mail.project-cloud.net";
domains = [ "project-cloud.net" ];
enableSubmissionSsl = true;
enableImap = false;
enableImapSsl = true;
# A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = {
"gitea@project-cloud.net" = {
hashedPasswordFile = config.sops.secrets."gitea_mail_pw_hash".path;
aliases = [ "git@project-cloud.net" ];
};
"asmir@project-cloud.net" = {
hashedPasswordFile = config.sops.secrets."asmir_mail_pw_hash".path;
aliases = [ "asmir.abdulahovic@project-cloud.net" ];
};
};
certificateScheme = "acme-nginx";
};
services.journald.extraConfig = ''SystemMaxUse=50M '';
services.logind.extraConfig = ''KillUserProcesses=yes '';
services.openssh.settings.PermitRootLogin = "prohibit-password";
services.openssh.enable = true;
services.openssh.listenAddresses = [
{
addr = "10.100.0.1"; # wireguard
port = 22;
}
];
services.opendkim.enable = true;
services.miniflux = {
enable = false;
adminCredentialsFile = config.sops.secrets."miniflux_env".path;
config = {
LISTEN_ADDR = "localhost:5001";
BASE_URL = "https://miniflux.project-cloud.net";
};
};
services.goatcounter = {
enable = true;
port = 8002;
proxy = true;
address = "127.0.0.1";
};
services.nextcloud = {
enable = false;
package = pkgs.nextcloud28;
config.adminpassFile = config.sops.secrets."nextcloud_admin".path;
configureRedis = true;
hostName = "cloud.project-cloud.net";
https = true;
settings = {
mail_smtpmode = "sendmail";
mail_sendmailmode = "pipe";
enabledPreviewProviders = [
"OC\\Preview\\BMP"
"OC\\Preview\\GIF"
"OC\\Preview\\HEIC"
"OC\\Preview\\JPEG"
"OC\\Preview\\Krita"
"OC\\Preview\\MarkDown"
"OC\\Preview\\MP3"
"OC\\Preview\\OpenDocument"
"OC\\Preview\\PNG"
"OC\\Preview\\TXT"
"OC\\Preview\\XBitmap"
];
};
phpOptions = {
"opcache.jit" = "tracing";
"opcache.jit_buffer_size" = "100M";
"opcache.interned_strings_buffer" = "16";
};
};
services.nginx = {
enable = true;
package = pkgs.nginxQuic;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."project-cloud.net" = {
quic = true;
http3 = true;
forceSSL = true;
enableACME = true;
root = "${project-cloud.packages.${system}.default}/public";
};
/*
virtualHosts.${config.services.nextcloud.hostName} = {
quic = true;
http3 = true;
forceSSL = true;
enableACME = true;
};
*/
virtualHosts."miniflux.project-cloud.net" = {
quic = true;
http3 = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:5001";
};
};
virtualHosts.${config.services.gitea.settings.server.DOMAIN} = {
quic = true;
http3 = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://unix:${toString config.services.gitea.settings.server.HTTP_ADDR}";
};
};
virtualHosts."stats.project-cloud.net" = {
quic = true;
http3 = true;
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:8002/";
};
};
};
services.gitea = {
enable = true;
appName = "Project Cloud Gitea server";
database = {
type = "sqlite3";
passwordFile = config.sops.secrets."gitea_db".path;
};
settings.server = {
DOMAIN = "git.project-cloud.net";
ROOT_URL = "https://git.project-cloud.net";
DISABLE_SSH = true;
HTTP_PORT = 3001;
LANDING_PAGE = "explore";
PROTOCOL = "http+unix";
};
settings.mailer = {
ENABLED = true;
FROM = "gitea@project-cloud.net";
PROTOCOL = "sendmail";
SENDMAIL_PATH = "/run/wrappers/bin/sendmail";
};
settings.service = {
DISABLE_REGISTRATION = true;
REGISTER_EMAIL_CONFIRM = true;
};
settings."markup.restructuredtext" =
let
docutils = pkgs.python3.withPackages (
ps: with ps; [
docutils
pygments
]
);
in
{
ENABLED = true;
FILE_EXTENSIONS = ".rst";
RENDER_COMMAND = "${docutils}/bin/rst2html.py";
IS_INPUT_FILE = false;
};
};
services.nfs.server.enable = false;
services.nfs.server.extraNfsdConfig = ''
rdma = true
vers3 = false
vers4.0 = false
vers4.1 = false
'';
services.nfs.server.exports = ''
/export/nixy 10.100.0.1/24(rw,nohide,insecure,no_subtree_check,all_squash,anonuid=1000,anongid=100)
'';
services.borgbackup.jobs."borgbase" = {
paths = [
"/var/lib/gitea"
];
exclude = [ ];
repo = "ssh://na9fqv67@na9fqv67.repo.borgbase.com/./repo";
encryption = {
mode = "repokey-blake2";
passCommand = "${pkgs.coreutils-full}/bin/cat ${config.sops.secrets."borgbase_enc_key".path}";
};
environment.BORG_RSH = "${pkgs.openssh}/bin/ssh -i ${config.sops.secrets."borgbase_ssh_key".path}";
compression = "auto,zstd";
startAt = "daily";
};
services.seafile = {
enable = false;
initialAdminPassword = "admin";
adminEmail = "asmir.abdulahovic" + "@" + "gmail.com";
};
# needed for sendmail mail functionality
users.users.gitea.extraGroups = [ "postdrop" ];
systemd.services.gitea.serviceConfig = {
RestrictAddressFamilies = [ "AF_NETLINK" ];
ProtectSystem = lib.mkForce false;
};
security.acme = {
acceptTerms = true;
defaults.email = "asmir.abdulahovic@gmail.com";
};
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = {
"asmir_mail_pw_hash".sopsFile = ./secrets/asmir_mail_pw_hash.yaml;
"borgbase_enc_key".sopsFile = ./secrets/borgbase_enc_key.yaml;
"borgbase_ssh_key".sopsFile = ./secrets/borgbase_ssh_key.yaml;
"gitea_mail_pw_hash".sopsFile = ./secrets/gitea_mail_pw_hash.yaml;
"miniflux_env".sopsFile = ./secrets/miniflux.yaml;
"wg_preshared/mediabox".sopsFile = ../common/secrets/wg_preshared.yaml;
"wg_preshared/nixy".sopsFile = ../common/secrets/wg_preshared.yaml;
"wg_preshared/workstation".sopsFile = ../common/secrets/wg_preshared.yaml;
"wg_privkey".sopsFile = ./secrets/wg_privkey.yaml;
"gitea_db" = {
sopsFile = ./secrets/gitea_db.yaml;
owner = config.users.users.gitea.name;
};
/*
"nextcloud_admin" = {
sopsFile = ./secrets/nextcloud_admin.yaml;
owner = config.users.users.nextcloud.name;
};
*/
};
};
networking.hostName = "magpie";
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [
80
443
587
2049
]; # http, mail, mail, nfs
networking.firewall.allowedUDPPorts = [
443
51820
]; # mail, wireguard
networking.firewall.allowPing = true;
networking.firewall.logRefusedConnections = lib.mkDefault false;
networking.nat.enable = true;
networking.nat.externalInterface = "enp1s0";
networking.nat.internalInterfaces = [ "wg0" ];
networking.networkmanager.enable = true;
networking.wireless.enable = false;
networking.wireguard.interfaces = {
wg0 = {
ips = [ "10.100.0.1/24" ];
listenPort = 51820;
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
postSetup = ''
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE
'';
# This undoes the above command
postShutdown = ''
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o eth0 -j MASQUERADE
'';
privateKeyFile = config.sops.secrets."wg_privkey".path;
peers = [
{
publicKey = builtins.readFile ../nixy/wg_pubkey;
presharedKeyFile = config.sops.secrets."wg_preshared/nixy".path;
allowedIPs = [ "10.100.0.6/32" ];
}
{
publicKey = builtins.readFile ../mediabox/wg_pubkey;
presharedKeyFile = config.sops.secrets."wg_preshared/mediabox".path;
allowedIPs = [ "10.100.0.5/32" ];
}
{
publicKey = builtins.readFile ../common/wg_pubkey_workstation;
presharedKeyFile = config.sops.secrets."wg_preshared/workstation".path;
allowedIPs = [ "10.100.0.4/32" ];
}
];
};
};
systemd = {
enableEmergencyMode = false;
watchdog = {
runtimeTime = "20s";
rebootTime = "30s";
};
sleep.extraConfig = ''
AllowSuspend=no
AllowHibernation=no
'';
};
system.stateVersion = "22.11";
}

View File

@ -0,0 +1,44 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"virtio_pci"
"usbhid"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/118de1e5-f23e-4af3-a10a-054eded78152";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/4FEE-DEED";
fsType = "vfat";
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

View File

@ -0,0 +1,30 @@
asmir_mail_pw_hash: ENC[AES256_GCM,data:LOKGd9X69fSj81BwaqjiQL18gXPebIdcfjOO2UJM8XOUEzsqP/gHYWuLYGQ5wuZB9zcFm0yeGjNN8hOq,iv:KwunTtk1ca/N4UidUXh3nSBwMNlP8vI4h2kk8roAzNU=,tag:JyfLzweD7sVT/+RVpLA3QQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBOS3RoalBRQTB5Mkp4THpa
aG9jS0UraEJlWHlVRFBWNWNJNGVOd0hxdUZBCm10OWwramN3UGdLUFpwbkduaU16
S1FWcHIrK0dKRTAvSlN4SlI3eHJJL3cKLS0tIFljS3oxWXZyRlFEVUdUYXRsc2x4
N1h6SFYrcTZQK1JSRWZsV2MvTGFwb0kKxRohlU6vR3CR2SGqDT9P8AxQXMSbpQuO
g1t6gj3c+YBugUsCMuNpYEE+8OvfSQmsZV0VHojS8dMHSD9x75237w==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA2bnFpZzB2b21YVEZtenBj
TlkxdVlSWmM3dDNnQmxqQm5FWlQ0ZHhySGg0Cll1andBcE0yZ04zaFZlajBDSDUx
VHRWbFVOeE1CZmlveTB0UEpjZUpzMEEKLS0tIE5tcVFuaWt6K2RKR3FodGYra25n
bHNWWmh1dFdJVGtETWYvZDY1TGpvUVkKu4sO+/OXdV4xsLmOMlbV5nIidX+iREgF
q0IavI9nzOZ0tkWSV/9mFua8Mp1vPW8wCBOqnW3nhPvYDoTbGQEovQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-10-20T19:31:29Z"
mac: ENC[AES256_GCM,data:xXiCems/1em6JdK3V5GcD811yc8t6iHHFmz0OOrWM3muR807Ux80TrD3uoMN8GxIMyr0AloH41k8+vxaSlMmHsGGl6o1P13aR03E+A9ZLp1W2Nb3nCy5rH4pF8WSeNMxZ1SoT2iEAtTsh29xusocQTMUvr7Ou8TDLyVvrKhBPZw=,iv:SSPpVTbVQTvhPg1qm9akrg2ji1fRcukkwX5P2FzWMb4=,tag:a6GiGWfwnKLtteVoi9DJtQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3

View File

@ -0,0 +1,30 @@
borgbase_enc_key: ENC[AES256_GCM,data:bnSjKRY6HlmOyhjyuJLH8Xqzzpm7NgZI5g==,iv:RYlg83PqV2DIQHa5FoD6ls/utVjuSwmrv56N6Lrtn8s=,tag:hC6e9d5/EH9V7kG23XblEQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCdm1lejdSTm1PN1dsWHNJ
Nzc5aERNUlk5U0VoNWRzcVlMSXpqSEFmYkVNCkhqeHZrMng4WjEzcnBxdmtVUWlz
NXhiNFB6Ukc2eGRiNW96YVloQyt0ZW8KLS0tIFhjUVlITVVTcktCTzEzdUJzTmsy
UVhGc2VKeFJmS3RUY2YrR2FVVlVOcDAKsl+Fo16/3PpQ35aF4EBq5kjpyNxnZfip
1sfq1ppUfg6QRRICWtxUyXLS898BVusW8cMft6k9JbgZfQnc9YUSBg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBhMTZhdm1mVXhWdlNJVytR
Z3ROLzNnZHUvMXRUcCtPeFFBRWJxY3lyRWljCkErdXAxc3ZETFMxd3ZCRHJPY2JU
N1YxL0VJZ1M0eUdEblhrTDd2VWNNRVUKLS0tIFRBTGNKUDUxaDdGK2x4aWIxMm9i
Zit1QTdRTjVNdjhFYklEUVlsQjZCM2cKtutM+au5vNF0x9ZP9Cg4pMUGsScIMRFU
KYrBHGW+VfEDpr534X8FXe1Uox70U+HPoT/mEm4RF575ssbTSoW0Hg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-05T19:01:07Z"
mac: ENC[AES256_GCM,data:Fz1ZwYR7cg+bcgNe/JZ2oEqhYihQWnCoy3J76VIPb089PNCXXp0xJ/eYjOoKlGK42z1wEO8hJ8FoaLvzuqhO0aatKpHDx0bBos8YqZYuGAuW115AdK5m6ecby7yi5lBIBpXOv1sU8uOtdBR32UPFAQ9oQf0KleWju47phF43v9o=,iv:Lbu5eLKfEnrehSY1+r0z75pZnNDNEVSmrEaJRDpDTU4=,tag:TLdtQTNbo0dxlpV9ZPm+uQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@ -0,0 +1,30 @@
borgbase_ssh_key: ENC[AES256_GCM,data:W/aAQPSaPxGPeY50arJr50OWZjN+RJt9Y4MlpPNtw3KT2y+fUuMpNAjMuGd+3mzA2bs9YpE2WlgJ7KO5XPH7M36tSI+K2pcnjX1NMl8giJ952iCsqW4siij64JguK/gUi3GAe3LXHTjr3VgubSdqVd25k0bys+GiMfsHXXGD6tinKmEheis6XgfcChrvyYgQ4DKPW4HOHC4/V6roXaK+GTe+qY0BdzM27cDHc3a85cuHAAeDnYdNfdRAItI3KmDCx8edeBwt4vonR/v9AaDRH2PjZWq583Rlqoa8TQvQi0+yWf6O6MikHQlP1GoYCe5iI+rOF6KTseDjS2aoLZ+mXNxVmmOVdZrq1vx0UpsbJWRZE+1UluQwdrEm1mLMrI4Z2wFNfzjg9rOiJ36AL1YdcXtI0RHLYp8r92Qt3IFVwcC1NT/AWJkFOGr5z0PX0w+mi4J+f1wDvVguXp2KaguB2XAJbnpgQQ2ZqYv0gTkBLZ/RAOyQgaMaESCfJBWXE3DESMOspj4AYUsjQiaxmF13,iv:ph++5hCX3DzqwCoObz73/Xn0qy/+Za5+DI/EVsc67yY=,tag:0VkALd0j3D6yA7jCE7vogg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAydXE0RXhGU0tsbnRTU0pw
THZBNngvUEwwMGVTQ3dscCtKMnVCb1pSSzN3CkVzNS9UY3dqYWRDOENTaFhadFcz
MGlibCt5Q3ppelVQU1AyM0wvTm1zMXMKLS0tIHNGM291dE5lb2pwTDFWbWtiUFNp
Y1ZoSG43TFd0WktKY3lUM3Y0RHJHZVkK0/sD5M54XiQzkSMlDHPkSVMypoxdhU/f
0nUWA20s6IU63Oqn0j7rGwV6S5j+fZCBzF4kSi8JLJb0619G2++M5g==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBiem5ZRE1oRU1hWENzc2sv
dkg4czhVeVNJQllnWG9vYnptL1FhZy9zc0hBClhLRzQxNlhQUEVUcnZDYlZqTWYx
eDQzV2ozbkd6ZWVZNWkxOXhBV0JNR00KLS0tIFQ4d29OQzhoWTl0Z3BrOURTSktU
SHZNdFhmS3ZQMnhzMDJWMTl4cXNudFEKhgbRW+6xqGhkTtr4h4JzPxZnGKqr4jcX
BABLTgzqvM+JvBzmUcYjuagVcLpWsQcNWBaYFBJBMhP8oOgF2dVBcQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-05T20:03:21Z"
mac: ENC[AES256_GCM,data:YpXUK6UNKpdudVZ+YManWreHufFzw9XbF1cBYutdAaTdqhlzPErpuOmEKLuMA7nr7SQkLK4pu1Eg0P5CA3QXsh0VUHMTiFWxNz7KZeoYAkacK9WzutEldsMG4iVlKmGHhQApSNW4kfPBKs1TgYyZdndBHEdILcoLDxke8kfkoVU=,iv:rpNeNTfXoMpScSfyrY7uK9ZkKasJGVAhgiMoe0XyJFo=,tag:Rl4Ya+iq0BvMSM/J0wySnQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@ -0,0 +1,30 @@
gitea_db: ENC[AES256_GCM,data:50Hu8vTKZFxd9kjbcDlyqBW9L5s=,iv:ADKMUKbu1YHOp+DUAezpT8tXCi7x3ayA2VN0s7k4kxg=,tag:S1cu5w8qKT7FFpC30Kd3Xg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUUXAraFhvN0NLeHhKWGJt
c2ttRGljUzZiN2ZJeWpTdVRzNCtzL0pqdHhnCmJvek9YNkF4UTd1ZEFSaDBJR1Jz
ZkUwTFNEYkhmbS9DVUJ0cTNrTVR5TlkKLS0tIFdscFJCaTJjYXFPcVZXUXBPS2ph
bERTT1dsaStRQnRvb1VnV2lTdGNQd0UK3dXTtGkfxq7oLzDrxFomE0oAjgZo+7H7
SVVxKy/caewOXbI3R/CHxuaYb0fDDlyIX/zqxqkSaXUIh4rsIT46xw==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCOFFtQUptR2xIcW5FS3JR
aUdLbGRJeU4rbFFVcU9HVVdYL293WXY0L3hvCmpPN1BnRDlZNDhOT25zVFRjaGE1
TThWQUVDOG5YOGtlRmU1T1pZZ1dxTHcKLS0tIHZSUTBDbFN5eXZPMHZvZ2UwMFJu
cjhmWGJIUEhZQjNXN3J6ZTk1aE1jZHMKjiwLd6gHiLJx63AIzM17C3RaEBbCFIyI
ppLWEw8cm53hvjCuxsY8jJ/5kHD+25Pw2NMAD5PKt8SjrJzrJcOtMA==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-10-17T21:16:10Z"
mac: ENC[AES256_GCM,data:EPiLv8IzVXqRan9UlBuA3TmxtB3f4Qj4owed+1Pat9Tih1yOe4Z9RT28JIYJQ70R/IK+Yi0NQem9Ec6HU+8kaxLE3fff/4PM+B9QQbB6fjgLFod/nFk+OuWgR7FTcJ2j16OnlxE5ikCP+qdfvAM0eEv+BoDrWv98gSyCXtMCe48=,iv:th0E7zioz7gtgMlns8kvnf5hmlRH0KX65wPxBi3YP6Y=,tag:JhoGvF8LJmrAQpUOEopohA==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3

View File

@ -0,0 +1,30 @@
gitea_mail_pw_hash: ENC[AES256_GCM,data:HCXKeqnOxcmxbvTWDFd750gXfs/irNvHw+TWQE5qjFsUP6MTRGvJNQvoU5NDYXs6pjgyznIUx1z31DQG,iv:UV7Yf2JsAcpkyfIW/ipYQa3tlTai0WD102iA3V6ba+A=,tag:TIcB+9GOqyuG68uCTAl4Tg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBrL2YxU2VhNTArQ0QwYzlU
Z0NSRm5KRU8xRmZCT1E1N09KY2Vob0lsQ2k0CktqTlZnaUVNaEhpT3BkOGNmN2cv
Z0JoaFFTTzBwNzVmcHNOeXdwVzdQOTQKLS0tIDluazF6RXA0MVYvY2dRRGkxMGRk
UEltOVNQdElpRGJVVlpoTVV2bU5rSncKoSGq75dVH7j/hSnqdjgWJyDgg0doEr6K
anD9sghKSX0afZmVJFOCXZ+lRYi7kmRbqFNBkkuuFndERtbN/5foXw==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSByNW9UcERVditoUE1DVUsw
WmxtbVNHeVpQS0g2WENJWTVJeHNUMU4yZEVNCnNrSnFnU2hUckxlYjJMYk5CTW9j
eU9mU1F4WlY1NWdLU0VxaDVtZWduaXcKLS0tIExtRHJkbFBKTWRjSGZOWGc1U0FF
ZjJkY0FpQnhCazVVVG1DOUZsQ2lXYzgK3UWDBu/Aq7n6CQiRF4NOQdSD4nfU2Gm2
Tlzyou5rj/rSAv5J7ENsDAzKtK6e5+Xe7acUDY+4Rye82vDxyoblaQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-10-14T21:21:12Z"
mac: ENC[AES256_GCM,data:NE9btXZKE3KJmxtWc0Ytb0atfBJKRs5T+Xk9RDFX6veSGBoB+M2+YMCONQdr8T2w6lLJqlrMBHqlfuvD3YnDj041xZmfSsi9NACliWj6GWVWcFWWc6W9OVH8/5CfwjYBdgTJ2o7wdnF9fYHvwMRcaHThDmoUkaExVtVsyu912og=,iv:kyekfEq32GSKVNKy8MJYfT5ZMKNSRQUk1viB2W6k29U=,tag:7ie/2P/F3bPQXpkWGKqTfA==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3

View File

@ -0,0 +1,30 @@
miniflux_env: ENC[AES256_GCM,data:K5FiJcboD3tpWxQQG4EeCuOb9d8+cXTLjqb9Nt+aYUvWHwycA51q3ZQTMY9JS7GevNugGvz7,iv:Xk7aW1/DObGxJxTlJniaCBHuCVfCh6OZEewISdZl2Pc=,tag:BY8uVkkRzyKr9pA6EGCY2A==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0K0ZNSWEweUNTbm5KZE5y
M3ZlbTdBc1RheHFNbGpxZllRdi9tMXVJaEFJCmdQdWh6cks5L3JFclJYWmlkYmVv
WDA2YXhiN3ovL1V0ZlJjbmluSm5tbGMKLS0tIG1QRnoxMHBQeGtLekRSRVVMNWdP
R1BuNDZVNzNaTmVvZm9EMy9ld0V4U1UKFjPcFiuhjwCChJKGQbIPFsHwl9oE7S+g
Utne4LrODAa3wj8TX3vgfRTBrljJmt+OwQJxRfTtq2ocyzR9rNUI+w==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBVNFAvaUlyeHA3Mnluam1G
dmtIWHU2R2pRV2E3NTVKV1NOTHRSYjVhQVRVCnR4OENHZGYzVE9UdlJBTjdxblIz
Q0MxN3gyeTJhNTdORFk0SDdycVFrWjAKLS0tIEc5c0RMNjdLSTNKWExsVmlQUGx5
RFp0dWJXOVVvSGlhZ1pPbGRBWmt2S0UKTwkFwYaTr5jNuQTlqR/1ud8ITKGIbNiM
myAf39EHCP6cQQ0fjtx2ihy56m9xoK35Aj7h3w0fadONWtCNnhuH2A==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-10-13T11:17:33Z"
mac: ENC[AES256_GCM,data:CpzC0H2Rfvl7F9tXCJ0WwkhE4Ba7eOIl1QMh1DHP8YQ9rChzAE8S5SXXuJA0jcmVY6NPfZ7zl8VEBepE+LHCq2UdSkAefawLeM6HwNfedP8N+zheqlyCZ8Os48628aHYN0PVI+/dMvpWWcfl+CFaH1mm4c+KYedCIsS9ZEYi9N8=,iv:EbF58pxbtHxPTAgs4dbZ31qyRT3QJ1kQoUShbLE11FY=,tag:FNF/OzS2SL3FweFw0RcRLQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3

View File

@ -0,0 +1,30 @@
nextcloud_admin: ENC[AES256_GCM,data:txb5JSKxFeTS3M9LSk7m5M1XAvg=,iv:Rf6VNFmK+f0pjL7wH0dlcPL4CqQDRq/qQyliTdn2c4I=,tag:wDQqDZCK2p5aG+g8eE4weA==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBHYVVnM0xOVzJ5OFZsYlZL
SThvVkNBdzJoVkZ3ZFBMYVlTNjQwNUxuaVFjCjBhUFRSaGZ6TEh4ellSdS9Uc3FP
cGJaanNUci9JMDZISXljM1lSREZaZGcKLS0tIFhJOGVIM3Bub3J0WWVMNDlqY3da
RmVCdEpoUjJGTDYzczNnOWRRTTE3WmcKnRV787F3yBJgSDEhHW1+sAFcyvH+OMQf
N7er4Wd9Tqi3IJ/lR2Z7Gwn1Dfm5kMHk+hxzPlmdpaGr42ZJNPmNVw==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBCZmFFRXU5NnlGRit6K1ov
TmR0K05uY2hva3liaDdGNmhST3dWTGdZb1EwCkpsQ3o1ZWloaUdFR3NpbS9uKzE5
S0ZRRmkxbkJnMFN6SzhzUFo1M3NnTnMKLS0tIE84aFdJS3E4eWw3SG1JeXJwRWd2
RWp5ZUtUNzJ4OWswWmhXWjRkZkpzWEUKj23XymHvh+nh3HiPD+erv2GZNNpUZKp6
s0KJSkGuIuILf3kfgp23jXNSFLMEtWwlSh5EP02g2EIHzUg2kLKNpQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-10-17T23:08:24Z"
mac: ENC[AES256_GCM,data:fb9cOL4Q+q5uarmXtXNlpRmWgv/Ao1MqwwH2V2CQxEiP8zFyFBZs2435vdcLzrQrnBXz0JLVu4g10SH2T4dpYFP42teIkrgmneecjjcM+UOsBsGsrxlpHMha1t/ERRhBA7uJze5/kwHqry6eruWehRTu65QF1qBTql3m6ipjCeY=,iv:a7aFuTCcRCIDERlrj/9dFCF7VgCDDakfPteQimHV3lc=,tag:4mwrDHaQWA4EU0AgtgZaMg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3

View File

@ -0,0 +1,30 @@
wg_privkey: ENC[AES256_GCM,data:TnUTZheznQqnyK59qdLmAcuVr9JICWlNVtPF1qRMDPbBblD0ALn10qbEC7M=,iv:83fum5iYUrw08XJ0s7RE+/WDGeVjVswPlptzQjWOjeQ=,tag:YhQlmilbnrpRxcUb6rzfHg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJUFplcGZMWGhrS2NsRUZF
WnltcCsvS0VaV29RbTdDK1UveDJwdlBXbTBJCkVaekVUWFVSVkZ5UjUwaWMxU3h0
eEtOQUR2VkF6RUtLYVBNalJPV3YzWWsKLS0tIDNGek4veStoa011VUV2Z3ZSUVpq
ZWlYQ2x6a3ROdlYzc3E1WjRhN3F1QUUKwaJruHMCoWtgvep0fI00helDZh8WVrsh
MV5IaEH5xapid5HHw9bLkjeeVKcT1fo7LCovouv+G5NTjvVzsMyLhw==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBlRWdQeWxUUlJaRndzcVln
ck5USkpzdDJpSWJTNDZJWVBMQnl0QnVvTDF3Clg2SEY3eDdqS0Y5ei8vUlk0dTli
bTYycFYyMjcxdmtpc1IybXBxN2RORm8KLS0tIHlHaEJLMnRTQ20yN2RrRnNqMzk0
ZVlSb1FHVVJhb0IyaHJiQlpHRjNyMDAKNQ8VzdC3s43YcZk6UQjyA1GX69x/znhE
ZaFkMfNX6CgxfjKRW2rhXrJi+txdhmQ0CfpfWDr3zp3XVuMq942M1Q==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-04T19:04:00Z"
mac: ENC[AES256_GCM,data:qYNlokRd1lQnOwNNVbV4PwdYeybIRNrxDKX4RPfHJxvQGHBmISzd52JCnCe7zJ14FP/bSNhQqfuxyjdxid/DVPUvkHP+HlaKUR0SLv6c91ORDoaMRC93hrPXypRGplFSbSjnd3dME43ll3oH8fLe4lP9z9KhGS2lRMdduptfWvg=,iv:/j6OOT1dK94vrPOk1Lbcca8KeWvoD+ZaHoH6nMMo0y8=,tag:syHuBVkhOCJ8JCONKkqFkg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

1
magpie/wg_pubkey Normal file
View File

@ -0,0 +1 @@
xhjJdIXtTBNhtSoehsi6p+znIgOfMRetl5/wtnMxJGk=

497
mediabox/configuration.nix Normal file
View File

@ -0,0 +1,497 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
config,
pkgs,
zremap,
system,
nvim,
...
}:
{
imports = [ ];
system.stateVersion = "23.05";
system.autoUpgrade.enable = false;
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
sops.secrets."peerix/private" = {
sopsFile = ./secrets/peerix.yaml;
mode = "0400";
owner = config.users.users.nobody.name;
group = config.users.users.nobody.group;
};
sops.secrets."wg_privkey" = {
sopsFile = ./secrets/wg_privkey.yaml;
};
sops.secrets."wg_preshared/mediabox" = {
sopsFile = ../common/secrets/wg_preshared.yaml;
};
nix = {
optimise.automatic = true;
gc.automatic = true;
gc.options = "--delete-older-than 7d";
package = pkgs.nixVersions.latest;
settings = {
experimental-features = [
"nix-command"
"flakes"
];
};
};
boot = {
initrd = {
compressor = "zstd";
availableKernelModules = [ "e1000e" ];
network = {
enable = true;
udhcpc.enable = true;
ssh = {
enable = true;
hostKeys = [ /etc/ssh_dummy_ed25519_key ];
authorizedKeys = [ (builtins.readFile ../nixy/ssh_pubkey) ];
};
};
};
kernelModules = [ "acpi_call" ];
kernelPackages = pkgs.linuxPackages_latest;
kernelParams = [ "msr.allow_writes=on" ];
kernel.sysctl = {
"net.core.default_qdisc" = "fq";
"net.ipv4.tcp_congestion_control" = "bbr";
};
loader.systemd-boot = {
editor = false;
enable = true;
memtest86.enable = true;
};
readOnlyNixStore = true;
supportedFilesystems = [ "btrfs" ];
tmp.useTmpfs = true;
tmp.tmpfsSize = "80%";
};
security = {
rtkit.enable = true;
acme = {
acceptTerms = true;
defaults.email = "aasmir@gmx.com";
};
};
powerManagement = {
enable = true;
cpuFreqGovernor = "ondemand";
};
networking = {
firewall = {
enable = true;
allowedTCPPorts = [
80
443
51820
];
};
hostName = "mediabox";
interfaces.enp0s25.useDHCP = true;
interfaces.wlp3s0.useDHCP = false;
useDHCP = false;
wireless.enable = false;
wireless.interfaces = [ "wlp3s0" ];
nameservers = [
"127.0.0.1"
"::1"
];
dhcpcd.extraConfig = "nohook resolv.conf";
networkmanager.dns = "none";
extraHosts = ''
192.168.1.173 nixy.lan
192.168.88.171 jellyfin.mediabox.lan
192.168.88.171 mediabox.lan
192.168.88.171 qbittorrent.mediabox.lan
192.168.88.1 router.lan
192.168.88.231 workstation.lan
'';
wireguard.interfaces = {
wg0 = {
ips = [ "10.100.0.5/24" ];
privateKeyFile = config.sops.secrets."wg_privkey".path;
peers = [
{
publicKey = builtins.readFile ../magpie/wg_pubkey;
presharedKeyFile = config.sops.secrets."wg_preshared/mediabox".path;
allowedIPs = [ "10.100.0.0/24" ];
endpoint = "5.75.229.224:51820";
persistentKeepalive = 25;
}
];
};
};
};
time.timeZone = "Europe/Sarajevo";
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ nvim.overlays.${system}.overlay ];
environment = {
homeBinInPath = true;
variables = {
PATH = "$HOME/.cargo/bin";
};
};
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.zsh.enable = true;
programs.light.enable = true;
programs.firejail.enable = true;
programs.adb.enable = false;
programs.wireshark.enable = true;
programs.sway.enable = true;
# List services that you want to enable:
systemd = {
services = {
"macchanger-wireless" = {
after = [ "sys-subsystem-net-devices-wlp3s0.device" ];
before = [ "network-pre.target" ];
bindsTo = [ "sys-subsystem-net-devices-wlp3s0.device" ];
description = "Changes MAC of my wireless interface for privacy reasons";
stopIfChanged = false;
wantedBy = [ "multi-user.target" ];
wants = [ "network-pre.target" ];
script = ''
${pkgs.macchanger}/bin/macchanger -e wlp3s0 || true
'';
serviceConfig.Type = "oneshot";
};
"zremap" = {
description = "Intercepts keyboard udev events";
wants = [ "systemd-udevd.service" ];
wantedBy = [ "multi-user.target" ];
serviceConfig.Nice = -20;
script = ''
sleep 1
${zremap.defaultPackage.${system}}/bin/zremap \
/dev/input/by-path/platform-i8042-serio-0-event-kbd
'';
};
"wakeonlan" = {
description = "Reenable wake on lan every boot";
after = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.ethtool}/sbin/ethtool -s enp0s25 wol m";
};
wantedBy = [
"default.target"
"suspend.target"
"shutdown.target"
];
};
/*
"cpu_setting" = {
description = "Enable turboot boost and undervolt cpu after suspend";
wantedBy = ["post-resume.target" "multi-user.target"];
after = ["post-resume.target"];
script = ''
echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
echo 0 > /sys/devices/system/cpu/intel_pstate/no_turbo
${pkgs.undervolt}/bin/undervolt --core -105 --cache -105 --uncore -105 --gpu -15 -p1 47 28 -p2 57 0.0025
'';
serviceConfig.Type = "oneshot";
};
*/
};
};
services = {
acpid.enable = true;
btrfs.autoScrub.enable = true;
dbus.enable = true;
fstrim.enable = true;
fwupd.enable = true;
ntp.enable = true;
openssh.enable = true;
thinkfan.enable = false;
xrdp = {
enable = true;
defaultWindowManager = "icewm";
openFirewall = true;
};
logind = {
lidSwitch = "ignore";
};
jellyfin = {
enable = true;
user = "akill";
openFirewall = true;
};
jellyseerr = {
enable = true;
openFirewall = true;
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
deluge = {
enable = false;
user = "akill";
openFirewall = true;
dataDir = "/home/akill/.config/deluge";
web = {
enable = true;
openFirewall = false;
};
config = {
download_location = "/media";
allow_remote = true;
daemon_port = 58846;
};
};
transmission = {
enable = false;
openFirewall = true;
settings = {
rpc-whitelist = "192.168.88.*";
download-dir = "/media";
};
};
qbittorrent = {
enable = true;
user = "akill";
openFirewall = true;
dataDir = "/home/akill/.config/qbittorrent";
port = 8081;
};
nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts."deluge.mediabox.lan" = {
locations."/".proxyPass = "http://localhost:8112/";
};
virtualHosts."qbittorrent.mediabox.lan" = {
locations."/".proxyPass = "http://localhost:8081/";
};
virtualHosts."jellyfin.mediabox.lan" = {
locations."/".proxyPass = "http://localhost:8096/";
};
virtualHosts."jellyseerr.mediabox.lan" = {
locations."/".proxyPass = "http://localhost:5055/";
};
};
journald.extraConfig = ''
SystemMaxUse=50M
'';
logind.extraConfig = ''
KillUserProcesses=yes
'';
xserver = {
enable = true;
libinput.enable = true;
desktopManager.xterm.enable = false;
displayManager.lightdm.enable = false;
displayManager.defaultSession = "none+icewm";
windowManager.icewm.enable = true;
};
udev.packages = [ ];
tlp = {
enable = true;
settings = { };
};
actkbd = {
enable = true;
bindings = [
{
keys = [ 121 ];
events = [ "key" ];
command = "${pkgs.alsaUtils}/bin/amixer -q set Master toggle";
}
{
keys = [ 122 ];
events = [
"key"
"rep"
];
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}- unmute";
}
{
keys = [ 123 ];
events = [
"key"
"rep"
];
command = "${pkgs.alsaUtils}/bin/amixer -q set Master ${config.sound.mediaKeys.volumeStep}+ unmute";
}
{
keys = [ 224 ];
events = [ "key" ];
command = "/run/current-system/sw/bin/light -U 5";
}
{
keys = [ 225 ];
events = [ "key" ];
command = "/run/current-system/sw/bin/light -A 5";
}
];
};
mpd = {
musicDirectory = "/home/mpd/music";
enable = false;
extraConfig = ''
audio_output {
type "pulse"
name "pulsee srv"
server "127.0.0.1"
}
'';
};
batteryNotifier = {
enable = true;
notifyCapacity = 20;
suspendCapacity = 10;
};
dnscrypt-proxy2 = {
enable = true;
settings = {
ipv6_servers = true;
require_dnssec = true;
sources.public-resolvers = {
urls = [
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
];
cache_file = "/var/lib/dnscrypt-proxy/public-resolvers.md";
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
};
};
};
};
fonts.packages = with pkgs; [
dina-font
fira-code
fira-code-symbols
font-awesome
font-awesome_4
iosevka
jetbrains-mono
liberation_ttf
proggyfonts
siji
];
virtualisation = {
podman = {
enable = true;
dockerCompat = true;
};
};
sound.enable = true;
hardware = {
bluetooth = {
enable = false;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
};
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
];
};
};
zramSwap = {
enable = false;
algorithm = "zstd";
};
users.users.akill = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [
"wireshark"
"wheel"
"kvm"
"tty"
"audio"
"sound"
"adbusers"
"transmission"
];
openssh.authorizedKeys.keys = [
(builtins.readFile ../nixy/ssh_pubkey)
];
};
users.users.ado = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [
"wireshark"
"wheel"
"kvm"
"tty"
"audio"
"sound"
"adbusers"
"transmission"
];
};
users.users.mediauser = {
isNormalUser = true;
shell = pkgs.bash;
extraGroups = [ ];
};
}

View File

@ -0,0 +1,90 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
fsType = "btrfs";
options = [
"subvol=root"
"compress=lzo"
"noatime"
];
};
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/60aa7671-bfee-451b-b871-ac7c5a4a9f3a";
fileSystems."/home" = {
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
fsType = "btrfs";
options = [
"subvol=home"
"compress=lzo"
"noatime"
];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
fsType = "btrfs";
options = [
"subvol=nix"
"compress=lzo"
"noatime"
];
};
fileSystems."/persist" = {
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
fsType = "btrfs";
options = [
"subvol=persist"
"compress=lzo"
"noatime"
];
};
fileSystems."/var/log" = {
device = "/dev/disk/by-uuid/ae774285-60dc-4b08-ab26-8208e8f4e81e";
fsType = "btrfs";
options = [
"subvol=log"
"compress=lzo"
"noatime"
];
neededForBoot = true;
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/4B94-6E7B";
fsType = "vfat";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/7b44ab02-84ff-4ffd-be26-58247cf5a982"; }
];
hardware.cpu.intel.updateMicrocode = true;
nix.settings.max-jobs = lib.mkDefault 8;
}

1
mediabox/peerix-public Normal file
View File

@ -0,0 +1 @@
peerix-mediabox:UDgG3xdQYv7bmx2l4ZPNRPJtp2zMmY++H/fnGeJ9BQw=

View File

@ -0,0 +1,31 @@
peerix:
private: ENC[AES256_GCM,data:m76hyDWzcIlczegZyPyTtOYOgOGeyX++SeGsqEWS5b3ZbR2M9RqUGYEscLRX3/Dlff2vgs+hI4cOjiMnhq9pnLzP25Xh4XAiJNMkD43fFCCb7zj2RUWEyLAzzmWpR8fSB1mXTpciUGM=,iv:s9EXpkGYR0kI5xQZ8wAmkobK1q4XlVdFH4irEVwy1bs=,tag:L7AF6mFsxss6NDantbqXMw==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age19yrl6pr73cv067ksfz0txp3zm2au25jfyjeerw23ml55ps5cyyfqtm3kmt
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB2Zmc0c1AxMVEzdi94L0Nh
dHJFSHVSbG1vay9NUDBEVkM4ZWNoT3h4Q1c0CkhWdWVzTEJxZENZYXVFT2RhV3pT
aDZIUUdWVUVRUDc4ZEFDTkdnaDJxdVkKLS0tIDd6TE56REdjRVdtSXB1dkJrVVNj
dUxhRnB4dVFRam9xNlFiY2VOSXpNamcKNzRghHeyPtltKH4GkJQ0ef4apr5gziq9
dhXy6Qil48QJd4hnyr7GW1n7eRIq24OWO3WglLbVAUSQr/gzM2TWiA==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBSMjVQZkVVQmZFbCt3Z2ZI
Q3NVZUJ0VkZjK0E5SFpqWE50c2dOeFNsUm1jCmdDZGxZYk13emhhanRzWjhvZFM1
UWNpNm5malkrU1Rkak9PNWk2bW5nRDQKLS0tIE9UdXg4L0hMRzJuUERIMytvc2pr
Y1BBZFJseUNIeTVtTjBGazk5WE1ZcUUKs9pEtDbCYRfSP0Rh9ENo9A6nUFkYHr4D
3DvOKSyLL33FBoEddDBd7Si1mpjY2bunueBAe+diDgOrol6tWIMoUw==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-09-30T14:18:57Z"
mac: ENC[AES256_GCM,data:R0TJ/7uihpsCHwPLXFYKi+ZaEUtbZVz02utDF7vO7gYDN1MFa0c5nZ/mAnJJtTJI41GdAu9ezTUiU6H1HTHLxYMeUoNAAvNlSCkvGc/oMQofXidL34hq1X2vG05N3UQlkbAXTlCBkYc20oVVOVmT/lq7USEx29oB/ytxZzKYFvM=,iv:qpz0g+O4kwChct1ddiT3D8rZBg08YUr4Ba5pJ4WQyzo=,tag:pWLFiQWl1QSzveBxnq4uXw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.0

View File

@ -0,0 +1,30 @@
wg_privkey: ENC[AES256_GCM,data:ovAxwZEcmRzt/zb42ortPwPyREC16E5YNfDBguZK7uByR4BgJi8kNeoG+GY=,iv:Cv50+JB5S+44U3L9od4zwrEKHi/LM38LnA94DkvCer4=,tag:ehKQrqWwA6daxc2yASDWNQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age19yrl6pr73cv067ksfz0txp3zm2au25jfyjeerw23ml55ps5cyyfqtm3kmt
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBKSGxudng1enhDa281S0pm
Q0kwQmc1T2hUK0dHd3B4cUh3RzZPZ1dGaXo4CkdPMzNnQWMyYjJiUWk4WEYyODFp
b2FTbnZwMHh6SHhIcjVNbnBKSVk3TWMKLS0tIFBZOW56K2Y5Q3I4dmh5dXBieEF2
SWQwcmkzQU5aeEliS29QN3Y0V04zNU0KF0WmF8BDvZ2DyJFztKJv8YmDuqVsAoO4
QEVLwrJDurRxcNIVGLs5W+60Osa5XMpNc74e23rU7mucB5wPA/84dg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBWMUtUYyswV3czWDdXWG1x
cnh5QTZpdlBZYlZ2b2oweXJ5SkZSQldhQmpZCmFrQVlyYnNqZ01kVTVNQTlBRFNR
WDlITEJOUFZGa0U2NG8xMGpkSnNOQTAKLS0tIDNlK0dxWnB3a3dkTnRmTm5oTlFD
eGV1VE1tL1c0a3hUdXM2bExmV1l3RnMK8aOugY3XHTCfeBDJVOyGljuuu6hQGJ7W
ZGoxOz+hhYIHj/04J9DIIOUyt81m8LNCbxcacFKyW7Sqosfj+7N7Gg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-14T19:25:26Z"
mac: ENC[AES256_GCM,data:vcyglyYG93K3KBISpIESGlNCs5ojWZAL0gyDUzBNCxG5H8RKEz1Y7yOtr5EXnnP66qcBHlKhb81Iyrc071pmJL9dIttiqmvjSWf0zZ9RuV0uYcO/42cqk3J4tBJ6iYCi64y58jifDObbRni6jiGVEGEkSk8cXFqR8UXoSTeXWtU=,iv:avpWr8SeHK1VHz9XhkO7Nd7VOfMP7JXcQaXJA8Xiuhs=,tag:ixJsw/snZEWXGhdPLU1cGg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

1
mediabox/wg_pubkey Normal file
View File

@ -0,0 +1 @@
S+tL/pTm4D7bsWj/dhpPXHYxcye/DuNMguLD5l1ACEU=

79
modules/nextcloud.nix Normal file
View File

@ -0,0 +1,79 @@
{
config,
pkgs,
...
}:
{
# Enable Nginx
services.nginx = {
enable = true;
# Use recommended settings
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
# Only allow PFS-enabled ciphers with AES256
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
# Setup Nextcloud virtual host to listen on ports
virtualHosts = {
"nextcloud.mediabox.lan" = {
## Force HTTP redirect to HTTPS
#forceSSL = true;
};
};
};
# Actual Nextcloud Config
services.nextcloud = {
enable = true;
hostName = "localhost";
enableBrokenCiphersForSSE = false;
package = pkgs.nextcloud25;
# Use HTTPS for links
https = true;
# Auto-update Nextcloud Apps
autoUpdateApps.enable = true;
# Set what time makes sense for you
autoUpdateApps.startAt = "05:00:00";
config = {
# Further forces Nextcloud to use HTTPS
overwriteProtocol = "https";
# Nextcloud PostegreSQL database configuration, recommended over using SQLite
dbtype = "pgsql";
dbuser = "nextcloud";
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
dbname = "nextcloud";
dbpassFile = "/var/nextcloud-db-pass";
adminpassFile = "/var/nextcloud-admin-pass";
adminuser = "admin";
};
};
# Enable PostgreSQL
services.postgresql = {
enable = true;
# Ensure the database, user, and permissions always exist
ensureDatabases = [ "nextcloud" ];
ensureUsers = [
{
name = "nextcloud";
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
}
];
};
# Ensure that postgres is running before running the setup
systemd.services."nextcloud-setup" = {
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
};
}

121
modules/qbittorrent.nix Normal file
View File

@ -0,0 +1,121 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
cfg = config.services.qbittorrent;
configDir = "${cfg.dataDir}/.config";
openFilesLimit = 4096;
in
{
options.services.qbittorrent = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Run qBittorrent headlessly as systemwide daemon
'';
};
dataDir = mkOption {
type = types.path;
default = "/var/lib/qbittorrent";
description = ''
The directory where qBittorrent will create files.
'';
};
user = mkOption {
type = types.str;
default = "qbittorrent";
description = ''
User account under which qBittorrent runs.
'';
};
group = mkOption {
type = types.str;
default = "qbittorrent";
description = ''
Group under which qBittorrent runs.
'';
};
port = mkOption {
type = types.port;
default = 8080;
description = ''
qBittorrent web UI port.
'';
};
openFirewall = mkOption {
type = types.bool;
default = false;
description = ''
Open services.qBittorrent.port to the outside network.
'';
};
openFilesLimit = mkOption {
default = openFilesLimit;
description = ''
Number of files to allow qBittorrent to open.
'';
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.qbittorrent ];
nixpkgs.overlays = [
(final: prev: {
qbittorrent = prev.qbittorrent.override { guiSupport = false; };
})
];
networking.firewall = mkIf cfg.openFirewall {
allowedTCPPorts = [ cfg.port ];
allowedUDPPorts = [ cfg.port ];
};
systemd.services.qbittorrent = {
after = [ "network.target" ];
description = "qBittorrent Daemon";
wantedBy = [ "multi-user.target" ];
path = [ pkgs.qbittorrent ];
serviceConfig = {
ExecStart = ''
${pkgs.qbittorrent}/bin/qbittorrent-nox \
--profile=${configDir} \
--webui-port=${toString cfg.port}
'';
# To prevent "Quit & shutdown daemon" from working; we want systemd to
# manage it!
Restart = "on-success";
User = cfg.user;
Group = cfg.group;
UMask = "0002";
LimitNOFILE = cfg.openFilesLimit;
};
};
users.users = mkIf (cfg.user == "qbittorrent") {
qbittorrent = {
group = cfg.group;
home = cfg.dataDir;
createHome = true;
description = "qBittorrent Daemon user";
};
};
users.groups = mkIf (cfg.group == "qbittorrent") {
qbittorrent = {
gid = null;
};
};
};
}

650
nixy/configuration.nix Normal file
View File

@ -0,0 +1,650 @@
{
config,
nix-xilinx,
nvim,
pkgs,
system,
zremap,
...
}:
let
USER = "akill";
in
{
imports = [ ];
system.stateVersion = "23.05";
system.autoUpgrade.enable = false;
system.switch = {
enable = false;
enableNg = true;
};
sops = {
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = {
"peerix/private" = {
sopsFile = ./secrets/peerix.yaml;
mode = "0400";
owner = config.users.users.nobody.name;
group = config.users.users.nobody.group;
};
"wg_privkey" = {
sopsFile = ./secrets/wg_privkey.yaml;
};
"wg_preshared/nixy" = {
sopsFile = ../common/secrets/wg_preshared.yaml;
};
"wg_privkey_proton" = {
sopsFile = ./secrets/wg_privkey_proton.yaml;
};
"wg_endpoint_proton" = {
sopsFile = ./secrets/wg_privkey_proton.yaml;
};
"borgbase_enc_key" = {
sopsFile = ./secrets/borgbase_enc_key.yaml;
owner = config.users.users.${USER}.name;
};
"borgbase_ssh_key" = {
sopsFile = ./secrets/borgbase_ssh_key.yaml;
owner = config.users.users.${USER}.name;
};
};
};
nix = {
optimise.automatic = true;
gc.automatic = true;
gc.options = "--delete-older-than 7d";
package = pkgs.nixVersions.latest;
settings = {
sandbox = true;
experimental-features = [
"nix-command"
"flakes"
];
};
};
boot = {
extraModulePackages = with config.boot.kernelPackages; [
usbip
v4l2loopback
];
initrd.compressor = "zstd";
initrd.kernelModules = [ ];
initrd.systemd.enable = true;
binfmt.emulatedSystems = [
"wasm32-wasi"
"x86_64-windows"
];
kernelParams = [
"psmouse.synaptics_intertouch=0"
"mem_sleep_default=deep"
];
kernel.sysctl = {
"net.core.default_qdisc" = "fq";
"net.ipv4.tcp_congestion_control" = "bbr";
};
loader.efi.canTouchEfiVariables = true;
loader.systemd-boot = {
editor = false;
enable = true;
memtest86.enable = true;
};
readOnlyNixStore = true;
supportedFilesystems = [
"xfs"
];
tmp.useTmpfs = true;
};
security = {
rtkit.enable = true;
allowSimultaneousMultithreading = true;
sudo.enable = true;
doas.enable = true;
doas.extraRules = [
{
users = [ USER ];
keepEnv = true;
persist = true;
}
];
};
powerManagement = {
enable = true;
};
networking = {
nftables.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [
80
443
51820
8020
];
};
hostName = "nixy";
nameservers = [
"127.0.0.1"
"::1"
];
dhcpcd.extraConfig = "nohook resolv.conf";
extraHosts = ''
192.168.88.171 jellyfin.mediabox.lan
192.168.88.171 jellyseerr.mediabox.lan
192.168.88.171 mediabox.lan
192.168.88.171 qbittorrent.mediabox.lan
192.168.88.1 router.lan
192.168.88.231 workstation.lan
192.168.88.121 ender.lan
'';
networkmanager = {
enable = true;
dns = "none";
wifi.backend = "iwd";
};
wireless.iwd = {
enable = true;
settings = {
General = {
AddressRandomization = "network";
#EnableNetworkConfiguration = true;
};
};
};
wireguard.interfaces = {
wg0 = {
ips = [ "10.100.0.6/24" ];
privateKeyFile = config.sops.secrets."wg_privkey".path;
peers = [
{
publicKey = builtins.readFile ../magpie/wg_pubkey;
presharedKeyFile = config.sops.secrets."wg_preshared/nixy".path;
allowedIPs = [ "10.100.0.0/24" ];
endpoint = "5.75.229.224:51820";
persistentKeepalive = 25;
}
];
};
neox_wg = {
ips = [ "192.168.51.2/32" ];
privateKeyFile = config.sops.secrets."wg_privkey".path;
peers = [
{
publicKey = builtins.readFile ../nixy/wg_pubkey_nx;
allowedIPs = [ "192.168.2.0/24" ];
endpoint = "185.194.64.26:51820";
persistentKeepalive = 25;
}
];
};
};
};
time.timeZone = "Europe/Sarajevo";
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
nix-xilinx.overlay
nvim.overlays.${system}.overlay
];
environment = {
etc = {
"firejail/qutebrowser.local".text = ''
whitelist ''${RUNUSER}/qutebrowser
'';
};
extraInit = ''
unset -v SSH_ASKPASS
'';
homeBinInPath = true;
variables = {
PATH = "$HOME/.cargo/bin";
};
};
programs = {
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = false;
localNetworkGameTransfers.openFirewall = true;
};
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
appimage = {
enable = true;
binfmt = true;
};
zsh.enable = true;
firejail.enable = true;
adb.enable = true;
wireshark.enable = true;
sway.enable = true;
};
documentation.dev.enable = true;
# List services that you want to enable:
systemd = {
services = {
"zremap@" = {
enable = true;
restartIfChanged = true;
serviceConfig.Nice = -20;
unitConfig = {
Description = "zremap on %I";
ConditionPathExists = "%I";
};
serviceConfig = {
Type = "simple";
ExecStart = "${zremap.defaultPackage.${system}}/bin/zremap %I";
};
};
"netns@" = {
description = "%I network namespace";
before = [ "network.target" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.iproute2}/bin/ip netns add %I";
ExecStop = "${pkgs.iproute2}/bin/ip netns del %I";
};
};
"wg_proton" = {
description = "wg network interface";
bindsTo = [ "netns@wg.service" ];
requires = [ "network-online.target" ];
wants = [ "dnscrypt-proxy2_proton.service" ];
after = [ "netns@wg.service" ];
before = [ "dnscrypt-proxy2_proton.service" ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = pkgs.writers.writeBash "wg-up" ''
set -e
ENDPOINT_IP=$(${pkgs.coreutils-full}/bin/cat "${config.sops.secrets."wg_endpoint_proton".path}")
${pkgs.iproute2}/bin/ip link add proton_wg type wireguard
${pkgs.iproute2}/bin/ip link set proton_wg netns wg
${pkgs.iproute2}/bin/ip -n wg address add 10.2.0.2/32 dev proton_wg
${pkgs.iproute2}/bin/ip netns exec wg \
${pkgs.wireguard-tools}/bin/wg set "proton_wg" private-key "${
config.sops.secrets."wg_privkey_proton".path
}"
${pkgs.iproute2}/bin/ip netns exec wg \
${pkgs.wireguard-tools}/bin/wg set "proton_wg" peer "g6DkXWKI/68RsLjROIwCEcyB/ZhyK5Q7OWcz1TtqER0=" \
endpoint "$ENDPOINT_IP:51820" \
persistent-keepalive "25" \
allowed-ips "0.0.0.0/0"
${pkgs.iproute2}/bin/ip -n wg link set lo up
${pkgs.iproute2}/bin/ip -n wg link set proton_wg up
${pkgs.iproute2}/bin/ip -n wg route add default dev proton_wg
'';
ExecStop = pkgs.writers.writeBash "wg-down" ''
${pkgs.iproute2}/bin/ip -n wg route del default dev proton_wg
${pkgs.iproute2}/bin/ip -n wg link del proton_wg
'';
};
};
"dnscrypt-proxy2_proton" = {
description = "DNSCrypt-proxy client proton";
wants = [
"network-online.target"
"nss-lookup.target"
];
before = [ "nss-lookup.target" ];
after = [ "wg_proton.service" ];
partOf = [ "wg_proton.service" ];
serviceConfig = {
AmbientCapabilities = "CAP_NET_BIND_SERVICE";
CacheDirectory = "dnscrypt-proxy";
DynamicUser = true;
ExecStart = "${pkgs.dnscrypt-proxy}/bin/dnscrypt-proxy -config ${config.services.dnscrypt-proxy2.configFile}";
LockPersonality = true;
LogsDirectory = "dnscrypt-proxy";
MemoryDenyWriteExecute = true;
NetworkNamespacePath = "/var/run/netns/wg";
NonBlocking = true;
NoNewPrivileges = true;
PrivateDevices = true;
ProtectClock = true;
ProtectControlGroups = true;
ProtectHome = true;
ProtectHostname = true;
ProtectKernelLogs = true;
ProtectKernelModules = true;
ProtectKernelTunables = true;
ProtectSystem = "strict";
Restart = "always";
RestrictAddressFamilies = [
"AF_INET"
"AF_INET6"
];
RestrictNamespaces = true;
RestrictRealtime = true;
RuntimeDirectory = "dnscrypt-proxy";
StateDirectory = "dnscrypt-proxy";
SystemCallArchitectures = "native";
SystemCallFilter = [
"@system-service"
"@chown"
"~@aio"
"~@keyring"
"~@memlock"
"~@setuid"
"~@timer"
];
};
};
};
coredump.enable = false;
extraConfig = ''
DefaultTimeoutStartSec=30s
DefaultTimeoutStopSec=30s
'';
};
services = {
acpid.enable = true;
dbus.enable = true;
dbus.implementation = "broker";
fstrim.enable = true;
fwupd.enable = true;
ntp.enable = true;
openssh.enable = true;
printing.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
libinput.enable = true;
xserver = {
enable = true;
dpi = 144;
desktopManager.xterm.enable = false;
displayManager = {
lightdm.enable = false;
startx.enable = true;
};
windowManager.i3.enable = false;
};
udev = {
packages = [
pkgs.openhantek6022
pkgs.openocd
];
extraRules = ''
#Xilinx FTDI
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Xilinx", MODE:="666"
#Xilinx Digilent
ATTR{idVendor}=="1443", MODE:="666"
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Digilent", MODE:="666"
#Arduino UNO r4
SUBSYSTEMS=="usb", ATTRS{idVendor}=="2341", MODE:="0666"
#zremap on new keyboard
ACTION=="add", SUBSYSTEM=="input", ATTRS{phys}!="", KERNEL=="event[0-9]*", ENV{ID_INPUT_KEY}=="1", ENV{ID_INPUT_KEYBOARD}=="1", TAG+="systemd", ENV{SYSTEMD_WANTS}+="zremap@$env{DEVNAME}.service"
'';
};
tlp = {
enable = true;
};
batteryNotifier = {
enable = true;
notifyCapacity = 20;
suspendCapacity = 10;
};
actkbd = {
enable = true;
bindings = [
{
keys = [ 113 ];
events = [ "key" ];
command = "/run/current-system/sw/bin/runuser -l ${USER} -c 'amixer -q set Master toggle'";
}
{
keys = [ 114 ];
events = [
"key"
"rep"
];
command = "/run/current-system/sw/bin/runuser -l ${USER} -c 'amixer -q set Master 5%- unmute'";
}
{
keys = [ 115 ];
events = [
"key"
"rep"
];
command = "/run/current-system/sw/bin/runuser -l ${USER} -c 'amixer -q set Master 5%+ unmute'";
}
{
keys = [ 224 ];
events = [ "key" ];
command = "${pkgs.light}/bin/light -U 5";
}
{
keys = [ 225 ];
events = [ "key" ];
command = "${pkgs.light}/bin/light -A 5";
}
];
};
dnscrypt-proxy2 = {
enable = true;
settings = {
ipv6_servers = true;
require_dnssec = true;
require_nolog = true;
require_nofilter = true;
http3 = true;
sources.public-resolvers = {
urls = [
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
];
cache_file = "/var/lib/dnscrypt-proxy/public-resolvers.md";
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
};
};
};
borgbackup.jobs."borgbase" =
let
user = config.users.users.${USER};
home = user.home;
in
{
user = user.name;
paths = [
(home + "/pic/priv")
(home + "/pproj")
(home + "/videos/priv")
];
exclude = [
"**/.ccls_cache"
"**/*.d"
"**/*.map"
"**/*.o"
"**/zig-cache"
"**/zig-out"
];
repo = "ssh://oda929rv@oda929rv.repo.borgbase.com/./repo";
encryption = {
mode = "repokey-blake2";
passCommand = "${pkgs.coreutils-full}/bin/cat ${config.sops.secrets."borgbase_enc_key".path}";
};
environment.BORG_RSH = "${pkgs.openssh}/bin/ssh -i ${config.sops.secrets."borgbase_ssh_key".path}";
compression = "auto,zstd";
startAt = "daily";
};
nix-serve = {
enable = false;
secretKeyFile = "/var/cache-priv-key.pem";
};
journald.extraConfig = ''
SystemMaxUse=50M
'';
logind.extraConfig = ''
KillUserProcesses=yes
'';
seafile = {
enable = false;
initialAdminPassword = "admin";
adminEmail = "asmir.abdulahovic@gmail.com";
ccnetSettings = {
General = {
SERVICE_URL = "http://127.0.0.1:8020";
};
};
seafileSettings = {
fileserver = {
host = "0.0.0.0";
port = 8082;
};
};
};
};
fonts = {
fontconfig = {
cache32Bit = true;
allowBitmaps = true;
useEmbeddedBitmaps = true;
defaultFonts = {
monospace = [ "JetBrainsMono" ];
};
};
packages = with pkgs; [
dejavu_fonts
dina-font
fira-code
fira-code-symbols
font-awesome_6
inconsolata
iosevka
jetbrains-mono
liberation_ttf
libertine
noto-fonts
noto-fonts-cjk-sans
noto-fonts-color-emoji
noto-fonts-emoji
proggyfonts
siji
terminus_font
terminus_font_ttf
ubuntu_font_family
vistafonts
];
};
virtualisation = {
libvirtd = {
enable = true;
allowedBridges = [
"virbr0"
"br0"
];
};
spiceUSBRedirection.enable = true;
containers.storage.settings = {
storage = {
graphroot = "/var/lib/containers/storage";
runroot = "/run/containers/storage";
};
};
podman = {
enable = true;
autoPrune.enable = true;
dockerCompat = true;
};
};
hardware = {
bluetooth = {
enable = true;
settings = {
General = {
Enable = "Source,Sink,Media,Socket";
};
};
};
graphics = {
enable = true;
extraPackages = [ ];
};
rtl-sdr.enable = true;
};
zramSwap = {
enable = false;
algorithm = "zstd";
};
users.users.${USER} = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [
"wireshark"
"kvm"
"tty"
"audio"
"sound"
"adbusers"
"dialout"
"wheel"
];
};
}

View File

@ -0,0 +1,65 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.luks.devices."crypt_dev".device =
"/dev/disk/by-uuid/e10821b9-5426-4f03-b716-1645a64fcd6a";
boot.initrd.luks.devices."crypt_dev".allowDiscards = true;
boot.initrd.availableKernelModules = [
"nvme"
"ehci_pci"
"xhci_pci"
"uas"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [
"kvm-amd"
"amd-gpu"
];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/c461c971-54ca-4fb7-91e8-6ac70de53ef2";
fsType = "xfs";
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/eeaa6fab-d67d-400f-b6d4-b1f44c2e0047";
fsType = "xfs";
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/aeaa71ca-a439-4ef3-9ab8-db7ae8f59376";
fsType = "xfs";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/828E-F3C3";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = true;
hardware.enableRedistributableFirmware = true;
}

View File

@ -0,0 +1,21 @@
borgbase_enc_key: ENC[AES256_GCM,data:AD+JghEOX25tBGYhoU1ge1fqrA+5AK8N4yg=,iv:u05GVeWbL3xdZQgGkXSPkxlATd2M9MX4uSZiLOHMMRE=,tag:pmTQIJWmz+ePmSNzO/EO4Q==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBEaDhSZVVibVl1NU84NG9U
aEVQbThIcC9CajNHS25SVW1SMFFwMUsvMmxJCkpTVThpZ0JZdEpLTnJlQWFqM244
LzFaUFVvWWxIcU4wRlhXalF5TkNpVHMKLS0tIExXMUx5cDBBbDloQ0sxbEY0eGdj
bE5vNHVHekI2RzY5M3JNcTdCa3pNeUUK8C04wF1te6epA97sNrhoz0VUn+MC7SML
6N1CZK3MuRARBqcj4c/W1aXuTysvuV1o/Fl5xOk/gbumcfwnDYj28A==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-21T08:14:25Z"
mac: ENC[AES256_GCM,data:7M+akGH09E2JYyKLmwpjx0VCEBmXqO6bNHFNRCO+9LdSIqsEw8MD4WGO0zwHOD9ls7+1OPFeoU+MVbtfMhmvN4g6rg+tFkXbxPSXCPkTA4tL90ZLXoBIpUBxKKhFMxtdOnjXxES3rTzjXGAvxocFOiNv/7pKbzeqMJUnH9FgAcM=,iv:h0+OpLmutMyPN3YFhyuHFgWSqxVK5WmBAE0k5ezEo9A=,tag:UKOXnTOjWaLDEOYk5YK4Aw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@ -0,0 +1,21 @@
borgbase_ssh_key: ENC[AES256_GCM,data:lLHIBmw/03An3SRJUjYS2pn0g7XEW0kTXtSObhIGwjBwlRypU7uQDz4JseOA2GbSm+GqsGK8U3Ifgirb7t8AsGy6DPxO+2sm+ByJ1S46G6cwkO2GateJw4Zg0mmhUBBuB/eXQMLuBLKZM2WGta5+6O0SWxDtsrTsBhlo5qbwwYILu0gg2zsBWFSn1OBGgvjYYRTd7N85WX8+S7oNYVAL2HjCmhHHtYrLnua4ajBY9dQEzrKdZaQW4v39HV9MyoilEz17fFLU8S2KbJ1iw8HgoAc9W81hpQNNd8fWKY+e0iWxD9X5H7UTs8YP/bsKeWyG4OAwr99zIZ1Lqzi0EuZI+PYkIz4Q4WBmv1wD6Py274iug3kr1OqvaIOmIT/9j2C3mOZTqxuFaF5T4NMkcIeViCBmRwUMTl/8a36X+n/MYxRoznHCQmg8zKubDuykVJfBmFwxbUc9tx8PeodnWeiASOV7FvBie47yq+NyBGItJXAK14SxLE9T2sxRchJWcrQBcekZdZ5Mej20lfUlcAGkwfUc0e54xsv1K3oY,iv:5157BQmbfuF5EYbDHCy/TmnTYErIwmgXO8RaX6f18xs=,tag:T2eZN46Qd6RgLWk4kbYgPQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB5b2YzSDdaU3R5TUdqS3Nv
eUYraFBiZlZ1TXBqYzlWNUNYOFlyMzJvWEE4ClJ6R25CRXRUZ2FDTFY2ZmJIRkRX
WVJCSy83N2JUNzRuT3VuSUF1OTV2TUkKLS0tIEZ5cVg1V2o0MkdmWEx1emJVdjZ0
RkZFL2tRNW9RdnAwalE2ZzVQcnljRFUKRyN8ahv9ZI63m8ycl74GZ59lyAXUsKmi
tfPqQvL1oTtJr3hzwy2bkctXQLYjGvsMyZt2tiWpy5vLc1MrxlqVDQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-21T08:16:40Z"
mac: ENC[AES256_GCM,data:VkXpCPQB4RypDrK31pYWXeOcl8ulis6fMF1q/SLCg2wXnL0jFrmAFp78C+ers9xFhbnUnMbVc/ZJIVKfa0g94WV3jJbn4+HB0GPWQCz7LwhmG5XEY5O5sFLuDCcHb/epZvDbCsEQeiq+TGDHp6TtdL8qDF+hE2k8qfsy570wocU=,iv:HQleJtHWQ5uk4+Witn2aaqh0SvXqomfiSO/ExgPzVag=,tag:hlBmboddR8GDAmBpETi0Ow==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

22
nixy/secrets/peerix.yaml Normal file
View File

@ -0,0 +1,22 @@
peerix:
private: ENC[AES256_GCM,data:Oi8H5nqJ0Bf45wQepCjdZNHBOv4AlPxNN7L5Th3gcRQlW1FS77nusIWGSUvlmL2a5LTN0FV36o2GFPrrhiwmvnkQwuSZKc9VeDTf7SX0RRL1NLmRR/zy4WsRNJFxlqtjahieqg==,iv:6hJwqcdPayZaYZhJ0OfYLAtmeVndLEfeYZjUq5/3qJE=,tag:MiAfg8aZAHNYbB0JwcdStg==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBSMEIyck1xbVJ4Zm56Z3dM
OGsxa1p0TGIvRE5DYXZzTDM3YUZFVTAxbUUwCllPd0FOUlRiZW5wT2QvLzZXYjRr
S1A5WjZxLzNYQ1ZWVFFQTzRwMFQweFEKLS0tIHNoZUpHS2dDNmFKc3ZVNFZuUFU4
L0M0MitMeDg1ZWYxcDNCQlVGUjRKeFkKvD2SKnuh517o2knPr2SOWq3kubMyI7UV
j6HgXVbHUDjmKl2dY+YVTnmxrK54E+Q6iiu7mQnvLdzxYBK/EiNt9w==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-21T08:17:51Z"
mac: ENC[AES256_GCM,data:v4KQq3Y5ZxsyMxR+FS1BZkH/bPTIIHfQu800U44odaNycIbWnuwCnLWGyJK6Por76bWALycGppDbHPKKW/N1I1XLy/EAXo02+nhHNvKVi2cXSXciuEPc/Cl+6TbP39lx4+EOM8CZoNZ8HAiS3QPy2bwZdMjEw/OHl8TqlN07q9s=,iv:PIcv/b6t+54/yCTZj+12Yep15ors/wXNUnaXjLjpVbM=,tag:JxO5M3OYaWzqgf4gUhCzzg==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@ -0,0 +1,21 @@
wg_preshared: ENC[AES256_GCM,data:k+aFYDNMojf5kktn6KJ4F5mH5oGdqxdF0MO88NcYpai9USnH394XRL9ASvs=,iv:L5LIXbADhrivKjK/V0E5QpRT7BDsktwIuKHgY+2qr84=,tag:pCW1naU/ygxAIDYWV2hHPQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBZSHZvYy9TTmVEb2ZSTncy
ckJ1bXZGWVdJSkVHMGx2Vk5ZNlZ3Q2wzVFQ0Cmg1M3hKNFhnZk5nTE54RTdyR0Vs
NVRiTEltSnkxdmhhdGlycHNPWjFLbncKLS0tIE02NVJRZTd0VmowT1c4cjhKNlZk
Q01BQWNSVWtIMnFXRWpxR3JDMU8zYTAKIbfpM8uUb09cUlA8YWtgEOL5zvWf5omv
baZINiAu0/f1avYmW6Qb+aLa2ALrSZaotj46Uwd9Lb5mtjJ/8v9IOg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-20T18:12:20Z"
mac: ENC[AES256_GCM,data:4PWjwxOO0UuNsevCbzCLaiW7C+So4mEGivd9GzyLKx2JlkNFVB8wqPrY1Rl1ANMrT+7LKc8tVOA4zbweNc9idFG4y5DcvnDSieqKu9v1MeEMHqNpz5TTLbCP81g7qegjI/WKul2kaWIdPaioI/f5x2E6rEYnzFv+Di2mc3W+Qcc=,iv:iE9sali0O3sQIhOw30RGR/4ZQsAPcSxq1qxosfasojU=,tag:+9AOwph5A4oDXsK6Z3YeZA==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@ -0,0 +1,21 @@
wg_privkey: ENC[AES256_GCM,data:XL9FU1kZXvBJfwyt3HpQe8k8zg9HT6Xm0BdjNMduSu9uAgcHbglpLc/qTB0=,iv:QgX1VsmLUsDozFXmzDVPukjPNTa4Lnh806AQ4qdgpa8=,tag:RNVlDbtx8vAAbG0rinLVOw==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBBSnkyM1ZrcnEvM3VHL0Nk
THhUUDdGU2s5UFgrVGZ3WXhkYTRIVTlaeGs4CjR4eVpmRy9qUkZSWkpFZDZHRDZI
ZWRXSmMzL2RWZkVrSlFPcC9ueGpDVFkKLS0tIDZWbENyS2hrSCtlNlBHaE56QTha
eFJmWXk1SVJEbDJOc1Q1VFlzVS8yODgKFXRAtR+67x0dkQTqZPtMT0Hd+aW+5K17
S/lhuHRhITt3woQnecVPMYklgJJlsyQ6blKhJw8dvhbVWWThZ853rQ==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-04-21T08:18:59Z"
mac: ENC[AES256_GCM,data:xPKsGZD5RKT/WMRupe4YTgoiUQRFq77KQyGaazeY1GEPI117gWxRHEpiyCLnfhZWcaekPWoXosm32wRLwDAXM/Femk567i5uKKG2wAqApWbc+FXTQ71w/CFr9uEWFApBjpEHpuBBaFV23qJfylsqeMp9r52d9Sp5eDQC4RJead0=,iv:oiNoZ/bqQUe+luqeuldw1M0KB2d4C5T7kXy+mLFZNZQ=,tag:5pK22TYGwbBNyWlfd/Ufxw==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

View File

@ -0,0 +1,22 @@
wg_privkey_proton: ENC[AES256_GCM,data:qVVd+1s2T3sKDi03V+eMvgqW8LAVl/yEKwtG2EMn8NhBCN7RvlttC5SeIDM=,iv:/QcrtmMjCzZRulumIz5u9oxyaRt+HUq96ZiP8ecpvAo=,tag:1DCaJqVGfg3sfvKTQnmzZA==,type:str]
wg_endpoint_proton: ENC[AES256_GCM,data:ggoWnB6nGjGc/kSOaCo=,iv:1r5J6SO5JYH7+bMhE2lGwfFETVFeS61eCXtej0Pl07M=,tag:p+0hhQ/vqZzZML24YReA0g==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age1geqqmsnng2e9sja6uxxmtlwlm4c6e5v6ch3l3yjenstq6tjq4fusr0305s
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAxdXZpL1lrOEYyYVdFTzNJ
SHhXRVc5Y0o4ZzN2THRjM215UWczVjZOTXg4CjBJZ2VxN0t0ZFgzTmJMeXo5SWZk
UjRlNmdRTVVPbHVEeXM3TWhoS0pSUTQKLS0tIEtkTURBc1A3d2lTalhmeEoxUkZj
K3BHZnUzN3ZrL1dFQk8rWFpZR05pbFUKObrnIpY3NR1o3/lKhTfVpQU+eQRTi7wF
SAjGZ5BRdCi5x1VWRxiT1Fvjqkm7kBEQFvdSvbqW2UK6lVHtWgt2Vg==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-05-12T13:30:18Z"
mac: ENC[AES256_GCM,data:3UqJGcNGPZDlLA3a0uNHUI0ykDC0ByxAR2ZsrsbWQMv3BS6zyBuc+zpTHQZoIPGsAMUetuB3OuA0IQNll3abg6u2AadEQBUf1PYMWlo58txLYlAs/q0g+575F+LhDSgmDMKOFXz4HqbFP0RYTHkPnmjWPMWWY3G9o6B3Iaw5+Kc=,iv:massJRpGcH4pDZxJrpQYy80XVViyw+qFsZ8Sk9Xze08=,tag:eDvuNadKGKBS/3jauvnuFQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.8.1

1
nixy/ssh_pubkey Normal file
View File

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMPNCxE/8z02lVOC1unJbPMH+Ma+KRJfmz33oUfz3hKc root@nixy

1
nixy/wg_pubkey Normal file
View File

@ -0,0 +1 @@
oHVmhw80daHjDjo7nwt/Y9eKBaH5FoTiVeukwDObijM=

1
nixy/wg_pubkey_nx Normal file
View File

@ -0,0 +1 @@
eoYSDh27qQFpvOcDmuVFzSTuPnrHQYXDMqatKmDAth0=

View File

@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchFromGitHub,
docbook_xsl,
libxslt,
meson,
ninja,
pkg-config,
bash-completion,
libcap,
libselinux,
}:
stdenv.mkDerivation rec {
pname = "bubblewrap";
version = "0.8.0";
src = fetchFromGitHub {
owner = "rhendric";
repo = "bubblewrap";
rev = "23ff0f875b3a0200c1796daa01173ecec7deaf88";
hash = "sha256-EWsuAGsShaHEmLi0jUHX2bFQZkinIOsRbgB7tZSfq8E=";
};
postPatch = ''
substituteInPlace tests/libtest.sh \
--replace "/var/tmp" "$TMPDIR"
'';
nativeBuildInputs = [
docbook_xsl
libxslt
meson
ninja
pkg-config
];
buildInputs = [
bash-completion
libcap
libselinux
];
# incompatible with Nix sandbox
doCheck = false;
meta = with lib; {
changelog = "https://github.com/containers/bubblewrap/releases/tag/${src.rev}";
description = "Unprivileged sandboxing tool";
homepage = "https://github.com/containers/bubblewrap";
license = licenses.lgpl2Plus;
maintainers = with maintainers; [ dotlambda ];
platforms = platforms.linux;
mainProgram = "bwrap";
};
}

171
packages/viber/default.nix Normal file
View File

@ -0,0 +1,171 @@
{
alsa-lib,
brotli,
cups,
curl,
bubblewrap,
bash,
writeShellScriptBin,
dbus,
dpkg,
expat,
fetchurl,
fontconfig,
freetype,
glib,
gst_all_1,
harfbuzz,
krb5,
lcms,
lib,
libcap,
libevent,
libGL,
libGLU,
libopus,
libpulseaudio,
libwebp,
libxkbcommon,
libxml2,
libxslt,
makeWrapper,
mesa,
nspr,
nss,
openssl,
snappy,
stdenv,
systemd,
wayland,
xorg,
zlib,
zstd,
...
}:
stdenv.mkDerivation {
pname = "viber";
version = "23.2.0.3";
src = fetchurl {
# Official link: https://download.cdn.viber.com/cdn/desktop/Linux/viber.deb
url = "https://download.cdn.viber.com/cdn/desktop/Linux/viber.deb";
hash = "sha256-9WHiI2WlsgEhCPkrQoAunmF6lSb2n5RgQJ2+sdnSShM=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ dpkg ];
dontUnpack = true;
libPath = lib.makeLibraryPath [
alsa-lib
brotli
cups
curl
dbus
expat
fontconfig
freetype
glib
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gstreamer
harfbuzz
krb5
lcms
libcap
libevent
libGLU
libGL
libopus
libpulseaudio
libwebp
libxkbcommon
libxml2
libxslt
mesa
nspr
nss
openssl
snappy
stdenv.cc.cc
systemd
wayland
zlib
zstd
xorg.libICE
xorg.libSM
xorg.libX11
xorg.libxcb
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXScrnSaver
xorg.libXtst
xorg.xcbutilimage
xorg.xcbutilkeysyms
xorg.xcbutilrenderutil
xorg.xcbutilwm
xorg.libxkbfile
];
installPhase =
let
viberWrap = writeShellScriptBin "viberWrap" ''
${bubblewrap}/bin/bwrap --bind / / \
--dev /dev \
--tmpfs $HOME \
--bind $HOME/.ViberPC/ $HOME/.ViberPC \
--bind $HOME/Downloads/ $HOME/Downloads \
$@
'';
in
''
dpkg-deb -x $src $out
mkdir -p $out/bin
# Soothe nix-build "suspicions"
chmod -R g-w $out
for file in $(find $out -type f \( -perm /0111 -o -name \*.so\* \) ); do
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" || true
patchelf --set-rpath $libPath:$out/opt/viber/lib $file || true
done
# qt.conf is not working, so override everything using environment variables
wrapProgram $out/opt/viber/Viber \
--set QT_PLUGIN_PATH "$out/opt/viber/plugins" \
--set QT_XKB_CONFIG_ROOT "${xorg.xkeyboardconfig}/share/X11/xkb" \
--set QTCOMPOSE "${xorg.libX11.out}/share/X11/locale" \
--set QML2_IMPORT_PATH "$out/opt/viber/qml"
echo "#!${bash}/bin/bash" > $out/bin/viber
echo "${viberWrap}/bin/viberWrap $out/opt/viber/Viber" >> $out/bin/viber
chmod +x $out/bin/viber
mv $out/usr/share $out/share
rm -rf $out/usr
# Fix the desktop link
substituteInPlace $out/share/applications/viber.desktop \
--replace /opt/viber/Viber $out/opt/viber/Viber \
--replace /usr/share/ $out/share/
'';
dontStrip = true;
dontPatchELF = true;
meta = {
homepage = "https://www.viber.com";
description = "An instant messaging and Voice over IP (VoIP) app";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" ];
maintainers = with lib.maintainers; [ jagajaga ];
};
}

View File

@ -1,31 +0,0 @@
peerix:
private: ENC[AES256_GCM,data:WlWrX0kxeElaGvFllg2EkgfDsj1bkRwD9xMTWQevktDQaRd3IdVD9IwFZcwgTgS4hVM6gy9Q/VWX3M12vKaLdaKeTR/PMOQGCov291w12cAFIg/pYINp+511a9aHqFaIZx0WeA==,iv:Ni0M4Tikcbs6NsanYunOKn1R8jLlC59NiDbqNVPW7gM=,tag:POSZ9OgkLZyvnN8vn8OgDQ==,type:str]
sops:
kms: []
gcp_kms: []
azure_kv: []
hc_vault: []
age:
- recipient: age153y8mz6gqy5t54q4fnrdvjj4v5ls9cgp3hhpd2hzf5tvkcnncf6q4xns0j
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBNbWcxaHVYUjVydnZVZkJa
MFA1TDJFcmtpUis2SXBWNjh5QjI0WkgydHhBCklzVFRlZ0VoSitISlpIaVFJaHRZ
enNFaFl1MkRaQUtpb1JUOUNJaXJDT00KLS0tIHZBeGc2ejR4bkcxVjhrWDYyOVpk
V28zVWZsTFpJVHY3bHdqR3dGMHNqWncKcjvVw61Zfh0yXKikjnrlq1CIoN7wDiiQ
5FDAzjdTMGLOXvrxtfKEJ0RUP8/ANJ+b69pJTBl8To4qIAFGKU0syg==
-----END AGE ENCRYPTED FILE-----
- recipient: age1smcrg45udmvl5w8306qec07lqqzjplwx3l8f80tcewpkh7r3h5yqgenrqd
enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBYUnNveWIrOEE4UnlGNnpN
WE5oN1hrOTlma0ZWUDc5ZG5pcUFOV1BJam5nCnhiaFRJVjcreDFiTU85RlJzK0tT
eURJdHAwWXVZU2xHbTdsOVc4VjJOaUUKLS0tIGJ2c3JxVGFZWHdCY1p3M1VRNGlk
enVTczYxcjNPZkFHTG5RZEtRTTRJOUEKNTPZFBwdnKNmalgPqpJew8ucwQZ3yK+8
6Zqv3POnq68ms4nFelQynDYDAEK/maN+qYdo8qgFi14pz87liVF/Ug==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2023-07-03T20:12:05Z"
mac: ENC[AES256_GCM,data:kcfnNiu88VTYGgxfSRIkqK8MXS7Gcan9oXxc+UM6/c7yCj35ogNGtDxJmJ4O1Gov2LrP3+lbhyHjOeQBYN06JmE+3o3SV/bIZ5HUWMYqmj+yO1sG8ugSx2NAgSMKmyESlrZTZvN9Z9Z8JocmN1TtyA9Uip7/URfGOXaIFYYDLwE=,iv:bxRoXN4DEIi4B2bCxKcImKp1rfkps4RxP3UbjBePjPw=,tag:x4yXtvmoOrFEadhZmbJjAQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.7.3