Compare commits

..

208 Commits

Author SHA1 Message Date
c4c7e95e7d 🔧 [pi4] Temporary disable Actual budget 2025-08-12 16:40:05 +00:00
cb6e38604d [pi4] ADd roomba dependency to home assistant️ 2025-08-12 16:40:04 +00:00
859a0e22c2 🔒 [pi4] Do not require password for sudo️ 2025-08-12 16:40:04 +00:00
db3e754114 🪛 [shared] Add clean recipies 2025-08-11 21:10:50 +02:00
51413f3896 [shared] Replace Prettier with Biome 2025-08-11 20:48:52 +02:00
9557d9a6e6 🔧 [laptop] Update HyprPanel config 2025-08-10 16:59:29 +02:00
c4160fef76 [pi4] Initial Home-Assistant setup️ 2025-08-10 13:14:56 +00:00
49c60b3519 🔧 [shared/desktop] Update Zed config 2025-08-09 13:07:37 +02:00
383fb19b59 📦 [shared] Updated dependencies, replace Grayjay flake with package 2025-08-09 12:59:51 +02:00
28ab51d4bf 🗑️ [shared/desktop] Remove deprecated Catppuccing GTK 2025-08-09 12:40:19 +02:00
56cb89cb65 📦 [desktop] Use latest Linux LTS 2025-08-09 12:39:18 +02:00
efaaa3d724 [pi4] Disable mailserver️ 2025-08-09 08:36:37 +00:00
adb156a8b8 📦 [shared] Update dependencies 2025-07-28 22:12:41 +02:00
51c9dac1ef 🪛 [shared] Added httpie import 2025-07-28 18:24:21 +02:00
cbcb8f1764 [shared] Replace Hyprpanel flake with HM module 2025-07-28 18:24:21 +02:00
055c399d31 [pi4] Add reverse proxy for martials.no staging environment 2025-07-10 18:47:08 +00:00
4985fd4a89 🐛 [pi4] Fix Actual container not working 2025-07-10 18:47:08 +00:00
9064fc6d1d [shared] Add Httpie-desktop 2025-07-03 21:50:48 +02:00
3e718fadfc [pi4] Containerize Actual service 2025-06-23 19:18:40 +00:00
763ee6312a ♻️ [pi4] Refactor firewall with variables 2025-06-23 18:17:08 +00:00
5704ebe712 [pi4] Initial Actual Budget service 2025-06-23 18:07:09 +00:00
70b5d5fd4d [pi4] Nginx reload on change instead of restart 2025-06-23 17:47:35 +00:00
c29acb0902 [pi4] Headscale config with Postgres 2025-06-23 17:42:15 +00:00
a545b4a45c 🔧 [pi4] Update Forgejo deprecated setting 2025-06-10 16:41:54 +00:00
c839811b9f 🐛 [pi4] Fix wrong nginx config for headscale 2025-06-10 16:41:02 +00:00
2812e85976 🚑 [pi4] Redirect from www. to 2025-06-08 21:41:29 +00:00
3835c3a1a6 🚸 [pi4] Don't change password in forgejo 2025-06-08 21:37:07 +00:00
a277e8f3ed [pi4] Fix nginx config with TLS 2025-06-08 21:34:06 +00:00
eb8c857940 🚨 [shared] Migrate Yazi from manager to mgr 2025-06-03 21:50:42 +02:00
b3e6222cac [pi4] Added initial Nginx config 2025-06-03 19:36:14 +00:00
575452512a 📦 [desktop] Set Linux kernel to 6.14 2025-06-03 18:55:26 +02:00
5cc4c6479c 📦 [shared] Update dependencies 2025-06-03 18:55:02 +02:00
724fe6767e ♻️ [shared] Refactor system configs 2025-06-02 21:02:33 +02:00
b74e5aab62 [pi4] Added initial Simple mailserver config 2025-06-02 17:44:41 +00:00
be02be6bf2 ♻️ [pi4] Rename default_phone_region and other minor changes in Nextcloud 2025-05-31 16:04:19 +00:00
d614495a2c 🧑‍💻 [pi4] Allow all traffic from local network 2025-05-31 15:42:48 +00:00
1f2ea2d5fa [pi4] Added initial Forgejo config and Podman 2025-05-31 15:42:48 +00:00
969a1e75bf [pi4] Added notes to nextcloud 2025-05-31 15:42:47 +00:00
fe01334a85 🚸 [shared] Added public SSH keys for androids 2025-05-31 14:35:37 +02:00
e986f337bd [pi4] Initial Nextcloud config 2025-05-27 20:01:07 +00:00
96d57d34c1 🔒 [pi4] Disable ssh on gpg 2025-05-27 17:08:47 +00:00
dcad8f12b9 🐛 [shared] Fix missing background on sddm 2025-05-27 18:27:07 +02:00
1595e260d5 [shared] Added bat with cat alias 2025-05-27 17:31:25 +02:00
de53426fa5 🔧 [shared] Update stateVersion to 25.05 2025-05-26 20:30:17 +02:00
fc89c377e8 ⬆️ [shared] Upgrade to NixOS 25.05 2025-05-26 20:27:34 +02:00
53329b8d1c ♻️ [shared] Moved Hm configs to shared base 2025-05-22 20:10:48 +02:00
2b020958ed ♻️ [shared] Move gnome-keyring to base 2025-05-22 19:50:11 +02:00
e4fe0e1127 ♻️ [shared] Moved users config to base. Use password from Sops 2025-05-22 19:40:49 +02:00
21d07edcf1 ♻️ [shared] Moved files to base shared directory 2025-05-22 19:36:56 +02:00
7455299dd7 ♻️ [shared] Refactor hm ssh config, added systems to hm module 2025-05-20 22:03:58 +02:00
9a8cc63674 🚚 [shared] Added shared config that shared desktop config inherits from 2025-05-20 21:52:00 +02:00
adb02fbcc2 [shared] Added homelab systemConfig 2025-05-20 21:37:26 +02:00
882c42a093 ♻️ [shared] Move domain to common file 2025-05-19 21:51:12 +02:00
c6fcb7b6b8 ♻️ [shared] Refactor ssh config to be dynamic 2025-05-19 21:42:29 +02:00
b2fd4f1da5 [shared] Added all public ssh keys to authorizedKeys 2025-05-19 20:23:04 +02:00
2fe8c9edcb 🔧 [shared] Added ssh config for pi4 and homelab 2025-05-15 19:35:36 +00:00
ab8a579a9c [shared] Only use cuda acceleration for Ollama if Nvidia is used 2025-05-15 21:32:19 +02:00
b7c38d133e 🔧 [shared] Added thinkpad to ssh config 2025-05-15 21:18:06 +02:00
55f7a37aaa [shared] Added ssh config for desktop. Justfile to get pub ssh 2025-05-15 21:14:05 +02:00
48ff2cdfd2 💥 [pi4] Caddy redirect from kitchenowl to grocery 2025-05-15 20:48:00 +02:00
73e6462229 🔐 [pi4] Password defined in sops 2025-05-15 18:47:22 +00:00
050741393b [pi4] Added initial caddy config based on homelab 2025-05-13 21:31:29 +02:00
08cd2cbebc [shared] Added planify 2025-05-13 21:00:14 +02:00
5fce13233e Added Signal-desktop 2025-05-04 22:19:58 +02:00
0770ae3ecf [desktop] Bluetooth
Added Bluetooth support to desktop, including PS3 controllers
2025-04-29 20:32:24 +02:00
a49dc70148 📦️ [desktop] Update packages, update Linux kernel to latest, update Nvidia drivers 2025-04-29 20:32:14 +02:00
33351682c0 [shared] Added fzf, ssh hm config, reencrypted secrets 2025-04-21 11:54:22 +02:00
15d5121f0e ♻️ [shared] Refactor helix conifg, rm vscodium, add age for thinkpad 2025-04-20 18:04:23 +02:00
d74f3880ca [shared] Helix config
Support for more languages in Helix. C-f to format. Autosave. Added some lsp packages
2025-04-19 19:37:12 +02:00
f1bf7b4ded [shared] Gitmoji-cli
Added gitmoji-cli to home-manager
2025-04-19 18:07:55 +02:00
985a71d901 [shared] Replace Neovim with Helix
Moved Helix editor to shared.
Removed Nixvim flake and it's config
2025-04-19 17:54:56 +02:00
7e5bc137e5 [shared] Added eza, ls replacement 2025-04-19 17:05:35 +02:00
923b0c8980 [shared] Zoxide cd alias. Replaced Papers with sioyek 2025-04-19 16:27:53 +02:00
e97dd6f5ce [shared] Updated Zed config, changed user config to just username 2025-04-18 19:49:14 +02:00
31c25681c5 [thinkpad] Fingerprint for sudo and login. Upgraded hyprlock to unstable 2025-04-18 17:54:17 +02:00
9e96de997d [pi4] Added Sops with new hash. Added boot recipe to justfile 2025-04-18 13:59:06 +00:00
b521aebef6 🐛 [pi4] Fix wrong paths. Added Zoxide 2025-04-17 12:49:59 +00:00
feb1d07500 [pi4] Public age key for pi4, generate ssh key in justfile 2025-04-17 10:25:14 +00:00
4f126bab90 📝 [shared] Add justfile comments 2025-04-17 12:06:57 +02:00
4b3ad49384 🐛 [desktop] Fix wallpaper not overriding default setting 2025-04-17 12:06:13 +02:00
01e5fb42d3 [shared] Sops nix for user passwords 2025-04-17 00:31:19 +02:00
8244fe8927 [pi4] Added gnome-keyring for keys 2025-04-16 21:17:50 +00:00
244a029d70 [pi4] Nftables firewall config, moved security.nix to security dir 2025-04-16 21:17:50 +00:00
36ba00efc3 [shared] Toggle hidden files using ctrl+h in Yazi 2025-04-16 15:45:57 +02:00
f1d2672194 [shared] Moved cmdline tools to /shell in home-manager config. Added Yazi catppuccin theme instead of manual 2025-04-16 15:10:40 +02:00
b9e009b0cb [shell] Added shell for formatting entire repo 2025-04-16 14:16:00 +02:00
8f1782eccd 🐛 [thinkpad] Fix hypr overrides not overriding 2025-04-16 13:50:22 +02:00
ed6a435d79 [pi4] Replaced Nvim with Helix editor 2025-04-16 09:26:50 +00:00
7ed64943a6 🐛 [shared] Moved nixfmt to formatters.nix 2025-04-16 10:39:49 +02:00
3c5484f1a1 [shared] Formatters in their own file 2025-04-16 00:08:42 +02:00
e515408ef2 🐛 [pi4] Fix wrong paths, added missing prettier formatter 2025-04-15 22:03:50 +00:00
5a23b66666 [pi4] Tailscale, just, nh, experimentals, fish in module 2025-04-15 23:44:15 +02:00
22ab5aa5cf [pi4] Split module config 2025-04-15 23:39:10 +02:00
4ed23cdf5f Pi4 home-manager config 2025-04-15 23:22:49 +02:00
a47b9bb118 Moved gpg config, added programs.gpg 2025-04-15 23:15:40 +02:00
4df44fa4de 🐛 Fix build errors on pi4, added configs to push 2025-04-15 21:14:17 +00:00
3df0986257 :Moved zen styling to hosts: 2025-04-15 18:26:14 +02:00
57d4f949aa 🐛 Fix build errors. Moved zen styling to hosts and app to shared. Start tailscale in justfile 2025-04-15 18:22:06 +02:00
4a884f5e6e Monitor specific configs in hosts 2025-04-15 17:48:57 +02:00
980334b44b Prefer rebase when pulling from git 2025-04-15 13:01:23 +02:00
0474fd9802 Moved yubikey config to security dir and rename 2025-04-15 13:01:23 +02:00
16c4a8f46b Split up config files to multiple and added imports. Fixed default values for systemConfigs 2025-04-15 12:48:27 +02:00
9611b8bb8d Moved modeules into shared 2025-04-14 23:30:50 +02:00
3b6a3e5a66 🐛 Moved fmt to before git add, formatted file 2025-04-13 13:22:57 +02:00
a7836ff585 🐛 Fix config errors 2025-04-13 11:57:32 +02:00
f0ce1f4169 ♻️ Moved git key to desktop config, step variable in hyprpanel audio 2025-04-13 11:40:05 +02:00
a0537f5634 Moved common home-manager config to shared/home-manager 2025-04-12 23:29:10 +02:00
0649473709 Added pi4 to systems, moved getSecret function to lib 2025-04-12 20:25:10 +02:00
6ca92c8537 Added Thinkpad and pi4 configs 2025-04-12 19:45:01 +02:00
00cf2c38f9 Pass hostName in args, fix Hyprpanel theming, removed unused flake and overlay 2025-04-12 18:51:28 +02:00
e3a1dd36d7 Moved modules and hm dir to hosts dir. Moved some code to shared and extended lib with custom functions 2025-04-12 17:05:38 +02:00
df5bea9cc0 Added pdf-arranger 2025-04-12 11:19:08 +02:00
b5c273e072 Just recipe to update single flake, moved some home configs 2025-04-06 12:55:05 +02:00
11e8f2f8c6 Grayjay, Imv, updated dependencies
- Added Grayjay flake

- Added imv

- Set imv as default image viewer

- Changed catppuccin homeManagerModules to homeModules

- Media dir in home dir for media config

- pkg-config for rust development

