Compare commits

..

415 commits

Author SHA1 Message Date
Leonardo Eugênio eb85e2573d disko: add monolith config 2024-06-13 22:43:42 -03:00
Leonardo Eugênio 538a7c202e i15 format 2024-06-13 22:01:35 -03:00
Leonardo Eugênio b1c96cb075 Add disko 2024-06-13 21:21:04 -03:00
Leonardo Eugênio 3c09386643 add disko 2024-06-13 21:16:24 -03:00
Leonardo Eugênio a7f6983abe monolith: remove bigboy mounts 2024-06-13 21:14:58 -03:00
Leonardo Eugênio d302447326 flake: remove specialisations 2024-06-13 12:49:57 -03:00
Leonardo Eugênio 7426658f62 vscode: use fhs version 2024-06-13 12:49:57 -03:00
lelgenio b97940aa97 firefox: force sidebar to the right 2024-06-12 23:36:18 -03:00
lelgenio ba4c57b914 update 2024-06-12 17:44:27 -03:00
Leonardo Eugênio c8578c9ec9 flake: de-depulicate flake inputs 2024-06-11 19:45:50 -03:00
Leonardo Eugênio dd0531a825 firefox: install return_youtube_dislikes 2024-06-11 11:53:17 -03:00
Leonardo Eugênio 0ca4b6910e docker: format config 2024-06-11 09:30:29 -03:00
Leonardo Eugênio e27e9b584d flake: remove hyprland 2024-06-11 01:23:05 -03:00
Leonardo Eugênio 9cdb3eb489 sway: remove obsolete systemd integration 2024-06-11 01:19:35 -03:00
Leonardo Eugênio dfb3b88ada packages: extract lipsum 2024-06-11 01:10:39 -03:00
Leonardo Eugênio dfde651cb9 packages: extract material-wifi-icons 2024-06-11 01:08:21 -03:00
Leonardo Eugênio 8aa35f1368 mangohud: remove obsolete patch 2024-06-11 01:02:16 -03:00
Leonardo Eugênio b4876d9dd9 bemenu: remove obsolete patch 2024-06-11 00:56:11 -03:00
Leonardo Eugênio 5d75616eda flake: remove maildir-notify-daemon 2024-06-11 00:53:20 -03:00
Leonardo Eugênio e3325220f4 Revert "monolith: remove corectrl"
This reverts commit 43dd44d237.
2024-06-10 22:50:25 -03:00
Leonardo Eugênio be3f65adb9 fixup! controller: add auto-connect service 2024-06-10 12:44:51 -03:00
Leonardo Eugênio dbd1099e19 vdir: remove vdir 2024-06-08 10:00:44 -03:00
Leonardo Eugênio 6b17b910f8 phantom: set hostname 2024-06-07 01:50:56 -03:00
Leonardo Eugênio 8625dbc8a2 phantom: update nextcloud 2024-06-07 01:18:32 -03:00
Leonardo Eugênio 30c7871610 update 2024-06-06 01:42:13 -03:00
Leonardo Eugênio 2f67b084d2 treewide: remove variables from pkgs 2024-06-05 01:20:42 -03:00
Leonardo Eugênio 36a717072a sway: only enable vrr on fullscreen 2024-06-05 01:20:42 -03:00
Leonardo Eugênio 43dd44d237 monolith: remove corectrl 2024-06-05 01:20:42 -03:00
Leonardo Eugênio 655baa24b0 monolith: only set kernel version here 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 085ca01d56 waybar: always show mpd icon 2024-06-05 01:20:01 -03:00
lelgenio 26ca820d4e kak: add javascript region to blade templates 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 36636a8a98 qutebrowser: remove config, not used anymore 2024-06-05 01:20:01 -03:00
Leonardo Eugênio e9b3ed69c9 gnome: disable open tablet driver 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 20d72d7787 gnome: don't manage mimeapps 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 07be28a2fb gnome: enable variable refresh rate 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 6859150622 monolith: forced disks to use mq-deadline scheduler 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 9137829f02 nix: don't optimise on every build
this makes builds slower
2024-06-05 01:20:01 -03:00
Leonardo Eugênio 90a08dfaa9 gnome: add workaround for autologin bug 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 49074303af controller: add auto-connect service 2024-06-05 01:20:01 -03:00
Leonardo Eugênio ad12a22346 flake: set formatter to nixfmt-rfc-style 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 15c5e33060 treewide: format using nixfmt-rfc-style 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 5218277b3e kakoune: use rfc-style nixfmt 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 2ce8246287 nix: lower frequency of gc 2024-06-05 01:20:01 -03:00
Leonardo Eugênio cbeaa72101 monolith: add docker subvolume 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 3b411b0c6d configuration: extract nixos config into more files 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 3333772c23 kdeconect: update config 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 686f605a6d gnome: update autologin config 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 2215da6dc5 scripts: add pass export script 2024-06-05 01:20:01 -03:00
Leonardo Eugênio a30f87ec71 qutebrowser: don't install if not the default browser 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 48c074f1f4 monolith: disable virtualbox while it's borked 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 9f2382ef2d flake: update to 24.05 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 96c86f2cc8 Revert "sshd: disable until xz is secure"
This reverts commit b0d1b2fbff.
2024-06-05 01:20:01 -03:00
Leonardo Eugênio 4ddc0a4acd sway: don't require rebuilding sway dependencies 2024-06-05 01:20:01 -03:00
Leonardo Eugênio 7bb5a7c5a0 sway: set godot windows to floating 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5cc4532b24 sway: autostart corectrl 2024-05-31 11:41:21 -03:00
Leonardo Eugênio faca1d3c81 git: enable lfs 2024-05-31 11:41:21 -03:00
Leonardo Eugênio f54f98ea4e update: pass arguments to ./switch 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 8f0160ef73 monolith: add gpu crash work-around 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 2ce18fc7a0 sway: enable adaptive sync 2024-05-31 11:41:21 -03:00
Leonardo Eugênio ba3ab547b7 forgejo-runner: update runner token and url 2024-05-31 11:41:21 -03:00
Leonardo Eugênio dc4ca50622 firefox: add i dont care about cookies 2024-05-31 11:41:21 -03:00
Leonardo Eugênio be28de858d ssh: update hostnames 2024-05-31 11:41:21 -03:00
Leonardo Eugênio b489452aba sway: make gaming windows floating by default 2024-05-31 11:41:21 -03:00
Leonardo Eugênio e925f586a1 update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 45383a0d8b firefox: add substitoot extension 2024-05-31 11:41:21 -03:00
Leonardo Eugênio de2b80018b monolith: enable all features of corectrl 2024-05-31 11:41:21 -03:00
Leonardo Eugênio d86b7db36e monolith: add forgejo runner 2024-05-31 11:41:21 -03:00
Leonardo Eugênio e4b9bcca7e sshd: disable until xz is secure 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 850be61bf3 sway: add more env vars to dbus activation 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 9f10425c04 flake: update lockfile 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 36d2bedd34 syncthing: way for tray 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5f588d7e1a kdenlive: fix theme 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 577328395d theme: improve qt theming 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 34c35fb4eb syncthing: enable tray icon 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5161c3a5d8 mangohud: install patch to fix keybind crash 2024-05-31 11:41:21 -03:00
Leonardo Eugênio b4538b5db5 gpg: simplify config 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5fa213ab59 update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5571ebd26a lsp: replace rnix-lsp with nil 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 5cbc3b799f update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 061df3f2c4 btop: enable gpu monitoring 2024-05-31 11:41:21 -03:00
Leonardo Eugênio f6c2f4905b update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio f9d95745ef kak-lsp: update config to new format 2024-05-31 11:41:21 -03:00
Leonardo Eugênio b60fc8900a alacritty: update config 2024-05-31 11:41:21 -03:00
Leonardo Eugênio c7999c3fbe update renamed xkb config 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 78d6120281 update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 916132cf9c update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 33063a8b99 update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 2deca2fc3d sway: disable adaptive sync 2024-05-31 11:41:21 -03:00
Leonardo Eugênio c713e32440 update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 1201faf5fe update 2024-05-31 11:41:21 -03:00
Leonardo Eugênio 6c6e82aae8 switch to nixpkgs unstable 2024-05-31 11:41:21 -03:00
Leonardo Eugênio da736e199c email: add aliases 2024-05-31 11:40:43 -03:00
Leonardo Eugênio 8f2ccfea9d vscode: update config 2024-05-28 01:47:10 -03:00
lelgenio 323a02c6fd phantom: open port 8745 2024-05-20 16:07:05 -03:00
Leonardo Eugênio 0397a4e166 nginx: redirect syncthing. to .com 2024-05-16 11:19:02 -03:00
lelgenio f8e48e7fa0 nginx: redirect git. to .com 2024-05-15 15:54:04 -03:00
Leonardo Eugênio c40cbf74f3 nginx: add .xyz -> .com redirect 2024-05-14 16:56:09 -03:00
Leonardo Eugênio 2516836026 mastodon: configure noreply email 2024-05-11 22:21:35 -03:00
Leonardo Eugênio 0f10937be8 phantom: move from .xyz to .com 2024-05-11 18:32:26 -03:00
Leonardo Eugênio de26e20ed4 phandom: remove wiki 2024-05-11 18:32:26 -03:00
lelgenio 30ea33079a kak: name clipboard sync hook 2024-05-08 16:28:59 -03:00
Leonardo Eugênio 4f54c31dc5 email: disable ipv6 smtp 2024-05-03 12:32:45 -03:00
Leonardo Eugênio 3c8caa0a17 fixup! switch: don't show git diff pager 2024-05-03 12:32:38 -03:00
Leonardo Eugênio a78e75055f switch: don't show git diff pager 2024-04-29 11:36:17 -03:00
Leonardo Eugênio e67ed127b9 home: disable nextcloud client 2024-04-10 13:33:32 -03:00
Leonardo Eugênio 8518176f2b phantom: use personal git forge as autoUpdate source 2024-04-09 01:01:29 -03:00
Leonardo Eugênio bf382371cb phantom: add a top level domain page 2024-04-09 00:42:40 -03:00
Leonardo Eugênio 3bf20808b5 nextcloud: fix ssl certificates 2024-04-08 23:38:49 -03:00
Leonardo Eugênio e53be29b0c email: fix fqdn 2024-04-08 22:48:02 -03:00
Leonardo Eugênio d06253b430 email: add roundcube archive plugin 2024-04-08 22:14:06 -03:00
Leonardo Eugênio ed4ded7402 pass: Update password-store repository 2024-04-07 02:48:31 -03:00
Leonardo Eugênio 9165fd4b6f forgejo: remove unnecessary ssh configuration 2024-04-06 23:41:34 -03:00
Leonardo Eugênio 68a7125822 phantom: add script to update, fmt 2024-04-06 20:44:20 -03:00
Leonardo Eugênio d0dd646246 mastodon: clean up media more often 2024-04-06 20:38:46 -03:00
Leonardo Eugênio 5edca9c2c6 phandom: add forgejo server 2024-04-06 20:38:35 -03:00
Leonardo Eugênio 8de573b35c pkgs: add blade-formatter 2024-04-01 11:57:54 -03:00
Leonardo Eugênio 748a3ba0ba phantom: disable auto reboots since it's a container 2024-03-30 16:31:48 -03:00
Leonardo Eugênio f897680775 secrets: rename ghost secrets to phantom 2024-03-29 01:08:21 -03:00
Leonardo Eugênio d3f02f8762 hosts: delete ghost host 2024-03-29 01:06:59 -03:00
Leonardo Eugênio 4cd1e7cab1 ssh: update hosts list 2024-03-29 01:05:05 -03:00
Leonardo Eugênio 7ab7a3459a hosts: add phantom 2024-03-28 23:02:31 -03:00
Leonardo Eugênio c60e22b26a flake: update lockfile with mailserver items 2024-03-27 16:43:35 -03:00
Leonardo Eugênio 55ce6457c8 ghost: fix rDNS lookup 2024-03-27 13:50:23 -03:00
Leonardo Eugênio a3e77a9661 scripts: add script to read QR codes 2024-03-27 12:40:22 -03:00
Leonardo Eugênio 08d66a4053 ghost: add mail server 2024-03-27 02:28:28 -03:00
Leonardo Eugênio eb25c3c32f flake: add auto formatter 2024-03-23 12:41:45 -03:00
lelgenio 3313416291 update 2024-03-19 13:47:25 -03:00
Leonardo Eugênio f84a9e7edd mangohud: fix keyboard shortcuts 2024-03-19 13:47:25 -03:00
Leonardo Eugênio 77d1fa78f5 waybar: enable tray again 2024-03-19 13:47:25 -03:00
Leonardo Eugênio 3530a81491 gpg: simplify config 2024-03-19 13:47:25 -03:00
Leonardo Eugênio 05d5414d81 sway: restart daemons more often 2024-03-19 13:47:25 -03:00
Leonardo Eugênio b16750277b lsp: replace rnix-lsp with nil 2024-03-19 13:47:25 -03:00
Leonardo Eugênio 754ea46301 media: install pitivi 2024-03-19 13:47:25 -03:00
Leonardo Eugênio b85144a9f3 email: remove email config 2024-03-19 13:47:25 -03:00
Leonardo Eugênio 2e090030bd nix: add wheel group to trusted users 2024-03-19 13:47:25 -03:00
Leonardo Eugênio 184ac7ff03 monolith: enable opencl rocm and blender hardware acceleration
This reverts commit 2e4cd80d89.
2024-03-19 13:45:13 -03:00
lelgenio 99576a7cb0 steam: remove steam workaround 2024-03-19 13:44:53 -03:00
lelgenio 311fb4384e home: update bc implementation 2024-03-11 18:02:58 -03:00
lelgenio a78d416cac update 2024-02-27 17:16:38 -03:00
Leonardo Eugênio d451db8d83 sway: fix suspend scripts 2024-02-23 12:01:24 -03:00
Leonardo Eugênio a0531650c6 mastodon: remove unnecessary configurations 2024-02-23 12:01:09 -03:00
Leonardo Eugênio 7f8b98c153 firefox: force search options 2024-02-22 21:17:51 -03:00
Leonardo Eugênio 04850913a1 systemd: set a low stop timeout 2024-02-22 21:10:11 -03:00
Leonardo Eugênio dc026727c9 obs: disable shutdown safemode check 2024-02-22 21:10:04 -03:00
Leonardo Eugênio 02c6040972 nix: collect garbage daily 2024-02-19 12:54:08 -03:00
Leonardo Eugênio 6c534c590f nix: keep flake inputs after garbage collection 2024-02-19 12:45:54 -03:00
Leonardo Eugênio e7d0121d46 nix: add nix-community substituter 2024-02-19 12:05:14 -03:00
Leonardo Eugênio fd9628423b firefox: set default search engine 2024-02-18 22:10:40 -03:00
Leonardo Eugênio 3b05a090d6 ghost: remove mastodon update/patch 2024-02-17 21:47:28 -03:00
Leonardo Eugênio 6ff6428277 ghost: enabled automatic updates 2024-02-17 21:47:28 -03:00
Leonardo Eugênio 5ee50a33b2 kak: fix git mode conflic resolution 2024-02-12 10:54:50 -03:00
Leonardo Eugênio 10e4811c3e nix: enable repl-flake 2024-02-11 01:45:38 -03:00
Leonardo Eugênio 9f35809cc6 helix: fix config 2024-02-10 00:10:16 -03:00
Leonardo Eugênio b0bd973365 monolith: add projects mount 2024-02-09 19:12:31 -03:00
Leonardo Eugênio 325cf58e2c thunar: enable krita thumbnails 2024-02-07 12:45:30 -03:00
Leonardo Eugênio a587610fd1 scripts: fix wl-copy-file path handling 2024-02-06 20:54:50 -03:00
Leonardo Eugênio 7e2c9b087a otd: don't use shift in binds becasue it's bugged 2024-02-03 01:08:05 -03:00
Leonardo Eugênio 35e0704b82 agenix: fix secrets not being opened on boot
Agenix runs before some partitions are mounted,
one option is to mark those partitions are need for boot:

{
  fileSystems."/home".neededForBoot = true;
}