- Removed Loupe image viewer

- Moved mpv to media dir
2025-04-02 20:09:55 +02:00
542a627e23 ♻️ Moved wallpapers, added wallpapers and secrets to theme and common files 2025-03-09 12:29:09 +01:00
1ff146e3c0 ♻️ Replace imports with function argument, hyprpanel does not follow nixpkgs, git push alias 2025-03-09 11:25:26 +01:00
a6cb4a5cf6 🐛 Disable wallpaper by Hyprpanel, comments on justfile 2025-03-02 08:19:45 +01:00
909d3b9b21 Use same package of git 2025-03-01 23:00:24 +01:00
3552314e69 Store git secrets using libsecret 2025-03-01 22:54:49 +01:00
adb963a48d Added lock and unlock to justfile 2025-03-01 15:11:42 +01:00
7ab89cda7c Wildcard encrypt files in secrets dir, util function to load
secrets, use apu-key in weather widget
2025-03-01 15:09:03 +01:00
fd03c87c18 🔐 Add weather API key 2025-03-01 14:31:54 +01:00
443530b667 Added git-crypt and .gitattributes 2025-03-01 14:27:58 +01:00
5a36e23ae7 📦 Updated packages, protonmail and freetube on unstable 2025-02-27 18:44:59 +01:00
056012a288 Gaming dir with heroic and wind, moved steam to dir 2025-02-18 21:56:34 +01:00
1ed7ce2e89 🪟 Move windows with arrowkeys, moved zen package to /zen dir in home 2025-02-15 12:14:03 +01:00
000b5fe81a Zen theme, Updated dependencies, moved fortune and cowsay pkgs 2025-02-15 12:02:23 +01:00
0825b293a1 >_ Replaced shell scripts with justfile, nix shell to download the rest 2025-02-13 21:52:01 +01:00
0b0d93cf41 Zed tab icons, hyprsysteminfo, papers pdfReader, update flake.lock 2025-02-09 17:48:45 +01:00
b50fce54a7 Git sign by default, hostname from common.nix in flake.nix 2025-02-02 19:05:07 +01:00
830b76bcb6 🧹 Refactor, moved monitornames to common.nix, removed waypaper reload 2025-02-02 18:33:09 +01:00
76ebdad3ce 🧹 Mpv loop config, moved fish aliases to proper files 2025-02-02 15:06:34 +01:00
bd2f725029 🪛 Comments, git safe dir, moved nixvim import
- Moved nixvim import to nixvim directory
- Added git safe directory to /etc/nixos
2025-02-02 13:16:51 +01:00
9da67d058d 📦 Onlyoffice and QT Wayland 2025-01-26 21:36:38 +01:00
760cb4d8df 🎵 Cava desktop entry, Replaces node 20 with 22 2025-01-23 19:25:30 +01:00
fd8ca5a8c3 🖌️ Styled Fastfetch, more info in README, alias for fastfetch 2025-01-19 19:59:54 +01:00
29ac28bd15 👉 Replaced pointer with working Catppuccin pointer, start nix-shells in
fish
2025-01-18 13:59:09 +01:00
0bfa938db3 📺 Replaced DP-1 montior, uncommented turn off screen code 2025-01-17 22:34:22 +01:00
1f06944f93 🌑 Prefer dark theme for GTK apps, removed obsolete hyprpanel setting 2025-01-16 22:29:43 +01:00
7374764069 ⬆ Updated packages, added update script 2025-01-16 22:11:55 +01:00
3005b55e89 🪛 Unstable in home-manager, new wallpapers, .NET
- Added unstable overlay in order to fetch pkgs from unstable
- Changed Zed-editor to unstable
- Commented turn off screen timeout, still buggy
- Added new Catppuccin wallpapers
- Changed secondary colours on lock screen to fit wallpaper
- Removed <i/> on lock screen
- Added Rider, .NET 9 adn ASP.NET 9
- Readded EDITOR env to nvim
2025-01-16 20:04:50 +01:00
b12c09719a 🖼️ Replaced Swww with Hyprpaper, turned back on screen off after idle,
fixed wallpaper on lockscreen, fixed hyprshot dir
2025-01-12 20:32:36 +01:00
6fbe3a6da0 🖌️ Goodbye Stylix
- Added theming to Btop
- Added theming to Nvim and removed bufferline plugin
- Added mode to theme.nix to change from light theme to dark theme
- Replaced Starship theme with Catppuccin starship theme
- Added QT platformtheme ENV
- Moved wallpapers into wallpaper dir
- Replaced image of desktop1 with more up to date one
2025-01-12 17:38:51 +01:00
f7e4fc7638 🖌️ Styling, flatpak == false, clock
- Disabled flatpak
- Added kitty config and disabled stylix
- Styled Mpv
- Added gnome-clocks
2025-01-12 16:17:44 +01:00
be020ff82c 🎬 Freetube config, added Zen flake and updated default browser 2025-01-12 12:27:00 +01:00
759c57dfac 📺 Reorganized, changed hardware acceleration to use Nvidia, added
Nvidia powermanagement
2025-01-11 23:50:44 +01:00
e67a840d93 🧑‍💻 Use Systemd for Hyprland 2025-01-11 23:24:55 +01:00
c75db3b717 🧑‍💻 Zed configs, Nextcloud as service, moved dev stuff 2025-01-11 21:00:27 +01:00
99c1d855ab 🖌️ Catppuccin on GTK apps 2025-01-11 12:46:23 +01:00
d192efdf0f 🐱 Added Catppuccin flake, Added Cava, removed wlogout and replace bind
with Hyprpanel Dash
2025-01-11 12:15:19 +01:00
c5b5896aef 📺 Added Mpv and updated flakes 2025-01-11 11:53:20 +01:00
1834e6f23e 🧹 Moved git config to git.nix and added aliases 2025-01-11 11:20:09 +01:00
e2d16b9aa9 📁 Yazi File Browser 2025-01-11 11:15:48 +01:00
92e21a03dc 🪞 Rotate second monitor 2025-01-10 20:01:36 +01:00
0df9d996c6 🎵 Spicetify with catppucchin theme 2025-01-09 22:23:28 +01:00
e80f492b4e 🖼️ Changed wallpaper, added usericon, readded profile image on
lockscreen
2025-01-09 21:49:54 +01:00
914c25808f Replaced waybar and swaync with Hyprpanel and dunst 2025-01-09 19:52:08 +01:00
89265aef48 🧹 Run garbage cleaner weekly. Fixed wrong keybind for esc menu 2025-01-08 20:00:37 +01:00
0e15fa0b0d Merge pull request 'common-config' (#2) from common-config into main
📦 Created config files with common code

- Created common.nix for various configs
- Created theme.nix for theme related configs
- Moved some code to more logical files
- Moved some standalone files into nix multi-line strings, in order to
  inject data
- Replaced some ambiguous characters
2025-01-08 18:52:07 +00:00
a60debe421 Replaced ambigious characters 2025-01-08 19:49:57 +01:00
89acd3e5cb 📦 Moved more configs to common files, and refactored code with common 2025-01-08 19:47:02 +01:00
57ebb73095 Merge branch 'main' into common-config 2025-01-07 20:35:57 +01:00
62a0a52935 🖥️ Remove askPass and add autoSetupRemote to git config 2025-01-07 20:32:55 +01:00
1133e01eff 📦 Created config files with common code
- Created common.nix for various configs
- Created theme.nix for theme related configs
- Moved some code to more logical files
- Moved some standalone files into nix multiline strings, in order to
  inject data
2025-01-07 20:18:30 +01:00
e223999ae1 👉 Use correct pointer 2025-01-06 21:18:45 +01:00
533ff49808 🧹 Moved Hyprland conf to .nix file. Shorter title in waybar and changed notification icon 2025-01-06 20:44:32 +01:00
00a3c0b0cd 🪟 Resize by using arrow keys, Cowsay fortune on shell open 2025-01-06 19:17:08 +01:00
5fa27621dd 🤖 Added Ollama 2025-01-06 18:25:52 +01:00
5a4bc7ce31 🧑‍💻 Zed editor and nil ls, refactored locales 2025-01-05 21:31:01 +01:00
573f2c459e 📑 Treefmt formatter for nix, json, css, sh and more 2025-01-05 20:48:24 +01:00
b30376cdcf 🧹 Moved almost all files to /modules. Moved some code to separate files 2025-01-05 19:14:37 +01:00
f0ac3a7705 🛌 Nih-Helper and renamed rebuild to switch 2025-01-05 18:24:57 +01:00
36bb075dd2 💾 Changed flakes to use latest stable where possible 2025-01-05 18:14:52 +01:00
9aa4ac2816 Merge pull request 'unstable-overlay and hardware encoding' (#1) from unstable-overlay into main
Reviewed-on: https://git.martials.no/martials/nixos-configuration/pulls/1

- Hypridle suspend and refactor
- Hardware acceleration
- Overlay to get access to unstable branch
- Updated flake deps
- Replaced hardware.pulseaudio with service.pulseaudio
- Commented out gnome-extention-manager, due to build failure
- Enabled Hyprland logs
2025-01-05 11:11:22 +00:00
def86ef9f3 - Replaced hardware.pulseaudio with service.pulseaudio
- Removed ghostty
- Commented out gnome-extention-manager, due to build failure
- Enabled Hyprland logs
2025-01-05 00:07:02 +01:00
fdebb57cad Overlay to get access to unstable branch, added Ghostty as dep 2025-01-04 23:36:16 +01:00
08d1afd90f 🚀 Hardware acceleration 2025-01-04 23:16:07 +01:00
a5da3d0924 🦥 Hypridle suspend and refactor 2025-01-04 23:06:06 +01:00
7b3a5b13ea ⚠ Styles Swaync with Catppuccin 2025-01-04 21:55:56 +01:00
157178f95e 😎 Changed colour of notification to use catppuccin colour and mute icon for mute 2025-01-04 18:13:34 +01:00
8f7dcd3ce7 🗒 Desktop screenshot and short list of deps 2025-01-04 18:06:59 +01:00
211f311d0d ⌨ Keyboard config for Via/Qmk keyboard, added VLC 2025-01-04 17:43:21 +01:00
8dd038fd6a 📸 Fix open kitty in Nautilus, thumbnails for videos and SVGS 2025-01-02 22:28:12 +01:00
a30f8f1b08 📸 Hyprshot screenshots
- Added Hyprshot for screenshots
- Added keybindings to take them
- Added XDG_PICTURES_DIR env for storing pictures
2025-01-02 21:17:58 +01:00
84d9817933 🖼 Emojis in Rofi, some styling changes
- Added rofimoji and wl-clipboard to Rofi
- Changed font to JetBrains Mono
- Added SSH window
- Changed width and round corners
2025-01-01 19:59:09 +01:00
69fff69c65 🖼 Styled Rofi, calc and disk apps, gcc
- Formatted theme for Rofi
- Moved Rofi config to .rasi file, because of troubles styling with programs.rofi
- Added gnome-calculator and gnome-disk
- Added GCC
- Open Calc by pressing SUPER + K
- Opens terminal in workspace 2 at boot
2025-01-01 19:00:38 +01:00
fe1186f960 🖼 Replaced Dolphin with Nauvis, mime types, image-viewer
- Added Gstreamer packages for audio data
- Replaced catppuccin wallpaper on lockscreen with one where the logo is higher
- Replaced dolphin with nautilus file manager
- Moved Gnome related configs to /gnome
- Added Gnome appindicator and extension manager
- Added loupe and gimp
- Added mime types for image files
2024-12-31 20:28:24 +01:00
cbcc4d8df6 🧰 Styled SDDM
- Catppuccin theme for SDDM
- Moved SDDM config to sddm.nix
- Removed unused toml file
2024-12-31 18:22:30 +01:00
51b30405c5 🧰 Styled Hyprlock
- Commented out listener in Hypridle that caused a bug?
- Activated btop
2024-12-31 17:24:33 +01:00
59892a5981 🐟 Fish plugin and alias
- Alias for ssh with kitty
- Fish config file in home with starship
- Added fishbang plugin to fish
- nix-prefetch-github to get rev and hash
2024-12-31 14:01:42 +01:00
66dd36235b 🖌 Styling
- Changed font on waybar to JetBrains Mono, and fontsize to a slighly smaller one
- Removed and refactored style files slightly
- Replaced icon for music in waybar
- Padding for kitty
2024-12-31 13:19:03 +01:00
47d9c12a8f 🪛 Quick fix \n Added Hypridle to exec-once and changed timeout from 5 to 1200 seconds 2024-12-31 00:45:55 +01:00
1c9dded45c 🔒 Replaced swaylock with Hyprlock
- Removed Swaylock
- Added Hyprlock with Catppuccin theme.
- Replaced commands to swaylock with hyprlock.
- Added JetBrains Mono Nerd Font
2024-12-31 00:39:22 +01:00
793b3a16d0 💤 Hypridle
- Added hypridle with a simple config
2024-12-30 23:19:40 +01:00
b28a7d7fbb 🇳🇴/🇬🇧 Locale switcher
- Added no to list of keyboard locales.
- Added no and gb to list of supported locales.
- Added a waybar language switcher, that can be clicked to toggle
- Toggle languages using ALT+SHIFT
- Enable numlock at boot
2024-12-30 20:21:06 +01:00
4a5cd5dd73 🚂 Autostart nextcloud, and fix typo 2024-12-29 22:26:34 +01:00
bd6c1b821b ✍ Update readme with commands 2024-12-29 22:16:38 +01:00
a65404bb8c ☄ Enter waybar
Moved waybar config into NixOS configuration.

Added test script to check config without switching
2024-12-29 22:13:25 +01:00
a2f141a290 🔐 Enter hyprland.conf
Moved hyprland config into NixOS configuration.

Moved hyprcursor under hyprland config.
2024-12-29 21:49:16 +01:00
bdaa858bdf 🔐 Security
Turned off login with Yubikey.

Show prompt in terminal when key is inserted
2024-12-29 15:53:21 +01:00
bd8a71e177 🔐 Yubikey
Can now log in using yubikey.

Moved icons for hyprcursor and added a manifest file.
2024-12-29 11:32:06 +01:00
6d6331f4b4 ☝ Cursors
Added Hyprcursor with rose-pine-hyprcursor theme.

Moved username into a constant in home.nix.

Installed Discord
2024-12-29 10:56:58 +01:00
f60462a770 🧹 Organizing
Moved code to separate files.

Rofi config in home-manager.

Moved home.nix to /home.

Scripts to format and rebuild
2024-12-29 00:34:39 +01:00
8e91b0ca78 wlogout and swaylock. Moved starship to home-manager and styled with catppuccin. Changed some font colours for better contrast. Transparency on terminals. swww for animated wallpapers. Starter template for creating new files. Styled waybar from catppuccin template, changed some icons. 2024-12-28 20:25:37 +01:00
a9ad4efed3 Moved waybar config to own file. Added playerctl to system, removed hardware config from git 2024-12-28 13:30:51 +01:00
0808c2b3b8 Installed startship, themed kitty, moved some configs to shell.nix, stylix for theming 2024-12-28 00:25:51 +01:00
f087509250 nixvim configuration using flakes 2024-12-27 21:31:18 +01:00
ee3b4012c3 Removed old home-manager code 2024-12-27 18:52:54 +01:00
161 changed files with 4783 additions and 380 deletions

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
shared/secrets/weather-api-key filter=git-crypt diff=git-crypt

BIN
.gitea/assets/desktop.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

4
.gitignore vendored
View File

@ -1 +1,5 @@
# Symlink create by `nix build`
result
# IDEs
.idea

11
.sops.yaml Normal file
View File

@ -0,0 +1,11 @@
keys:
- &thinkpad age1j66v6z6hlsgqjfv5fz7fldm5q9jay4j5v5du6ymfda6hv40nsqesg89g7p
- &desktop age1fxr5s6d6ar0xy5pr63kpq93tk7jha5k96jcxnyquj6s2mw8mmcpss8w29w
- &pi4 age1xlnprpvshv93eerthxzg6cahklsfc4efh8dd6u8dte9u6cl0u5qsz48qlt
creation_rules:
- path_regex: shared/secrets/secrets.yaml$
key_groups:
- age:
- *thinkpad
- *desktop
- *pi4

View File

@ -1,4 +1,65 @@
# NixOS Configurations
WIP!
My NixOS configurations with dotfiles for my systems.
![Screenshot of desktop](./.gitea/assets/desktop.png)
## Uses
| | |
| ------ | ---------- |
| WM | Hyprland |
| Shell | Fish |
| Prompt | Starship |
| Theme | Catppuccin |
| GPU | Nvidia |
| Panel | Hyprpanel |
| Runner | Rofi |
| Fetch | Fastfetch |
## Commands
First time run, will create a shell with the minimum dependencies in order to download the rest
```Shell
nix develop . --experimental-features 'nix-command flakes'
just switch-now
```
Scripts below will not run unless the necessary packages have been added to the path, either in a shell or by running nixos-rebuild
Format all .nix files
```Shell
just fmt
```
Rebuild and test Nix configuration
- Will add all new files to git and format all nix-files
```Shell
just test
```
Rebuild and switch Nix configuration
- Will add all new files to git and format all nix-files
```Shell
just switch
```
Update and switch
- Will update the flakes and nix-channel, then switch if there are no errors
```Shell
just update-all
```
To update a single flake and rebuild
```Shell
just update zen-browser
```

12
biome.jsonc Normal file
View File

@ -0,0 +1,12 @@
{
"$schema": "https://biomejs.dev/schemas/2.0.5/schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space"
},
"linter": {
"enabled": false
}
}

View File

@ -1,291 +0,0 @@
# 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, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos"; # Define your hostname.
# 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 = "Europe/Oslo";
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "nb_NO.UTF-8";
LC_IDENTIFICATION = "nb_NO.UTF-8";
LC_MEASUREMENT = "nb_NO.UTF-8";
LC_MONETARY = "nb_NO.UTF-8";
LC_NAME = "nb_NO.UTF-8";
LC_NUMERIC = "nb_NO.UTF-8";
LC_PAPER = "nb_NO.UTF-8";
LC_TELEPHONE = "nb_NO.UTF-8";
LC_TIME = "nb_NO.UTF-8";
};
# Configure console keymap
console.keyMap = "uk";
# Define a user account. Don't forget to set a password with passwd.
users.users.martin = {
isNormalUser = true;
description = "martin";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
environment.variables = {
EDITOR = "nvim";
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
gnupg
firefox
wget
git
kitty
swaynotificationcenter
pipewire
wireplumber
xdg-utils
xdg-desktop-portal-gtk
xdg-desktop-portal-hyprland
hyprpolkitagent
waybar
rofi-wayland
kdePackages.dolphin
kdePackages.qtwayland
kdePackages.qtsvg
kdePackages.qt6ct
spotify
protonmail-desktop
adw-gtk3
glib
adwaita-icon-theme
jetbrains.rust-rover
jetbrains.webstorm
vscodium
stremio
docker
rustup
nodejs
pnpm
fastfetch
freetube
nixd
];
home-manager = {
backupFileExtension = "backup";
users.martin = {
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
};
home = {
username = "martin";
homeDirectory = "/home/martin";
sessionVariables = {
EDITOR = "nvim";
};
stateVersion = "24.11";
};
programs = {
git = {
enable = true;
userName = "Martin Berg Alstad";
userEmail = "git@martials.no";
};
kitty.enable = true;
neovim = {
enable = true;
vimAlias = true;
};
};
};
#wayland.windowManager.hyprland.enable = true;
};
nix = {
settings.experimental-features = [ "nix-command" "flakes" ];
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs = {
bash = {
# Starts the OS using Bash, then starts fish if it's not running
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
dconf = {
enable = true;
};
fish.enable = true;
gnupg.agent.enable = true;
hyprland = {
enable = true;
xwayland.enable = true;
};
kdeconnect = {
enable = true;
};
# Required for nvim with flakes
# nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
security.rtkit.enable = true;
services = {
displayManager.sddm = {
enable = true;
wayland.enable = true;
};
flatpak.enable = true;
gnome = {
gnome-keyring.enable = true;
};
pcscd.enable = true;
pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
};
tailscale = {
enable = true;
};
xserver = {
enable = true;
# Load Nvidia driver for Xorg and Wayland
videoDrivers = ["nvidia"];
# Configure keymap in X11
xkb = {
layout = "gb";
variant = "";
};
};
};
virtualisation.docker = {
enable = true;
storageDriver = "btrfs";
rootless = {
enable = true;
setSocketVariable = true;
};
};
qt = {
enable = true;
#platformTheme = "gnome";
#style = "adwaita-dark";
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Enable OpenGL
hardware.graphics = {
enable = true;
};
hardware.nvidia = {
# Required
modesetting.enable = true;
# Use closed-source drivers
open = false;
# Enable the Nvidia settings menu
nvidiaSettings = true;
};
xdg.mime.defaultApplications = {
"text/html" = "io.github.zen_browser.zen.desktop";
"x-scheme-handler/http" = "io.github.zen_browser.zen.desktop";
"x-scheme-handler/https" = "io.github.zen_browser.zen.desktop";
"x-scheme-handler/about" = "io.github.zen_browser.zen.desktop";
"x-scheme-handler/unknown" = "io.github.zen_browser.zen.desktop";
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
}

335
flake.lock generated
View File

@ -1,5 +1,103 @@
{
"nodes": {
"blobs": {
"flake": false,
"locked": {
"lastModified": 1604995301,
"narHash": "sha256-wcLzgLec6SGJA8fx1OEN1yV/Py5b+U5iyYpksUY/yLw=",
"owner": "simple-nixos-mailserver",
"repo": "blobs",
"rev": "2cccdf1ca48316f2cfd1c9a0017e8de5a7156265",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"repo": "blobs",
"type": "gitlab"
}
},
"catppuccin": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1754727511,
"narHash": "sha256-iRqRCeeXEQ5HSB6zI6Wja7ZfY0PPRx5yelgjtoX2iMo=",
"owner": "catppuccin",
"repo": "nix",
"rev": "7b55c4947c02f79dfd249432ccb0ada2726c29e2",
"type": "github"
},
"original": {
"owner": "catppuccin",
"repo": "nix",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1747046372,
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"git-hooks": {
"inputs": {
"flake-compat": [
"simple-nixos-mailserver",
"flake-compat"
],
"gitignore": "gitignore",
"nixpkgs": [
"simple-nixos-mailserver",
"nixpkgs"
]
},
"locked": {
"lastModified": 1742649964,
"narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82",
"type": "github"
},
"original": {
"owner": "cachix",
"repo": "git-hooks.nix",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"simple-nixos-mailserver",
"git-hooks",
"nixpkgs"
]
},
"locked": {
"lastModified": 1709087332,
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -7,11 +105,33 @@
]
},
"locked": {
"lastModified": 1735053786,
"narHash": "sha256-Gm+0DcbUS338vvkwyYWms5jsWlx8z8MeQBzcnIDuIkw=",
"lastModified": 1753592768,
"narHash": "sha256-oV695RvbAE4+R9pcsT9shmp6zE/+IZe6evHWX63f2Qg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "35b98d20ca8f4ca1f6a2c30b8a2c8bb305a36d84",
"rev": "fc3add429f21450359369af74c2375cb34a2d204",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.05",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"zen-browser",
"nixpkgs"
]
},
"locked": {
"lastModified": 1752603129,
"narHash": "sha256-S+wmHhwNQ5Ru689L2Gu8n1OD6s9eU9n9mD827JNR+kw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "e8c19a3cec2814c754f031ab3ae7316b64da085b",
"type": "github"
},
"original": {
@ -22,11 +142,107 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1734649271,
"narHash": "sha256-4EVBRhOjMDuGtMaofAIqzJbg4Ql7Ai0PSeuVZTHjyKQ=",
"lastModified": 1753694789,
"narHash": "sha256-cKgvtz6fKuK1Xr5LQW/zOUiAC0oSQoA9nOISB0pJZqM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "dc9637876d0dcc8c9e5e22986b857632effeb727",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-25_05": {
"locked": {
"lastModified": 1747610100,
"narHash": "sha256-rpR5ZPMkWzcnCcYYo3lScqfuzEw5Uyfh+R0EKZfroAc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ca49c4304acf0973078db0a9d200fd2bae75676d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1754689972,
"narHash": "sha256-eogqv6FqZXHgqrbZzHnq43GalnRbLTkbBbFtEfm1RSc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fc756aa6f5d3e2e5666efcf865d190701fef150a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1754498491,
"narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1754689972,
"narHash": "sha256-eogqv6FqZXHgqrbZzHnq43GalnRbLTkbBbFtEfm1RSc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "fc756aa6f5d3e2e5666efcf865d190701fef150a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1747179050,
"narHash": "sha256-qhFMmDkeJX9KJwr5H32f1r7Prs7XbQWtO0h3V0a0rFY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "adaa24fbf46737f3f1b5497bf64bae750f82942e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1752480373,
"narHash": "sha256-JHQbm+OcGp32wAsXTE/FLYGNpb+4GLi5oTvCxwSoBOA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d70bd19e0a38ad4790d3913bf08fcbfc9eeca507",
"rev": "62e0f05ede1da0d54515d4ea8ce9c733f12d9f08",
"type": "github"
},
"original": {
@ -38,8 +254,113 @@
},
"root": {
"inputs": {
"catppuccin": "catppuccin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"simple-nixos-mailserver": "simple-nixos-mailserver",
"sops-nix": "sops-nix",
"spicetify-nix": "spicetify-nix",
"zen-browser": "zen-browser"
}
},
"simple-nixos-mailserver": {
"inputs": {
"blobs": "blobs",
"flake-compat": "flake-compat",
"git-hooks": "git-hooks",
"nixpkgs": "nixpkgs_3",
"nixpkgs-25_05": "nixpkgs-25_05"
},
"locked": {
"lastModified": 1747965231,
"narHash": "sha256-BW3ktviEhfCN/z3+kEyzpDKAI8qFTwO7+S0NVA0C90o=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "53007af63fade28853408370c4c600a63dd97f41",
"type": "gitlab"
},
"original": {
"owner": "simple-nixos-mailserver",
"ref": "nixos-25.05",
"repo": "nixos-mailserver",
"type": "gitlab"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1754328224,
"narHash": "sha256-glPK8DF329/dXtosV7YSzRlF4n35WDjaVwdOMEoEXHA=",
"owner": "mic92",
"repo": "sops-nix",
"rev": "49021900e69812ba7ddb9e40f9170218a7eca9f4",
"type": "github"
},
"original": {
"owner": "mic92",
"repo": "sops-nix",
"type": "github"
}
},
"spicetify-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
],
"systems": "systems"
},
"locked": {
"lastModified": 1754196919,
"narHash": "sha256-0zATw65mNql9H8e7HWVBPpijMSbDVeK7JNivRBcUScM=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
"rev": "24fcb94f7792ab755b933e1c9516996530ac1fbd",
"type": "github"
},
"original": {
"owner": "Gerg-L",
"repo": "spicetify-nix",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1754713785,
"narHash": "sha256-/XEjh0nXEzHX5H84AAEP1vJopIGf0Z4sbfqKklwQaHk=",
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"rev": "7564df093b5d6aac0be47a0cd6336e5a36ece598",
"type": "github"
},
"original": {
"owner": "0xc000022070",
"repo": "zen-browser-flake",
"type": "github"
}
}
},

212
flake.nix
View File

@ -1,32 +1,202 @@
{
description = "NixOS configuration";
description = "Martin's NixOS configuration - Based on EmergentMind/nix-config";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
#
# ========= Official NixOS and HM Package Sources =========
#
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
# The next two are for pinning to stable vs unstable regardless of what the above is set to
# This is particularly useful when an upcoming stable release is in beta because you can effectively
# keep 'nixpkgs-stable' set to stable for critical packages while setting 'nixpkgs' to the beta branch to
# get a jump start on deprecation changes.
# See also 'stable-packages' and 'unstable-packages' overlays at 'overlays/default.nix"
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs";
};
#
# ========= Utilities =========
#
# Secrets management
sops-nix = {
url = "github:mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Catppuccin theming
catppuccin.url = "github:catppuccin/nix";
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-25.05";
# Spotify
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
# Browser
zen-browser.url = "github:0xc000022070/zen-browser-flake";
};
outputs = inputs@{ nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
in
{
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
system = system;
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.martin = import ./home.nix;
}
];
outputs =
{
self,
nixpkgs,
home-manager,
...
}@inputs:
let
inherit (self) outputs;
common = import ./shared/common.nix;
theme = import ./shared/theme.nix;
#
# ========= Architectures =========
#
forAllSystems = nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
];
# ========== Extend lib with lib.custom ==========
# NOTE: This approach allows lib.custom to propagate into hm
# see: https://github.com/nix-community/home-manager/pull/3454
customLib = (_self: _super: { custom = import ./lib { inherit (nixpkgs) lib; }; });
lib = nixpkgs.lib.extend customLib;
libHm = home-manager.lib.extend customLib;
systems = builtins.map (config: defaultAttrs // config) [
{
hostName = "desktop";
nvidia.enable = true;
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMSzXyTuQyTrWsfORQbvgrqt/33+hfSUDXeMg6D1T2wz";
}
{
hostName = "thinkpad";
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILNlHKE/BD8kKfhJD7GBk1A3whZf3gTjk9VEgGAj3qsH";
}
{
hostName = "pi4";
system = "aarch64-linux";
wayland.enable = false;
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJE9m7YiITe1sDqSZ7Pa8luIw3WToLsypixZEqE4wCQE";
address.private = common.localIpAddr 188;
}
{
hostName = "homelab";
wayland.enable = false;
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIARDv5nRlfPDXdV+Db4FaqeSJZ3/3MO0frYGzuVeqYAl";
address.private = common.localIpAddr 231;
address.tailnet = common.tailnetAddr "admin";
}
];
defaultAttrs = {
hostName = builtins.abort "hostName is required";
system = "x86_64-linux";
username = common.username;
version = common.system.version;
wayland.enable = true;
nvidia.enable = false;
};
knownSystems = [
{
# Samsung S23 FE
hostName = "localhost-y4maoyqm";
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII7SSjiqnjif1Kko60iXVTKJ7a1/lRlR8TFNtoclNcnQ";
}
{
# OnePlus 8
hostName = "localhost-4izgka9k";
ssh.publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIALtulVgLrUEpKnpfPFQTHjaEXTxs2Q818NC18eLx0bj";
}
];
in
{
#
# ========= Overlays =========
#
# Custom modifications/overrides to upstream packages
overlays = import ./overlays.nix { inherit inputs; };
#
# ========= Host Configurations =========
#
nixosConfigurations = builtins.listToAttrs (
builtins.map (
{
hostName,
system,
username,
...
}@systemConfig:
{
name = hostName;
value = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = {
inherit
outputs
inputs
common
theme
lib
systemConfig
systems
knownSystems
;
isDarwin = false;
};
modules = [
./hosts/${hostName}
home-manager.nixosModules.home-manager
{
home-manager = {
# Backups conflicting files in case of error
backupFileExtension = "bkp";
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit
inputs
common
theme
libHm
systemConfig
systems
;
};
users.${username} = import ./hosts/${hostName}/home-manager;
};
}
{
nixpkgs.overlays = [ ];
}
];
};
}
) systems
);
#
# ========= Formatting =========
#
# Nix formatter available through 'nix fmt' https://github.com/NixOS/nixfmt
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
#
# ========= DevShell =========
#
# Custom shell for bootstrapping on new hosts, modifying nix-config, and secrets management
devShells = forAllSystems (
system:
import ./shell.nix {
pkgs = nixpkgs.legacyPackages.${system};
}
);
};
};
}