I choose to copy my ssh key to the root user's HOME,
which is not in a separate partition.
2024-02-02 21:03:34 -03:00
Leonardo Eugênio 3830a01240 ghost: update mastodon to fix a vulnerability 2024-02-02 20:53:36 -03:00
Leonardo Eugênio 6ab508f374 update 2024-02-02 20:48:01 -03:00
lelgenio 7ddc64cf61 sway: add keybind to disable cursor 2024-02-02 13:43:33 -03:00
lelgenio e2e6b85d62 kakoune: don't show changelog 2024-02-01 17:57:46 -03:00
Leonardo Eugênio fe06b965b8 wacom: Install OpenTabletDriver 2024-01-24 22:11:36 -03:00
Leonardo Eugênio 2b642b2aaf sway: Ignore PS4 controller touchpad events 2024-01-22 20:37:43 -03:00
Leonardo Eugênio 25c8833ec3 greetd: extract greetd config 2024-01-20 21:42:07 -03:00
Leonardo Eugênio 47e3cc536c media-packages: install krita 2024-01-20 21:33:13 -03:00
Leonardo Eugênio 52a2cfc73b git: enable push.autoSetupRemote 2024-01-20 21:33:13 -03:00
lelgenio 9a879481d1 kak: make intelephense ignore direnv 2024-01-19 17:57:00 -03:00
Leonardo Eugênio 525a75f620 update 2024-01-19 11:39:10 -03:00
Leonardo Eugênio 85b6c0a559 network: open deluge port 2024-01-16 12:38:16 -03:00
Leonardo Eugênio 5763f59f37 firefox: install locale add-ons 2024-01-16 12:38:06 -03:00
Leonardo Eugênio e4d49b6e2b kdeconnect: Open kdeconnect ports on firewall 2024-01-10 21:52:23 -03:00
Leonardo Eugênio 142d2c2314 Remove mullvad vpn 2024-01-10 09:16:13 -03:00
Leonardo Eugênio 65d78cb872 firefox: install mastodon easy federation extensions 2024-01-06 10:02:32 -03:00
Leonardo Eugênio 231a273225 update 2024-01-05 11:13:31 -03:00
Leonardo Eugênio e66076f267 cli: install par 2024-01-05 11:13:19 -03:00
Leonardo Eugênio de6d1e9edb update 2023-12-28 15:25:27 -03:00
Leonardo Eugênio 3916fc3f51 dzgui: use upstream nixpkgs 2023-12-26 21:47:23 -03:00
Leonardo Eugênio f3664a410c waybar: add more headphone inputs 2023-12-19 08:14:19 -03:00
Leonardo Eugênio 26b886e46d update dzgui 2023-12-17 19:44:29 -03:00
lelgenio 2e4b268fa9 kakoune: add 'copy indentation from previous line' command 2023-12-14 17:50:32 -03:00
lelgenio 2d10752d15 firefox: install unhook extension 2023-12-14 17:50:21 -03:00
Leonardo Eugênio b4ff6d21af boot: fix vconsole font setup 2023-12-13 12:38:26 -03:00
Leonardo Eugênio b1f17cf793 flake: remove NUR dependency 2023-12-12 17:20:33 -03:00
Leonardo Eugênio 6b45e2fb35 firefox: use fetchFirefoxAddon instead of nur repos 2023-12-12 17:20:33 -03:00
lelgenio 9995a776d7 rainbow: enable gitlab ci runner 2023-12-07 13:58:34 -03:00
lelgenio e8f3fa733f fish: add cargo abbr 2023-12-05 17:30:53 -03:00
Leonardo Eugênio c9f13dbe40 update 2023-12-01 19:02:05 -03:00
lelgenio d18c85efb2 Improve gitlab config 2023-11-30 09:24:08 -03:00
Leonardo Eugênio 80ef3f0e6c ghost: create rena wiki 2023-11-29 01:41:47 -03:00
Leonardo Eugênio ff7c1b3bb3 ghost: update 2023-11-29 01:33:28 -03:00
Leonardo Eugênio 2279296549 steam: patch current system version instead of nixpkgs fork 2023-11-28 19:39:35 -03:00
Leonardo Eugênio 4de9729c8f monolith: install zenpower kernel module 2023-11-28 19:09:51 -03:00
Leonardo Eugênio 82db6d783d gnome: improve gnome experience 2023-11-28 19:09:51 -03:00
Leonardo Eugênio 804e8b50f5 update: minor fixups 2023-11-26 15:40:25 -03:00
Leonardo Eugênio a08aca5301 update: 23.11 2023-11-26 15:40:18 -03:00
Leonardo Eugênio 49040b5be9 exa: switch to eza 2023-11-26 12:36:42 -03:00
Leonardo Eugênio d0d7d7f930 gc: only run gc monthly 2023-11-23 12:37:15 -03:00
Leonardo Eugênio b8ee69c66b sway: make bindings more readable 2023-11-21 18:01:20 -03:00
Leonardo Eugênio 6528a97d21 ghost: increase inotify watch limit 2023-11-17 11:22:11 -03:00
lelgenio be8be99265 firefox: Allow editing userChrome by default 2023-11-16 14:25:44 -03:00
Leonardo Eugênio aec76bd138 steam: update 2023-11-11 21:48:30 -03:00
Leonardo Eugênio 3094240717 power: suspend on power button 2023-11-11 13:20:39 -03:00
Leonardo Eugênio c51f030d0a update 2023-11-11 13:20:30 -03:00
Leonardo Eugênio 22cca89c4a pipewire: unify config file 2023-11-07 23:59:34 -03:00
Leonardo Eugênio d1a4f1d4f7 pipewire: disable rnnoise voice detection 2023-11-07 23:59:18 -03:00
Leonardo Eugênio a18f2791c2 mpd: don't enable mpd for gnome 2023-11-07 20:46:08 -03:00
Leonardo Eugênio 08c09a7fce sway: move kdeconnect to sway config 2023-11-07 20:45:41 -03:00
lelgenio 17b43bab27 nix: add snowflakeos cachix 2023-10-30 16:50:48 -03:00
Leonardo Eugênio f07f6b66a3 gnome: replace lollypop with amberol 2023-10-28 21:09:20 -03:00
Leonardo Eugênio 0aad44af19 fish: disable async prompt in gnome 2023-10-28 11:53:58 -03:00
Leonardo Eugênio 43c769617b mimeapps: add archive-manager setting 2023-10-27 09:13:08 -03:00
Leonardo Eugênio 58b3150d3a mime: extract declaration from implementation
Maybe this should be made into a separate package later.
2023-10-26 22:03:27 -03:00
Leonardo Eugênio 884d02f003 ghost: split config 2023-10-26 20:20:16 -03:00
lelgenio b8081cf4c6 home: add ssh config 2023-10-26 17:34:27 -03:00
lelgenio f6530e55ea Add double rainbow host 2023-10-26 15:26:30 -03:00
Leonardo Eugênio d8feb9fe92 steam: also install bottles 2023-10-26 11:08:51 -03:00
Leonardo Eugênio e9d25a7d69 gnome: fix cursor theme 2023-10-26 10:35:59 -03:00
Leonardo Eugênio 3ebd680633 ghost: enable syncthing 2023-10-24 10:57:44 -03:00
Leonardo Eugênio 66b22ae784 ghost: add storage 2023-10-23 22:52:17 -03:00
Leonardo Eugênio 19fccaba0e update 2023-10-23 21:11:48 -03:00
Leonardo Eugênio 2e4cd80d89 monolith: disable opencl rocm and blender hardware acceleration 2023-10-22 14:56:02 -03:00
Leonardo Eugênio b00b4e322f ghost: split secrets for server and local 2023-10-22 14:55:39 -03:00
Leonardo Eugênio 32b1771867 ghost: minor update 2023-10-17 11:01:18 -03:00
Leonardo Eugênio eb3eca98c4 ghost: enabled writefreely 2023-10-16 10:15:19 -03:00
Leonardo Eugênio 5eca20902c ghost: add mastodon 2023-10-15 01:28:07 -03:00
Leonardo Eugênio 9c1709c039 hosts: add ghost 2023-10-14 16:30:51 -03:00
Leonardo Eugênio 152344a801 scripts: fix copying files in download script 2023-10-06 23:07:15 -03:00
lelgenio 16bdde3504 system: set TZ environment variable 2023-10-05 17:58:09 -03:00
Leonardo Eugênio 95deef964f chat: pin thunderbird version 2023-10-03 11:28:40 -03:00
lelgenio c9f6682a2b helix: configure php formatter 2023-10-02 15:58:59 -03:00
lelgenio 3c2c25d388 vscode: disable update check 2023-10-02 14:54:16 -03:00
Leonardo Eugênio 9f0d478b41 update 2023-09-29 00:15:47 -03:00
Leonardo Eugênio 6e28ce3ffe sway: add LinkedIn shortcut 2023-09-27 11:07:00 -03:00
Leonardo Eugênio ece5ca2141 monolith: Improve filtering of Logitech mouse dongle 2023-09-20 02:21:37 -03:00
Leonardo Eugênio a993a5711d rename pipewire home manager module 2023-09-18 12:26:34 -03:00
Leonardo Eugênio 2357cf053e waybar: fix volume setting 2023-09-12 00:51:09 -03:00
Leonardo Eugênio 6b49c83fff waybar: fix some warnings 2023-09-12 00:43:56 -03:00
Leonardo Eugênio 90fa9564dc monolith: fix suspending with Logitech dongle 2023-09-11 00:24:27 -03:00
Leonardo Eugênio fcc155ab3c system: install virtualbox 2023-09-11 00:09:13 -03:00
Leonardo Eugênio fc6d9d4d62 kak: add prettier 2023-09-01 09:49:41 -03:00
lelgenio 195d2b5589 update demoji 2023-08-31 16:51:14 -03:00
lelgenio 3548de8d33 boot: use upstream plymouth themes package 2023-08-31 16:22:55 -03:00
lelgenio 55d5178bb6 pkgs: add emmet-cli 2023-08-31 14:10:02 -03:00
Leonardo Eugênio e43975898e vdir: fix conflicts 2023-08-31 14:09:37 -03:00
Leonardo Eugênio 75064dafd4 mpv: add plugins 2023-08-31 14:09:27 -03:00
lelgenio 8633e67c92 kak: fix laravel blade endforeach syntax highlight 2023-08-29 14:17:11 -03:00
Leonardo Eugênio 069c9c60b7 update 2023-08-22 21:08:05 -03:00
Leonardo Eugênio 24aece1aa7 monolith: remove acpi wakeup workaround 2023-08-22 20:55:47 -03:00
lelgenio 431fe5bd1b Revert "update"
This reverts commit fc60022bb7.
2023-08-22 14:22:43 -03:00
Leonardo Eugênio a2ca5e0042 monolith: allow hibernation 2023-08-20 17:46:49 -03:00
Leonardo Eugênio 15397a871a monolith: fix suspending by disabling suspend2idle 2023-08-20 17:46:27 -03:00
Leonardo Eugênio 34ce503cec monolith: add new storage device 2023-08-19 19:26:54 -03:00
Leonardo Eugênio fc60022bb7 update 2023-08-18 10:49:34 -03:00
Leonardo Eugênio 13a740fd6e git: don't assume or set upstream url 2023-08-18 00:56:56 -03:00
Leonardo Eugênio a817587c34 update dzgui 2023-08-18 00:56:42 -03:00
lelgenio 1eabd3405d vscode: disable snippetsPreventQuickSuggestions 2023-08-17 17:55:19 -03:00
lelgenio da7a3084c7 fish: fix pass completion 2023-08-17 13:38:27 -03:00
Leonardo Eugênio 44c5fbace4 gnome: set level 3 switch (key to the left of Z) 2023-08-17 12:30:07 -03:00
Leonardo Eugênio b2d356fe6e gnome: add passwordsafe 2023-08-17 10:01:37 -03:00
Leonardo Eugênio 430b18f747 vscode: don't confirm sync 2023-08-16 11:45:16 -03:00
Leonardo Eugênio 49b921c678 vscode: enable auto fetch 2023-08-16 11:23:25 -03:00
Leonardo Eugênio 93a1831e40 vscode: add vscode settings 2023-08-16 11:09:25 -03:00
Leonardo Eugênio 1d03ba2f4a home: install backgrounds dir recursivelly
This is necessary so that other software
can add new backgrounds dynamically
2023-08-16 00:31:01 -03:00
Leonardo Eugênio 4019472dc1 vscode: enable vscode and fix missing NIX_PATH 2023-08-16 00:29:14 -03:00
Leonardo Eugênio f86b1e977e waybar: add calendar 2023-08-13 15:10:09 -03:00
Leonardo Eugênio 16ab674e79 email: use xdg data dirs to store maildir 2023-08-11 21:51:02 -03:00
Leonardo Eugênio f27db83936 home: remove many unnecessary packages 2023-08-10 12:49:11 -03:00
Leonardo Eugênio 61d2767a9f thunar: add "convert to mp4" shortcut 2023-08-10 12:48:50 -03:00
Leonardo Eugênio 7aa1cec6fa tesseract: only use 'eng' and 'por' language 2023-08-09 20:25:40 -03:00
lelgenio 27cc126d4a storage: automatically cleanup old files 2023-08-08 17:55:13 -03:00
lelgenio edeab9f843 fixup! pass: enable otp generation 2023-08-08 16:45:02 -03:00
Leonardo Eugênio 2ab0b84209 monolith: autostart some apps 2023-08-08 12:43:24 -03:00
Leonardo Eugênio 869ba87dab nix: set empty NIX_PATH 2023-08-08 12:43:11 -03:00
Leonardo Eugênio 89cef20b3c pass: enable otp generation 2023-08-07 19:58:05 -03:00
Leonardo Eugênio 4ad060e795 fish: list todos on init 2023-08-07 19:57:48 -03:00
Leonardo Eugênio 3aab632dc3 home: add nicotine-plus 2023-08-07 13:00:26 -03:00
Leonardo Eugênio ed0a0412bb steam: add temporary fix for switching generations 2023-08-04 01:31:28 -03:00
Leonardo Eugênio 429e490bb5 media: update to godot 4 2023-08-03 21:57:09 -03:00
Leonardo Eugênio 36b21bc379 plank: fix graphical mode 2023-08-03 21:54:32 -03:00
Leonardo Eugênio 6357800e37 home: add system tools 2023-08-03 21:06:46 -03:00
Leonardo Eugênio 3fe72cac61 ranger: fix after updates 2023-07-28 20:54:48 -03:00
Leonardo Eugênio 05e598acf0 remove unstable 2023-07-27 01:20:31 -03:00
Leonardo Eugênio 82fb005bc1 mangohud: add more fps limits 2023-07-26 23:46:18 -03:00
Leonardo Eugênio 6be8458b9c update dzgui 2023-07-26 23:46:11 -03:00
Leonardo Eugênio 47b3aa665f blender: enable hardware acceleration 2023-07-20 20:42:47 -03:00
Leonardo Eugênio ce39addcf0 update 2023-07-17 12:31:30 -03:00
Leonardo Eugênio d09cbf4a10 update dzgui 2023-07-16 22:38:18 -03:00
lelgenio 90acb5b08c kakoune: add bind to copy file path 2023-07-13 17:17:53 -03:00
Leonardo Eugênio 951bf6bc91 update 2023-07-06 11:02:02 -03:00
Leonardo Eugênio 42b5fcf970 Revert "flake: switch to nixpkgs unstable by default"
This reverts commit a024dad386.
2023-07-05 19:58:50 -03:00
Leonardo Eugênio e7e9f167d7 mangohud: fix fps limiting 2023-07-04 11:06:37 -03:00
Leonardo Eugênio c52cbc26df Revert "monolith: don't hardcode display name"
This reverts commit c8c00f08e8.
2023-06-27 20:25:04 -03:00
Leonardo Eugênio ab00a850fd monolith: add a generic data mount 2023-06-27 20:24:50 -03:00
Leonardo Eugênio 778604cd50 hardware: add corectrl 2023-06-27 20:24:32 -03:00
Leonardo Eugênio 5445964844 waybar: disconnect vpn by right clicking 2023-06-27 12:49:47 -03:00
Leonardo Eugênio 337a0a211a gitlab: force a known good version for runners 2023-06-26 20:31:57 -03:00
Leonardo Eugênio 1d32343e47 monolith: enable vpn 2023-06-26 20:04:23 -03:00
Leonardo Eugênio e7d1840eaf update 2023-06-26 12:38:11 -03:00
Leonardo Eugênio 5f4f95896c firefox: disable av1 hardware decoding, it's laggy 2023-06-23 00:31:51 -03:00
Leonardo Eugênio c8c00f08e8 monolith: don't hardcode display name 2023-06-20 17:00:10 -03:00
Leonardo Eugênio ba1a36e915 chat: delay app init 2023-06-19 16:58:17 -03:00
Leonardo Eugênio ce2c4d4deb update rtp ip 2023-06-19 16:58:17 -03:00
Leonardo Eugênio 4e84cb32c2 kernel: remove amdgpu overheating workaround 2023-06-19 16:58:17 -03:00
Leonardo Eugênio 43a0ce5d0f gpu: enable hardware accelerated playback 2023-06-19 16:58:17 -03:00
lelgenio a024dad386 flake: switch to nixpkgs unstable by default 2023-06-13 17:14:11 -03:00
lelgenio 37df277974 hosts: fix rainbow config 2023-06-13 09:11:56 -03:00
Leonardo Eugênio 1a1f44b997 flake: remove mpvpaper, i don't use it 2023-06-13 08:39:18 -03:00
Leonardo Eugênio c6b05942c5 flake: remove override for sea-orm-cli 2023-06-07 17:16:08 -03:00
Leonardo Eugênio f8e4e5344e extract xdg-dirs 2023-06-06 10:04:14 -03:00
Leonardo Eugênio 2649edfb47 chat: autostart programs using sway settings 2023-06-02 23:11:11 -03:00
Leonardo Eugênio 77cb5087ac gtk: disable gtk3 nocsd, it causes lots of crashes due to LD_PRELOAD 2023-06-02 23:10:32 -03:00
Leonardo Eugênio 778794f91b update to nixos 23.05 2023-06-02 22:42:56 -03:00
Leonardo Eugênio 8bbdb28d32 gnome: update config 2023-06-02 17:55:54 -03:00
Leonardo Eugênio bd275e8982 home: install vkcube and glxgears 2023-06-02 11:14:54 -03:00
Leonardo Eugênio 073e578141 home-manager: fix standalone config 2023-06-02 11:14:27 -03:00
Leonardo Eugênio 2dd9bea706 vpn: allow disabling vpn config 2023-06-02 10:40:51 -03:00
Leonardo Eugênio 10380a53b5 sway: add wl-crosshair 2023-05-31 20:42:55 -03:00
Leonardo Eugênio 5aa0614a59 kakoune: remove dotdrop highlighter 2023-05-30 15:20:23 -03:00
Leonardo Eugênio 39cbe4e5e8 kakoune: highlight leptos html macro 2023-05-29 12:47:20 -03:00
Leonardo Eugênio 3d207cb35a update dzgui 2023-05-27 13:06:29 -03:00
Leonardo Eugênio 9a69d8b3c3 theme: fix warnings for negative border-radius 2023-05-22 11:15:03 -03:00
Leonardo Eugênio 7ddf21e6de steam: revert to stable version 2023-05-21 18:57:54 -03:00
Leonardo Eugênio 192957ead0 zathura: fix background colors 2023-05-20 23:27:45 -03:00
Leonardo Eugênio e30fa78d33 vpn: install graphicall interface 2023-05-20 14:27:30 -03:00
Leonardo Eugênio e997ed95d7 fish: only install done when using sway 2023-05-20 14:27:16 -03:00
Leonardo Eugênio 40f8f28b57 media-packages: add obs-studio 2023-05-20 12:41:31 -03:00
Leonardo Eugênio 4af864dde7 update dzgui 2023-05-20 12:41:23 -03:00
Leonardo Eugênio f29d93b3c9 add legacy launcher 2023-05-19 17:53:08 -03:00
Leonardo Eugênio 635eef0902 config: switch to firefox browser by default 2023-05-18 22:11:00 -03:00
Leonardo Eugênio d95364b3ea nix: extract nix config 2023-05-18 12:36:43 -03:00
Leonardo Eugênio 9c9ebff974 thunar: enable plugins 2023-05-18 12:36:29 -03:00
Leonardo Eugênio b38dce323a update dzgui 2023-05-17 23:51:14 -03:00
Leonardo Eugênio 9ad6bc4ac3 xdpw: don't prompt for monitor to share, I only ever use one 2023-05-17 11:51:07 -03:00
Leonardo Eugênio 8329ca5ea0 update 2023-05-16 12:46:48 -03:00
Leonardo Eugênio 15d8216494 waybar: tweak playerctl 2023-05-15 12:49:01 -03:00
Leonardo Eugênio 37aed2697d Mail: send proper notifications 2023-05-13 00:13:40 -03:00
lelgenio b26f2fce58 gitlab: fix thoreb telemetria builder config 2023-05-12 17:52:58 -03:00
Leonardo Eugênio f1cbae7b53 qutebrowser: remeber dark theme preference 2023-05-12 12:11:46 -03:00
Leonardo Eugênio d32bd28650 helix: add helix pager 2023-05-11 11:20:47 -03:00
Leonardo Eugênio ba4d00d1df fish: add some plugins 2023-05-09 21:25:26 -03:00
Leonardo Eugênio 1c70c3c695 helix: update cursorline theme 2023-05-09 09:45:25 -03:00
lelgenio ee96d61a04 helix: update theme 2023-05-08 17:25:08 -03:00
Leonardo Eugênio a8ed33860c email: switch back to thunderbird as email client 2023-05-07 22:21:09 -03:00
Leonardo Eugênio b9c65f797f flake: add formatter 2023-05-07 22:20:10 -03:00
Leonardo Eugênio 2cf980caa1 boot: fix password prompt timeout 2023-05-07 22:19:23 -03:00
Leonardo Eugênio f6efa2cc57 kakoune: remove kak-plug, install all plugins via nix 2023-05-07 14:26:24 -03:00
Leonardo Eugênio 6f3935f736 chat: add Element client 2023-05-07 12:18:50 -03:00
Leonardo Eugênio b400bd938e Revert "nix: keep derivations and outputs"
This reverts commit 54d54f521f.
2023-05-07 00:50:40 -03:00
Leonardo Eugênio d7277c7222 kakoune: fix lsp formatting 2023-05-06 17:26:22 -03:00
Leonardo Eugênio ef75e936c6 kakoune: disable auto formatting 2023-05-06 17:26:05 -03:00
Leonardo Eugênio 5034746b55 steam: fix bug in steam beta 2023-05-06 17:25:06 -03:00
Leonardo Eugênio 4977cf1628 move style stuff to style attribute 2023-05-04 23:57:36 -03:00
Leonardo Eugênio 9425abdf54 waybar: extract style to separate file 2023-05-04 20:38:30 -03:00
Leonardo Eugênio 43a40da5d2 waybar: move to dir 2023-05-04 19:51:18 -03:00
Leonardo Eugênio 517086541e waybar: extract _sway_idle_toggle script 2023-05-04 19:32:12 -03:00
Leonardo Eugênio 8d980ed634 fish: add special icon for unpushed branches 2023-05-04 00:53:54 -03:00
Leonardo Eugênio e1dc83286a flake: remove mullvad import 2023-05-03 08:55:32 -03:00
Leonardo Eugênio 38d0fe189a overlays: use substituteInPlace over sed 2023-05-03 08:49:08 -03:00
Leonardo Eugênio a9b1fd1e9c mangohud: minor update 2023-05-03 08:32:02 -03:00
Leonardo Eugênio 7b631196ca remove nil-lsp input, use the one from nixpkgs 2023-05-02 16:13:40 -03:00
Leonardo Eugênio 091995849f update scripts 2023-05-02 00:19:23 -03:00
Leonardo Eugênio 320adcf1ac update 2023-05-02 00:19:15 -03:00
Leonardo Eugênio 54d54f521f nix: keep derivations and outputs 2023-05-02 00:19:03 -03:00
lelgenio d4c7c60ec7 firefox: allow unsigned extensions 2023-04-24 17:56:35 -03:00
Leonardo Eugênio c9e73492f9 waybar: fix vpn module 2023-04-24 12:39:28 -03:00
Leonardo Eugênio b081b01841 update 2023-04-24 12:35:47 -03:00
Leonardo Eugênio ca041b9a48 rust: remove rustup 2023-04-24 12:35:47 -03:00
Leonardo Eugênio 6bb17bd0e6 helix: fix extend search 2023-04-24 12:35:47 -03:00
Leonardo Eugênio c6f9e14fa8 waybar: add vpn indicator 2023-04-23 23:37:00 -03:00
Leonardo Eugênio 5f95eb8b1a boot: don't timeout on password prompt 2023-04-23 23:36:22 -03:00
Leonardo Eugênio f396b3cfbd gnome: add gnome user settings 2023-04-19 00:25:45 -03:00
Leonardo Eugênio 74b5ba8c13 fixup! Revert "firefox: move extensions to nixExtensions" 2023-04-19 00:25:45 -03:00
Leonardo Eugênio 9ef72dd902 hyprland: fix hyprland always being built 2023-04-19 00:25:45 -03:00
Leonardo Eugênio d9a40ec660 Revert "firefox: move extensions to nixExtensions"
This reverts commit 783790a2e9.
2023-04-19 00:25:45 -03:00
lelgenio 3188d11a7b down_meme: create memes dir if not exists 2023-04-17 15:27:35 -03:00
Leonardo Eugênio 6dfeeb36ed update 2023-04-13 20:26:59 -03:00
lelgenio 72e4a8f932 qutebrowser: enable toggling dark mode during runtime 2023-04-13 15:28:20 -03:00
lelgenio 62bd9e6676 Add dzadd script 2023-04-11 14:44:38 -03:00
lelgenio 76855bedf9 Packages: install cargo-audit 2023-04-11 13:46:54 -03:00
Leonardo Eugênio 13797298c2 fixes 2023-04-10 12:45:37 -03:00
Leonardo Eugênio 7c217a07da update 2023-04-10 12:45:27 -03:00
Leonardo Eugênio a28a906125 update 2023-03-30 13:28:19 -03:00
Leonardo Eugênio 364980bf63 vpn: allow traffic outside vpn 2023-03-30 13:28:05 -03:00
Leonardo Eugênio b085e22f80 fish: update prompt 2023-03-29 22:48:11 -03:00
Leonardo Eugênio 8a4e545841 update 2023-03-11 20:12:52 -03:00
Leonardo Eugênio a8e1eda2d9 mangohud: fix steam games not launching 2023-03-11 20:12:48 -03:00
Leonardo Eugênio 1944bda13c qutebrowser: fix carret mode movement 2023-03-11 18:49:45 -03:00
Leonardo Eugênio 7a670b3aad qutebrowser: improve pinned tabs 2023-03-11 18:49:17 -03:00
Leonardo Eugênio 58cdca84e5 vpn: allow docker to use the network 2023-03-11 18:44:45 -03:00
lelgenio 7d698c6f0d qutebrowser: dont't auto-leave insert mode 2023-03-09 17:58:09 -03:00
Leonardo Eugênio 5b9ff161c0 update 2023-03-09 16:32:35 -03:00
Leonardo Eugênio db80138e53 mullvad: add vpn config file 2023-03-09 12:38:53 -03:00
Leonardo Eugênio d9f56ffc93 mullvad: add completions 2023-03-09 10:10:19 -03:00
Leonardo Eugênio e3261735cc enable mullvar daemon 2023-03-08 12:46:41 -03:00
Leonardo Eugênio d1782cc03e update 2023-03-06 23:26:40 -03:00
Leonardo Eugênio 8ad3c92683 astroid: crash due to incorrect css 2023-03-06 23:26:40 -03:00
lelgenio 8af57c2e9e fish: Fix prompt on repos with no commits 2023-03-06 16:53:32 -03:00
lelgenio b20a9762a1 qutebrowser: don't use darkreader on hub.docker.com 2023-03-02 17:48:26 -03:00
lelgenio ad581a434a pager: fix systemd not using correct pager 2023-03-02 14:23:38 -03:00
Leonardo Eugênio da3e1b132b update 2023-02-28 19:56:14 -03:00
lelgenio 17e6f9ecee swaylock: fix quoting problem 2023-02-27 16:39:31 -03:00
Leonardo Eugênio 007895fcb5 wpass: enter qutebrowser insert mode befor autotype 2023-02-26 15:44:32 -03:00
Leonardo Eugênio 9ecae78687 systemd: use kak-pager 2023-02-25 20:27:07 -03:00
Leonardo Eugênio 1370ee664b style: clear up wifi-icons derivation 2023-02-25 19:56:38 -03:00
Leonardo Eugênio 6c56795c33 sway: extract assigns 2023-02-25 19:48:14 -03:00
Leonardo Eugênio 8b3cdd756d sway: extract modes from config 2023-02-25 19:48:14 -03:00
Leonardo Eugênio c82e25f0a4 sway: extract binds 2023-02-25 19:48:14 -03:00
Leonardo Eugênio 5f0c129b63 swayidle: extract config from sway 2023-02-25 19:48:14 -03:00
Leonardo Eugênio ce4a6bb501 swaylock: extract config from sway 2023-02-25 19:48:14 -03:00
Leonardo Eugênio f26b404d9d mako: extract from sway config 2023-02-25 19:48:14 -03:00
Leonardo Eugênio 1036602b03 sway: create a dir for sway stuff 2023-02-25 19:48:14 -03:00
Leonardo Eugênio caa4495215 scripts: extract color_picker from sway 2023-02-25 19:48:14 -03:00
Leonardo Eugênio 313a8e168a sway: remove gtk window decoration 2023-02-25 19:48:14 -03:00
Leonardo Eugênio 1beedef599 update 2023-02-25 16:09:18 -03:00
166 changed files with 5875 additions and 14285 deletions

File diff suppressed because it is too large Load diff

146
flake.nix
View file

@ -1,55 +1,42 @@
{
description = "My system config";
inputs = {
nixpkgs.url = "nixpkgs/nixos-22.11";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-22.11";
nixpkgs.url = "nixpkgs/nixos-24.05";
home-manager.url = "github:nix-community/home-manager/release-24.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nur.url = "github:nix-community/NUR";
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# mpvpaper
wegank = {
url = "github:wegank/nur-packages";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
alacritty-sixel.url = "github:ayosec/alacritty";
alacritty-sixel.flake = false;
ranger-sixel.url = "github:remi6397/ranger/feature/sixel";
ranger-sixel.flake = false;
ranger-icons.url = "github:alexanderjeurissen/ranger_devicons";
ranger-icons.flake = false;
material-wifi-icons.url = "github:dcousens/material-wifi-icons";
material-wifi-icons.flake = false;
sea-orm-cli.url = "github:lucperkins/nixpkgs/lperkins/sea-orm-cli";
nil-lsp.url = "github:oxalica/nil";
nil-lsp.inputs.nixpkgs.follows = "nixpkgs-unstable";
plymouth-themes.url = "github:adi1090x/plymouth-themes";
plymouth-themes.flake = false;
lipsum.url = "github:hannenz/lipsum";
lipsum.flake = false;
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
agenix.url = "github:ryantm/agenix";
nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-24_05.follows = "nixpkgs";
};
dzgui.url = "github:lelgenio/dzgui-nix";
dzgui.inputs.nixpkgs.follows = "nixpkgs";
dzgui-nix = {
url = "github:lelgenio/dzgui-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
tlauncher = {
url = "git+https://git.lelgenio.xyz/lelgenio/tlauncher-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
@ -63,37 +50,56 @@
url = "github:lelgenio/demoji";
inputs.nixpkgs.follows = "nixpkgs";
};
wl-crosshair = {
url = "github:lelgenio/wl-crosshair";
inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{ nixpkgs, nixpkgs-unstable, home-manager, nur, ... }:
# gnome stuff
nixos-conf-editor = {
url = "github:vlinkz/nixos-conf-editor";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-software-center = {
url = "github:vlinkz/nix-software-center";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs:
let
inherit (import ./user/variables.nix) desktop;
system = "x86_64-linux";
pkgs = import nixpkgs {
nixpkgsConfig = {
inherit system;
config = { allowUnfree = true; };
config = {
allowUnfree = true;
};
overlays = old_overlays.all;
};
lib = nixpkgs.lib;
inherit (import ./user/variables.nix) desktop;
system = "x86_64-linux";
pkgs = import inputs.nixpkgs nixpkgsConfig;
lib = inputs.nixpkgs.lib;
packages = import ./pkgs { inherit pkgs inputs; };
old_overlays = (import ./overlays { inherit packages inputs; });
specialArgs = { inherit inputs; };
common_modules = [
specialArgs = {
inherit inputs;
};
common_modules =
[
{ nixpkgs.pkgs = pkgs; }
./system/configuration.nix
./system/secrets.nix
./system/specialisation.nix
inputs.disko.nixosModules.disko
# nur.nixosModules.nur
./system/greetd.nix
{ login-manager.greetd.enable = desktop == "sway"; }
inputs.agenix.nixosModules.default
inputs.hyprland.nixosModules.default
{
programs.hyprland.enable = true;
# programs.hyprland.package = null;
}
home-manager.nixosModules.home-manager
inputs.dzgui-nix.nixosModules.default
inputs.home-manager.nixosModules.home-manager
inputs.disko.nixosModules.disko
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
@ -101,9 +107,11 @@
home-manager.backupFileExtension = "bkp";
# Optionally, use home-manager.extraSpecialArgs to pass
# arguments to home.nix
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.extraSpecialArgs = {
inherit inputs;
};
}
] ++ lib.optional (desktop == "sway") ./system/sway.nix
]
++ lib.optional (desktop == "gnome") ./system/gnome.nix
++ lib.optional (desktop == "kde") ./system/kde.nix;
in
@ -121,6 +129,7 @@
modules = [
./hosts/monolith
./system/monolith-gitlab-runner.nix
./system/monolith-forgejo-runner.nix
./system/nix-serve.nix
./system/steam.nix
] ++ common_modules;
@ -132,24 +141,45 @@
./system/rainbow-gitlab-runner.nix
] ++ common_modules;
};
double-rainbow = lib.nixosSystem {
inherit system specialArgs;
modules = [
./hosts/double-rainbow.nix
./system/rainbow-gitlab-runner.nix
] ++ common_modules;
};
pixie = lib.nixosSystem {
inherit system specialArgs;
modules = [ ./hosts/pixie ] ++ common_modules ++ [{
modules =
[ ./hosts/pixie.nix ]
++ common_modules
++ [
{
packages.media-packages.enable = lib.mkOverride 0 false;
programs.steam.enable = lib.mkOverride 0 false;
services.flatpak.enable = lib.mkOverride 0 false;
}];
}
];
};
phantom = lib.nixosSystem {
inherit system specialArgs;
modules = [ ./hosts/phantom ];
};
};
homeConfigurations.lelgenio = home-manager.lib.homeManagerConfiguration {
homeConfigurations.lelgenio = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = { inherit inputs; };
extraSpecialArgs = {
inherit inputs;
osConfig = { };
};
modules = [ ./user/home.nix ];
};
packages.${system} = packages;
packages.${system} = pkgs // packages;
formatter.${system} = pkgs.nixfmt-rfc-style;
};
}

67
hosts/double-rainbow.nix Normal file
View file

@ -0,0 +1,67 @@
{
config,
lib,
pkgs,
modulesPath,
...
}:
let
btrfs_options = [
"compress=zstd:3"
"noatime"
"x-systemd.device-timeout=0"
];
btrfs_ssd = [
"ssd"
"discard=async"
];
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ "i915" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/a072a77b-ca29-47df-be65-6d310d067d78";
fsType = "btrfs";
options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd;
};
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/97EB-7DB5";
fsType = "vfat";
};
swapDevices = [ ];
services.udev.extraRules = ''
# Force all disks to use mq-deadline scheduler
# For some reason "noop" is used by default which is kinda bad when io is saturated
ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="mq-deadline"
'';
# 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.enp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "double-rainbow"; # Define your hostname.
}

81
hosts/i15.nix Normal file
View file

@ -0,0 +1,81 @@
# 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,
...
}:
let
btrfs_options = [
"compress=zstd:3"
"noatime"
"x-systemd.device-timeout=0"
];
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_usb_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
boot.initrd.luks.devices = {
"main" = {
bypassWorkqueues = true;
device = "/dev/disk/by-label/CRYPT_ROOT";
};
};
boot.loader.efi.efiSysMountPoint = "/boot/efi";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-label/NIX_BOOT";
fsType = "vfat";
};
fileSystems."/" = {
device = "/dev/disk/by-label/NIX_ROOT";
fsType = "btrfs";
options = [ "subvol=@nixos" ] ++ btrfs_options;
};
fileSystems."/home" = {
device = "/dev/disk/by-label/NIX_ROOT";
fsType = "btrfs";
options = [ "subvol=@home" ] ++ btrfs_options;
};
fileSystems."/swap" = {
device = "/dev/disk/by-label/NIX_ROOT";
fsType = "btrfs";
options = [ "subvol=@swap" ] ++ btrfs_options;
};
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB
}
];
# 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.enp2s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "i15"; # Define your hostname.
}

View file