View File

@ -1,41 +0,0 @@
{ config, pkgs, ... }:
{
# Home Manager needs a bit of information about you and the
# paths it should manage.
home = {
username = "martin";
homeDirectory = "/home/martin";
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
stateVersion = "24.11";
};
# Let Home Manager install and manage itself.
programs = {
git = {
enable = true;
userName = "Martin Berg Alstad";
userEmail = "git@martials.no";
};
home-manager.enable = true;
kitty.enable = true;
neovim = {
enable = true;
vimAlias = true;
viAlias = true;
};
};
services = {
gpg-agent = {
enable = true;
pinentryPackage = pkgs.pinentry-curses;
};
};
}

View File

@ -0,0 +1,18 @@
{ pkgs, ... }:
{
hardware.bluetooth = {
enable = true;
input = {
# Required to get PS3 controllers working
General = {
ClassicBondedOnly = false;
UserspaceHID = false;
};
};
powerOnBoot = true;
package = pkgs.unstable.bluez;
};
services.blueman.enable = true;
}

4
hosts/desktop/common.nix Normal file
View File

@ -0,0 +1,4 @@
{
monitor1 = "DP-1";
monitor2 = "DP-3";
}

15
hosts/desktop/default.nix Normal file
View File

@ -0,0 +1,15 @@
{
lib,
pkgs,
...
}:
{
imports = [
(lib.custom.relativeToDesktop "modules")
./bluetooth.nix
./hardware-configuration.nix
];
boot.kernelPackages = pkgs.linuxPackages_6_12;
}

View File

@ -1,29 +1,42 @@
# 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,
modulesPath,
...
}:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/5e3f0f97-4bb4-4a53-ace2-9ed19ff9e8ea";
fsType = "btrfs";
options = [ "subvol=@" ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/5e3f0f97-4bb4-4a53-ace2-9ed19ff9e8ea";
fsType = "btrfs";
options = [ "subvol=@" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/D188-48A9";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/D188-48A9";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];

View File

@ -0,0 +1,14 @@
{
lib,
...
}:
{
imports = [
(lib.custom.relativeToDesktop "home-manager")
./hyprpaper.nix
./settings.nix
];
programs.git.signing.key = "706F53DD087A91DE";
}

View File

@ -0,0 +1,29 @@
# Wallpapers
{
lib,
theme,
...
}:
{
services.hyprpaper.settings =
let
wallpaper1 = builtins.toString theme.wallpaper.monitor1;
wallpaper2 = builtins.toString theme.wallpaper.monitor2;
in
{
preload = lib.mkForce [
wallpaper1
wallpaper2
];
wallpaper =
let
common = import ../common.nix;
in
lib.mkForce [
"${common.monitor1},${wallpaper1}"
"${common.monitor2},${wallpaper2}"
];
};
}

View File

@ -0,0 +1,12 @@
{ lib, ... }:
{
wayland.windowManager.hyprland.settings.monitor =
let
common = import ../common.nix;
in
lib.mkForce [
"${common.monitor1}, 3440x1440@175, 0x0, 1"
"${common.monitor2}, 3840x2160@60, 3440x0, 1.5, transform, 1"
];
}

View File

@ -0,0 +1,113 @@
/* Catppuccin Mocha Blue userChrome.css*/
@media (prefers-color-scheme: dark) {
:root {
--zen-colors-primary: #313244 !important;
--zen-primary-color: #89b4fa !important;
--zen-colors-secondary: #313244 !important;
--zen-colors-tertiary: #181825 !important;
--zen-colors-border: #89b4fa !important;
--toolbarbutton-icon-fill: #89b4fa !important;
--lwt-text-color: #cdd6f4 !important;
--toolbar-field-color: #cdd6f4 !important;
--tab-selected-textcolor: rgb(171, 197, 247) !important;
--toolbar-field-focus-color: #cdd6f4 !important;
--toolbar-color: #cdd6f4 !important;
--newtab-text-primary-color: #cdd6f4 !important;
--arrowpanel-color: #cdd6f4 !important;
--arrowpanel-background: #1e1e2e !important;
--sidebar-text-color: #cdd6f4 !important;
--lwt-sidebar-text-color: #cdd6f4 !important;
--lwt-sidebar-background-color: #11111b !important;
--toolbar-bgcolor: #313244 !important;
--newtab-background-color: #1e1e2e !important;
--zen-themed-toolbar-bg: #181825 !important;
--zen-main-browser-background: #181825 !important;
}
#permissions-granted-icon {
color: #181825 !important;
}
.sidebar-placesTree {
background-color: #1e1e2e !important;
}
#zen-workspaces-button {
background-color: #1e1e2e !important;
}
#TabsToolbar {
background-color: #181825 !important;
}
#urlbar-background {
background-color: #1e1e2e !important;
}
.content-shortcuts {
background-color: #1e1e2e !important;
border-color: #89b4fa !important;
}
.urlbarView-url {
color: #89b4fa !important;
}
#zenEditBookmarkPanelFaviconContainer {
background: #11111b !important;
}
toolbar .toolbarbutton-1 {
&:not([disabled]) {
&:is([open], [checked])
> :is(
.toolbarbutton-icon,
.toolbarbutton-text,
.toolbarbutton-badge-stack
) {
fill: #11111b;
}
}
}
.identity-color-blue {
--identity-tab-color: #89b4fa !important;
--identity-icon-color: #89b4fa !important;
}
.identity-color-turquoise {
--identity-tab-color: #94e2d5 !important;
--identity-icon-color: #94e2d5 !important;
}
.identity-color-green {
--identity-tab-color: #a6e3a1 !important;
--identity-icon-color: #a6e3a1 !important;
}
.identity-color-yellow {
--identity-tab-color: #f9e2af !important;
--identity-icon-color: #f9e2af !important;
}
.identity-color-orange {
--identity-tab-color: #fab387 !important;
--identity-icon-color: #fab387 !important;
}
.identity-color-red {
--identity-tab-color: #f38ba8 !important;
--identity-icon-color: #f38ba8 !important;
}
.identity-color-pink {
--identity-tab-color: #f5c2e7 !important;
--identity-icon-color: #f5c2e7 !important;
}
.identity-color-purple {
--identity-tab-color: #cba6f7 !important;
--identity-icon-color: #cba6f7 !important;
}
}

View File