@ -1,10 +1,22 @@
{ config, lib, pkgs, modulesPath, ... }: {
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
networking.hostName = "i15"; # Define your hostname.
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"sd_mod"
"rtsx_usb_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -12,14 +24,15 @@
disko.devices = (import ./partitions.nix { disks = [ "/dev/sda" ]; });
boot.loader.efi.efiSysMountPoint = "/boot/efi";
swapDevices = [{
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB
}];
}
];
networking.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
pkgs.makeDiskoTest {
name = "test-disko-i15";
disko-config = ./partitions.nix;

View file

@ -1,6 +1,12 @@
{ disks ? [ "/dev/sda" ], ... }:
{
disks ? [ "/dev/sda" ],
...
}:
let
btrfs_options = [ "compress=zstd:3" "noatime" ];
btrfs_options = [
"compress=zstd:3"
"noatime"
];
in
{
disk.sda = {
@ -18,7 +24,10 @@ in
bootable = true;
content = {
type = "filesystem";
extraArgs = [ "-n" "BOOT_I15" ];
extraArgs = [
"-n"
"BOOT_I15"
];
format = "vfat";
mountpoint = "/boot";
# options = [ "defaults" ];
@ -35,14 +44,25 @@ in
keyFile = "/tmp/secret.key";
content = {
type = "btrfs";
extraArgs = [ "--label" "ROOT_I15" ];
subvolumes = let mountOptions = btrfs_options; in {
"/home" = { inherit mountOptions; };
extraArgs = [
"--label"
"ROOT_I15"
];
subvolumes =
let
mountOptions = btrfs_options;
in
{
"/home" = {
inherit mountOptions;
};
"/nixos" = {
inherit mountOptions;
mountpoint = "/";
};
"/swap" = { inherit mountOptions; };
"/swap" = {
inherit mountOptions;
};
};
};
};

View file

@ -1,85 +1,150 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
let
btrfs_options = [ "compress=zstd:3" "noatime" ];
btrfs_ssd = [ "ssd" "discard=async" ];
btrfs_options = [
"compress=zstd:3"
"noatime"
"x-systemd.device-timeout=0"
];
btrfs_ssd = [
"ssd"
"discard=async"
];
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
./partition.nix
];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
hardware.opentabletdriver.enable = true;
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [
"kvm-amd"
"amdgpu"
"zenpower"
];
boot.kernelParams = [
"amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug
"video=DP-1:1920x1080@144"
# hibernation
# "resume=LABEL=BTRFS_ROOT" # findmnt -o LABEL --noheadings /swap/
# "resume_offset=36709632" # btrfs inspect-internal map-swapfile -r /swap/swapfile
];
systemd.sleep.extraConfig = ''
HibernateDelaySec=30s
SuspendState=mem
'';
hardware.opengl.driSupport = true;
# # For 32 bit applications
hardware.opengl.driSupport32Bit = true;
# hardware.opengl.extraPackages = with pkgs; [ amdvlk ];
# # For 32 bit applications
# # Only available on unstable
# hardware.opengl.extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
# environment.variables = { AMD_VULKAN_ICD = "RADV"; };
boot.extraModulePackages = [
((pkgs.amdgpu-kernel-module.override {
kernel = config.boot.kernelPackages.kernel;
}).overrideAttrs (_: {
patches = [ ../patches/kernel/amdgpu-disable-shutdown-on-overheating.diff ];
}))
hardware.opengl.extraPackages = with pkgs; [
libva
libvdpau
vaapiVdpau
rocm-opencl-icd
rocm-opencl-runtime
rocmPackages.rocm-smi
];
fileSystems."/" = {
device = "/dev/disk/by-label/BTRFS_ROOT";
fsType = "btrfs";
options = [ "subvol=nixos" ] ++ btrfs_options ++ btrfs_ssd;
};
# boot.initrd.luks.reusePassphrases = true;
boot.initrd.luks.devices = {
"main" = {
bypassWorkqueues = true;
device = "/dev/disk/by-label/CRYPT_ROOT";
};
"data" = {
bypassWorkqueues = true;
device = "/dev/disk/by-label/CRYPT_DATA";
boot.kernelPackages = pkgs.linuxPackages_6_1;
programs.corectrl = {
enable = true;
gpuOverclock = {
enable = true;
ppfeaturemask = "0xffffffff";
};
};
boot.loader.efi.efiSysMountPoint = "/boot/efi";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
fileSystems."/home" = {
device = "/dev/disk/by-label/BTRFS_ROOT";
fsType = "btrfs";
options = [ "subvol=home" ] ++ btrfs_options ++ btrfs_ssd;
};
fileSystems."/home/lelgenio/Games" = {
device = "/dev/disk/by-label/BTRFS_DATA";
fsType = "btrfs";
options = [ "subvol=@games" "nofail" ] ++ btrfs_options;
};
fileSystems."/home/lelgenio/Downloads/Torrents" = {
device = "/dev/disk/by-label/BTRFS_DATA";
fsType = "btrfs";
options = [ "subvol=@torrents" "nofail" ] ++ btrfs_options;
};
fileSystems."/home/lelgenio/Música" = {
device = "/dev/disk/by-label/BTRFS_DATA";
fsType = "btrfs";
options = [ "subvol=@music" "nofail" ] ++ btrfs_options;
};
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="pci", DRIVER=="pcieport", ATTR{power/wakeup}="disabled"
'';
# fileSystems."/" = {
# device = "/dev/disk/by-label/BTRFS_ROOT";
# fsType = "btrfs";
# options = [ "subvol=nixos" ] ++ btrfs_options ++ btrfs_ssd;
# };
# # boot.initrd.luks.reusePassphrases = true;
# boot.initrd.luks.devices = {
# "main" = {
# bypassWorkqueues = true;
# device = "/dev/disk/by-label/CRYPT_ROOT";
# };
# "data" = {
# bypassWorkqueues = true;
# device = "/dev/disk/by-label/CRYPT_DATA";
# };
# "bigboy" = {
# bypassWorkqueues = true;
# device = "/dev/disk/by-label/CRYPT_BIGBOY";
# };
# };
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
# fileSystems."/boot/efi" = {
# device = "/dev/disk/by-label/NIXBOOT";
# fsType = "vfat";
# };
# fileSystems."/home" = {
# device = "/dev/disk/by-label/BTRFS_ROOT";
# fsType = "btrfs";
# options = [ "subvol=home" ] ++ btrfs_options ++ btrfs_ssd;
# };
# fileSystems."/home/lelgenio/Games" = {
# device = "/dev/disk/by-label/BTRFS_DATA";
# fsType = "btrfs";
# options = [
# "subvol=@games"
# "nofail"
# ] ++ btrfs_options;
# };
# fileSystems."/home/lelgenio/Downloads/Torrents" = {
# device = "/dev/disk/by-label/BTRFS_DATA";
# fsType = "btrfs";
# options = [
# "subvol=@torrents"
# "nofail"
# ] ++ btrfs_options;
# };
# fileSystems."/home/lelgenio/Música" = {
# device = "/dev/disk/by-label/BTRFS_DATA";
# fsType = "btrfs";
# options = [
# "subvol=@music"
# "nofail"
# ] ++ btrfs_options;
# };
# fileSystems."/home/lelgenio/.local/mount/data" = {
# device = "/dev/disk/by-label/BTRFS_DATA";
# fsType = "btrfs";
# options = [
# "subvol=@data"
# "nofail"
# ] ++ btrfs_options;
# };
# fileSystems."/home/lelgenio/.local/mount/bigboy" = {
# device = "/dev/disk/by-label/BTRFS_BIGBOY";
# fsType = "btrfs";
# options = [ "nofail" ] ++ btrfs_options ++ btrfs_ssd;
# };
# 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
@ -87,20 +152,30 @@ in
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = "ondemand";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "monolith"; # Define your hostname.
services.udev.extraRules = ''
# Fix broken suspend with Logitech USB dongle
# `lsusb | grep Logitech` will return "vendor:product"
ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c547" ATTR{power/wakeup}="disabled"
# Force all disks to use mq-deadline scheduler
# For some reason "noop" is used by default which is kinda bad when io is saturated
ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="mq-deadline"
'';
# swap
fileSystems."/swap" = {
device = "/dev/disk/by-label/BTRFS_ROOT";
fsType = "btrfs";
# Note these options effect the entire BTRFS filesystem and not just this volume,
# with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
options = [ "subvol=swap" ] ++ btrfs_options ++ btrfs_ssd;
};
swapDevices = [{
device = "/swap/swapfile";
size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
}];
# fileSystems."/swap" = {
# device = "/dev/disk/by-label/BTRFS_ROOT";
# fsType = "btrfs";
# # Note these options effect the entire BTRFS filesystem and not just this volume,
# # with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
# options = [ "subvol=swap" ] ++ btrfs_options ++ btrfs_ssd;
# };
# swapDevices = [
# {
# device = "/swap/swapfile";
# size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
# }
# ];
}

View file

@ -0,0 +1,68 @@
let
btrfs_options = [
"compress=zstd:3"
"noatime"
"x-systemd.device-timeout=0"
];
btrfs_ssd = btrfs_options ++ [
"ssd"
"discard=async"
];
in
{
disko.devices = {
disk = {
bigboy_disk = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "2G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "defaults" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "bigboy";
# disable settings.keyFile if you want to use interactive password entry
passwordFile = "/tmp/secret.key"; # Interactive
# settings = {
# allowDiscards = true;
# keyFile = "/tmp/secret.key";
# };
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/@nixos" = {
mountpoint = "/";
mountOptions = btrfs_ssd;
};
"/@home" = {
mountpoint = "/home";
mountOptions = btrfs_ssd;
};
"/@swap" = {
mountpoint = "/.swapvol";
swap.swapfile.size = "32G";
};
};
};
};
};
};
};
};
};
};
}

72
hosts/phantom/default.nix Normal file
View file

@ -0,0 +1,72 @@
{
config,
pkgs,
inputs,
...
}:
{
imports = [
./vpsadminos.nix
inputs.agenix.nixosModules.default
../../system/nix.nix
./hardware-config.nix
./mastodon.nix
./nextcloud.nix
./nginx.nix
./syncthing.nix
./users.nix
./writefreely.nix
./email.nix
./forgejo.nix
];
networking.hostName = "phantom";
services.nginx.virtualHosts."lelgenio.com" = {
enableACME = true;
forceSSL = true;
root = pkgs.runCommand "www-dir" { } ''
mkdir -p $out
cat > $out/index.html <<EOF
<!DOCTYPE html>
<html lang="en">
<body>
<h1>
Nothing to see here!
<h1>
</body>
</html>
EOF
'';
};
# # Enable networking
# networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Sao_Paulo";
# Select internationalisation properties.
i18n.defaultLocale = "pt_BR.utf8";
boot.kernel.sysctl."fs.inotify.max_user_watches" = 1048576;
age = {
identityPaths = [ "/root/.ssh/id_rsa" ];
};
system.autoUpgrade = {
enable = true;
dates = "04:40";
operation = "switch";
flags = [
"--update-input"
"nixpkgs"
"--no-write-lock-file"
"-L"
];
flake = "git+https://git.lelgenio.com/lelgenio/nixos-config#phantom";
};
networking.firewall.allowedTCPPorts = [ 8745 ];
system.stateVersion = "23.05"; # Never change this
}

58
hosts/phantom/email.nix Normal file
View file

@ -0,0 +1,58 @@
{
pkgs,
inputs,
config,
...
}:
{
imports = [ inputs.nixos-mailserver.nixosModules.mailserver ];
mailserver = {
enable = true;
fqdn = "lelgenio.com";
domains = [
"lelgenio.xyz"
"git.lelgenio.xyz"
"lelgenio.com"
"git.lelgenio.com"
"social.lelgenio.com"
];
certificateScheme = "acme-nginx";
# Create passwords with
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = {
"lelgenio@lelgenio.com" = {
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
aliases = [
"postmaster@lelgenio.com"
"lelgenio@lelgenio.xyz"
"lelgenio@lelgenio.xyz"
];
};
"noreply@git.lelgenio.com" = {
hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0.";
};
"noreply@social.lelgenio.com" = {
hashedPassword = "$2b$05$DcA9xMdvHqqQMZw2.zybI.vfKsQAJtaQ/JB.t9AHu6psstWq97m2C";
};
};
};
# Prefer ipv4 and use main ipv6 to avoid reverse DNS issues
services.postfix.extraConfig = ''
smtp_address_preference = ipv4
'';
# Webmail
services.roundcube = {
enable = true;
package = pkgs.roundcube.withPlugins (p: [ p.carddav ]);
hostName = "mail.lelgenio.com";
extraConfig = ''
$config['smtp_host'] = "tls://${config.mailserver.fqdn}:587";
$config['smtp_user'] = "%u";
$config['smtp_pass'] = "%p";
$config['plugins'] = [ "carddav", "archive" ];
'';
};
}

53
hosts/phantom/forgejo.nix Normal file
View file

@ -0,0 +1,53 @@
{
lib,
pkgs,
config,
...
}:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in
{
services.nginx = {
virtualHosts.${cfg.settings.server.DOMAIN} = {
forceSSL = true;
enableACME = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
};
};
services.forgejo = {
enable = true;
database.type = "postgres";
lfs.enable = true;
settings = {
service.DISABLE_REGISTRATION = true;
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
server = {
DOMAIN = "git.lelgenio.com";
HTTP_PORT = 3000;
ROOT_URL = "https://${srv.DOMAIN}/";
};
mailer = {
ENABLED = true;
SMTP_ADDR = "mail.lelgenio.com";
FROM = "noreply@git.lelgenio.com";
USER = "noreply@git.lelgenio.com";
};
};
mailerPasswordFile = config.age.secrets.phantom-forgejo-mailer-password.path;
};
age.secrets.phantom-forgejo-mailer-password = {
file = ../../secrets/phantom-forgejo-mailer-password.age;
mode = "400";
owner = "forgejo";
};
}

View file

@ -0,0 +1,14 @@
{
config,
pkgs,
inputs,
...
}:
{
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 2); # 2 GB
}
];
}

View file

@ -0,0 +1,29 @@
{
config,
pkgs,
inputs,
...
}:
{
services.mastodon = {
enable = true;
configureNginx = true;
localDomain = "social.lelgenio.com";
smtp = {
authenticate = true;
host = "lelgenio.com";
fromAddress = "noreply@social.lelgenio.com";
user = "noreply@social.lelgenio.com";
passwordFile = config.age.secrets.phantom-mastodon-mailer-password.path;
};
streamingProcesses = 2;
extraConfig.SINGLE_USER_MODE = "true";
mediaAutoRemove.olderThanDays = 10;
};
age.secrets.phantom-mastodon-mailer-password = {
file = ../../secrets/phantom-mastodon-mailer-password.age;
mode = "400";
owner = "mastodon";
};
}

View file

@ -0,0 +1,31 @@
{
config,
pkgs,
inputs,
...
}:
{
services.nextcloud = {
enable = true;
package = pkgs.nextcloud29;
hostName = "cloud.lelgenio.com";
https = true;
config = {
adminpassFile = config.age.secrets.phantom-nextcloud.path;
};
};
services.nginx.virtualHosts.${config.services.nextcloud.hostName} = {
forceSSL = true;
enableACME = true;
};
age = {
secrets.phantom-nextcloud = {
file = ../../secrets/phantom-nextcloud.age;
mode = "400";
owner = "nextcloud";
group = "nextcloud";
};
};
}

46
hosts/phantom/nginx.nix Normal file
View file

@ -0,0 +1,46 @@
{
config,
pkgs,
lib,
...
}:
{
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
recommendedGzipSettings = true;
};
# Redirect *lelgenio.xyz -> *lelgenio.com
services.nginx.virtualHosts =
lib.mapAttrs' (key: value: lib.nameValuePair "${key}lelgenio.xyz" value)
(
lib.genAttrs
[
""
"social."
"blog."
"cloud."
"mail."
"git."
"syncthing."
]
(name: {
enableACME = true;
forceSSL = true;
locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri";
})
);
security.acme = {
acceptTerms = true;
defaults.email = "lelgenio@disroot.org";
};
networking.firewall.allowedTCPPorts = [
80
443
];
}

View file

@ -0,0 +1,29 @@
{
config,
pkgs,
inputs,
...
}:
{
services.syncthing = {
enable = true;
dataDir = "/var/lib/syncthing-data";
guiAddress = "0.0.0.0:8384";
openDefaultPorts = true;
};
services.nginx.virtualHosts."syncthing.lelgenio.com" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8384";
extraConfig =
# required when the target is also TLS server with multiple hosts
"proxy_ssl_server_name on;"
+
# required when the server wants to use HTTP Authentication
"proxy_pass_header Authorization;";
};
};
}

48
hosts/phantom/users.nix Normal file
View file

@ -0,0 +1,48 @@
{ pkgs, ... }:
{
security.rtkit.enable = true;
services.openssh = {
enable = true;
ports = [
9022
22
];
settings = {
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
# Define a user account. Don't forget to set a password with passwd.
users.mutableUsers = false;
users.users.lelgenio = {
isNormalUser = true;
description = "Leonardo Eugênio";
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
extraGroups = [
"networkmanager"
"wheel"
"docker"
"adbusers"
"bluetooth"
"corectrl"
"vboxusers"
];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
];
};
users.users.root = {
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
];
initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
};
security.sudo.wheelNeedsPassword = false;
programs.fish.enable = true;
environment.systemPackages = with pkgs; [ git ];
}

View file

@ -0,0 +1,76 @@
# This file provides compatibility for NixOS to run in a container on vpsAdminOS
# hosts.
#
# If you're experiencing issues, try updating this file to the latest version
# from vpsAdminOS repository:
#
# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix
{
config,
pkgs,
lib,
...
}:
with lib;
let
nameservers = [
"1.1.1.1"
"2606:4700:4700::1111"
];
in
{
networking.nameservers = mkDefault nameservers;
services.resolved = mkDefault { fallbackDns = nameservers; };
networking.dhcpcd.extraConfig = "noipv4ll";
systemd.services.systemd-sysctl.enable = false;
systemd.services.systemd-oomd.enable = false;
systemd.sockets."systemd-journald-audit".enable = false;
systemd.mounts = [
{
where = "/sys/kernel/debug";
enable = false;
}
];
systemd.services.rpc-gssd.enable = false;
# Due to our restrictions in /sys, the default systemd-udev-trigger fails
# on accessing PCI devices, etc. Override it to match only network devices.
# In addition, boot.isContainer prevents systemd-udev-trigger.service from
# being enabled at all, so add it explicitly.
systemd.additionalUpstreamSystemUnits = [ "systemd-udev-trigger.service" ];
systemd.services.systemd-udev-trigger.serviceConfig.ExecStart = [
""
"-udevadm trigger --subsystem-match=net --action=add"
];
boot.isContainer = true;
boot.enableContainers = mkDefault true;
boot.loader.initScript.enable = true;
boot.specialFileSystems."/run/keys".fsType = mkForce "tmpfs";
boot.systemdExecutable = mkDefault "/run/current-system/systemd/lib/systemd/systemd systemd.unified_cgroup_hierarchy=0";
# Overrides for <nixpkgs/nixos/modules/virtualisation/container-config.nix>
documentation.enable = mkOverride 500 true;
documentation.nixos.enable = mkOverride 500 true;
networking.useHostResolvConf = mkOverride 500 false;
services.openssh.startWhenNeeded = mkOverride 500 false;
# Bring up the network, /ifcfg.{add,del} are supplied by the vpsAdminOS host
systemd.services.networking-setup = {
description = "Load network configuration provided by the vpsAdminOS host";
before = [ "network.target" ];
wantedBy = [ "network.target" ];
after = [ "network-pre.target" ];
path = [ pkgs.iproute2 ];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
ExecStart = "${pkgs.bash}/bin/bash /ifcfg.add";
ExecStop = "${pkgs.bash}/bin/bash /ifcfg.del";
};
unitConfig.ConditionPathExists = "/ifcfg.add";
restartIfChanged = false;
};
}