@ -0,0 +1,157 @@
/* Catppuccin Mocha Blue userContent.css*/
@media (prefers-color-scheme: dark) {
/* Common variables affecting all pages */
@-moz-document url-prefix("about:") {
:root {
--in-content-page-color: #cdd6f4 !important;
--color-accent-primary: #89b4fa !important;
--color-accent-primary-hover: rgb(163, 197, 251) !important;
--color-accent-primary-active: rgb(138, 153, 250) !important;
background-color: #1e1e2e !important;
--in-content-page-background: #1e1e2e !important;
}
}
/* Variables and styles specific to about:newtab and about:home */
@-moz-document url("about:newtab"), url("about:home") {
:root {
--newtab-background-color: #1e1e2e !important;
--newtab-background-color-secondary: #313244 !important;
--newtab-element-hover-color: #313244 !important;
--newtab-text-primary-color: #cdd6f4 !important;
--newtab-wordmark-color: #cdd6f4 !important;
--newtab-primary-action-background: #89b4fa !important;
}
.icon {
color: #89b4fa !important;
}
.search-wrapper .logo-and-wordmark .logo {
background: url("zen-logo-mocha.svg"),
url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Blue/zen-logo-mocha.svg")
no-repeat center !important;
display: inline-block !important;
height: 82px !important;
width: 82px !important;
background-size: 82px !important;
}
@media (max-width: 609px) {
.search-wrapper .logo-and-wordmark .logo {
background-size: 64px !important;
height: 64px !important;
width: 64px !important;
}
}
.card-outer:is(:hover, :focus, .active):not(.placeholder) .card-title {
color: #89b4fa !important;
}
.top-site-outer .search-topsite {
background-color: #89b4fa !important;
}
.compact-cards .card-outer .card-context .card-context-icon.icon-download {
fill: #a6e3a1 !important;
}
}
/* Variables and styles specific to about:preferences */
@-moz-document url-prefix("about:preferences") {
:root {
--zen-colors-tertiary: #181825 !important;
--in-content-text-color: #cdd6f4 !important;
--link-color: #89b4fa !important;
--link-color-hover: rgb(163, 197, 251) !important;
--zen-colors-primary: #313244 !important;
--in-content-box-background: #313244 !important;
--zen-primary-color: #89b4fa !important;
}
groupbox,
moz-card {
background: #1e1e2e !important;
}
button,
groupbox menulist {
background: #313244 !important;
color: #cdd6f4 !important;
}
.main-content {
background-color: #11111b !important;
}
.identity-color-blue {
--identity-tab-color: #8aadf4 !important;
--identity-icon-color: #8aadf4 !important;
}
.identity-color-turquoise {
--identity-tab-color: #8bd5ca !important;
--identity-icon-color: #8bd5ca !important;
}
.identity-color-green {
--identity-tab-color: #a6da95 !important;
--identity-icon-color: #a6da95 !important;
}
.identity-color-yellow {
--identity-tab-color: #eed49f !important;
--identity-icon-color: #eed49f !important;
}
.identity-color-orange {
--identity-tab-color: #f5a97f !important;
--identity-icon-color: #f5a97f !important;
}
.identity-color-red {
--identity-tab-color: #ed8796 !important;
--identity-icon-color: #ed8796 !important;
}
.identity-color-pink {
--identity-tab-color: #f5bde6 !important;
--identity-icon-color: #f5bde6 !important;
}
.identity-color-purple {
--identity-tab-color: #c6a0f6 !important;
--identity-icon-color: #c6a0f6 !important;
}
}
/* Variables and styles specific to about:addons */
@-moz-document url-prefix("about:addons") {
:root {
--zen-dark-color-mix-base: #181825 !important;
--background-color-box: #1e1e2e !important;
}
}
/* Variables and styles specific to about:protections */
@-moz-document url-prefix("about:protections") {
:root {
--zen-primary-color: #1e1e2e !important;
--social-color: #cba6f7 !important;
--coockie-color: #89dceb !important;
--fingerprinter-color: #f9e2af !important;
--cryptominer-color: #b4befe !important;
--tracker-color: #a6e3a1 !important;
--in-content-primary-button-background-hover: rgb(81, 83, 105) !important;
--in-content-primary-button-text-color-hover: #cdd6f4 !important;
--in-content-primary-button-background: #45475a !important;
--in-content-primary-button-text-color: #cdd6f4 !important;
}
.card {
background-color: #313244 !important;
}
}
}

View File

@ -0,0 +1,13 @@
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_15_9)">
<rect width="1024" height="1024" rx="225" fill="#11111b"/>
<circle cx="512" cy="512" r="340" stroke="#cdd6f4" stroke-width="70"/>
<circle cx="512" cy="512" r="224.915" stroke="#cdd6f4" stroke-width="51"/>
<circle cx="512" cy="512" r="129.018" stroke="#cdd6f4" stroke-width="31"/>
</g>
<defs>
<clipPath id="clip0_15_9">
<rect width="1024" height="1024" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 568 B

View File

@ -0,0 +1,7 @@
{
# TODO merge with shared
home.file.".zen/audtxq7n.default/chrome" = {
source = ./chrome;
recursive = true;
};
}

44
hosts/pi4/actual.nix Normal file
View File

@ -0,0 +1,44 @@
{ config, common, ... }:
let
domain = "beta.budget.${common.domain}";
port = 8084;
in
{
networking.nat = {
enable = false;
internalInterfaces = [ "ve-*" ];
externalInterface = "wlan0";
# Lazy IPv6 connectivity for the container
enableIPv6 = true;
};
containers.actual = {
autoStart = false;
privateNetwork = true;
hostAddress = "192.168.10.188";
localAddress = "192.168.10.11";
config =
{ ... }:
{
networking.firewall.allowedTCPPorts = [ port ];
services = {
actual = {
enable = false;
settings = {
inherit port;
loginMethod = "password";
};
};
};
system.stateVersion = common.system.version;
};
};
services.nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://${config.containers.actual.localAddress}:${toString port}";
proxyWebsockets = true;
};
};
}

16
hosts/pi4/boot.nix Normal file
View File

@ -0,0 +1,16 @@
{ pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
initrd.availableKernelModules = [
"xhci_pci"
"usbhid"
"usb_storage"
];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
};
}

91
hosts/pi4/caddy.nix Normal file
View File

@ -0,0 +1,91 @@
{ common, ... }:
let
domain = common.domain;
in
{
services.caddy = {
enable = false;
email = "cert@${domain}";
virtualHosts =
let
localProxy = proxyTo "localhost";
homelabProxy = proxyTo "192.168.10.231";
proxyTo = ip: port: "reverse_proxy ${ip}:${builtins.toString port}";
redirect = subdomain: "redir https://${subdomain}.${domain}{uri}";
in
{
"beta.${domain}".extraConfig = ''
redir https://${domain}{uri}
'';
"git.${domain}".extraConfig = ''
${redirect "code"}
'';
"kitchenowl.${domain}".extraConfig = ''
${redirect "grocery"}
'';
# Gitea
"code.${domain}".extraConfig = ''
${homelabProxy 3000}
'';
# Forgejo
"beta.code.${domain}".extraConfig = ''
${localProxy 8001}
'';
# Nextcloud
"nextcloud.${domain}".extraConfig = ''
redir /.well-known/carddav /remote.php/dav 301
redir /.well-known/caldav /remote.php/dav 301
${homelabProxy 11000}
'';
# Kitchenowl
"grocery.${domain}".extraConfig = ''
${homelabProxy 800}
'';
# Actual Budget
"budget.${domain}".extraConfig = ''
${homelabProxy 5006}
'';
# Uptime Kuma
"status.${domain}".extraConfig = ''
${homelabProxy 3001}
'';
# Headscale
"vpn.${domain}".extraConfig = ''
reverse_proxy /web* 192.168.10.231:8084
reverse_proxy * 192.168.10.231:8082
'';
# Headscale SmartDNS
"dns.${domain}".extraConfig = ''
${homelabProxy 8082}
'';
# FreshRSS
"rss.${domain}".extraConfig = ''
${homelabProxy 8085}
'';
# Ente backend
"api.ente.${domain}".extraConfig = ''
${homelabProxy 8083}
'';
# Ente Photos frontend
"ente.${domain}".extraConfig = ''
${homelabProxy 3003}
'';
# Ente Auth frontend
"mfa.${domain}".extraConfig = ''
${homelabProxy 3004}
'';
# Homepage / portfolio
"${domain}".extraConfig = ''
${homelabProxy 4321}
'';
# Yamtrack
"track.${domain}".extraConfig = ''
${homelabProxy 8090}
'';
# Donetick
"chore.${domain}".extraConfig = ''
${homelabProxy 2021}
'';
};
};
}

20
hosts/pi4/default.nix Normal file
View File

@ -0,0 +1,20 @@
{ lib, ... }:
{
imports = with lib.custom; [
(relativeToBase "modules")
./actual.nix
./boot.nix
./caddy.nix
./forgejo.nix
./hardware.nix
./headscale.nix
./home-assitant.nix
./mailserver.nix
./nextcloud.nix
./nginx.nix
./podman.nix
./postgres.nix
./security
];
}

94
hosts/pi4/forgejo.nix Normal file
View File

@ -0,0 +1,94 @@
{
config,
pkgs,
lib,
systemConfig,
common,
...
}:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
domain = "beta.code.${common.domain}";
passwordKey = "forgejo/admin-pass";
runnerTokenKey = "forgejo/runner-token";
in
{
services = {
nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "http://127.0.0.1:${builtins.toString srv.HTTP_PORT}";
serverAliases = [ "beta.git.${common.domain}" ];
};
forgejo = {
enable = true;
database.type = "postgres";
# Enable support for Git Large File Storage
lfs.enable = true;
secrets.mailer.PASSWD = config.sops.secrets."mailserver/password-hash".path;
settings = {
server = {
DOMAIN = domain;
# You need to specify this to remove the port from URLs in the web UI.
ROOT_URL = "https://${domain}/";
HTTP_PORT = 8002;
};
# You can temporarily allow registration to create an admin user.
service.DISABLE_REGISTRATION = true;
# Add support for actions, based on act: https://github.com/nektos/act
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
# Sending emails is completely optional
# You can send a test email from the web UI at:
# Profile Picture > Site Administration > Configuration > Mailer Configuration
mailer = lib.mkIf config.mailserver.enable {
ENABLED = true;
PROTOCOL = "smtps";
SMTP_ADDR = config.mailserver.fqdn;
FROM = "noreply-forgejo@${common.domain}";
USER = "${systemConfig.username}@${common.domain}";
};
};
};
gitea-actions-runner = {
package = pkgs.forgejo-actions-runner;
instances.default = {
enable = true;
name = "monolith";
url = "https://${domain}";
# Obtaining the path to the runner token file may differ
# tokenFile should be in format TOKEN=<secret>, since it's EnvironmentFile for systemd
tokenFile = config.sops.secrets.${runnerTokenKey}.path;
labels = [
"docker:docker://node:20-bullseye"
"native:host"
];
};
};
};
sops.secrets = {
${passwordKey}.owner = "forgejo";
${runnerTokenKey}.owner = "forgejo";
};
# Create a single admin user / update password if exists
systemd.services.forgejo.preStart =
let
adminCmd = "${lib.getExe config.services.forgejo.package} admin user";
pwd = config.sops.secrets.${passwordKey};
user = "martin"; # Note, Forgejo doesn't allow creation of an account named "admin"
email = "git@${common.domain}";
in
''
${adminCmd} create --admin --email "${email}" --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true
## Alter an existing user. Will prompt new password on login
# ${adminCmd} change-password --username ${user} --password "$(tr -d '\n' < ${pwd.path})" || true
'';
}

12
hosts/pi4/hardware.nix Normal file
View File

@ -0,0 +1,12 @@
{
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
# TODO mount ext hdd
};
hardware.enableRedistributableFirmware = true;
}

66
hosts/pi4/headscale.nix Normal file
View File

@ -0,0 +1,66 @@
{
config,
common,
...
}:
let
cfg = config.services.headscale;
domain = "beta.vpn.${common.domain}";
dnsDomain = "secure.${common.domain}";
in
{
networking.firewall = {
trustedInterfaces = [ config.services.tailscale.interfaceName ];
allowedUDPPorts = [ config.services.tailscale.port ];
};
services = {
headscale = {
enable = true;
address = "0.0.0.0";
port = 8083;
settings = {
database = {
postgres = {
host = "/run/postgresql";
name = "headscale";
port = config.services.postgresql.settings.port;
user = cfg.user;
};
type = "postgres";
};
dns = {
base_domain = dnsDomain;
magic_dns = true;
};
logtail.enabled = false;
server_url = "https://${domain}";
};
};
nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://localhost:${toString config.services.headscale.port}";
proxyWebsockets = true;
};
};
postgresql =
let
psql = cfg.settings.database.postgres;
in
{
ensureDatabases = [ psql.name ];
ensureUsers = [
{
name = psql.user;
ensureDBOwnership = true;
}
];
};
};
}

View File

@ -0,0 +1,73 @@
{ pkgs, common, ... }:
let
dbName = "hass";
domain = "beta.home.${common.domain}";
port = 8085;
in
{
services = {
home-assistant = {
enable = true;
package =
(pkgs.home-assistant.override {
extraPackages =
py: with py; [
# Postgres
psycopg2
# Roomba
roombapy
];
}).overrideAttrs
(oldAttrs: {
# Avoid long install checks
doInstallCheck = false;
});
extraComponents = [
# Components required to complete the onboarding
"esphome"
"met"
"radio_browser"
];
config = {
# Includes dependencies for a basic setup
# https://www.home-assistant.io/integrations/default_config/
default_config = { };
homeassistant = {
name = "Hjem";
unit_system = "metric";
temperature_unit = "C";
};
http = {
server_host = "::1";
trusted_proxies = [ "::1" ];
use_x_forwarded_for = true;
server_port = port;
};
recorder.db_url = "postgresql://@/${dbName}";
};
};
nginx.virtualHosts.${domain} = {
forceSSL = true;
enableACME = true;
extraConfig = ''
proxy_buffering off;
'';
locations."/" = {
proxyPass = "http://[::1]:${toString port}";
proxyWebsockets = true;
};
};
postgresql = {
enable = true;
ensureDatabases = [ dbName ];
ensureUsers = [
{
name = dbName;
ensureDBOwnership = true;
}
];
};
};
}

View File

@ -0,0 +1,9 @@
{ lib, ... }:
{
imports = with lib.custom; [
(relativeToBase "home-manager")
];
programs.git.signing.key = "E3FA0E995C0D0E5E";
}

44
hosts/pi4/mailserver.nix Normal file
View File

@ -0,0 +1,44 @@
{
config,
inputs,
common,
systemConfig,
...
}:
let
passwordHashKey = "mailserver/password-hash";
in
{
imports = [
inputs.simple-nixos-mailserver.nixosModule
];
mailserver = {
enable = false;
# stateVersion = 1; TODO uncomment on 25.11
fqdn = "mail.${common.domain}";
domains = [
common.domain
];
# A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = {
"${systemConfig.username}@${common.domain}" = {
hashedPasswordFile = config.sops.secrets.${passwordHashKey}.path;
};
};
# Use Let's Encrypt certificates. Note that this needs to set up a stripped
# down nginx and opens port 80.
certificateScheme = "acme-nginx";
};
networking.firewall.allowedTCPPorts = [
25
465
587
];
sops.secrets.${passwordHashKey}.neededForUsers = true;
}

90
hosts/pi4/nextcloud.nix Normal file
View File

@ -0,0 +1,90 @@
# https://mich-murphy.com/configure-nextcloud-nixos/
{
pkgs,
config,
common,
...
}:
let
adminPassKey = "nextcloud/admin-pass";
domain = "beta.nextcloud.${common.domain}";
dbname = "nextcloud";
dbuser = dbname;
in
{
security.acme = {
acceptTerms = true;
certs.${config.services.nextcloud.hostName}.email = "acme@${common.domain}";
};
services = {
nextcloud = {
enable = true;
autoUpdateApps.enable = true;
config = {
adminpassFile = config.sops.secrets.${adminPassKey}.path;
dbtype = "pgsql";
dbname = dbname;
dbuser = dbuser;
# default directory for postgresql, ensures automatic setup of db
dbhost = "/run/postgresql";
adminuser = "admin";
};
extraApps = {
inherit (config.services.nextcloud.package.packages.apps)
contacts
deck
notes
tasks
;
};
extraAppsEnable = true;
hostName = domain;
https = true;
maxUploadSize = "0"; # No max limit
package = pkgs.nextcloud31;
settings = {
default_phone_region = "NO";
trusted_domains = [
domain
];
};
};
nginx.virtualHosts.${config.services.nextcloud.hostName} = {
forceSSL = true;
enableACME = true;
};
postgresql = {
ensureDatabases = [ dbname ];
ensureUsers = [
{
name = dbuser;
ensureDBOwnership = true;
}
];
};
postgresqlBackup = {
enable = true;
location = "/data/backup/nextclouddb";
databases = [ dbname ];
# time to start backup in systemd.time format
startAt = "*-*-* 23:15:00";
};
};
sops.secrets.${adminPassKey}.neededForUsers = true;
# ensure postgresql db is started with nextcloud
systemd.services."nextcloud-setup" = {
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
};
}

94
hosts/pi4/nginx.nix Normal file
View File

@ -0,0 +1,94 @@
{
common,
...
}:
let
domain = common.domain;
proxyTo = address: port: {
enableACME = true;
forceSSL = true;
locations."/".proxyPass = "${address}:${builtins.toString port}";
};
proxyLocations = locations: {
enableACME = true;
forceSSL = true;
inherit locations;
};
homelab = "http://${common.localIpAddr 231}";
homelabProxy = proxyTo homelab; # TODO get homelab local ip from systems
redirect = subdomain: {
enableACME = true;
forceSSL = true;
globalRedirect = if subdomain == "" then domain else "${subdomain}.${domain}";
};
in
{
services.nginx = {
enable = true;
enableReload = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
# Beta is currently stable
"www.${domain}" = redirect "";
"beta.${domain}" = redirect "";
"dev.${domain}" = homelabProxy 4322;
"git.${domain}" = redirect "code";
"kitchenowl.${domain}" = redirect "grocery";
# Gitea
"code.${domain}" = homelabProxy 3000;
# Nextcloud
"nextcloud.${domain}" = proxyLocations {
"/".proxyPass = "${homelab}:11000";
"/.well-known/carddav".return = "301 /remote.php/dav";
"/.well-known/caldav".return = "301 /remote.php/dav";
};
# Kitchenowl
"grocery.${domain}" = homelabProxy 800;
# Actual budget
"budget.${domain}" = homelabProxy 5006;
# Uptime Kuma
"status.${domain}" = homelabProxy 3001;
# Headscale
"vpn.${domain}" = proxyLocations {
"/web".proxyPass = "${homelab}:8084";
"/" = {
proxyPass = "${homelab}:8082";
extraConfig = ''
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_redirect http:// https://;
proxy_buffering off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains" always;
'';
};
};
# Headscale SmartDNS
"dns.${domain}" = homelabProxy 8082;
# FreshRSS
"rss.${domain}" = homelabProxy 8085;
# Ente backend
"api.ente.${domain}" = homelabProxy 8083;
# Ente Photos frontend
"ente.${domain}" = homelabProxy 3003;
# Ente Auth frontend
"mfa.${domain}" = homelabProxy 3004;
# Homepage / portfolio
"${domain}" = homelabProxy 4321;
# Yamtrack
"track.${domain}" = homelabProxy 8090;
# Donetick
"chore.${domain}" = homelabProxy 2021;
};
};
security.acme = {
acceptTerms = true;
defaults.email = "acme@${domain}";
};
}

23
hosts/pi4/podman.nix Normal file
View File

@ -0,0 +1,23 @@
{ pkgs, ... }:
{
virtualisation = {
# Enable common container config files in /etc/containers
containers.enable = true;
podman = {
enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
};
# Useful other development tools
environment.systemPackages = with pkgs; [
podman-tui # status of containers in the terminal
podman-compose # start group of containers for dev
];
}

11
hosts/pi4/postgres.nix Normal file
View File

@ -0,0 +1,11 @@
{ pkgs, ... }:
{
services.postgresql = {
enable = true;
authentication = pkgs.lib.mkOverride 10 ''
#type database DBuser auth-method
local all all trust
'';
};
}

View File

@ -0,0 +1,22 @@
{ systemConfig, ... }:
{
imports = [
./firewall.nix
];
security.sudo.extraRules = [
{
users = [ systemConfig.username ];
runAs = "ALL:ALL";
commands = [
{
command = "ALL";
options = [ "NOPASSWD" ];
}
];
}
];
services.pcscd.enable = true;
}

View File

@ -0,0 +1,17 @@
{ common, ... }:
{
networking = {
firewall = {
enable = true;
allowedTCPPorts = [
80
443
];
extraInputRules = ''
ip saddr ${common.localIpRange} accept
'';
};
nftables.enable = true;
};
}

View File

@ -0,0 +1,6 @@
{
services = {
upower.enable = true;
power-profiles-daemon.enable = true;
};
}

View File

@ -0,0 +1,14 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.bluez
];
hardware.bluetooth = {
enable = true;
powerOnBoot = true; # powers up the default Bluetooth controller on boot
};
services.blueman.enable = true;
}

View File

@ -0,0 +1,4 @@
{
# Empty matches all monitors
monitor1 = "";
}

View File

@ -0,0 +1,23 @@
{
pkgs,
lib,
...
}:
{
imports = [
(lib.custom.relativeToDesktop "modules")
./battery.nix
./bluetooth.nix
./hardware-configuration.nix
./security.nix
];
boot.kernelPackages = pkgs.linuxPackages_latest;
environment.systemPackages = with pkgs; [
brightnessctl
hyprsunset # Blue light filter
];
}

View File

@ -0,0 +1,57 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"usb_storage"
"sd_mod"
"sdhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/5ac9c425-35ae-47d5-a683-68ee0dbfc2bc";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-99b73f22-3fa1-42b5-ad48-54b0ccff72cc".device =
"/dev/disk/by-uuid/99b73f22-3fa1-42b5-ad48-54b0ccff72cc";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/3CFB-D12A";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -0,0 +1,14 @@
{
lib,
...
}:
{
imports = [
(lib.custom.relativeToDesktop "home-manager")
./hyprland
./zen
];
programs.git.signing.key = "848D71DE0590C199";
}

View File

@ -0,0 +1,8 @@
# Home configurations for Hyprland. For system configs, see ./modules/hyprland
{
imports = [
./hyprlock.nix
./hyprpanel.nix
./settings.nix
];
}

View File

@ -0,0 +1,15 @@
{ pkgs, lib, ... }:
{
# TODO fingerprint prompt using $FPRINTPROMPT
programs.hyprlock = {
package = pkgs.unstable.hyprlock;
settings = {
auth."fingerprint:enabled" = true;
# Override removed settings shared config
general = lib.mkForce {
hide_cursor = true;
};
};
};
}

View File

@ -0,0 +1,16 @@
{
lib,
...
}:
{
programs.hyprpanel.settings.bar.layouts."*".right = lib.mkForce [
"kbinput"
"volume"
"network"
"systray"
"clock"
"battery"
"notifications"
];
}

View File

@ -0,0 +1,33 @@
{
lib,
...
}:
{
wayland.windowManager.hyprland.settings = {
monitor =
let
common = import ../../common.nix;
in
lib.mkForce [
"${common.monitor1}, 1920x1080@60.05, 0x0, 1"
];
# Autostart
exec-once = [
"hyprsunset -t 5000" # Set blue light filter
];
input = {
sensitivity = lib.mkForce 0.4; # -1.0 - 1.0, 0 means no modification.
touchpad.natural_scroll = lib.mkForce true;
};
gestures = {
workspace_swipe = lib.mkForce true;
workspace_swipe_distance = lib.mkForce 150;
workspace_swipe_min_speed_to_force = lib.mkForce 0;
workspace_swipe_cancel_ratio = lib.mkForce 0.5;
};
};
}

View File

@ -0,0 +1,113 @@
/* Catppuccin Mocha Blue userChrome.css*/
@media (prefers-color-scheme: dark) {
:root {
--zen-colors-primary: #313244 !important;
--zen-primary-color: #89b4fa !important;
--zen-colors-secondary: #313244 !important;
--zen-colors-tertiary: #181825 !important;
--zen-colors-border: #89b4fa !important;
--toolbarbutton-icon-fill: #89b4fa !important;
--lwt-text-color: #cdd6f4 !important;
--toolbar-field-color: #cdd6f4 !important;
--tab-selected-textcolor: rgb(171, 197, 247) !important;
--toolbar-field-focus-color: #cdd6f4 !important;
--toolbar-color: #cdd6f4 !important;
--newtab-text-primary-color: #cdd6f4 !important;
--arrowpanel-color: #cdd6f4 !important;
--arrowpanel-background: #1e1e2e !important;
--sidebar-text-color: #cdd6f4 !important;
--lwt-sidebar-text-color: #cdd6f4 !important;
--lwt-sidebar-background-color: #11111b !important;
--toolbar-bgcolor: #313244 !important;
--newtab-background-color: #1e1e2e !important;
--zen-themed-toolbar-bg: #181825 !important;
--zen-main-browser-background: #181825 !important;
}
#permissions-granted-icon {
color: #181825 !important;
}
.sidebar-placesTree {
background-color: #1e1e2e !important;
}
#zen-workspaces-button {
background-color: #1e1e2e !important;
}
#TabsToolbar {
background-color: #181825 !important;
}
#urlbar-background {
background-color: #1e1e2e !important;
}
.content-shortcuts {
background-color: #1e1e2e !important;
border-color: #89b4fa !important;
}
.urlbarView-url {
color: #89b4fa !important;
}
#zenEditBookmarkPanelFaviconContainer {
background: #11111b !important;
}
toolbar .toolbarbutton-1 {
&:not([disabled]) {
&:is([open], [checked])
> :is(
.toolbarbutton-icon,
.toolbarbutton-text,
.toolbarbutton-badge-stack
) {
fill: #11111b;
}
}
}
.identity-color-blue {
--identity-tab-color: #89b4fa !important;
--identity-icon-color: #89b4fa !important;
}
.identity-color-turquoise {
--identity-tab-color: #94e2d5 !important;
--identity-icon-color: #94e2d5 !important;
}
.identity-color-green {
--identity-tab-color: #a6e3a1 !important;
--identity-icon-color: #a6e3a1 !important;
}
.identity-color-yellow {
--identity-tab-color: #f9e2af !important;
--identity-icon-color: #f9e2af !important;
}
.identity-color-orange {
--identity-tab-color: #fab387 !important;
--identity-icon-color: #fab387 !important;
}
.identity-color-red {
--identity-tab-color: #f38ba8 !important;
--identity-icon-color: #f38ba8 !important;
}
.identity-color-pink {
--identity-tab-color: #f5c2e7 !important;
--identity-icon-color: #f5c2e7 !important;
}
.identity-color-purple {
--identity-tab-color: #cba6f7 !important;
--identity-icon-color: #cba6f7 !important;
}
}

View File