View file

@ -0,0 +1,30 @@
{
config,
pkgs,
inputs,
...
}:
{
services.writefreely = {
enable = true;
acme.enable = true;
nginx.enable = true;
nginx.forceSSL = true;
host = "blog.lelgenio.com";
admin.name = "lelgenio";
admin.initialPasswordFile = config.age.secrets.phantom-writefreely.path;
settings.app = {
site_name = "Leo's blog";
single_user = true;
};
};
age = {
secrets.phantom-writefreely = {
file = ../../secrets/phantom-writefreely.age;
mode = "400";
owner = "writefreely";
group = "writefreely";
};
};
}

View file

@ -1,13 +1,25 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
@ -18,8 +30,7 @@
options = [ "subvol=nixos" ];
};
boot.initrd.luks.devices."pixie".device =
"/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928";
boot.initrd.luks.devices."pixie".device = "/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928";
fileSystems."/home" = {
device = "/dev/mapper/pixie";
@ -46,8 +57,7 @@
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
# networking.interfaces.veth74f3ffc.useDHCP = lib.mkDefault true;
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "pixie"; # Define your hostname.
}

View file

@ -1,16 +1,34 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
let
btrfs_options = [ "compress=zstd:3" "noatime" ];
btrfs_ssd = [ "ssd" "discard=async" ];
btrfs_options = [
"compress=zstd:3"
"noatime"
"x-systemd.device-timeout=0"
];
btrfs_ssd = [
"ssd"
"discard=async"
];
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ "i915" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@ -46,10 +64,12 @@ in
options = [ "subvol=@swap" ] ++ btrfs_ssd;
};
swapDevices = [{
swapDevices = [
{
device = "/swap/swapfile";
size = (1024 * 8);
}];
}
];
# 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
@ -59,8 +79,7 @@ in
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "rainbow"; # Define your hostname.
}

View file

@ -1,92 +1,82 @@
{ inputs, packages, ... }: rec {
{ inputs, packages, ... }:
rec {
all = [
nur
scripts
sway
unstable
sixel-patches
themes
new-packages
patches
variables
lib_extended
disko
];
nur = inputs.nur.overlay;
scripts = (import ../scripts);
sway = (import ./sway.nix);
themes = (
final: prev: {
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
orchis_theme_compact = (
final.orchis-theme.override {
border-radius = 0;
tweaks = [
"compact"
"solid"
];
}
);
nerdfonts_fira_hack = (
final.nerdfonts.override {
fonts = [
"FiraCode"
"Hack"
];
}
);
}
);
unstable = (final: prev: {
unstable = import inputs.nixpkgs-unstable {
inherit (prev) system config;
};
});
sixel-patches = (import ./sixel-patches.nix (inputs));
themes = (final: prev: {
material-wifi-icons = final.stdenv.mkDerivation rec {
name = "material-wifi-icons";
src = inputs.material-wifi-icons;
installPhase =
let dest = "$out/share/fonts/${name}";
in ''
mkdir -p ${dest}
cp material-wifi.ttf ${dest}
'';
};
papirus_red = (final.unstable.papirus-icon-theme.override { color = "red"; });
orchis_theme_compact = (final.orchis-theme.override { tweaks = [ "compact" "solid" ]; });
nerdfonts_fira_hack = (final.nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; });
});
new-packages = (final: prev: packages // {
new-packages = (
final: prev:
packages
// {
dhist = inputs.dhist.packages.${prev.system}.dhist;
demoji = inputs.demoji.packages.${prev.system}.default;
dzgui = inputs.dzgui.packages.${prev.system}.dzgui;
mpvpaper = inputs.wegank.packages.${prev.system}.mpvpaper;
tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default;
}
);
sea-orm-cli = inputs.sea-orm-cli.legacyPackages.${prev.system}.sea-orm-cli;
webcord = (prev.webcord or prev.unstable.webcord).overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ../patches/webcord/fix-reading-config.patch ];
});
nil-lsp = inputs.nil-lsp.packages.${prev.system}.nil;
});
patches = (final: prev: {
bemenu = prev.bemenu.overrideAttrs (o: {
preBuild = ''
sed -i 's/ZWLR_LAYER_SHELL_V1_LAYER_TOP/ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY/g' lib/renderers/wayland/window.c
'';
});
patches = (
final: prev: {
mySway = prev.sway.override {
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
patches = old.patches
++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
patches = old.patches ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
});
steam = prev.unstable.steam.override {
extraPkgs = pkgs: with pkgs; [ capitaine-cursors bibata-cursors ];
};
}
);
qutebrowser = prev.qutebrowser.overrideAttrs (old: {
src = prev.fetchFromGitHub {
owner = "pinusc";
repo = "qutebrowser";
rev = "feature/tree-tabs";
sha256 = "sha256-kHxZ3AzbfPJ3im1kQNn8DDlKBn+yPI4SLbSZuBQrUWY=";
lib_extended = (
final: prev: {
lib = prev.lib // rec {
# Utility function
# Input: [{v1=1;} {v2=2;}]
# Output: {v1=1;v2=2;}
mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { };
# Easily translate imperative templating code
# Input: [ 1 2 ] (num: { "v${num}" = num; })
# Output: {v1=1;v2=2;}
forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func);
};
});
});
variables = (final: prev: {
uservars = import ../user/variables.nix;
}
);
disko = final: prev: {
makeDiskoTest =
let
makeTest = import (prev.path + "/nixos/tests/make-test-python.nix");
eval-config = import (prev.path + "/nixos/lib/eval-config.nix");
in
(prev.callPackage "${inputs.disko}/tests/lib.nix" {
inherit makeTest eval-config;
}).makeDiskoTest;
});
(prev.callPackage "${inputs.disko}/tests/lib.nix" { inherit makeTest eval-config; }).makeDiskoTest;
};
}

View file

@ -1,16 +0,0 @@
inputs: (final: prev: {
alacritty = (prev.unstable.alacritty.overrideAttrs (old-alacritty: rec {
src = inputs.alacritty-sixel;
cargoDeps = old-alacritty.cargoDeps.overrideAttrs (prev.lib.const {
inherit src;
outputHash = "sha256-jqjYMVkH32z5EFgafiOYAOc5Q/IYs0jjJeqRb0L6WsY=";
});
}));
ranger = (prev.ranger.overridePythonAttrs (old-ranger: rec {
src = inputs.ranger-sixel;
checkInputs = [ ];
propagatedBuildInputs = with prev.python3Packages;
old-ranger.propagatedBuildInputs ++ [ astroid pylint pytest ];
}));
})

View file

@ -1,19 +0,0 @@
(pkgs: _: {
# bash script to let dbus know about important env variables and
# propogate them to relevent services run at the end of sway config
# see
# https://github.com/emersion/xdg-desktop-portal-wlr/wiki/"It-doesn't-work"-Troubleshooting-Checklist
# note: this is pretty much the same as /etc/sway/config.d/nixos.conf but also restarts
# some user services to make sure they have the correct environment variables
dbus-sway-environment = pkgs.writeTextFile {
name = "dbus-sway-environment";
destination = "/bin/dbus-sway-environment";
executable = true;
text = ''
systemctl --user import-environment
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
# systemctl --user stop pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
# systemctl --user start pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
'';
};
})

View file

@ -1,44 +0,0 @@
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
index bfe80ac0a..5343b8b86 100644
--- a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
+++ b/drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu_helper.c
@@ -614,7 +614,6 @@ int phm_irq_process(struct amdgpu_device *adev,
* Try to do a graceful shutdown to prevent further damage.
*/
dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU SW CTF!\n");
- orderly_poweroff(true);
} else if (src_id == VISLANDS30_IV_SRCID_CG_TSS_THERMAL_HIGH_TO_LOW)
dev_emerg(adev->dev, "ERROR: GPU under temperature range detected!\n");
else if (src_id == VISLANDS30_IV_SRCID_GPIO_19) {
@@ -633,7 +632,6 @@ int phm_irq_process(struct amdgpu_device *adev,
* Try to do a graceful shutdown to prevent further damage.
*/
dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU SW CTF!\n");
- orderly_poweroff(true);
} else
dev_emerg(adev->dev, "ERROR: GPU under temperature range detected!\n");
} else if (client_id == SOC15_IH_CLIENTID_ROM_SMUIO) {
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
index 70b560737..11373a474 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c
@@ -1444,7 +1444,6 @@ static int smu_v11_0_irq_process(struct amdgpu_device *adev,
* Try to do a graceful shutdown to prevent further damage.
*/
dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU SW CTF!\n");
- orderly_poweroff(true);
break;
case THM_11_0__SRCID__THM_DIG_THERM_H2L:
dev_emerg(adev->dev, "ERROR: GPU under temperature range detected\n");
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
index 89f0f6eb1..99024cfec 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c
@@ -1386,7 +1386,6 @@ static int smu_v13_0_irq_process(struct amdgpu_device *adev,
* Try to do a graceful shutdown to prevent further damage.
*/
dev_emerg(adev->dev, "ERROR: System is going to shutdown due to GPU SW CTF!\n");
- orderly_poweroff(true);
break;
case THM_11_0__SRCID__THM_DIG_THERM_H2L:
dev_emerg(adev->dev, "ERROR: GPU under temperature range detected\n");

View file

@ -0,0 +1,19 @@
commit 9c516cc61775a88312280f7732328d5fdf7af825
Author: lelgenio <lelgenio@disroot.org>
Date: Mon May 22 11:30:01 2023 -0300
fix: limit lowest value for corner-radious at 0
diff --git a/src/_sass/_variables.scss b/src/_sass/_variables.scss
index 9915a22..6e87a4f 100644
--- a/src/_sass/_variables.scss
+++ b/src/_sass/_variables.scss
@@ -24,7 +24,7 @@ $large-icon-size: 32px;
//
$window-radius: $default_corner + $space-size;
-$corner-radius: if($compact == 'false', $default_corner, $default_corner - 2px);
+$corner-radius: if($compact == 'false', $default_corner, max(0, $default_corner - 2px));
$material-radius: $default_corner / 2 + 4px;
$menu-radius: $default_corner / 4 + $space-size + 2px;
$popup-radius: $default_corner + $space-size + 2px;

File diff suppressed because it is too large Load diff

View file

@ -1,14 +0,0 @@
diff --git a/sources/code/main/modules/config.ts b/sources/code/main/modules/config.ts
index caf51df..41faabe 100644
--- a/sources/code/main/modules/config.ts
+++ b/sources/code/main/modules/config.ts
@@ -158,6 +158,9 @@ class Config<T> {
#read(): unknown {
const encodedData = readFileSync(this.#path+this.#pathExtension);
let decodedData = encodedData.toString();
+ if (decodedData === "")
+ return {};
+
if(this.#pathExtension === FileExt.Encrypted)
decodedData = safeStorage.decryptString(encodedData);
return JSON.parse(decodedData);

View file

@ -1,38 +0,0 @@
{ pkgs
, lib
, kernel ? pkgs.linuxPackages_latest.kernel
}:
pkgs.stdenv.mkDerivation {
pname = "amdgpu-kernel-module";
inherit (kernel) src version postPatch nativeBuildInputs;
kernel_dev = kernel.dev;
kernelVersion = kernel.modDirVersion;
modulePath = "drivers/gpu/drm/amd/amdgpu";
buildPhase = ''
BUILT_KERNEL=$kernel_dev/lib/modules/$kernelVersion/build
cp $BUILT_KERNEL/Module.symvers .
cp $BUILT_KERNEL/.config .
cp $kernel_dev/vmlinux .
make "-j$NIX_BUILD_CORES" modules_prepare
make "-j$NIX_BUILD_CORES" M=$modulePath modules
'';
installPhase = ''
make \
INSTALL_MOD_PATH="$out" \
XZ="xz -T$NIX_BUILD_CORES" \
M="$modulePath" \
modules_install
'';
meta = {
description = "AMD GPU kernel module";
license = lib.licenses.gpl3;
};
}

View file

@ -0,0 +1,64 @@
{
lib,
mkYarnPackage,
fetchFromGitHub,
fetchYarnDeps,
testers,
writeText,
runCommand,
blade-formatter,
}:
mkYarnPackage rec {
pname = "blade-formatter";
version = "1.38.2";
src = fetchFromGitHub {
owner = "shufo";
repo = pname;
rev = "v${version}";
hash = "sha256-JvILLw7Yp4g/dSsYtZ2ylmlXfS9t+2KADlBrYOJWTpg=";
};
packageJSON = ./package.json;
offlineCache = fetchYarnDeps {
yarnLock = "${src}/yarn.lock";
hash = "sha256-UFDxw3fYMzSUhZw+TCEh/dN7OioKI75LzKSnEwGPKDA=";
};
postBuild = "yarn build";
passthru.tests = {
version = testers.testVersion {
package = blade-formatter;
command = "blade-formatter --version";
};
simple = testers.testEqualContents {
assertion = "blade-formatter formats a basic blade file";
expected = writeText "expected" ''
@if (true)
Hello world!
@endif
'';
actual =
runCommand "actual"
{
nativeBuildInputs = [ blade-formatter ];
base = writeText "base" ''
@if( true ) Hello world! @endif
'';
}
''
blade-formatter $base > $out
'';
};
};
meta = with lib; {
description = "Laravel Blade template formatter";
homepage = "https://github.com/shufo/blade-formatter";
license = licenses.mit;
maintainers = with maintainers; [ lelgenio ];
};
}

120
pkgs/blade-formatter/package.json Executable file
View file

@ -0,0 +1,120 @@
{
"name": "blade-formatter",
"engines": {
"node": ">= 14.0.0"
},
"keywords": [
"php",
"formatter",
"laravel"
],
"version": "1.38.2",
"description": "An opinionated blade template formatter for Laravel",
"main": "./dist/bundle.cjs",
"types": "./dist/types/main.d.ts",
"type": "module",
"exports": {
".": {
"import": "./dist/bundle.js",
"require": "./dist/bundle.cjs",
"default": "./dist/bundle.js"
},
"./*": "./*"
},
"scripts": {
"build": "cross-env NODE_ENV=production node esbuild.js && cross-env NODE_ENV=production ESM_BUILD=true node esbuild.js",
"prepublish": "tsc src/main.ts --declaration --emitDeclarationOnly --outDir ./dist/types || true",
"watch": "node esbuild.js",
"test": "yarn run build && node --experimental-vm-modules node_modules/.bin/jest",
"lint": "eslint src -c .eslintrc.json --ext ts",
"fix": "prettier {src,__tests__}/**/*.ts --write",
"check_formatted": "prettier **/*.ts -c",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0",
"prepare": "husky install",
"bin": "cross-env ./bin/blade-formatter.cjs"
},
"bin": {
"blade-formatter": "bin/blade-formatter.cjs"
},
"author": "Shuhei Hayashibara",
"license": "MIT",
"dependencies": {
"@prettier/plugin-php": "^0.19.7",
"@shufo/tailwindcss-class-sorter": "3.0.1",
"aigle": "^1.14.1",
"ajv": "^8.9.0",
"chalk": "^4.1.0",
"concat-stream": "^2.0.0",
"detect-indent": "^6.0.0",
"find-config": "^1.0.0",
"glob": "^8.0.1",
"html-attribute-sorter": "^0.4.3",
"ignore": "^5.1.8",
"js-beautify": "^1.14.8",
"lodash": "^4.17.19",
"php-parser": "3.1.5",
"prettier": "^2.2.0",
"tailwindcss": "^3.1.8",
"vscode-oniguruma": "1.7.0",
"vscode-textmate": "^7.0.1",
"xregexp": "^5.0.1",
"yargs": "^17.3.1"
},
"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/plugin-transform-modules-commonjs": "^7.16.5",
"@babel/preset-env": "^7.13.12",
"@babel/preset-typescript": "^7.16.5",
"@types/concat-stream": "^2.0.0",
"@types/find-config": "^1.0.1",
"@types/fs-extra": "^11.0.0",
"@types/glob": "^8.0.0",
"@types/jest": "^29.0.0",
"@types/js-beautify": "^1.13.3",
"@types/lodash": "^4.14.178",
"@types/mocha": "^10.0.0",
"@types/node": "^18.0.0",
"@types/xregexp": "^4.4.0",
"@typescript-eslint/eslint-plugin": "^5.8.1",
"@typescript-eslint/parser": "^5.8.1",
"app-root-path": "^3.0.0",
"babel-jest": "^29.0.0",
"codecov": "^3.8.3",
"cross-env": "^7.0.3",
"esbuild": "^0.19.0",
"esbuild-node-externals": "^1.4.1",
"eslint": "^8.5.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^9.0.0",
"eslint-import-resolver-typescript": "^3.0.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^26.0.0",
"eslint-plugin-prettier": "^5.0.0",
"fs-extra": "^11.0.0",
"husky": "^8.0.0",
"jest": "^29.0.0",
"lint-staged": ">=10",
"source-map-loader": "^4.0.0",
"ts-jest": "^29.0.0",
"ts-loader": "^9.2.6",
"ts-migrate": "^0.1.27",
"ts-node": "^10.4.0",
"typescript": "^5.0.0"
},
"repository": {
"type": "git",
"url": "https://github.com/shufo/blade-formatter.git"
},
"files": [
"dist",
"src",
"bin",
"wasm",
"syntaxes",
"CHANGELOG.md"
],
"lint-staged": {
"*.ts": "yarn run fix"
}
}

View file

@ -1,11 +1,12 @@
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, zlib
, stdenv
, Security ? null
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
zlib,
stdenv,
Security ? null,
}:
rustPlatform.buildRustPackage rec {
@ -22,9 +23,7 @@ rustPlatform.buildRustPackage rec {
cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
Security
];
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
meta = with lib; {
description = "Check all the things.";

View file

@ -1,9 +1,11 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example' or (legacy) 'nix-build -A example'
{ pkgs, inputs }: {
plymouth-theme-red = pkgs.callPackage ./plymouth-theme-red.nix { inherit inputs; };
{ pkgs, inputs }:
{
blade-formatter = pkgs.callPackage ./blade-formatter { };
cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { };
lipsum = pkgs.callPackage ./lipsum.nix { inherit inputs; };
amdgpu-kernel-module = pkgs.callPackage ./amdgpu-kernel-module.nix { };
lipsum = pkgs.callPackage ./lipsum.nix { };
emmet-cli = pkgs.callPackage ./emmet-cli.nix { };
material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { };
}

27
pkgs/emmet-cli.nix Normal file
View file

@ -0,0 +1,27 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "emmet-cli";
version = "0.0.1";
src = fetchFromGitHub {
owner = "Delapouite";
repo = "emmet-cli";
rev = "407b0e8c59f65f205967d6be71105e0bd2001d62";
hash = "sha256-8lDgD1eIc2r5aB2baaiHKbkFdAxErX5p96MNqztR9rg=";
};
npmDepsHash = "sha256-Utgk/Cw83ffGr2/4aNkp3n3wSOojLZLA7OR+OakYBC0=";
dontNpmBuild = true;
meta = {
description = "Emmet command line interface";
homepage = "https://github.com/Delapouite/emmet-cli";
mainProgram = "emmet";
};
}

View file

@ -1,23 +1,32 @@
{ pkgs, inputs }:
pkgs.stdenv.mkDerivation rec {
{
stdenv,
fetchFromGitHub,
pkg-config,
vala,
wrapGAppsHook,
}:
stdenv.mkDerivation rec {
pname = "lipsum";
version = "0.0.1";
src = inputs.lipsum;
src = fetchFromGitHub {
owner = "hannenz";
repo = "lipsum";
rev = "0fb31e6ede10fbd78d7652f5fb21670cddd8e3ed";
hash = "sha256-a6uv0tJulN9cAGWxvQr8B0PUJEY8Rx4e759xzS66Xlo=";
};
buildInputs = with pkgs; [
nativeBuildInputs = [
pkg-config
glib
gtk3.dev
vala
wrapGAppsHook
];
makeFlags = [
"PRG=${pname}"
];
makeFlags = [ "PRG=${pname}" ];
installPhase = ''
install -Dm 755 "$pname" "$out/bin/$pname"
install -Dm 755 "./data/de.hannenz.lipsum.gschema.xml" "$out/share/glib-2.0/schemas/de.hannenz.lipsum.gschema.xml"
glib-compile-schemas "$out/share/glib-2.0/schemas/"
'';
}

View file

@ -0,0 +1,16 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
pname = "material-wifi-icons";
version = "0.0.1";
src = fetchFromGitHub {
owner = "dcousens";
repo = "material-wifi-icons";
rev = "2daf6b3d96d65beb2a3e37a9a53556aab3826d97";
hash = "sha256-KykU5J7SdpBDG+6rkD//XeHd+6pK3qabe+88RduhwKc=";
};
installPhase = ''
install -D material-wifi.ttf $out/share/fonts/${pname}
'';
}

View file

@ -1,25 +0,0 @@
{ pkgs, inputs }:
pkgs.stdenv.mkDerivation rec {
pname = "red-loader-plymouth";
version = "0.0.1";
src = inputs.plymouth-themes;
buildInputs = [
pkgs.git
];
configurePhase = ''
mkdir -p $out/share/plymouth/themes/
'';
buildPhase = ''
'';
installPhase = ''
cp -r pack_4/red_loader $out/share/plymouth/themes
cat pack_4/red_loader/red_loader.plymouth | sed "s@\/usr\/@$out\/@" > \
$out/share/plymouth/themes/red_loader/red_loader.plymouth
'';
}

11
scripts/_sway_idle_toggle Normal file
View file

@ -0,0 +1,11 @@
#!/bin/sh
swayidlectl() {
systemctl --user $1 swayidle.service
}
if swayidlectl status > /dev/null; then
swayidlectl stop
else
swayidlectl start
fi

26
scripts/auto_connect_gamepad Executable file
View file

@ -0,0 +1,26 @@
#!/bin/sh
list_paired_controllers() {
bluetoothctl devices Paired | grep -i 'controller' | cut -d' ' -f2
}
count_connected_controllers() {
bluetoothctl devices Connected | grep -i 'controller' | wc -l
}
try_to_connect_to_all_controllers() {
list_paired_controllers | while read paired_controller; do
echo "Trying to connect to controller $paired_controller"
bluetoothctl connect "$paired_controller"
done
}
while true; do
echo "looping"
if test "$(count_connected_controllers)" -ne 0 ; then
echo "there is a controller connected, not attempting to connect to any other"
sleep 10s
continue
fi
try_to_connect_to_all_controllers
done

10
scripts/color_picker Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
set -xe
grim -g "$(slurp -b aabbcc00 -p)" - |
convert - txt:- |
grep -oE '#[0-9A-Fa-f]{6}' |
wl-copy -n
notify-send "$(wl-paste)" "Copied to clipboard"

View file

@ -1,8 +1,10 @@
(final: prev:
with prev;
let
(
final: prev:
with prev;
let
import_script = (_: path: import (path) { inherit pkgs lib; });
create_script = (name: text: runtimeInputs:
create_script = (
name: text: runtimeInputs:
let
script_body = pkgs.writeTextFile {
inherit name;
@ -16,32 +18,123 @@ let
inherit name runtimeInputs;
text = ''exec ${script_body} "$@"'';
checkPhase = "";
}));
create_scripts =
lib.mapAttrs (name: deps: create_script name ./${name} deps);
in
create_scripts
{
})
);
create_scripts = lib.mapAttrs (name: deps: create_script name ./${name} deps);
pass = pkgs.pass.withExtensions (ex: with ex; [ pass-otp ]);
in
create_scripts {
br = [ ];
bmenu = [ final.bemenu final.dhist fish j4-dmenu-desktop jq sway ];
down_meme = [ wl-clipboard yt-dlp libnotify ];
wl-copy-file = [ wl-clipboard fish ];
bmenu = [
final.bemenu
final.dhist
fish
j4-dmenu-desktop
jq
sway
];
down_meme = [
wl-clipboard
yt-dlp
libnotify
];
wl-copy-file = [
wl-clipboard
fish
];
_diffr = [ diffr ];
_thunar-terminal = [ final.terminal ];
kak-pager = [ fish final._diffr ];
_sway_idle_toggle = [ final.swayidle ];
kak-pager = [
fish
final._diffr
];
kak-man-pager = [ final.kak-pager ];
musmenu = [ mpc-cli final.wdmenu trash-cli xdg-user-dirs libnotify sd wl-clipboard ];
showkeys =
[ ]; # This will not work unless programs.wshowkeys is enabled systemwide
helix-pager = [
fish
final._diffr
];
helix-man-pager = [ final.helix-pager ];
musmenu = [
mpc-cli
final.wdmenu
trash-cli
xdg-user-dirs
libnotify
sd
wl-clipboard
];
showkeys = [ ]; # This will not work unless programs.wshowkeys is enabled systemwide
terminal = [ alacritty ];
playerctl-status = [ playerctl ];
wpass = [ final.wdmenu fd pass sd wl-clipboard wtype ];
screenshotsh =
[ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ];
volumesh = [ pulseaudio libnotify ];
pulse_sink = [ pulseaudio pamixer final.wdmenu ];
} // lib.mapAttrs import_script {
pass-export = [
pass2csv
gnupg
];
wpass = [
final.wdmenu
fd
pass
sd
wl-clipboard
wtype
];
screenshotsh = [
capitaine-cursors
grim
slurp
jq
sway
wl-clipboard
xdg-user-dirs
];
volumesh = [
pulseaudio
libnotify
];
pulse_sink = [
pulseaudio
pamixer
final.wdmenu
];
color_picker = [
grim
slurp
wl-clipboard
libnotify
imagemagick
];
dzadd = [
procps
libnotify
final.wdmenu
jq
mpv
pqiv
python3Packages.deemix
mpc-cli
final.mpdDup
];
mpdDup = [
mpc-cli
perl
];
readQrCode = [
grim
zbar
wl-clipboard
];
auto_connect_gamepad = [
bluez
coreutils
gnugrep
];
vrr-fullscreen = [ ];
}
// lib.mapAttrs import_script {
wdmenu = ./wdmenu.nix;
wlauncher = ./wlauncher.nix;
_gpg-unlock = ./_gpg-unlock.nix;
})
}
)

View file

@ -6,9 +6,11 @@ cd "$DIR"
yt-dlp --merge-output-format mp4 "$(wl-paste)"
FILENAME="$(ls)"
FILENAME="$(ls | head -n1)"
cp * "$HOME/Downloads/Memes/$FILENAME"
mkdir -p "$HOME/Downloads/Memes"
cp "$FILENAME" "$HOME/Downloads/Memes/$FILENAME"
wl-copy-file "$HOME/Downloads/Memes/$FILENAME"

176
scripts/dzadd Executable file
View file

@ -0,0 +1,176 @@
#!/bin/sh
set -ex
tmpf=$(mktemp /tmp/dzadd.XXXXXX)
clean() {
test "$?" -eq "0" ||
notify-send "Exiting with error"
set +e
kill "$mpvPid"
rm -f "$tmpf"
}
trap clean EXIT
main() {
sType=$(printf "Track\nAlbum\nArtist" | wdmenu | tr '[:upper:]' '[:lower:]')
test -n "$sType" || exit 1
query=$(echo -n | wdmenu | sed 's/[^ a-z0-9]//g;s/ /+/g')
test -n "$query" || exit 1
case "$sType" in
track)
deezer_category="track"
jqFilter='.data[]| "\(.title) - \(.album.title) - \(.artist.name) |\(.id)"'
;;
album)
deezer_category="album"
jqFilter='.data[]| "\(.nb_tracks) - \(.title) - \(.artist.name) |\(.id)"'
;;
artist)
deezer_category="artist"
jqFilter='.data[]| "\(.nb_fan) - \(.name) |\(.id)"'
;;
top50)
deezer_category="artist"
jqFilter='.data[]| "\(.nb_fan) - \(.name) |\(.id)"'
;;
*)
exit 1
;;
esac
curl -m30 -s "api.deezer.com/search/${deezer_category}?q=${query}" |
sed 's/|//g' |
jq -r "$jqFilter" >"$tmpf"
pick_song
}
pick_song() {
choice=$(cat "$tmpf" | cut -d\| -f1 | wdmenu)
choice=$(grep "$choice" "$tmpf" | head -n 1)
choiceId=$(printf "%s" "$choice" | cut -d\| -f2)
case "$sType" in
top50)
choiceUrl="http://deezer.com/${deezer_category}/${choiceId}/top?=limit=50"
;;
*)
choiceUrl="http://deezer.com/${deezer_category}/${choiceId}"
;;
esac
pick_action "$choiceUrl"
}
pick_action() {
choiceUrl="$1"
COMMON_CHOISES="View Image\nDownload\nCopy URL\nAnother"
choice=$(printf "Preview\n${COMMON_CHOISES}" | wdmenu)
case "$choice" in
"Preview")
common_preview
;;
"View Image")
common_art
;;
"Download")
common_download
;;
"Copy URL")
wl-copy
;;
"Another")
pick_song
;;
*)
exit 1
;;
esac
}
common_preview() {
case "$sType" in
track)
;;
album)
preview_suffix=tracks
;;
artist)
preview_suffix=top
;;
top50)
preview_suffix=top
;;
*)
exit 1
;;
esac
choicePreview=$(
curl -m30 -s "http://api.deezer.com/${deezer_category}/${choiceId}/${preview_suffix}" |
jq -r '.preview, .data[0].preview | select(. != null)'
)
mpv --quiet --volume=50 --no-resume-playback "$choicePreview" &
mpvPid="$!"
choice=$(printf "$COMMON_CHOISES" | wdmenu -p 'Download?')
kill "$mpvPid" || true
}
common_art() {
case "$sType" in
track)
image_filter='.album.cover_big'
;;
album)
image_filter='.cover_big'
;;
artist)
image_filter='.picture_big'
;;
top50)
image_filter='.picture_big'
;;
*)
exit 1
;;
esac
curl -m30 -s "api.deezer.com/${deezer_category}/${choiceId}" |
jq -r "$image_filter" |
xargs curl -m30 -s |
pqiv -
pick_action
}
common_download() {
notify-send "Starting Download"
deemix "$choiceUrl" </dev/null &&
notify-send "Download Successful" ||
notify-send "Download Failed"
mpc add /
mpdDup
}
main

3
scripts/helix-man-pager Executable file
View file

@ -0,0 +1,3 @@
#!/bin/sh
col -b -x | hx

28
scripts/helix-pager Normal file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env fish
if test (count $argv) -ne 0
for i in $argv
cat "$i"
end | eval (status filename)
exit 0
end
set term_line_count (tput lines)
while read line
set -a input_lines "$line"
set input_line_count (printf "%s\n" $input_lines | wc -l)
if test "$term_line_count" -lt "$input_line_count"
begin
printf "%s\n" $input_lines
cat
end | hx
exit 0
end
end
printf "%s\n" $input_lines

View file

@ -1,6 +1,5 @@
#!/bin/sh
col -b -x |
kak -e '
map global normal q :q<ret>;
set buffer filetype man;

5
scripts/mpdDup Executable file
View file

@ -0,0 +1,5 @@
#!/bin/sh
mpc playlist -f '%position%\t%file%' |
sort -k 2 |
perl -ne 'm/(.*)\t(.*)/; print "$1\n" if $2 eq $prev; $prev=$2' |
mpc del

10
scripts/pass-export Executable file
View file

@ -0,0 +1,10 @@
#!/bin/sh
if test -z "$PASSWORD_STORE_DIR"; then
PASSWORD_STORE_DIR="$HOME/.password-store"
fi
pass2csv "$PASSWORD_STORE_DIR" "$HOME/passwords.csv" \
-f User '(user|login)(:\s*)?' \
-f TOTP 'otpauth(:)?' \
-f URL 'url(:\s*)?'

View file

@ -2,13 +2,9 @@
PLAYERCTL="playerctl --ignore-player=mpd"
STATUS="$(env LC_ALL=C $PLAYERCTL status title)"
TITLE="$($PLAYERCTL metadata title)"
ARTIST="$($PLAYERCTL metadata artist)"
test "$STATUS" = "Playing" \
&& printf " %s" "$TITLE" \
&& test -n "$ARTIST" \
&& printf " - %s" "$ARTIST"
test "$(LC_ALL=C $PLAYERCTL status)" = "Playing" \
&& printf " %s" "$($PLAYERCTL metadata title)" \
&& test -n "$($PLAYERCTL metadata artist)" \
&& printf " - %s" "$($PLAYERCTL metadata artist)"
echo ""

18
scripts/readQrCode Executable file
View file

@ -0,0 +1,18 @@
#!/bin/sh
set -o pipefail
main() {
if wl-paste | zbarimg -q --raw - | wl-copy
then
notify-send "Copied" "QrCode was copied to clipboard"
rm "$LOGFILE"
else
notify-send "Failed to read QrCode" "Log file is '$LOGFILE'"
fi
}
LOGFILE=$(mktemp /tmp/qrcode-XXXXXXXX.log)
main > "$LOGFILE" 2>&1

View file

@ -45,7 +45,7 @@ get_vol_system() {
}
is_muted_system() {
pamixer --get-mute >/dev/null
test "$(pamixer --get-mute)" = "true" >/dev/null
}
change_vol_system() {

28
scripts/vrr-fullscreen Executable file
View file

@ -0,0 +1,28 @@
#!/usr/bin/env bash
# List of supported outputs for VRR
output_vrr_whitelist=(
"DP-1"
"DP-2"
)
# Toggle VRR for fullscreened apps in prespecified displays to avoid stutters while in desktop
swaymsg -t subscribe -m '[ "window" ]' | while read window_json; do
window_event=$(echo ${window_json} | jq -r '.change')
# Process only focus change and fullscreen toggle
if [[ $window_event = "focus" || $window_event = "fullscreen_mode" ]]; then
output_json=$(swaymsg -t get_outputs | jq -r '.[] | select(.focused == true)')
output_name=$(echo ${output_json} | jq -r '.name')
# Use only VRR in whitelisted outputs
if [[ ${output_vrr_whitelist[*]} =~ ${output_name} ]]; then
output_vrr_status=$(echo ${output_json} | jq -r '.adaptive_sync_status')
window_fullscreen_status=$(echo ${window_json} | jq -r '.container.fullscreen_mode')
# Only update output if nesseccary to avoid flickering
[[ $output_vrr_status = "disabled" && $window_fullscreen_status = "1" ]] && swaymsg output "${output_name}" adaptive_sync 1
[[ $output_vrr_status = "enabled" && $window_fullscreen_status = "0" ]] && swaymsg output "${output_name}" adaptive_sync 0
fi
fi
done

View file

@ -1,12 +1,4 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) dmenu;
available_menus = {
bmenu = "bmenu";
rofi = "rofi -dmenu -sort";
};
menu_cmd = available_menus.${dmenu};
in
pkgs.writeShellScriptBin "wdmenu" ''
exec ${menu_cmd} "$@"
exec bmenu "$@"
''

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) dmenu;
inherit (config.my) dmenu;
available_menus = {
bmenu = "bmenu run";
rofi = "rofi -show drun -sort";

View file

@ -10,12 +10,13 @@ if test (count $argv) != 1
end
set -a file (realpath $argv[1])
set -a url (string escape --style=url "$file")
set -e argv[1]
if test -d "$file"
die 1 "Cannot copy directories" >&2
else if test -f "$file"
wl-copy $argv -t text/uri-list "file:///$file"
wl-copy $argv -t text/uri-list "file:///$url"
else
die 2 "No file found" >&2
end

View file

@ -1,12 +1,4 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) dmenu;
available_menus = {
bmenu = "bmenu run";
rofi = "rofi -show drun -sort";
};
menu_cmd = available_menus.${dmenu};
in
pkgs.writeShellScriptBin "wlauncher" ''
exec ${menu_cmd} "$@"
exec bmenu run "$@"
''