@ -0,0 +1,157 @@
/* Catppuccin Mocha Blue userContent.css*/
@media (prefers-color-scheme: dark) {
/* Common variables affecting all pages */
@-moz-document url-prefix("about:") {
:root {
--in-content-page-color: #cdd6f4 !important;
--color-accent-primary: #89b4fa !important;
--color-accent-primary-hover: rgb(163, 197, 251) !important;
--color-accent-primary-active: rgb(138, 153, 250) !important;
background-color: #1e1e2e !important;
--in-content-page-background: #1e1e2e !important;
}
}
/* Variables and styles specific to about:newtab and about:home */
@-moz-document url("about:newtab"), url("about:home") {
:root {
--newtab-background-color: #1e1e2e !important;
--newtab-background-color-secondary: #313244 !important;
--newtab-element-hover-color: #313244 !important;
--newtab-text-primary-color: #cdd6f4 !important;
--newtab-wordmark-color: #cdd6f4 !important;
--newtab-primary-action-background: #89b4fa !important;
}
.icon {
color: #89b4fa !important;
}
.search-wrapper .logo-and-wordmark .logo {
background: url("zen-logo-mocha.svg"),
url("https://raw.githubusercontent.com/IAmJafeth/zen-browser/main/themes/Mocha/Blue/zen-logo-mocha.svg")
no-repeat center !important;
display: inline-block !important;
height: 82px !important;
width: 82px !important;
background-size: 82px !important;
}
@media (max-width: 609px) {
.search-wrapper .logo-and-wordmark .logo {
background-size: 64px !important;
height: 64px !important;
width: 64px !important;
}
}
.card-outer:is(:hover, :focus, .active):not(.placeholder) .card-title {
color: #89b4fa !important;
}
.top-site-outer .search-topsite {
background-color: #89b4fa !important;
}
.compact-cards .card-outer .card-context .card-context-icon.icon-download {
fill: #a6e3a1 !important;
}
}
/* Variables and styles specific to about:preferences */
@-moz-document url-prefix("about:preferences") {
:root {
--zen-colors-tertiary: #181825 !important;
--in-content-text-color: #cdd6f4 !important;
--link-color: #89b4fa !important;
--link-color-hover: rgb(163, 197, 251) !important;
--zen-colors-primary: #313244 !important;
--in-content-box-background: #313244 !important;
--zen-primary-color: #89b4fa !important;
}
groupbox,
moz-card {
background: #1e1e2e !important;
}
button,
groupbox menulist {
background: #313244 !important;
color: #cdd6f4 !important;
}
.main-content {
background-color: #11111b !important;
}
.identity-color-blue {
--identity-tab-color: #8aadf4 !important;
--identity-icon-color: #8aadf4 !important;
}
.identity-color-turquoise {
--identity-tab-color: #8bd5ca !important;
--identity-icon-color: #8bd5ca !important;
}
.identity-color-green {
--identity-tab-color: #a6da95 !important;
--identity-icon-color: #a6da95 !important;
}
.identity-color-yellow {
--identity-tab-color: #eed49f !important;
--identity-icon-color: #eed49f !important;
}
.identity-color-orange {
--identity-tab-color: #f5a97f !important;
--identity-icon-color: #f5a97f !important;
}
.identity-color-red {
--identity-tab-color: #ed8796 !important;
--identity-icon-color: #ed8796 !important;
}
.identity-color-pink {
--identity-tab-color: #f5bde6 !important;
--identity-icon-color: #f5bde6 !important;
}
.identity-color-purple {
--identity-tab-color: #c6a0f6 !important;
--identity-icon-color: #c6a0f6 !important;
}
}
/* Variables and styles specific to about:addons */
@-moz-document url-prefix("about:addons") {
:root {
--zen-dark-color-mix-base: #181825 !important;
--background-color-box: #1e1e2e !important;
}
}
/* Variables and styles specific to about:protections */
@-moz-document url-prefix("about:protections") {
:root {
--zen-primary-color: #1e1e2e !important;
--social-color: #cba6f7 !important;
--coockie-color: #89dceb !important;
--fingerprinter-color: #f9e2af !important;
--cryptominer-color: #b4befe !important;
--tracker-color: #a6e3a1 !important;
--in-content-primary-button-background-hover: rgb(81, 83, 105) !important;
--in-content-primary-button-text-color-hover: #cdd6f4 !important;
--in-content-primary-button-background: #45475a !important;
--in-content-primary-button-text-color: #cdd6f4 !important;
}
.card {
background-color: #313244 !important;
}
}
}

View File

@ -0,0 +1,13 @@
<svg width="1024" height="1024" viewBox="0 0 1024 1024" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_15_9)">
<rect width="1024" height="1024" rx="225" fill="#11111b"/>
<circle cx="512" cy="512" r="340" stroke="#cdd6f4" stroke-width="70"/>
<circle cx="512" cy="512" r="224.915" stroke="#cdd6f4" stroke-width="51"/>
<circle cx="512" cy="512" r="129.018" stroke="#cdd6f4" stroke-width="31"/>
</g>
<defs>
<clipPath id="clip0_15_9">
<rect width="1024" height="1024" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 568 B

View File

@ -0,0 +1,7 @@
{
# TODO merge with shared
home.file.".zen/xdaxqlov.default/chrome" = {
source = ./chrome;
recursive = true;
};
}

View File

@ -0,0 +1,38 @@
{ pkgs, ... }:
{
security = {
pam.services = {
gdm-fingerprint.text = ''
auth required pam_shells.so
auth requisite pam_nologin.so
auth requisite pam_faillock.so preauth
auth required ${pkgs.fprintd}/lib/security/pam_fprintd.so
auth optional pam_permit.so
auth required pam_env.so
auth [success=ok default=1] ${pkgs.gdm}/lib/security/pam_gdm.so
auth optional ${pkgs.gnome-keyring}/lib/security/pam_gnome_keyring.so
account include login
password required pam_deny.so
session include login
session optional ${pkgs.gnome-keyring}/lib/security/pam_gnome_keyring.so auto_start
'';
login.fprintAuth = false;
};
};
# Start the driver at boot
systemd.services.fprintd = {
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "simple";
};
# Install the driver
services.fprintd = {
enable = true;
tod.driver = pkgs.libfprint-2-tod1-goodix-550a; # Goodix 550a driver (from Lenovo)
};
}

88
justfile Normal file
View File

@ -0,0 +1,88 @@
# List all receipes
default:
@just --list
# Format all files in repo
fmt:
treefmt --on-unmatched info
# Clean user files
clean-user:
nh clean user
# Clean all files
clean-all:
nh clean all
# Build a specific host but don't activate it. Host must use same system as target system
build HOST:
git add .
just fmt
nh os build . -H {{HOST}}
# Switch to new config, but don't add to bootloader
test *FLAGS:
git add .
just fmt
nh os test . {{FLAGS}}
# Add new configuration to bootloader, but don't activate it now
boot *FLAGS:
git add .
just fmt
nh os test . {{FLAGS}}
# Switch to new config and add to bootloader
switch *FLAGS:
git add .
just fmt
nh os switch . {{FLAGS}}
# Switch to new config and add to bootloader without formatting or adding to git
switch-now *FLAGS:
nh os switch . {{FLAGS}}
update-all *FLAGS:
nix flake update
just switch {{FLAGS}}
update PKG:
nix flake update {{PKG}}
just switch
# Encrypt all files in the repo using git-crypt
lock:
git-crypt lock
# Decrypt all files in the repo using git-crypt and the user's GPG key
unlock:
git-crypt unlock ~/.config/git/crypt-key
# Connect to tailnet or sign-in if not registered
start-tailscale:
tailscale up --login-server https://vpn.martials.no
# Generate a new SSH key without passphrase
generate-ssh:
ssh-keygen -t ed25519 -a 32 -f ~/.ssh/id_ed25519 -P ""
# Generate a new age key from an existing ssh key (without passphrase)
generate-age-from-ssh:
mkdir -p ~/.config/sops/age
nix run nixpkgs#ssh-to-age -- -private-key -i ~/.ssh/id_ed25519 > ~/.config/sops/age/keys.txt
# Get a public age key from an existing age private key
get-public-age-key:
nix shell nixpkgs#age -c age-keygen -y ~/.config/sops/age/keys.txt
# Get the public ssh key from the current user
get-public-ssh-key:
cat ~/.ssh/id_ed25519.pub
# Edit the SOPS secrets file
edit-secrets:
nix run nixpkgs#sops -- shared/secrets/secrets.yaml
# Hash a string using the mkpasswd command
hash PASS:
echo "{{PASS}}" | mkpasswd -s

27
lib/default.nix Normal file
View File

@ -0,0 +1,27 @@
# FIXME(lib.custom): Add some stuff from hmajid2301/dotfiles/lib/module/default.nix, as simplifies option declaration
{ lib, ... }:
with builtins;
{
getSecret = with lib.strings; filePath: trim (removeSuffix "\n" (readFile filePath));
# use path relative to the root of the project
relativeToRoot = lib.path.append ../.;
relativeToBase = lib.path.append ../shared/base;
relativeToDesktop = lib.path.append ../shared/desktop;
scanPaths =
path:
map (f: (path + "/${f}")) (
attrNames (
lib.attrsets.filterAttrs (
path: _type:
(_type == "directory") # include directories
|| (
(path != "default.nix") # ignore default.nix
&& (lib.strings.hasSuffix ".nix" path) # include .nix files
)
) (readDir path)
)
);
}

11
overlays.nix Normal file
View File

@ -0,0 +1,11 @@
{ inputs, ... }:
{
# Gives access to unstable packages everywhere
unstable-packages = final: _prev: {
unstable = import inputs.nixpkgs-unstable {
system = final.system;
config.allowUnfree = true;
};
};
}

1
result
View File

@ -1 +0,0 @@
/nix/store/1q8w6gl1ll0mwfkqc3c2yx005s6wwfrl-hello-2.12.1

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 KiB

BIN
shared/assets/downtown.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
shared/assets/ekg_v2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

BIN
shared/assets/face.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

View File

@ -0,0 +1,12 @@
{ inputs, ... }:
{
imports = [
inputs.catppuccin.homeModules.catppuccin
./development
./shell
./gpg.nix
./home-manager.nix
./ssh.nix
];
}

View File

@ -0,0 +1,6 @@
{
imports = [
./git.nix
./helix.nix
];
}

View File

@ -0,0 +1,35 @@
{ pkgs, common, ... }:
{
home.packages = with pkgs; [
git-crypt
gitmoji-cli
];
programs.git =
let
package = pkgs.git.override { withLibsecret = true; };
in
{
enable = true;
package = package;
userName = "Martin Berg Alstad";
userEmail = "git@${common.domain}";
aliases = {
amend = "commit --amend";
cm = "commit";
s = "status";
p = "push";
};
signing.signByDefault = true;
extraConfig = {
pull.rebase = true;
push.autoSetupRemote = true;
safe.directory = "/etc/nixos";
credential.helper = "${package}/bin/git-credential-libsecret";
};
};
}

View File

@ -0,0 +1,111 @@
{
pkgs,
lib,
theme,
...
}:
{
catppuccin.helix = {
enable = true;
flavor = theme.flavor;
};
programs = {
fish.shellAliases.edit = "hx";
helix =
let
prettier = format: {
command = lib.getExe pkgs.nodePackages.prettier;
args = [
"--stdin-filepath"
"file.${format}"
];
};
biome = format: {
command = lib.getExe pkgs.biome;
args = [
"check"
"--stdin-file-path=file.${format}"
"--write"
];
};
in
{
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [
# Markdown
marksman
markdown-oxide
# Html, css, Json, Eslint
vscode-langservers-extracted
# Yaml
ansible-language-server
yaml-language-server
];
settings = {
editor = {
auto-save = {
after-delay.enable = true;
focus-lost = true;
};
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
lsp = {
display-inlay-hints = true;
display-messages = true;
};
};
keys.normal = {
C-f = ":format";
};
};
languages.language = [
{
name = "css";
formatter = biome "css";
auto-format = true;
}
{
name = "json";
language-servers = [
"vscode-json-language-server"
];
formatter = biome "json";
auto-format = true;
}
{
name = "jsonc";
language-servers = [
];
formatter = biome "jsonc";
file-types = [
"jsonc"
];
auto-format = true;
}
{
name = "markdown";
formatter = prettier "md";
auto-format = true;
}
{
name = "nix";
formatter.command = lib.getExe pkgs.nixfmt-rfc-style;
auto-format = true;
}
{
name = "yaml";
formatter = prettier "yaml";
auto-format = true;
}
];
};
};
}

View File

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
enableFishIntegration = true;
pinentry.package = pkgs.pinentry-curses;
};
}

View File