View file

@ -1,3 +1,5 @@
#!/bin/sh
_gpg-unlock
set -xe
@ -7,8 +9,18 @@ find_file() {
wdmenu -p "Password" $@
}
main() {
print_actions_for_entry() {
echo "Autotype"
if test -n "$username"; then
echo "Username -> $username"
fi
echo "Password"
if test -n "$otp"; then
echo "OTP"
fi
}
main() {
test -n "$PASSWORD_STORE_DIR" &&
cd "$PASSWORD_STORE_DIR" ||
cd "$HOME/.password-store"
@ -19,8 +31,9 @@ main() {
username=`pass show "$entry" 2>/dev/null | perl -ne 'print $2 if /^(login|user|email): (.*)/'`
password=`pass show "$entry" 2>/dev/null | head -n 1`
otp=`pass otp "$entry" 2>/dev/null` || true
action=`printf "Autotype\nUsername -> $username\nPassword" | wdmenu -p Action`
action="$(print_actions_for_entry | wdmenu -p Action)"
case $action in
Autotype)
@ -30,6 +43,8 @@ main() {
printf '%s' "$username" | wl-copy;;
Password)
printf '%s' "$password" | wl-copy;;
OTP)
pass otp "$entry" | wl-copy;;
esac
}

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,13 @@
age-encryption.org/v1
-> ssh-rsa BwwxHg
Mnc+/tJ0QqxHkg2nl9gEkz5Oj1RgxtOZnD5gRv66ISUOqZhNm1+F+xVEdKn843/q
/WzH0f1cTF9NXP8vIaEo//bMmp50obJAd+JNovJxV+0gb9L55Nu7ayvK+eyk6j5n
eb8TxUnwh5BPkEyc6akDh/O49GXzLlVoFD6Ik/0f3YCqUDNAYOl2bsssXtevCeK/
WEPoCFGhZfNUrOo/0eAhiujZZ5zVb0CWNqXi8VTe2eWOE20VJULcN13TEyO3ZePx
bAPBmDfS5GgGlV4INWxVLaIMDrzlm0tYozbBNNUbdLFFOhIOrgvay9RWxdk0u2hJ
MPKoKsJ96EFxrbZJdS0W7a+aZk/Q3A3Civ2rtPx+5UANhmlY8e1lUHa26e1vA4K7
ApoMtDyCbuZ9FbLurwl9zO64wWP68aKzuyKOIw+wpy41NQ/PcViSY8KNG9Pt7A2N
CcOkByx+rwz+JdNHbOF8O4FFG4fNSWn7SvVtu5ymGgVi1bOd8PdJpjDR+6Is0SX7
--- DHNyITb7ZseEV58MOD/zHeH5vff0hhlbKg27rlYECGk
ÆJ…¨Úãè·<hUs/¿ïš}ó´Zi`ˆ JŸ°z5ùÃgõãŸ%€ì‡`¤º%/˜‚±<01>ˆ„á-Î<x—íõÉ’|

View file

@ -0,0 +1,15 @@
age-encryption.org/v1
-> ssh-rsa BwwxHg
bpGCgyaAPDutva1Gp/YPuek6IZTXJHKb7+oIAV/x+7Ry4Oci9zM2VWvPVE/rPE/d
0AzBX1NvsWBB005w42RfiErk4FQYRCouwNR1FNjUWNdQOmku++RPfxBXspAFIDkQ
yM7mqbhwf5by5rZY+2kl20QxkErkVtZolus1am9RV4uyXfdPaRcKjWOuPiEim42d
YdeCXq4nJGxlL3tRunIqLIZGhV08wHBl7Dubhn9hdD6/ekDk0RloVTBDZUY5tUPL
dJk+bfFPI0DimytzCwyQbWEHOkdiWYSNzbx2JhTSvuqefHP1UzB2LukaQc2gOJFV
mVKvQuGpOWknytMUhM6zCTvRw4OQutAZd96OniQYTas/vnmfT2l2n9aMEzQK157A
U9DmsvhBypILiQSPpA7QrGB1QVuRjAFJA86ASY1FAT6MdBBK4vZ8fK7mpT06JO/n
gwv+UlvFBziWHzA/1GOLrfD+ExjmbeucRZr5XGszrAaK/7GPZt4LF69hRmKegL94
-> 9I3~SC,<-grease M$2 RibFL]C
uR6MirHtTc4Tyrcw3T2my+BN2Q
--- 56zk9BqgwQqNymga1mUDgpvtfIpMy5i/JnaSXbjx6jk
ÞQÚÞ—Ž)NâÿÚ¦¨Žß-†ŸÀ ÷ÑDz-ÖIÅß-°]p$ÉX5æT·PU=u;kæ8}wÁV¦mšç=

View file

@ -0,0 +1,16 @@
age-encryption.org/v1
-> ssh-rsa BwwxHg
BUJ9L1bwZ0RWj3FmMghmZDkY4iuc0gujS3Rfat+hj/pg+MALZ69Tovc5RnqmOZT/
pTGPTzWj3WO70YU+wCUHKZ74JcKdL3wSD1FWOWYRvyDV3gxZjDTjw4Grs+sH9M4Z
MrhdoyY95fhmGZHJ7Qkx/aKCAK/OaFSu5Vhh37ykmLd1gQ9NJYQ+G3lLr1Mrqjd/
1QaBqJtJpAFTA0eCd3+oBtQ/qgHD2ZBJcOmkS9sRC6S4YKNoyoDifTbL29aJC4f/
08myI0WH/ApbtN1hWuiVWibmy/9/76IAvgUqi8fULNY5w7Otz3nKGV+mDA5+oD11
jCHZJdcec9JFyZ/V2mh/PoHpNawksNPy85eJ0MpM1avM25Qib8kWJM6fnZb7uJzt
DsYCl2q4ILnTaieuTSJUfgacKbrwSv7MQfgdh1SkXAShyZ7aSCoDhsgSdOVwYoAX
Mspm0NtodeV7493qZwYspO6H0xbfh20vXa1DOeMt98T1iP0aYYhfRXkb0wACx1QF
-> \z/RLj3S-grease cmv( uCkG*= .cX3S 9r^&
OVTVTnB3PjD4COiRCtQ
--- EhfDqxfjLIHF9Sa7V4ytO1xsRK8p23WDsWcB9/B9fRw
.ß=–£))/’ö‰Í¹êÒ‹#´ýLÁƒŒÓ‰Ž—|p
7 ÍñÄKä®7ò²Š@üCJfš:w6Pè•@@/N<>7¿

Binary file not shown.

View file

@ -2,9 +2,19 @@ let
main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15";
in
{
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [
main_ssh_public_key
];
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [
main_ssh_public_key
];
"gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
"monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ];
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
"monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ];
"phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ];
"phantom-writefreely.age".publicKeys = [ main_ssh_public_key ];
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
"phantom-forgejo-mailer-password.age".publicKeys = [ main_ssh_public_key ];
"phantom-mastodon-mailer-password.age".publicKeys = [ main_ssh_public_key ];
}

6
settings/default.nix Normal file
View file

@ -0,0 +1,6 @@
{ lib, ... }:
{
options = {
my = lib.mkOption { };
};
}

4
switch
View file

@ -1,5 +1,9 @@
#!/usr/bin/env bash
nix fmt
git --no-pager diff
sudo nice ionice \
nixos-rebuild \
switch \

12
switch-phantom Executable file
View file

@ -0,0 +1,12 @@
#!/bin/sh
nix fmt
git --no-pager diff
nixos-rebuild switch --flake .#phantom \
--update-input nixpkgs \
--no-write-lock-file \
--build-host phantom \
--target-host phantom \
"$@"

17
system/bluetooth.nix Normal file
View file

@ -0,0 +1,17 @@
{ pkgs, ... }:
{
services.blueman.enable = true;
hardware.bluetooth = {
enable = true;
settings = {
General = {
DiscoverableTimeout = 0;
# Discoverable = true;
AlwaysPairable = true;
};
Policy = {
AutoEnable = true;
};
};
};
}

View file

@ -1,6 +1,13 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
lib,
inputs,
...
}:
{
console = {
font = "ter-120n";
font = "${pkgs.terminus_font}/share/consolefonts/ter-120n.psf.gz";
packages = [ pkgs.terminus_font ];
earlySetup = false;
};
@ -16,6 +23,11 @@
"rd.systemd.show_status=false"
"rd.udev.log_level=3"
"udev.log_priority=3"
# Disable password timeout
"luks.options=timeout=0"
"rd.luks.options=timeout=0"
"rootflags=x-systemd.device-timeout=0"
];
initrd.systemd.enable = true;
@ -31,9 +43,9 @@
};
plymouth = {
enable = true;
theme = "red_loader";
themePackages = [
pkgs.plymouth-theme-red
theme = lib.mkIf (config.my.desktop == "sway") "red_loader";
themePackages = with pkgs; [
(adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; })
];
};
};

View file

@ -1,4 +1,10 @@
{ pkgs, lib, config, ... }: {
{
pkgs,
lib,
config,
...
}:
{
services.cachix-watch-store = {
enable = true;
cacheName = "lelgenio";

View file

@ -1,119 +1,42 @@
# 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, inputs, ... }: {
imports = [ ./gamemode.nix ./cachix.nix ./media-packages.nix ./boot.nix ];
packages.media-packages.enable = true;
{
config,
pkgs,
inputs,
...
}:
{
imports = [
./gamemode.nix
./cachix.nix
./media-packages.nix
./boot.nix
./thunar.nix
./nix.nix
./fonts.nix
./sound.nix
./bluetooth.nix
./locale.nix
./users.nix
./containers.nix
./network.nix
../settings
];
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernel.sysctl = {
"vm.max_map_count" = 1048576; # Needed by DayZ
};
my = import ../user/variables.nix;
zramSwap.enable = true;
programs.adb.enable = true;
services.udev.packages = [ pkgs.android-udev-rules ];
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Sao_Paulo";
# Select internationalisation properties.
i18n.defaultLocale = "pt_BR.utf8";
# Enable the GNOME Desktop Environment.
# services.xserver.displayManager.gdm.enable = true;
# services.xserver.desktopManager.gnome.enable = true;
# services.xserver.displayManager.autologin.user = "lelgenio";
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "colemak";
};
console.keyMap = "colemak";
# Enable CUPS to print documents.
# services.printing.enable = true;
services.flatpak.enable = true;
virtualisation.docker.enable = true;
virtualisation.docker.autoPrune.enable = true;
programs.firejail.enable = true;
security.rtkit.enable = true;
services.openssh = {
enable = true;
kbdInteractiveAuthentication = false;
passwordAuthentication = false;
permitRootLogin = "no";
ports = [ 9022 ];
};
# programs.ssh = {
# startAgent = true;
# extraConfig = ''
# AddKeysToAgent yes
# '';
# };
## Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
wireplumber.enable = true;
pulse.enable = true;
alsa.enable = true;
jack.enable = true;
};
services.blueman.enable = true;
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
settings = {
General = {
DiscoverableTimeout = 0;
# Discoverable = true;
AlwaysPairable = true;
};
Policy = { AutoEnable = true; };
};
};
# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.mutableUsers = false;
users.users.lelgenio = {
isNormalUser = true;
description = "Leonardo Eugênio";
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" ];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
];
};
users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
# services.getty.autologinUser = "lelgenio";
programs.fish.enable = true;
# TODO: enable thunar plugins
# programs.thunar.enable = true;
# programs.thunar.plugins = with pkgs.xfce; [ thunar-archive-plugin thunar-volman ];
services.gvfs.enable = true; # Mount, trash, and other functionalities
services.tumbler.enable = true; # Thumbnail support for images
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
services.libinput.enable = true;
packages.media-packages.enable = true;
environment.systemPackages = with pkgs; [
pinentry-curses
pavucontrol
glib # gsettings
@ -122,63 +45,15 @@
gnome3.adwaita-icon-theme # default gnome cursors
];
fonts.enableDefaultFonts = true;
fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
nerdfonts_fira_hack
];
services.geoclue2.enable = true;
# programs.qt5ct.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
services.pcscd.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "curses";
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
security.sudo.wheelNeedsPassword = false;
nix.registry.nixpkgs.flake = inputs.nixpkgs;
nix = {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
optimise.automatic = true;
settings = {
auto-optimise-store = true;
substituters = [
# "http://nixcache.lelgenio.1337.cx:5000"
"https://hyprland.cachix.org"
"https://lelgenio.cachix.org"
"https://wegank.cachix.org"
];
trusted-public-keys = [
# "nixcache.lelgenio.1337.cx:zxCfx7S658llDgAUG0JVyNrlAdFVvPniSdDOkvfTPS8="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"lelgenio.cachix.org-1:W8tMlmDFLU/V+6DlChXjekxoHZpjgVHZpmusC4cueBc="
"wegank.cachix.org-1:xHignps7GtkPP/gYK5LvA/6UFyz98+sgaxBSy7qK0Vs="
];
};
package = pkgs.unstable.nixFlakes; # or versioned attributes like nixVersions.nix_2_8
extraOptions = ''
experimental-features = nix-command flakes
systemd.extraConfig = ''
DefaultTimeoutStopSec=10s
'';
};
services.logind.extraConfig = ''
HandlePowerKey=suspend
'';
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave

20
system/containers.nix Normal file
View file

@ -0,0 +1,20 @@
{ pkgs, ... }:
{
services.flatpak.enable = true;
virtualisation.docker = {
enable = true;
autoPrune = {
enable = true;
dates = "monthly";
flags = [
"--all"
"--volumes"
];
};
};
programs.extra-container.enable = true;
programs.firejail.enable = true;
}

10
system/fonts.nix Normal file
View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
fonts.enableDefaultPackages = true;
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
nerdfonts_fira_hack
];
}

View file

@ -1,8 +1,16 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
programs.gamemode.enable = true;
programs.gamemode.enableRenice = true;
programs.gamemode.settings = {
general = { renice = 10; };
general = {
renice = 10;
};
# Warning: GPU optimisations have the potential to damage hardware
gpu = {

52
system/gitlab-runner.nix Normal file
View file

@ -0,0 +1,52 @@
{ pkgs, lib, ... }:
{
mkNixRunner =
registrationConfigFile: with lib; rec {
# File should contain at least these two variables:
# `CI_SERVER_URL`
# `REGISTRATION_TOKEN`
inherit registrationConfigFile; # 2
dockerImage = "alpine:3.18.2";
dockerAllowedImages = [ dockerImage ];
dockerVolumes = [
"/etc/nix/nix.conf:/etc/nix/nix.conf:ro"
"/nix/store:/nix/store:ro"
"/nix/var/nix/db:/nix/var/nix/db:ro"
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
];
dockerDisableCache = true;
preBuildScript = pkgs.writeScript "setup-container" ''
mkdir -p -m 0755 /nix/var/log/nix/drvs
mkdir -p -m 0755 /nix/var/nix/gcroots
mkdir -p -m 0755 /nix/var/nix/profiles
mkdir -p -m 0755 /nix/var/nix/temproots
mkdir -p -m 0755 /nix/var/nix/userpool
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root
mkdir -p -m 0700 "$HOME/.nix-defexpr"
. ${pkgs.nix}/etc/profile.d/nix.sh
${pkgs.nix}/bin/nix-env -i ${
concatStringsSep " " (
with pkgs;
[
nix
cacert
git
openssh
]
)
}
'';
environmentVariables = {
ENV = "/etc/profile";
USER = "root";
NIX_REMOTE = "daemon";
PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin";
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
};
tagList = [ "nix" ];
};
}

View file

@ -1,16 +1,44 @@
# 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, ... }: {
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
{ pkgs, lib, ... }:
{
services.xserver = {
enable = true;
desktopManager.gnome = {
enable = true;
# Enable VRR (Variable Refresh Rate)
extraGSettingsOverridePackages = with pkgs; [ gnome.mutter ];
extraGSettingsOverrides = ''
[org.gnome.mutter]
experimental-features=['variable-refresh-rate', 'scale-monitor-framebuffer']
'';
};
displayManager.gdm.enable = true;
};
# Workaround for https://github.com/NixOS/nixpkgs/issues/103746
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
services.displayManager.autoLogin = {
enable = true;
user = "lelgenio";
};
programs.kdeconnect = {
enable = true;
package = pkgs.gnomeExtensions.gsconnect;
};
hardware.opentabletdriver.enable = lib.mkForce false;
# services.xserver.displayManager.autologin.user = "lelgenio";
environment.systemPackages = with pkgs;
with gnome; [
environment.systemPackages =
with pkgs;
with gnome;
[
gnome-tweaks
dconf-editor
chrome-gnome-shell
gnomeExtensions.quick-settings-audio-devices-hider
];
}

97
system/greetd.nix Normal file
View file

@ -0,0 +1,97 @@
{
lib,
pkgs,
config,
...
}:
let
inherit (config.my)
key
accent
font
theme
desktop
;
cfg = config.login-manager.greetd;
in
{
options.login-manager.greetd = {
enable = lib.mkEnableOption "Use greetd as login manager";
};
config = lib.mkIf cfg.enable {
# Enable the X11 windowing system.
services.xserver.enable = false;
# enable sway window manager
programs.sway = {
enable = true;
package = pkgs.mySway;
wrapperFeatures.gtk = true;
};
services.dbus.enable = true;
programs.wshowkeys.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
# Always pick the first monitor, this is fine since I only ever use a single monitor
wlr.settings.screencast.chooser_type = "none";
# gtk portal needed to make gtk apps happy
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
services.greetd =
let
greetd_main_script = pkgs.writeShellScriptBin "main" ''
export XDG_CURRENT_DESKTOP=sway GTK_THEME="${theme.gtk_theme}" XCURSOR_THEME="${theme.cursor_theme}"
${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -c ${desktop}
swaymsg exit
'';
swayConfig = pkgs.writeText "greetd-sway-config" ''
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "${greetd_main_script}/bin/main"
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot'
input "*" {
repeat_delay 200
repeat_rate 30
xkb_layout us(colemak)
xkb_numlock enabled
xkb_options lv3:lsgt_switch,grp:shifts_toggle
}
'';
in
{
enable = true;
settings = {
initial_session = {
command = desktop;
user = "lelgenio";
};
default_session = {
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
};
};
};
environment.systemPackages = with pkgs; [
sway
swaylock
swayidle
wayland
pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-wlr
## Theme
capitaine-cursors
bibata-cursors
orchis_theme_compact
papirus_red
];
};
}

View file

@ -1,4 +1,5 @@
{ config, pkgs, ... }: {
{ config, pkgs, ... }:
{
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the KDE Desktop Environment.

13
system/locale.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, config, ... }:
{
time.timeZone = "America/Sao_Paulo";
environment.variables.TZ = config.time.timeZone;
i18n.defaultLocale = "pt_BR.utf8";
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "colemak";
};
console.keyMap = "colemak";
}

View file

@ -1,6 +1,13 @@
{ config, pkgs, lib, ... }:
let cfg = config.packages.media-packages;
in {
{
config,
pkgs,
lib,
...
}:
let
cfg = config.packages.media-packages;
in
{
options.packages.media-packages = {
enable = lib.mkEnableOption "media packages";
};
@ -9,15 +16,18 @@ in {
down_meme
yt-dlp
ffmpeg
obs-studio
imagemagick
mpc-cli
pkgs.unstable.helvum
helvum
gimp
inkscape
kdenlive
blender
krita
kdePackages.kdenlive
pitivi
blender-hip
libreoffice
godot
godot_4
];
};
}

View file

@ -0,0 +1,20 @@
{ pkgs, config, ... }:
{
services.gitea-actions-runner = {
package = pkgs.forgejo-actions-runner;
instances.default = {
enable = true;
name = "monolith";
url = "https://git.lelgenio.com";
tokenFile = config.age.secrets.monolith-forgejo-runner-token.path;
labels = [
# provide a debian base with nodejs for actions
"debian-latest:docker://node:18-bullseye"
# fake the ubuntu name, because node provides no ubuntu builds
"ubuntu-latest:docker://node:18-bullseye"
# provide native execution on the host
#"native:host"
];
};
};
}

View file

@ -1,4 +1,13 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
in
{
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
virtualisation.docker.enable = true;
services.gitlab-runner = {
@ -11,52 +20,16 @@
# dockerPrivileged = true;
# };
thoreb_builder = {
registrationConfigFile = config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
registrationConfigFile =
config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
dockerImage = "debian";
dockerPrivileged = true;
};
# runner for building in docker via host's nix-daemon
# nix store will be readable in runner, might be insecure
nix = with lib;{
# File should contain at least these two variables:
# `CI_SERVER_URL`
# `REGISTRATION_TOKEN`
registrationConfigFile = config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path; # 2
dockerImage = "alpine";
dockerVolumes = [
"/nix/store:/nix/store:ro"
"/nix/var/nix/db:/nix/var/nix/db:ro"
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
];
dockerDisableCache = true;
preBuildScript = pkgs.writeScript "setup-container" ''
mkdir -p -m 0755 /nix/var/log/nix/drvs
mkdir -p -m 0755 /nix/var/nix/gcroots
mkdir -p -m 0755 /nix/var/nix/profiles
mkdir -p -m 0755 /nix/var/nix/temproots
mkdir -p -m 0755 /nix/var/nix/userpool
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root
mkdir -p -m 0700 "$HOME/.nix-defexpr"
. ${pkgs.nix}/etc/profile.d/nix-daemon.sh
${pkgs.nix}/bin/nix-channel --add https://nixos.org/channels/nixos-20.09 nixpkgs # 3
${pkgs.nix}/bin/nix-channel --update nixpkgs
${pkgs.nix}/bin/nix-env -i ${concatStringsSep " " (with pkgs; [ nix cacert git openssh ])}
'';
environmentVariables = {
ENV = "/etc/profile";
USER = "root";
NIX_REMOTE = "daemon";
PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin";
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
};
tagList = [ "nix" ];
};
thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path;
thoreb-itinerario-nix = mkNixRunner config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
};
};
systemd.services.gitlab-runner.serviceConfig.Nice = 10;

25
system/network.nix Normal file
View file

@ -0,0 +1,25 @@
{ pkgs, ... }:
{
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Open kde connect ports
programs.kdeconnect.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
security.rtkit.enable = true;
services.openssh = {
enable = true;
ports = [ 9022 ];
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
}

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
{
services.nix-serve = {
enable = true;
secretKeyFile = config.age.secrets.monolith-nix-serve-privkey.path;

50
system/nix.nix Normal file
View file

@ -0,0 +1,50 @@
{
lib,
config,
pkgs,
inputs,
...
}:
let
collectFlakeInputs =
input: [ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { }));
in
{
system.extraDependencies = collectFlakeInputs inputs.self;
nix.registry.nixpkgs.flake = inputs.nixpkgs;
nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
optimise.automatic = true;
settings = {
trusted-users = [
"root"
"@wheel"
];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
# "http://nixcache.lelgenio.1337.cx:5000"
"https://lelgenio.cachix.org"
"https://wegank.cachix.org"
"https://snowflakeos.cachix.org/"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
# "nixcache.lelgenio.1337.cx:zxCfx7S658llDgAUG0JVyNrlAdFVvPniSdDOkvfTPS8="
"lelgenio.cachix.org-1:W8tMlmDFLU/V+6DlChXjekxoHZpjgVHZpmusC4cueBc="
"wegank.cachix.org-1:xHignps7GtkPP/gYK5LvA/6UFyz98+sgaxBSy7qK0Vs="
"snowflakeos.cachix.org-1:gXb32BL86r9bw1kBiw9AJuIkqN49xBvPd1ZW8YlqO70="
];
};
extraOptions = ''
experimental-features = nix-command flakes repl-flake
'';
};
}

View file

@ -1,4 +1,13 @@
{ config, pkgs, lib, ... }: {
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
in
{
boot.kernel.sysctl."net.ipv4.ip_forward" = true;
virtualisation.docker.enable = true;
services.gitlab-runner = {
@ -11,10 +20,14 @@
# dockerPrivileged = true;
# };
thoreb_builder = {
registrationConfigFile = config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
registrationConfigFile =
config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
dockerImage = "debian";
dockerPrivileged = true;
};
thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path;
thoreb-itinerario-nix = mkNixRunner config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
};
};
systemd.services.gitlab-runner.serviceConfig.Nice = 10;

View file

@ -1,14 +1,13 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
age = {
identityPaths = [ "/home/lelgenio/.ssh/id_rsa" ];
identityPaths = [ "/root/.ssh/id_rsa" ];
secrets.lelgenio-cachix.file = ../secrets/lelgenio-cachix.age;
secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file =
../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
secrets.monolith-nix-serve-privkey.file =
../secrets/monolith-nix-serve-privkey.age;
secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file = ../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
secrets.monolith-forgejo-runner-token.file = ../secrets/monolith-forgejo-runner-token.age;
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
secrets.monolith-nix-serve-privkey.file = ../secrets/monolith-nix-serve-privkey.age;
secrets.phantom-forgejo-mailer-password.file = ../secrets/phantom-forgejo-mailer-password.age;
};
}

12
system/sound.nix Normal file
View file

@ -0,0 +1,12 @@
{ pkgs, ... }:
{
sound.enable = true;
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
wireplumber.enable = true;
pulse.enable = true;
alsa.enable = true;
jack.enable = true;
};
}

View file

@ -1,24 +0,0 @@
{ pkgs, ... }: {
specialisation.dark-theme.configuration = {
nixpkgs.overlays = [
(final: prev: {
uservars = prev.uservars;
})
];
};
specialisation.light-theme.configuration = {
nixpkgs.overlays = [
(final: prev: {
uservars = prev.uservars // rec {
theme = prev.uservars.themes.light;
color = theme.color;
};
})
];
};
environment.systemPackages = [
(pkgs.writeShellScriptBin "theme" ''
sudo "/nix/var/nix/profiles/system/specialisation/$1-theme/bin/switch-to-configuration" test
'')
];
}

View file

@ -1,6 +1,33 @@
{ config, pkgs, inputs, ... }: {
{
config,
pkgs,
inputs,
...
}:
{
programs.steam.enable = true;
programs.steam.package = pkgs.steam.override {
extraLibraries =
pkgs:
with config.hardware.opengl;
if pkgs.hostPlatform.is64bit then
[ package ] ++ extraPackages
else
[ package32 ] ++ extraPackages32;
extraPkgs =
pkgs: with pkgs; [
capitaine-cursors
bibata-cursors
mangohud
xdg-user-dirs
];
};
environment.systemPackages = with pkgs; [
protontricks
bottles
];
programs.dzgui.enable = true;
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
}

View file

@ -1,75 +0,0 @@
{ pkgs, ... }:
let
inherit (pkgs.uservars) key accent font theme;
in
{
# Enable the X11 windowing system.
services.xserver.enable = false;
# enable sway window manager
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
services.dbus.enable = true;
programs.wshowkeys.enable = true;
xdg.portal = {
enable = true;
wlr.enable = true;
# gtk portal needed to make gtk apps happy
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
services.greetd =
let
greetd_main_script = pkgs.writeShellScriptBin "main" ''
${pkgs.dbus-sway-environment}/bin/dbus-sway-environment
export XDG_CURRENT_DESKTOP=sway GTK_THEME="${theme.gtk_theme}" XCURSOR_THEME="${theme.cursor_theme}"
${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -c sway
swaymsg exit
'';
swayConfig = pkgs.writeText "greetd-sway-config" ''
# `-l` activates layer-shell mode. Notice that `swaymsg exit` will run after gtkgreet.
exec "${greetd_main_script}/bin/main"
bindsym Mod4+shift+e exec swaynag \
-t warning \
-m 'What do you want to do?' \
-b 'Poweroff' 'systemctl poweroff' \
-b 'Reboot' 'systemctl reboot'
input "*" {
repeat_delay 200
repeat_rate 30
xkb_layout us(colemak)
xkb_numlock enabled
xkb_options lv3:lsgt_switch,grp:shifts_toggle
}
'';
in
{
enable = true;
settings = {
initial_session = {
command = "${pkgs.sway}/bin/sway";
user = "lelgenio";
};
default_session = {
command = "${pkgs.sway}/bin/sway --config ${swayConfig}";
};
};
};
environment.systemPackages = with pkgs; [
sway
swaylock
swayidle
wayland
pkgs.xdg-desktop-portal
pkgs.xdg-desktop-portal-wlr
## Theme
capitaine-cursors
bibata-cursors
orchis_theme_compact
papirus_red
];
}

32
system/thunar.nix Normal file
View file

@ -0,0 +1,32 @@
{
config,
pkgs,
inputs,
...
}:
{
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
# Mount, trash, and other functionalities
services.gvfs.enable = true;
# Thumbnail support for images
services.tumbler.enable = true;
environment.systemPackages = [
(pkgs.writeTextFile {
name = "thumbs";
text = ''
[Thumbnailer Entry]
TryExec=unzip
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
MimeType=application/x-krita;
'';
destination = "/share/thumbnailers/kra.thumbnailer";
})
];
}

29
system/users.nix Normal file
View file

@ -0,0 +1,29 @@
{ pkgs, ... }:
{
security.sudo.wheelNeedsPassword = false;
# services.getty.autologinUser = "lelgenio";
programs.fish.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.mutableUsers = false;
users.users.lelgenio = {
isNormalUser = true;
description = "Leonardo Eugênio";
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
extraGroups = [
"networkmanager"
"wheel"
"docker"
"adbusers"
"bluetooth"
"corectrl"
"vboxusers"
];
shell = pkgs.fish;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
];
};
users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
}

2
update
View file

@ -1,4 +1,4 @@
#!/bin/sh
nix flake update --verbose --print-build-logs
./switch
exec ./switch "$@"

View file

@ -1,6 +1,16 @@
{ config, pkgs, lib, ... }:
{
config,
pkgs,
lib,
...
}:
let
inherit (pkgs.uservars) key theme accent font;
inherit (config.my)
key
theme
accent
font
;
inherit (theme) color;
in
{
@ -10,7 +20,9 @@ in
settings = {
font = {
size = font.size.small;
normal = { family = font.mono; };
normal = {
family = font.mono;
};
};
colors = {
primary = {
@ -31,8 +43,8 @@ in
cyan = "${color.normal.cyan}";
white = "${color.normal.white}";
};
};
draw_bold_text_with_bright_colors = false;
};
window = {
opacity = theme.opacity / 100.0;
dynamic_padding = true;
@ -40,11 +52,11 @@ in
hints = {
alphabet = key.hints;
enabled = [{
enabled = [
{
regex =
let
mimes =
"(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
mimes = "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
# I fucking hate regex, look at this bullshit
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^`'';
# Kakoune uses these characters to represent whitespace,
@ -62,10 +74,13 @@ in
key = "U";
mods = "Control|Shift";
};
}];
}
];
};
mouse = { hide_when_typing = true; };
key_bindings = [
mouse = {
hide_when_typing = true;
};
keyboard.bindings = [
{
key = lib.toUpper key.up;
mode = "Vi|~Search";
@ -141,7 +156,9 @@ in
};
};
home.sessionVariables = { TERMINAL = "alacritty"; };
home.sessionVariables = {
TERMINAL = "alacritty";
};
# Look at this fucking bullshit:
# https://gitlab.gnome.org/GNOME/glib/-/blob/20c4fcb2a7246a2b205649eae3ebda4296217afc/gio/gdesktopappinfo.c#L2702

View file

@ -1,6 +1,17 @@
{ config, pkgs, lib, inputs, ... }:
{
config,
pkgs,
lib,
inputs,
...
}:
let
inherit (pkgs.uservars) key theme accent font;
inherit (config.my)
key
theme
accent
font
;
inherit (theme) color;
in
{

View file

@ -1,59 +1,23 @@
{ config, pkgs, lib, inputs, ... }: {
systemd.user.services = {
astroid = lib.mkIf (pkgs.uservars.email-client == "astroid") {
Unit = {
Description = "Astroid Email client";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStartPre = "/usr/bin/env sleep 10s";
ExecStart = "${pkgs.astroid}/bin/astroid";
Restart = "on-failure";
TimeoutStopSec = 10;
};
Install = { WantedBy = [ "sway-session.target" ]; };
};
thunderbird = lib.mkIf (pkgs.uservars.email-client == "thunderbird") {
Unit = {
Description = "Thunderbird Email client";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStartPre = "/usr/bin/env sleep 10s";
ExecStart = "${pkgs.thunderbird}/bin/thunderbird";
Restart = "on-failure";
};
Install = { WantedBy = [ "sway-session.target" ]; };
};
discord = {
Unit = {
Description = "Discord Internet voice chat";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" "pipewire-pulse.service" "tray.service" "telegram.service" ];
};
Service = {
ExecStartPre = "/usr/bin/env sleep 12s";
ExecStart = "${pkgs.webcord}/bin/webcord";
Restart = "on-failure";
};
Install = { WantedBy = [ "sway-session.target" ]; };
};
telegram = {
Unit = {
Description = "Telegram Internet chat";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" "pipewire-pulse.service" "tray.service" ];
};
Service = {
ExecStartPre = "/usr/bin/env sleep 11s";
ExecStart = "${pkgs.tdesktop}/bin/telegram-desktop";
Restart = "on-failure";
};
Install = { WantedBy = [ "sway-session.target" ]; };
};
{
config,
pkgs,
lib,
inputs,
...
}:
{
wayland.windowManager.sway = {
extraConfig = ''
exec thunderbird
exec webcord
exec telegram-desktop
'';
};
home.packages = with pkgs; [ tdesktop webcord thunderbird ];
home.packages = with pkgs; [
tdesktop
webcord
thunderbird
element-desktop-wayland
];
}

View file

@ -1,10 +1,22 @@
{ config, pkgs, lib, inputs, ... }: {
xdg.desktopEntries = {
connect-controller = {
name = "Connect Controller";
exec = "bluetoothctl connect 84:30:95:97:1A:79";
terminal = false;
{ pkgs, lib, ... }:
{
systemd.user.services = {
autoconnect-gamepad = {
Unit = {
Description = "Attempt to connect to game controllers";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
ExecStart = lib.getExe pkgs.auto_connect_gamepad;
};
Install = {
WantedBy = [ "sway-session.target" ];
};
};
};
xdg.desktopEntries = {
disconnect-controller = {
name = "Disconnect Controller";
exec = "bluetoothctl disconnect 84:30:95:97:1A:79";

63
user/desktop-entries.nix Normal file
View file

@ -0,0 +1,63 @@
{
config,
pkgs,
lib,
...
}:
{
xdg.desktopEntries = {
kak = {
name = "Kakoune";
genericName = "Text Editor";
comment = "Edit text files";
exec = "kak %F";
terminal = true;
type = "Application";
icon = "kak.desktop";
categories = [
"Utility"
"TextEditor"
];
startupNotify = true;
mimeType = [
"text/english"
"text/plain"
"text/x-makefile"
"text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
];
settings = {
Keywords = "Text;editor;";
TryExec = "kak";
};
};
down_meme = {
name = "DownMeme";
genericName = "Download memes";
exec = "down_meme";
terminal = true;
type = "Application";
icon = "download";
categories = [ "Network" ];
};
readQrCode = {
name = "Read QR Code";
genericName = "Read QR Code from clipboard image";
exec = "readQrCode";
terminal = true;
type = "Application";
icon = "download";
categories = [ "Network" ];
};
};
}

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