@ -0,0 +1,16 @@
{
systemConfig,
common,
...
}:
{
home = {
username = systemConfig.username;
homeDirectory = common.dir.home;
stateVersion = systemConfig.version;
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View File

@ -0,0 +1,13 @@
{ theme, ... }:
{
catppuccin.bat = {
enable = true;
flavor = theme.flavor;
};
programs = {
bat.enable = true;
fish.shellAliases.cat = "bat";
};
}

View File

@ -0,0 +1,10 @@
{ theme, ... }:
{
catppuccin.btop = {
enable = true;
flavor = theme.flavor;
};
programs.btop.enable = true;
}

View File

@ -0,0 +1,11 @@
{
imports = [
./bat.nix
./btop.nix
./eza.nix
./fastfetch.nix
./fish.nix
./fzf.nix
./zoxide.nix
];
}

View File

@ -0,0 +1,12 @@
{
programs = {
eza = {
enable = true;
colors = "always";
enableFishIntegration = true;
git = true;
icons = "always";
};
fish.shellAliases.ls = "eza";
};
}

View File

@ -0,0 +1,63 @@
{ lib, ... }:
{
programs = {
fish.shellAliases.fetch = "fastfetch";
fastfetch = {
enable = true;
settings = {
logo = {
source = "${lib.custom.relativeToRoot "shared/assets/Catppuccin.png"}";
type = "kitty";
height = 18;
padding.top = 2;
};
display.separator = " ";
modules =
let
keyColor = "34";
module = type: key: {
inherit type key keyColor;
};
formatModule = type: key: format: {
inherit
type
key
format
keyColor
;
};
in
[
"break"
"break"
{
type = "title";
keyWidth = 10;
}
"break"
(module "os" " ")
(module "kernel" " ")
(formatModule "packages" " " "{} (nixpkgs)")
(module "shell" " ")
(module "terminal" " ")
(module "wm" " ")
(module "theme" " ")
(module "cursor" " ")
(module "terminalfont" " ")
(module "uptime" " ")
(formatModule "datetime" " " "{1}-{3}-{11}")
(module "cpu" " ")
(module "gpu" "󰤽 ")
(module "sound" " ")
(module "lm" " ")
"break"
"colors"
"break"
"break"
];
};
};
};
}

View File

@ -0,0 +1,55 @@
{ pkgs, theme, ... }:
{
catppuccin = {
fish = {
enable = true;
flavor = theme.flavor;
};
starship = {
enable = true;
flavor = theme.flavor;
};
};
programs = {
fish = {
enable = true;
# Start starship when creating a new shell
interactiveShellInit = ''
starship init fish | source
${pkgs.fortune}/bin/fortune | ${pkgs.cowsay}/bin/cowsay -f tux
'';
plugins = [
{
# !! to get the previous command
# https://github.com/BrewingWeasel/fishbang
name = "fishbang";
src = pkgs.fetchFromGitHub {
owner = "BrewingWeasel";
repo = "fishbang";
rev = "50389667eb9ac79edcff9b987c83e1de8ac93921";
hash = "sha256-IneNWyfo29C7FDA5b6pTZRX3HpP6y/dRM6GXuLq2+zc=";
};
}
];
shellAliases = {
nix-shell = "nix-shell --run fish"; # Start nix-shells using fish
};
};
starship = {
enable = true;
settings = {
directory.substitutions = {
"Documents" = "󰈙 ";
"Downloads" = " ";
"Music" = "󰓃 ";
"Pictures" = " ";
"Git" = " ";
"nextcloud" = " ";
};
};
};
};
}

View File

@ -0,0 +1,13 @@
{ theme, ... }:
{
catppuccin.fzf = {
enable = true;
flavor = theme.flavor;
};
programs.fzf = {
enable = true;
enableFishIntegration = true;
};
}

View File

@ -0,0 +1,10 @@
# cd alternative
{
programs = {
fish.shellAliases.cd = "z";
zoxide = {
enable = true;
enableFishIntegration = true;
};
};
}

View File

@ -0,0 +1,32 @@
# ~/.ssh/config
{
systemConfig,
systems,
common,
...
}:
with builtins;
{
programs.ssh = {
enable = true;
matchBlocks = listToAttrs (
map (system: {
name = system.hostName;
value =
let
hostName =
if (system ? address && system.address ? tailnet) then
system.address.tailnet
else
common.tailnetAddr system.hostName;
in
{
port = 22;
user = systemConfig.username;
hostname = hostName;
};
}) systems
);
};
}

View File

@ -0,0 +1,11 @@
{
imports = [
./development
./networking.nix
./nix-helper.nix
./nixos.nix
./security
./shell.nix
./users.nix
];
}

View File

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
imports = [
./formatters.nix
./nix.nix
];
environment.systemPackages = with pkgs; [
git
just
];
}

View File

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
biome # Linter + formatter
nixfmt-rfc-style
treefmt
shfmt
];
}

View File

@ -0,0 +1,8 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
nixd
nil
];
}

View File

@ -0,0 +1,19 @@
{ pkgs, systemConfig, ... }:
{
environment.systemPackages = with pkgs; [
wget
];
networking = {
networkmanager.enable = true;
hostName = systemConfig.hostName;
};
programs.ssh.enableAskPassword = false;
services = {
openssh.enable = true;
tailscale.enable = true;
};
}

View File

@ -0,0 +1,14 @@
# Nix-Helper: github.com/viperML/nh
{ common, ... }:
{
programs.nh = {
enable = true;
flake = common.root;
clean = {
enable = true;
dates = "weekly";
extraArgs = "--keep-since 30d";
};
};
}

View File

@ -0,0 +1,28 @@
{
pkgs,
outputs,
systemConfig,
...
}:
{
environment.systemPackages = with pkgs; [
nix-prefetch-github # Cmd to get rev and hash from GitHub
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs = {
# Allow unfree packages
config.allowUnfree = true;
overlays = [ outputs.overlays.unstable-packages ];
};
system = {
rebuild.enableNg = true;
stateVersion = systemConfig.version;
};
}

View File

@ -0,0 +1,9 @@
{
imports = [
./keyring.nix
./sops.nix
./ssh.nix
];
programs.gnupg.agent.enable = true;
}

View File

@ -0,0 +1,3 @@
{
services.gnome.gnome-keyring.enable = true;
}

View File

@ -0,0 +1,20 @@
{
inputs,
lib,
systemConfig,
...
}:
{
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
defaultSopsFile = lib.custom.relativeToRoot "shared/secrets/secrets.yaml";
defaultSopsFormat = "yaml";
age.keyFile = "/home/${systemConfig.username}/.config/sops/age/keys.txt";
secrets.password-hash.neededForUsers = true;
};
}

View File

@ -0,0 +1,33 @@
# /nix/store/<hash>/etc/ssh/ssh_config & /nix/store/<hash>/etc/ssh/authorized_keys
{
systemConfig,
systems,
knownSystems,
common,
...
}:
with builtins;
let
allSystems = knownSystems ++ systems;
in
{
programs.ssh.knownHosts = listToAttrs (
map (system: {
name = system.hostName;
value = {
extraHostNames = [
(
if (system ? address && system.address ? tailnet) then
system.address.tailnet
else
common.tailnetAddr system.hostName
)
];
publicKey = system.ssh.publicKey;
};
}) allSystems
);
users.users.${systemConfig.username}.openssh.authorizedKeys.keys = (
map (system: system.ssh.publicKey) allSystems
);
}

View File

@ -0,0 +1,19 @@
# For Fish dotfiles, see: /home-manager/fish.nix
{ pkgs, ... }:
{
programs = {
bash = {
# Starts the OS using Bash, then starts fish if it's not running
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
fish.enable = true;
};
}

View File

@ -0,0 +1,18 @@
{ config, systemConfig, ... }:
let
username = systemConfig.username;
in
{
users = {
mutableUsers = false;
users.${username} = {
isNormalUser = true;
hashedPasswordFile = config.sops.secrets.password-hash.path;
description = username;
extraGroups = [
"networkmanager"
"wheel"
];
};
};
}

39
shared/common.nix Normal file
View File

@ -0,0 +1,39 @@
rec {
default = {
browser = "zen";
calculator = "gnome-calculator";
fileManager = "nautilus";
imageViewer = "imv";
lockScreen = "hyprlock";
terminal = "kitty";
};
dir = {
home = "/home/${username}";
pictures = "${dir.home}/Pictures";
};
domain = "martials.no";
tailnetDomain = "dns.${domain}";
localIpPrefix = "192.168.10.";
localIpRange = "${localIpPrefix}0/24";
localIpAddr = subAddr: "${localIpPrefix}${builtins.toString subAddr}";
tailnetAddr = host: "${host}.${tailnetDomain}";
keymaps = {
layout = "gb,no";
options = "grp:alt_shift_toggle"; # Toggle using ALT + SHIFT
};
username = "martin";
root = ../.;
# 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. It's perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.version = "25.05";
}

View File

@ -0,0 +1,15 @@
{ theme, ... }:
{
catppuccin.cursors = {
enable = true;
flavor = theme.flavor;
accent = "dark";
};
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
size = 16;
};
}

View File

@ -0,0 +1,23 @@
{
xdg.mimeApps = {
enable = true;
defaultApplications =
let
browser = "zen.desktop";
imageViewer = "imv.desktop";
pdfReader = "sioyek.desktop";
in
{
"text/html" = browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;
"x-scheme-handler/about" = browser;
"x-scheme-handler/unknown" = browser;
"image/jpg" = imageViewer;
"image/jpeg" = imageViewer;
"image/png" = imageViewer;
"image/gif" = imageViewer;
"application/pdf" = pdfReader;
};
};
}

View File

@ -0,0 +1,31 @@
{
lib,
common,
...
}:
let
dir = common.dir;
in
{
imports = [
(lib.custom.relativeToBase "home-manager")
./development
./hyprland
./media
./rofi
./shell
./zen
./cursors.nix
./default-applications.nix
./freetube.nix
./gtk.nix
./kitty.nix
./nextcloud.nix
./sioyek.nix
./spicetify.nix
];
home.sessionVariables = {
XDG_PICTURES_DIR = dir.pictures; # Define the default dir for pictures
};
}

View File

@ -0,0 +1,7 @@
{
imports = [
./zed.nix
];
# TODO set Wayland vmOptions in Jetbrains products, Requires current installed version in path
# -Dawt.toolkit.name=WLToolKit
}

View File

@ -0,0 +1,56 @@
{ pkgs, theme, ... }:
{
programs.zed-editor = {
enable = true;
package = pkgs.unstable.zed-editor;
extensions = [
"html"
"catppuccin"
"catppuccin-icons"
"toml"
"nix"
"git-firefly"
"just"
"biome"
];
userSettings =
let
font = "${theme.nerdFont} Nerd Font";
fontSize = 14;
in
{
agent = {
default_model = {
provider = "ollama";
model = "deepseek-r1:8b";
};
};
autosave = "on_focus_change";
auto_update = false;
base_keymap = "JetBrains";
buffer_font_family = font;
features = {
edit_prediction_provider = "zed";
};
icon_theme = {
mode = theme.mode;
light = "Catppuccin Latte";
dark = "Catppuccin Mocha";
};
ui_font_family = font;
ui_font_size = fontSize;
buffer_font_size = fontSize;
tabs = {
file_icons = true;
git_status = true;
};
theme = {
mode = theme.mode;
light = "Catppuccin Latte";
dark = "Catppuccin Mocha";
};
lsp.nil.initialization_options.formatting.command = [ "nixfmt" ];
};
};
}

View File

@ -0,0 +1,53 @@
{ pkgs, ... }:
{
catppuccin.freetube.enable = true;
programs.freetube = {
enable = true;
package = pkgs.unstable.freetube;
settings = {
allowDashAv1Formats = true;
checkForUpdates = false;
currentLocale = "en-GB";
defaultTheatreMode = true;
defaultQuality = "1080";
displayVideoPlayButton = false;
region = "NO";
useSponsorBlock = true;
sponsorBlockSponsor = {
color = "CatppuccinMochaGreen";
skip = "autoSkip";
};
sponsorBlockSelfPromo = {
color = "CatppuccinMochaYellow";
skip = "showInSeekBar";
};
sponsorBlockInteraction = {
color = "CatppuccinMochaPink";
skip = "showInSeekBar";
};
sponsorBlockIntro = {
color = "CatppuccinMochaSapphire";
skip = "doNothing";
};
sponsorBlockOutro = {
color = "CatppuccinMochaBlue";
skip = "doNothing";
};
sponsorBlockRecap = {
color = "CatppuccinMochaMauve";
skip = "doNothing";
};
sponsorBlockMusicOffTopic = {
color = "CatppuccinMochaFlamingo";
skip = "doNothing";
};
sponsorBlockFiller = {
color = "CatppuccinMochaMauve";
skip = "doNothing";
};
};
};
}

View File

@ -0,0 +1,13 @@
{ ... }:
{
dconf = {
enable = true;
settings = {
# Prefer dark mode for all GTK apps
"org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
};
gtk.enable = true;
}

View File

@ -0,0 +1,102 @@
{ common, ... }:
let
app = common.default;
in
{
wayland.windowManager.hyprland.settings = {
"$mainMod" = "SUPER";
"$shiftMod" = "$mainMod SHIFT";
"$ctrlMod" = "$mainMod CTRL";
"$menu" = "rofi -show drun";
bind = [
"$mainMod, Q, exec, ${app.terminal}"
"$mainMod, C, killactive,"
"$shiftMod, M, exit,"
"$mainMod, E, exec, ${app.fileManager}"
"$mainMod, V, togglefloating,"
"$mainMod, R, exec, $menu"
"$mainMod, P, pseudo," # dwindle
"$mainMod, J, togglesplit," # dwindle
"$mainMod, B, exec, ${app.browser}"
"$mainMod, L, exec, ${app.lockScreen}"
"$mainMod, K, exec, [float] ${app.calculator}"
"$mainMod, ESCAPE, exec, hyprpanel t dashboardmenu"
# Move focus with mainMod + arrow keys
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
# Move window with ctrl + mainMod + arrow keys
"$ctrlMod, left, movewindow, l"
"$ctrlMod, right, movewindow, r"
"$ctrlMod, up, movewindow, u"
"$ctrlMod, down, movewindow, d"
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9]
"$shiftMod, 1, movetoworkspace, 1"
"$shiftMod, 2, movetoworkspace, 2"
"$shiftMod, 3, movetoworkspace, 3"
"$shiftMod, 4, movetoworkspace, 4"
"$shiftMod, 5, movetoworkspace, 5"
"$shiftMod, 6, movetoworkspace, 6"
"$shiftMod, 7, movetoworkspace, 7"
"$shiftMod, 8, movetoworkspace, 8"
"$shiftMod, 9, movetoworkspace, 9"
"$shiftMod, 0, movetoworkspace, 10"
# Example special workspace (scratchpad)
"$mainMod, S, togglespecialworkspace, magic"
"$shiftMod, S, movetoworkspace, special:magic"
# Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
];
binde = [
# Resize the focused window
"$shiftMod, right, resizeactive, 20 0"
"$shiftMod, left, resizeactive, -20 0"
"$shiftMod, up, resizeactive, 0 -20"
"$shiftMod, down, resizeactive, 0 20"
];
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bindl = [
", XF86AudioNext, exec, playerctl next"
", XF86AudioPause, exec, playerctl play-pause"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPrev, exec, playerctl previous"
];
bindel = [
# Laptop multimedia keys for volume and LCD brightness
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",XF86MonBrightnessUp, exec, brightnessctl s 10%+"
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
];
};
}

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