diff --git a/.gitignore b/.gitignore index a4abc69d..5989bf18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ .direnv result .pre-commit-config.yaml +/.codex diff --git a/.sops.yaml b/.sops.yaml deleted file mode 100644 index 41b45eb8..00000000 --- a/.sops.yaml +++ /dev/null @@ -1,11 +0,0 @@ -keys: - users: - - &rap_zion age1y8vwxjyzhftr8n0mry5zkq34ra5g69z927p9s3qrj04gzqwasc8q3fqlgf - - &kubex age1qmfyk82lve992tvzw82d4dgr3ek77xx9m7uez3uq55mgqu6r5eys40evkr - - &firefly age13ps3kkzfn3eyaqc50reudytr5ws80ssamzh09kj6878a6lgxususuu58wp -creation_rules: - - path_regex: modules/home-manager/common/secrets.yaml$ - key_groups: - - age: - - *rap_zion - - *firefly diff --git a/README.md b/README.md index 2e3c5070..b5bdfb25 100644 --- a/README.md +++ b/README.md @@ -24,25 +24,42 @@ It follows a structure to keep related configurations together, but not too much # On fresh systems nix develop -# NixOS rebuilds (hostname autodetection) +# Dedicated devshell targets +switch-zion +switch-firefly +``` + +
+ πŸ”½ Details +
+ +```bash +# nh switch (hostname autodetection) nh os switch . +nh home switch . -# NixOS build with custom hostname +# nh switch with custom hostname nh os build --hostname kubex . +nh home switch -c nix@firefly . -# NixOS build installer iso image +# nix build installer iso nix build .#nixosConfigurations.vinox.config.system.build.isoImage -# NixOS remote switch -nixos-rebuild switch --flake .#kubex --target-host 192.168.55.10 --sudo +# nh remote switch +nh os switch --hostname kubex . -d always --target-host kubex +nh os switch --hostname nixberry . -d always --target-host -# HomeManager rebuilds (hostname & username autodetection) -nh home switch . +# nix remote switch +nixos-rebuild switch --flake .#kubex --target-host 192.168.55.10 --sudo -# HomeManager build with custom hostname -# TODO:! +# enable experimental-features +export NIX_CONFIG="experimental-features = nix-command flakes" +# OR +--extra-experimental-features "nix-command flakes" ``` +
+
πŸ’½ Disko
@@ -59,6 +76,11 @@ sudo nixos-install --flake .#zion
+## :open_book: Docs + +- [Hyprland - Keymap](./docs/hyprland.md#keymap) +- [NVIM - Keymap](https://github.com/RAPSNX/neonix/tree/main/docs/keymap.md) + ## Licenses The NixOS logo used in this repository is based on the original design available at [NixOS Artwork Repository](https://github.com/NixOS/nixos-artwork/blob/master/logo/nix-snowflake-colours.svg). diff --git a/dev-shells.nix b/dev-shells.nix index a547890b..850a268c 100644 --- a/dev-shells.nix +++ b/dev-shells.nix @@ -8,23 +8,38 @@ let src = ./.; hooks = { statix.enable = true; - nixfmt-rfc-style.enable = true; + nixfmt.enable = true; deadnix.enable = true; }; }; + + # Makefile like targets + switch-firefly = pkgs.writeShellScriptBin "switch-firefly" '' + NIX_CONFIG="experimental-features = nix-command flakes" \ + nh home switch -c nix@firefly . --show-activation-logs + ''; + + switch-zion = pkgs.writeShellScriptBin "switch-zion" '' + nh os switch && nh home switch + ''; in { - default = - with pkgs; - mkShell { - inherit (pre-commit-check) shellHook; + default = pkgs.mkShell { + inherit (pre-commit-check) shellHook; - packages = [ + packages = builtins.attrValues { + inherit (pkgs) nh statix deadnix - nixfmt-rfc-style + nixfmt nix-inspect - ]; + ; + + inherit + switch-firefly + switch-zion + ; }; + }; } diff --git a/docs/bootstrap.md b/docs/bootstrap.md new file mode 100644 index 00000000..92c716de --- /dev/null +++ b/docs/bootstrap.md @@ -0,0 +1,9 @@ +# Bootstrapping + +## General +### PWAs +Manually installed `PWAs` in `Chromium`: +- todoist + +## Firefly +Look into [./firefly.md](Firefly bootstrap) diff --git a/docs/firefly.md b/docs/firefly.md index 7312de93..7b5dfe76 100644 --- a/docs/firefly.md +++ b/docs/firefly.md @@ -1,13 +1,46 @@ +# Backups + +1. Firefox profile + +```bash +# TODO: Add this to home.nix +rsync -av --update ~/.mozilla/firefox/default ~/Nextcloud/Home/Backups/firefox_profile/ +``` + +2. Check atuin `key` match with the key in vault. + # Install device -1. Install it via usb-image -2. Install lix -3. Create local user -4. Get user-certificate with chandler -3. clone dotfiles -4. Make home-manager switch +1. Install `nix` (May disable any VPN) + +```bash +Verify command on nixos.org/download +sh <(curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install) --daemon +``` + +2. Clone dotfiles + 1. Change username `home.nix`, if necessary. +3. Switch config via `devshells` target. + +```bash +nix develop +switch-firefly +``` + +4. Create `hyprland` desktop file. +```bash +echo "[Desktop Entry] +Name=Hyprland +Comment=An intelligent dynamic tiling Wayland compositor +Exec=/home/$USER/.nix-profile/bin/start-hyprland +Type=Application" | sudo tee /usr/share/wayland-sessions/hyprland.desktop ``` -home-manager switch --flake .#rapsn@firefly + +5. Copy user-certificate to firefox + +```bash +# TODO: Add this to home.nix (as activation script for example) +ln -sf ~/.pki/nssdb/* ~/.mozilla/firefox/default/ ``` ## Manual things @@ -18,16 +51,43 @@ systemctl --user mask --now gpg-agent.service gpg-agent.socket \ gpg-agent-ssh.socket gpg-agent-extra.socket gpg-agent-browser.socket ``` -### Copy user-certificate to firefox +### Chromium -```bash -cp .pki/nssdb/* /home/rapsn/.mozilla/firefox/default/ +Extension: `Open in firefox`: + +**Other Settings** + +- Enable Reverse Mode + +**Automation Rules** + +Comma-separated list of URLs: +``` +*://*.google.com/*, *://chat.ske.eu01.stackit.cloud/* ``` + ### GTK Theme -Instead of configuring every theme myself, only the theme installation is managed via `nix`, to set the theme use `nwg-look`. +`nwg-look` is used to configure theme in multiple locations. +Run it, ensure to remove the check of `GTK4` files in preferences. +Set `widgets -> colorScheme -> prefer dark`. + +```bash +dconf read /org/gnome/desktop/interface/gtk-theme # Read the actual name +``` + +## Installed via APT + +Those programs are installed via apt, since they do not work within `nix`. -## Outside nix 😭 -- mumble (apt) -- hyprland (apt ppa:piper) +```bash +# TODO: Check why hyprlock not working +sudo add-apt-repository ppa:cppiber/hyprland +sudo apt update +sudo apt -y install \ + xdg-desktop-portal-wlr \ + mumble \ + swaylock \ + podman +``` diff --git a/docs/hyprland.md b/docs/hyprland.md new file mode 100644 index 00000000..d1c78e3c --- /dev/null +++ b/docs/hyprland.md @@ -0,0 +1,89 @@ +# Hyprland + +General docs for hyprland. + +## Keymap + + + + + +
+ +## Common + +| Key | Action | +|---|---| +| `Super+Enter` | Terminal | +| `Super+E` | Launcher | +| `Super+P` | Wlogout | +| `Super+Q` | Kill active | +| `Super+N` | Notification Center | +| `Super+.` | Emoji picker | + +## Window + +| Key | Action | +|---|---| +| `Super+F` | Fullscreen | +| `Super+Shift+F` | Full-Fullscreen | +| `Super+U` | Toggle floating | +| `Super+T` | Toggle split | +| `Super+Mouse1` | Move | +| `Super+Mouse2` | Resize | + +## Focus / Move + +| Key | Action | +|---|---| +| `Super+H/J/K/L` | Focus window L/D/U/R | +| `Super+Shift+H/J/K/L` | Move window L/D/U/R | + +## Workspaces + +| Key | Action | +|---|---| +| `Super+1…9` | Go `1…9` | +| `Alt+1…8` | Move `1…8` | + + + +## Special Workspaces + +| Key | Action | +|---|---| +| `Super+O` | Toggle `scratchy` | +| `Super+M` | Toggle `aux` | +| `Super+Shift+O` | Move active to `scratchy` | +| `Super+Shift+M` | Move active to `aux` | + +## Programs + +| Key | Action | +|---|---| +| `Super+Z` | Mumble mute | +| `Super+Shift+Z` | Mumble deaf | +| `Super+.` | Emoji picker | + +## Resize Mode + +Enter: `Super+R` + +| Key | Action | +|---|---| +| `H/J/K/L` | Resize | +| `Shift+H/J/K/L` | Small resize | +| `Enter` / `Esc` | Exit | + +## Window Mode + +Enter: `Super+W` + +| Key | Action | +|---|---| +| `Q/W/E/R` | Move window to workspace | +| `B` | Get firefox | +| `Shift+B` | Send firefox back to `3` | +| `Enter` / `Esc` | Exit | + +
diff --git a/docs/misc.md b/docs/misc.md index fe275e8b..368e9679 100644 --- a/docs/misc.md +++ b/docs/misc.md @@ -30,16 +30,38 @@ sudo efibootmgr --create \ --loader '\EFI\systemd\systemd-bootx64.efi' \ # Mind the backslashes ``` -## UWSM +## Monitor setup -### start apps -Use `uswm app -- ` to start apps. -This will start the app in a seperate `systemd` scope, which is part of the `app.slice`. -If not, the process will be part of the `session.slice`, which can result in termination of the user session. +All possible monitor configurations are configured via `kanshi`, which maches automatically the correct profile. +`/modules/home/desktops/addons/kanshi` -Keep the slice as clean as possible: -```bash -β”‚ β”‚ β”‚ β”œβ”€wayland-wm@hyprland\x2duwsm.desktop.service -β”‚ β”‚ β”‚ β”‚ β”œβ”€77102 /run/current-system/sw/bin/Hyprland -β”‚ β”‚ β”‚ β”‚ └─77200 Xwayland :0 -rootless -core -listenfd 54 -listenfd 55 -displayfd 107 -wm 104 +## Nix follows + +``` + neonix = { + url = "github:rgroemmer/neonix/plugin-enhancement"; + inputs.nixpkgs.follows = "nixpkgs"; + }; ``` + +This will follow the actual flakes `nixpkgs`, neonix by itself uses `nixvim` from its own inputs, which is not part +of `nixpkgs`. +If the flakes `nixpkgs` is to new, plugins and packages from it will be "to new" for the rather outdated `nixvim` from neonix repo. +This can lead to problems starting nvim, this can be fixed by update the `neonix` flake accordingly. +> There is also a nix (lix?) bug, which does not update the `flake.lock` when a follows is removed. + +## Neonix + +`neonix` needs to have its own `nixpkgs`, so no `nixpkgs.follows` is configured. +Instead this should be updated on its own, because if nixpkgs in dotfiles is to new, all dependencies and plugins of +nvim may not work anymore with the `neonix` upstream configuration. + +## Monitor / Workspace setup + +`kanshi` is used to match all possible desktop / office setups via profiles. +These profiles have the primary and secondary display configured, and will execute a script to adapt the workspace pinning. +This will write its config to `~/.config/hypr/workspaces.conf`, same as `nwg-desktop`. +`nwg-desktop` can still be used for both monitor and workspace dynamic configuration. + +**To actually change the monitor config, the `kanshi` systemd service needs to be stopped.** + diff --git a/docs/monitors.md b/docs/monitors.md new file mode 100644 index 00000000..06782fd0 --- /dev/null +++ b/docs/monitors.md @@ -0,0 +1,22 @@ +# Monitor / Workspace setup + +`kanshi` is used to match all possible desktop / office setups via profiles. +These profiles have the primary and secondary display configured, and will execute a script to adapt the workspace pinning. +This will write its config to `~/.config/hypr/workspaces.conf`, same as `nwg-desktop`. +`nwg-desktop` can still be used for both monitor and workspace dynamic configuration. + +**To actually change the monitor config, the `kanshi` systemd service needs to be stopped.** + + +## Samsungs auto input switch not working +With `ddcutil` it is possible to switch input of a display port monitor. + +``` +ddcutil --display 2 setvcp 60 0x09 # Display port (Zion) +ddcutil --display 2 setvcp 60 0x06 # HDMT (Firefly) +``` + +### TODOs + +- Add this to hyprland autostart, to automatically change input on startup. +- Create keybinding to switch both monitors between inputs. diff --git a/docs/nix-lang.md b/docs/nix-lang.md index 7546c6a1..838bf406 100644 --- a/docs/nix-lang.md +++ b/docs/nix-lang.md @@ -123,6 +123,25 @@ Prev is the package before this overlay, may after some other overlays from upst This overlay function will be executed while instantiating ``, `prev` is the `pkgs` instance with correct `system`, before the overlay is applied. +## Nix `with`, its confusing +For readablity `with` comes handy to reduce repetitive in attribute statements. +But it also has a lot of problems and is confusing, in particular when having multiple `with` globaly. +This is considerd as **bad practice** and entirely avoided. +Even more it should be avoided completely see [best-practices#with-scopes](https://nix.dev/guides/best-practices#with-scopes) + +```nix +packages = builtins.attrValues { + inherit (pkgs) + curl + jq + ; + inherit (something) + anything + ; +}; +``` + + ## Update custom packages (derivation) 1. Bump version, set all `hash`es to empty sting `""`. diff --git a/docs/structure.md b/docs/structure.md new file mode 100644 index 00000000..7176788e --- /dev/null +++ b/docs/structure.md @@ -0,0 +1,28 @@ +## πŸ›οΈ Structure + +### `flake.nix` +- `NixOS` and `HomeManager` configurations. + +### `devshells.nix` +- `devShells` to provide `git-commit-hooks` for: + - Leverage git-commit-hooks with enforce of lint, fmt & code checking. + - Shell environment with all tools needed to switch, build & run the `flake`. + +### `hosts/*` +- All devices using nix, with the host specific module configuration: + - `default.nix` entrypoint and config for all `NixOS` modules, usually imports the `hardware-configuration.nix`. + - `home.nix`entrypoint and config for all `home-manager` modules. + +### `modules` +- All modules for `home-manager` and `NixOS` + +**Module structure** + +- It defines a `option` and `config` for it. +- Every module has a `default.nix` which imports all module related files. + + +### `extra/` + +Configuration or backup files mostly not directly related to `nix`. + diff --git a/docs/style.md b/docs/style.md deleted file mode 100644 index bd04e392..00000000 --- a/docs/style.md +++ /dev/null @@ -1,37 +0,0 @@ -## πŸ›οΈ Structure - -# TODO: Update this completly - -- **`flake.nix`** Entrypoint to all: - - `NixOS` configurations. - - `HomeManager` configurations. - - `devShells` to provide `nix develop` environment. (see `shell.nix`) - - `formatter`. -- **`shell.nix`** Shell config for `nix develop` environment. - - Leverage git-commit-hooks with enforce of lint, fmt & code checking. - - Shell environment with all tools needed to switch, build & run the `flake`. -- **`hosts/`** All physical machines managed by `NixOS`. -- **`nixos`** Modules for `NixOS` separated into: - - `common/` **default** configurations for all `hosts`. - - `*` optional to import. -- **`home-manager`** Entrypoint for all `home-configurations` per `host`. - - `common/` contains configuration defaults valid for all `home-configurations`. - - `*/` contains `NixOS` modules, optional to import. -- `isos/` Configuration for all `NixOS` configurations which build images. -- `extra/` Configuration or backup files mostly not directly related to `nix`. -- `nix.nix` Nix & nixpkgs configuration for `NixOS` & `HomeManager`. - -## πŸ“œ Rules - -- **`Host`** - - βš–οΈ Every `hosts` entrypoint is a `default.nix`. - - βš–οΈ It imports all `NixOS` modules as `path`. - - βš–οΈ Define *host specific configuration* - - βš–οΈ Imports `hardware-configuration.nix` - - May has a `disko.nix` configuration to configure `filsystems`. -- **`Home-manager`** - - βš–οΈ Every `host` has its own entrypoint at toplevel. - - βš–οΈ Every `host` entrypoint is a file with the host name which: - - Imports all `Home` configuration for this `host`. - - Defines **host specific configuration** - diff --git a/extra/keyboard/README.md b/extra/keyboard/README.md new file mode 100644 index 00000000..f0baabe3 --- /dev/null +++ b/extra/keyboard/README.md @@ -0,0 +1,7 @@ +# Keyboard layout backup +Since there were problems restoring the keymap with via, the main file is `./corne-via-backup.json`, a layout +generated by qmk-configurator. + +## Change / Update +Upload to qmk-configurator, adapt & download new `json`. +Use qmk-configuration fork, with `flash.sh` diff --git a/extra/keyboard/corne-qmk-main.json b/extra/keyboard/corne-qmk-main.json new file mode 100644 index 00000000..e862a258 --- /dev/null +++ b/extra/keyboard/corne-qmk-main.json @@ -0,0 +1,14 @@ +{ + "keyboard": "crkbd", + "keymap": "rapsn-led", + "layers": [ + ["KC_TAB", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_Z", "KC_U", "KC_I", "KC_O", "KC_P", "KC_ESC", "KC_LGUI", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_BSPC", "OSL(4)", "KC_LSFT", "KC_Y", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_LSFT", "KC_LCTL", "MO(1)", "KC_SPC", "KC_ENT", "MO(2)", "KC_LCTL"], + ["KC_TRNS", "RALT(KC_S)", "KC_UNDS", "KC_LBRC", "KC_RBRC", "KC_CIRC", "KC_EXLM", "KC_LT", "KC_GT", "KC_PEQL", "KC_AMPR", "KC_DEL", "KC_TRNS", "KC_BSLS", "KC_SLSH", "KC_LCBR", "KC_RCBR", "KC_ASTR", "KC_QUES", "KC_LPRN", "KC_RPRN", "KC_MINS", "KC_COLN", "KC_AT", "KC_TRNS", "KC_HASH", "KC_DLR", "KC_PIPE", "KC_TILD", "KC_GRV", "KC_PPLS", "KC_PERC", "KC_DQUO", "KC_QUOT", "KC_SCLN", "KC_TRNS", "KC_LGUI", "KC_TRNS", "KC_SPC", "KC_ENT", "MO(3)", "KC_RALT"], + ["KC_TRNS", "KC_F1", "KC_F2", "KC_F3", "KC_F4", "KC_NO", "KC_HOME", "LCTL(KC_LEFT)", "LCTL(KC_RGHT)", "KC_END", "KC_NO", "KC_TRNS", "KC_TRNS", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_LEFT", "KC_DOWN", "KC_UP", "KC_RGHT", "KC_NO", "KC_TRNS", "KC_TRNS", "KC_F10", "KC_F11", "KC_F12", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_TRNS", "KC_LGUI", "MO(3)", "KC_SPC", "KC_ENT", "KC_TRNS", "KC_RALT"], + ["KC_NO", "LGUI(KC_1)", "LGUI(KC_2)", "LGUI(KC_3)", "LGUI(KC_4)", "LGUI(KC_5)", "LGUI(KC_6)", "LGUI(KC_7)", "LGUI(KC_8)", "LGUI(KC_9)", "KC_NO", "KC_NO", "KC_NO", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_NO", "KC_NO", "LALT(KC_1)", "LALT(KC_2)", "LALT(KC_3)", "KC_4", "LALT(KC_5)", "LALT(KC_6)", "KC_NO", "KC_COMM", "KC_DOT", "KC_NO", "KC_NO", "KC_LGUI", "KC_TRNS", "KC_SPC", "KC_ENT", "KC_TRNS", "KC_RALT"], + ["KC_NO", "DF(0)", "DF(5)", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "RALT(KC_U)", "KC_NO", "RALT(KC_O)", "KC_NO", "KC_NO", "KC_NO", "RALT(KC_A)", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_TRNS", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "RALT(KC_6)", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO"], + ["KC_TAB", "KC_Q", "KC_TRNS", "KC_E", "KC_R", "KC_T", "KC_Z", "KC_U", "KC_I", "KC_O", "KC_P", "KC_ESC", "KC_LGUI", "KC_A", "KC_S", "KC_D", "KC_F", "KC_G", "KC_H", "KC_J", "KC_K", "KC_L", "KC_BSPC", "OSL(4)", "KC_LSFT", "KC_Y", "KC_X", "KC_C", "KC_V", "KC_B", "KC_N", "KC_M", "KC_COMM", "KC_DOT", "KC_SLSH", "KC_LCTL", "KC_LCTL", "MO(6)", "KC_SPC", "KC_ENT", "DF(0)", "KC_LCTL"], + ["KC_NO", "KC_1", "KC_2", "KC_3", "KC_4", "KC_5", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_6", "KC_7", "KC_8", "KC_9", "KC_0", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_Y", "KC_U", "KC_I", "KC_O", "KC_P", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_TRNS", "KC_NO", "KC_NO", "KC_TRNS", "KC_NO"] + ], + "layout": "LAYOUT_split_3x6_3" +} diff --git a/extra/keyboard/crkbd.layout.json b/extra/keyboard/corne-via-backup.json similarity index 100% rename from extra/keyboard/crkbd.layout.json rename to extra/keyboard/corne-via-backup.json diff --git a/flake.lock b/flake.lock index 8455fc22..fc600514 100644 --- a/flake.lock +++ b/flake.lock @@ -20,11 +20,11 @@ ] }, "locked": { - "lastModified": 1764714051, - "narHash": "sha256-AjcMlM3UoavFoLzr0YrcvsIxALShjyvwe+o7ikibpCM=", + "lastModified": 1775558810, + "narHash": "sha256-fy95EdPnqQlpbP8+rk0yWKclWShCUS5VKs6P7/1MF2c=", "owner": "hyprwm", "repo": "aquamarine", - "rev": "a43bedcceced5c21ad36578ed823e6099af78214", + "rev": "7371b669b22aa2af980f913fc312a786d2f1abb2", "type": "github" }, "original": { @@ -38,11 +38,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1765485905, - "narHash": "sha256-fk6zFzzcwz6su99K7UTxS2497+z/Cdk3FzNsacsmZKA=", + "lastModified": 1776420287, + "narHash": "sha256-0P2QyDM8R1FFww//TNDLTRVnVkQxVdbEVQiVuyD1SqY=", "owner": "catppuccin", "repo": "nix", - "rev": "b49c675acd80931fc8b54290920a90189b461dcf", + "rev": "bdf0285dc7978ebd78b76054631d7ef05680895e", "type": "github" }, "original": { @@ -58,11 +58,11 @@ ] }, "locked": { - "lastModified": 1765794845, - "narHash": "sha256-YD5QWlGnusNbZCqR3pxG8tRxx9yUXayLZfAJRWspq2s=", + "lastModified": 1773889306, + "narHash": "sha256-PAqwnsBSI9SVC2QugvQ3xeYCB0otOwCacB1ueQj2tgw=", "owner": "nix-community", "repo": "disko", - "rev": "7194cfe5b7a3660726b0fe7296070eaef601cae9", + "rev": "5ad85c82cc52264f4beddc934ba57f3789f28347", "type": "github" }, "original": { @@ -74,15 +74,15 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "NixOS", "repo": "flake-compat", "type": "github" } @@ -90,15 +90,15 @@ "flake-compat_2": { "flake": false, "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "NixOS", "repo": "flake-compat", "type": "github" } @@ -106,15 +106,15 @@ "flake-compat_3": { "flake": false, "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { - "owner": "edolstra", + "owner": "NixOS", "repo": "flake-compat", "type": "github" } @@ -128,11 +128,11 @@ ] }, "locked": { - "lastModified": 1765495779, - "narHash": "sha256-MhA7wmo/7uogLxiewwRRmIax70g6q1U/YemqTGoFHlM=", + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "5635c32d666a59ec9a55cab87e898889869f7b71", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", "type": "github" }, "original": { @@ -159,6 +159,27 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": [ + "nfsm", + "systems" + ] + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "gitignore": { "inputs": { "nixpkgs": [ @@ -231,11 +252,11 @@ ] }, "locked": { - "lastModified": 1765823531, - "narHash": "sha256-tyNJjd48hfgsyEfsq1Ueufg4oJv6b8xBA6NYRJrLPyg=", + "lastModified": 1776454077, + "narHash": "sha256-7zSUFWsU0+jlD7WB3YAxQ84Z/iJurA5hKPm8EfEyGJk=", "owner": "nix-community", "repo": "home-manager", - "rev": "8315c1544f383b791a3115c9959d1f27920e8320", + "rev": "565e5349208fe7d0831ef959103c9bafbeac0681", "type": "github" }, "original": { @@ -260,11 +281,11 @@ ] }, "locked": { - "lastModified": 1753964049, - "narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=", + "lastModified": 1772461003, + "narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=", "owner": "hyprwm", "repo": "hyprcursor", - "rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5", + "rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7", "type": "github" }, "original": { @@ -289,11 +310,11 @@ ] }, "locked": { - "lastModified": 1763733840, - "narHash": "sha256-JnET78yl5RvpGuDQy3rCycOCkiKoLr5DN1fPhRNNMco=", + "lastModified": 1775496928, + "narHash": "sha256-Ds759WU03mGWtu3I43J+5GF5Ni8TvF+GYQUFD+fVeMo=", "owner": "hyprwm", "repo": "hyprgraphics", - "rev": "8f1bec691b2d198c60cccabca7a94add2df4ed1a", + "rev": "cf95d93d17baa18f1d9b016b3afe27f820521a6e", "type": "github" }, "original": { @@ -321,11 +342,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1765837153, - "narHash": "sha256-FLJNXQLl/qL2LSCwW493eOSja4IxfR0wAF/0KnwXZS4=", + "lastModified": 1776514109, + "narHash": "sha256-sGZir5sjqKOUv2fywOFXVolUnVJRtI1KvAqt42ql/mI=", "owner": "hyprwm", "repo": "hyprland", - "rev": "6e09eb2e6cc1744687f158f2a576de844be59f4e", + "rev": "889ee4f26d77ff0c36f5c4767ef0629371fd2c18", "type": "github" }, "original": { @@ -367,11 +388,11 @@ ] }, "locked": { - "lastModified": 1764812575, - "narHash": "sha256-1bK1yGgaR82vajUrt6z+BSljQvFn91D74WJ/vJsydtE=", + "lastModified": 1774710575, + "narHash": "sha256-p7Rcw13+gA4Z9EI3oGYe3neQ3FqyOOfZCleBTfhJ95Q=", "owner": "hyprwm", "repo": "hyprland-guiutils", - "rev": "fd321368a40c782cfa299991e5584ca338e36ebe", + "rev": "0703df899520001209646246bef63358c9881e36", "type": "github" }, "original": { @@ -392,11 +413,11 @@ ] }, "locked": { - "lastModified": 1759610243, - "narHash": "sha256-+KEVnKBe8wz+a6dTLq8YDcF3UrhQElwsYJaVaHXJtoI=", + "lastModified": 1772460177, + "narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "bd153e76f751f150a09328dbdeb5e4fab9d23622", + "rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917", "type": "github" }, "original": { @@ -421,11 +442,11 @@ ] }, "locked": { - "lastModified": 1764612430, - "narHash": "sha256-54ltTSbI6W+qYGMchAgCR6QnC1kOdKXN6X6pJhOWxFg=", + "lastModified": 1772459629, + "narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=", "owner": "hyprwm", "repo": "hyprlang", - "rev": "0d00dc118981531aa731150b6ea551ef037acddd", + "rev": "7615ee388de18239a4ab1400946f3d0e498a8186", "type": "github" }, "original": { @@ -473,11 +494,11 @@ ] }, "locked": { - "lastModified": 1764592794, - "narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=", + "lastModified": 1772462885, + "narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=", "owner": "hyprwm", "repo": "hyprtoolkit", - "rev": "5cfe0743f0e608e1462972303778d8a0859ee63e", + "rev": "9af245a69fa6b286b88ddfc340afd288e00a6998", "type": "github" }, "original": { @@ -498,11 +519,11 @@ ] }, "locked": { - "lastModified": 1764962281, - "narHash": "sha256-rGbEMhTTyTzw4iyz45lch5kXseqnqcEpmrHdy+zHsfo=", + "lastModified": 1774911391, + "narHash": "sha256-c4YVwO33Mmw+FIV8E0u3atJZagHvGTJ9Jai6RtiB8rE=", "owner": "hyprwm", "repo": "hyprutils", - "rev": "fe686486ac867a1a24f99c753bb40ffed338e4b0", + "rev": "e6caa3d4d1427eedbdf556cf4ceb70f2d9c0b56d", "type": "github" }, "original": { @@ -523,11 +544,11 @@ ] }, "locked": { - "lastModified": 1763640274, - "narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=", + "lastModified": 1772459835, + "narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671", + "rev": "0a692d4a645165eebd65f109146b8861e3a925e7", "type": "github" }, "original": { @@ -552,11 +573,11 @@ ] }, "locked": { - "lastModified": 1764872015, - "narHash": "sha256-INI9AVrQG5nJZFvGPSiUZ9FEUZJLfGdsqjF1QSak7Gc=", + "lastModified": 1775414057, + "narHash": "sha256-mDpHnf+MkdOxEqIM1TnckYYh9p1SXR8B3KQfNZ12M8s=", "owner": "hyprwm", "repo": "hyprwire", - "rev": "7997451dcaab7b9d9d442f18985d514ec5891608", + "rev": "86012ee01b0fdd8bf3101ef38816f2efbee42490", "type": "github" }, "original": { @@ -565,6 +586,36 @@ "type": "github" } }, + "import-tree": { + "locked": { + "lastModified": 1773693634, + "narHash": "sha256-BtZ2dtkBdSUnFPPFc+n0kcMbgaTxzFNPv2iaO326Ffg=", + "owner": "vic", + "repo": "import-tree", + "rev": "c41e7d58045f9057880b0d85e1152d6a4430dbf1", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", + "type": "github" + } + }, + "import-tree_2": { + "locked": { + "lastModified": 1772344373, + "narHash": "sha256-OQQ1MhB9t1J71b2wxRRTdH/Qd8UGG0p+dGspfCf5U1c=", + "owner": "vic", + "repo": "import-tree", + "rev": "10fda59eee7d7970ec443b925f32a1bc7526648c", + "type": "github" + }, + "original": { + "owner": "vic", + "repo": "import-tree", + "type": "github" + } + }, "krewfile": { "inputs": { "flake-utils": "flake-utils", @@ -573,11 +624,11 @@ ] }, "locked": { - "lastModified": 1739869900, - "narHash": "sha256-UPvzdmbQloXkQprO5EsWhsV7vg6+PyC60NNctduLznA=", + "lastModified": 1767002854, + "narHash": "sha256-4PE60B0aZQyT1MCf6fCLwI6uAk3vYpjuR6I/3XZsy6o=", "owner": "brumhard", "repo": "krewfile", - "rev": "ba420832d80b673aff278972065b4fdb7d64a106", + "rev": "dc1e6ebe5c5d4b81cfd6239f8451d5e8090bc6f9", "type": "github" }, "original": { @@ -588,16 +639,17 @@ }, "neonix": { "inputs": { + "import-tree": "import-tree_2", "nixpkgs": "nixpkgs_2", "nixvim": "nixvim", "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "lastModified": 1765833763, - "narHash": "sha256-MjVgnWPOXK8HR1LATNi0QTDkYg76zU+g6NQPddq1LRY=", + "lastModified": 1773763727, + "narHash": "sha256-eIs5oebsXVNlSzOUBE/bPhOO0wTPaeqG6Mt282BAFCY=", "owner": "rgroemmer", "repo": "neonix", - "rev": "b8e535115138d533cebd0b7ef79c5ff53ee60829", + "rev": "c357d962e8963bda78295b3becfc70816a540c44", "type": "github" }, "original": { @@ -606,13 +658,93 @@ "type": "github" } }, + "nfsm": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": [ + "nixpkgs" + ], + "systems": "systems_4" + }, + "locked": { + "lastModified": 1767882499, + "narHash": "sha256-vH7ILtO2y7wesmbgzi4XiDVjiq2rvLEt4s8sW2t5IpY=", + "owner": "gvolpe", + "repo": "nfsm", + "rev": "c55e5e6bcb5f221f2f032fcf4ec7b06ea34af6b4", + "type": "github" + }, + "original": { + "owner": "gvolpe", + "repo": "nfsm", + "type": "github" + } + }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": [ + "nixpkgs" + ], + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1776509722, + "narHash": "sha256-oHVMjAMBukYnGeEE0EtCQsx8cNRv8WadHD8ZV3oZFSM=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "f8cc32a3aba29fdacd06d80b0986028cfd413a22", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1776505268, + "narHash": "sha256-+hK+EgAwuRG+lhqwOkKfXlqMEdELIoTMdjfVosIlLb0=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "9e5716a9dbf7dbf9622a95a5bd23a898867759c6", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixos-hardware": { "locked": { - "lastModified": 1764440730, - "narHash": "sha256-ZlJTNLUKQRANlLDomuRWLBCH5792x+6XUJ4YdFRjtO4=", + "lastModified": 1775490113, + "narHash": "sha256-2ZBhDNZZwYkRmefK5XLOusCJHnoeKkoN95hoSGgMxWM=", "owner": "nixos", "repo": "nixos-hardware", - "rev": "9154f4569b6cdfd3c595851a6ba51bfaa472d9f3", + "rev": "c775c2772ba56e906cbeb4e0b2db19079ef11ff7", "type": "github" }, "original": { @@ -624,11 +756,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1763966396, - "narHash": "sha256-6eeL1YPcY1MV3DDStIDIdy/zZCDKgHdkCmsrLJFiZf0=", + "lastModified": 1776169885, + "narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5ae3b07d8d6527c42f17c876e404993199144b6a", + "rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9", "type": "github" }, "original": { @@ -638,13 +770,29 @@ "type": "github" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1776434932, + "narHash": "sha256-gyqXNMgk3sh+ogY5svd2eNLJ6oEwzbAeaoBrrxD0lKk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "c7f47036d3df2add644c46d712d14262b7d86c0c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { - "lastModified": 1765472234, - "narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=", + "lastModified": 1772542754, + "narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b", + "rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4", "type": "github" }, "original": { @@ -656,11 +804,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1765472234, - "narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=", + "lastModified": 1776169885, + "narHash": "sha256-l/iNYDZ4bGOAFQY2q8y5OAfBBtrDAaPuRQqWaFHVRXM=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b", + "rev": "4bd9165a9165d7b5e33ae57f3eecbcb28fb231c9", "type": "github" }, "original": { @@ -680,11 +828,11 @@ "systems": "systems_3" }, "locked": { - "lastModified": 1765796308, - "narHash": "sha256-szKgoF0JbDUvWkqjB2AyyFagmsF5ZFEjajZRUiUV9mU=", + "lastModified": 1772402258, + "narHash": "sha256-3DmCFOdmbkFML1/G9gj8Wb+rCCZFPOQtNoMCpqOF8SA=", "owner": "nix-community", "repo": "nixvim", - "rev": "12a76dd12beccd8d18249b05d10d6acda4e722e0", + "rev": "21ae25e13b01d3b4cdc750b5f9e7bad68b150c10", "type": "github" }, "original": { @@ -703,11 +851,11 @@ ] }, "locked": { - "lastModified": 1765016596, - "narHash": "sha256-rhSqPNxDVow7OQKi4qS5H8Au0P4S3AYbawBSmJNUtBQ=", + "lastModified": 1775036584, + "narHash": "sha256-zW0lyy7ZNNT/x8JhzFHBsP2IPx7ATZIPai4FJj12BgU=", "owner": "cachix", "repo": "git-hooks.nix", - "rev": "548fc44fca28a5e81c5d6b846e555e6b9c2a5a3c", + "rev": "4e0eb042b67d863b1b34b3f64d52ceb9cd926735", "type": "github" }, "original": { @@ -726,11 +874,11 @@ ] }, "locked": { - "lastModified": 1765464257, - "narHash": "sha256-dixPWKiHzh80PtD0aLuxYNQ0xP+843dfXG/yM3OzaYQ=", + "lastModified": 1772665116, + "narHash": "sha256-XmjUDG/J8Z8lY5DVNVUf5aoZGc400FxcjsNCqHKiKtc=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "09e45f2598e1a8499c3594fe11ec2943f34fe509", + "rev": "39f53203a8458c330f61cc0759fe243f0ac0d198", "type": "github" }, "original": { @@ -748,11 +896,11 @@ ] }, "locked": { - "lastModified": 1765464257, - "narHash": "sha256-dixPWKiHzh80PtD0aLuxYNQ0xP+843dfXG/yM3OzaYQ=", + "lastModified": 1775585728, + "narHash": "sha256-8Psjt+TWvE4thRKktJsXfR6PA/fWWsZ04DVaY6PUhr4=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "09e45f2598e1a8499c3594fe11ec2943f34fe509", + "rev": "580633fa3fe5fc0379905986543fd7495481913d", "type": "github" }, "original": { @@ -767,32 +915,14 @@ "disko": "disko", "home-manager": "home-manager", "hyprland-git": "hyprland-git", + "import-tree": "import-tree", "krewfile": "krewfile", "neonix": "neonix", + "nfsm": "nfsm", + "niri": "niri", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_3", - "pre-commit-hooks": "pre-commit-hooks_3", - "sops-nix": "sops-nix" - } - }, - "sops-nix": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1765836173, - "narHash": "sha256-hWRYfdH2ONI7HXbqZqW8Q1y9IRbnXWvtvt/ONZovSNY=", - "owner": "mic92", - "repo": "sops-nix", - "rev": "443a7f2e7e118c4fc63b7fae05ab3080dd0e5c63", - "type": "github" - }, - "original": { - "owner": "mic92", - "repo": "sops-nix", - "type": "github" + "pre-commit-hooks": "pre-commit-hooks_3" } }, "systems": { @@ -840,6 +970,21 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "xdph": { "inputs": { "hyprland-protocols": [ @@ -868,11 +1013,11 @@ ] }, "locked": { - "lastModified": 1761431178, - "narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=", + "lastModified": 1773601989, + "narHash": "sha256-2tJf/CQoHApoIudxHeJye+0Ii7scR0Yyi7pNiWk0Hn8=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "4b8801228ff958d028f588f0c2b911dbf32297f9", + "rev": "a9b862d1aa000a676d310cc62d249f7ad726233d", "type": "github" }, "original": { @@ -880,6 +1025,39 @@ "repo": "xdg-desktop-portal-hyprland", "type": "github" } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1773622265, + "narHash": "sha256-wToKwH7IgWdGLMSIWksEDs4eumR6UbbsuPQ42r0oTXQ=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "a879e5e0896a326adc79c474bf457b8b99011027", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 53336366..0ebaf259 100644 --- a/flake.nix +++ b/flake.nix @@ -18,10 +18,6 @@ url = "github:brumhard/krewfile"; inputs.nixpkgs.follows = "nixpkgs"; }; - sops-nix = { - url = "github:mic92/sops-nix"; - inputs.nixpkgs.follows = "nixpkgs"; - }; disko = { url = "github:nix-community/disko"; inputs.nixpkgs.follows = "nixpkgs"; @@ -32,6 +28,18 @@ }; nixos-hardware.url = "github:nixos/nixos-hardware/master"; catppuccin.url = "github:catppuccin/nix"; + + niri = { + url = "github:sodiboo/niri-flake"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + nfsm = { + # Niri fullscreen manager + url = "github:gvolpe/nfsm"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + import-tree.url = "github:vic/import-tree"; }; outputs = @@ -43,7 +51,6 @@ ... }: let - inherit (self) outputs; lib = nixpkgs.lib // home-manager.lib; mylib = import ./lib { inherit lib; }; @@ -52,63 +59,83 @@ "x86_64-linux" ]; + overlays = [ + (import ./overlays) + inputs.niri.overlays.niri + ]; + pkgsFor = lib.genAttrs systems ( system: import nixpkgs { - inherit system; - overlays = [ (import ./overlays) ]; + inherit system overlays; } ); forAllSystems = f: lib.genAttrs systems (system: f pkgsFor.${system}); + + nixosModules = [ + inputs.catppuccin.nixosModules.catppuccin + inputs.niri.nixosModules.niri + (inputs.import-tree.match ".*/default\\.nix" ./modules/nixos) + ./modules/nix.nix + ]; + + homeModules = [ + inputs.catppuccin.homeModules.catppuccin + inputs.neonix.homeManagerModules.neonix + inputs.krewfile.homeManagerModules.krewfile + inputs.niri.homeModules.niri + (inputs.import-tree.match ".*/default\\.nix" ./modules/home) + ./modules/nix.nix + ]; in - with lib; { inherit lib; - formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style); + formatter = forAllSystems (pkgs: pkgs.nixfmt); + devShells = forAllSystems (pkgs: import ./dev-shells.nix { inherit pkgs pre-commit-hooks; }); packages = forAllSystems (pkgs: import ./packages { inherit pkgs; }); nixosConfigurations = { # Main workstation - zion = nixosSystem { - modules = [ ./hosts/zion ]; + zion = lib.nixosSystem { + modules = nixosModules ++ [ ./hosts/zion ]; specialArgs = { inherit inputs mylib; }; }; # K3S home-lab - kubex = nixosSystem { - modules = [ ./hosts/kubex ]; + kubex = lib.nixosSystem { + modules = nixosModules ++ [ ./hosts/kubex ]; specialArgs = { inherit inputs mylib; }; }; # Raspberry-pi 3 - nixberry = nixosSystem { - modules = [ ./hosts/nixberry ]; + nixberry = lib.nixosSystem { + modules = nixosModules ++ [ ./hosts/nixberry ]; specialArgs = { inherit inputs mylib; }; }; # ISO multi-tool - vinox = nixosSystem { - modules = [ ./hosts/vinox ]; + vinox = lib.nixosSystem { + modules = nixosModules ++ [ ./hosts/vinox ]; specialArgs = { inherit inputs mylib; }; }; }; homeConfigurations = { # Main workstation - "rap@zion" = homeManagerConfiguration { - modules = [ ./modules/home-manager/zion.nix ]; + "rap@zion" = lib.homeManagerConfiguration { + modules = homeModules ++ [ ./hosts/zion/home.nix ]; pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs mylib; }; + extraSpecialArgs = { inherit inputs self mylib; }; }; # Firefly workmachine - "rapsn@firefly" = homeManagerConfiguration { - modules = [ ./modules/home-manager/firefly.nix ]; + "nix@firefly" = lib.homeManagerConfiguration { + modules = homeModules ++ [ ./hosts/firefly/home.nix ]; pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { inherit inputs outputs mylib; }; + extraSpecialArgs = { inherit inputs self mylib; }; }; }; }; diff --git a/hosts/firefly/home.nix b/hosts/firefly/home.nix new file mode 100644 index 00000000..cde409df --- /dev/null +++ b/hosts/firefly/home.nix @@ -0,0 +1,69 @@ +{ + lib, + config, + pkgs, + ... +}: +{ + + home = { + username = "raphaelgroemmer"; + homeDirectory = lib.mkDefault "/home/${config.home.username}"; + stateVersion = lib.mkDefault "22.05"; + }; + + roles = { + work = true; + email = "raphael.groemmer@digits.schwarz"; + + apparmor-gen = [ + config.programs.chromium.finalPackage + pkgs.obsidian + ]; + + desktop = { + hyprland = { + enable = true; + package = pkgs.hyprland; + + hyprlock.enable = true; + hypridle = { + enable = true; + cmd = "/usr/bin/swaylock"; + }; + autostart = [ + "sleep 3 && mumble" # Need to sleep for tray icon + "firefox" + "chromium" + ]; + }; + }; + + cli = { + zsh.zshrc = '' + [ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen) + source <(gardenctl completion zsh) + eval $(gardenctl kubectl-env zsh) + ''; + }; + }; + + home.packages = builtins.attrValues { + inherit (pkgs) + stackit-cli + openstackclient-full + vault-bin + brightnessctl + ; + + inherit (pkgs.mypkgs) + gardenctl + gardenlogin + ; + }; + + targets.genericLinux = { + enable = true; + gpu.enable = true; + }; +} diff --git a/hosts/kubex/default.nix b/hosts/kubex/default.nix index f575d4c2..fc3c4c0c 100644 --- a/hosts/kubex/default.nix +++ b/hosts/kubex/default.nix @@ -2,18 +2,20 @@ inputs, pkgs, ... -}: { +}: +{ imports = [ inputs.disko.nixosModules.disko ./hardware-configuration.nix ./disko.nix - ../../modules/nixos ]; - # Host specific configuration - hostConfiguration = { - boot.supportedFilesystems = ["zfs"]; + hostConfig = { + boot = { + enable = true; + supportedFilesystems = [ "zfs" ]; + }; user = { name = "kubex"; @@ -22,8 +24,8 @@ "sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIKX8MmA9KdHCny6rKCGZlyd/J5qCXh+YDM0/3ZGDmfyaAAAABHNzaDo= yubi@rapsn.me" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqKYXW07z0llbDKRIakLD1PjHe3HxK9iu6czXs+ZU7v techkey@rapsn" ]; - extraOptions = {}; - extraGroups = []; + extraOptions = { }; + extraGroups = [ ]; }; roles = { @@ -41,8 +43,8 @@ PROMPT = "%m@%n> "; RPROMPT = "%D %T"; }; - systemPackages = [pkgs.restic]; + systemPackages = [ pkgs.restic ]; }; - nix.settings.trusted-users = ["@wheel"]; # need for remote build + nix.settings.trusted-users = [ "@wheel" ]; # need for remote build } diff --git a/hosts/nixberry/default.nix b/hosts/nixberry/default.nix index 64a585b5..08af8368 100644 --- a/hosts/nixberry/default.nix +++ b/hosts/nixberry/default.nix @@ -1,8 +1,9 @@ { - pkgs, inputs, + lib, ... -}: { +}: +{ imports = [ inputs.nixos-hardware.nixosModules.raspberry-pi-3 @@ -10,15 +11,19 @@ ]; # Host specific configuration - hostConfiguration = { + hostConfig = { user = { name = "rap"; initialHashedPassword = "$y$j9T$8uQSJbY6w9kjXnj74JKjA1$pWYgNf.gb497suX//oIw6aggEPoD2Xv1kvMKZfDTOU/"; - keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqKYXW07z0llbDKRIakLD1PjHe3HxK9iu6czXs+ZU7v techkey@rapsn"]; - extraOptions = {}; - extraGroups = []; + keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqKYXW07z0llbDKRIakLD1PjHe3HxK9iu6czXs+ZU7v techkey@rapsn" + ]; + extraOptions = { }; + extraGroups = [ ]; }; + boot.enable = false; + services = { tailscale = true; }; @@ -28,7 +33,7 @@ "/" = { device = "/dev/disk/by-label/NIXOS_SD"; fsType = "ext4"; - options = ["noatime"]; + options = [ "noatime" ]; }; }; @@ -43,7 +48,7 @@ } ]; - environment.systemPackages = with pkgs; [neovim]; + nix.settings.trusted-users = [ "@wheel" ]; # need for remote build - nix.settings.trusted-users = ["@wheel"]; # need for remote build + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; } diff --git a/hosts/vinox/default.nix b/hosts/vinox/default.nix index 4864a26b..faf32ae6 100644 --- a/hosts/vinox/default.nix +++ b/hosts/vinox/default.nix @@ -2,26 +2,29 @@ lib, inputs, ... -}: { +}: +{ imports = [ "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix" "${inputs.nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" ./installer.nix ./diagnostics.nix - ../../modules/nixos ]; # Host specific configuration - hostConfiguration = { - boot.supportedFilesystems = ["ntfs"]; + hostConfig = { + boot = { + enable = true; + supportedFilesystems = [ "ntfs" ]; + }; user = { name = "root"; initialHashedPassword = ""; - extraOptions = {}; - extraGroups = []; - keys = ["ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqKYXW07z0llbDKRIakLD1PjHe3HxK9iu6czXs+ZU7v"]; + extraOptions = { }; + extraGroups = [ ]; + keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGqKYXW07z0llbDKRIakLD1PjHe3HxK9iu6czXs+ZU7v" ]; }; }; diff --git a/hosts/vinox/diagnostics.nix b/hosts/vinox/diagnostics.nix index 26732857..ca52a494 100644 --- a/hosts/vinox/diagnostics.nix +++ b/hosts/vinox/diagnostics.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ environment.systemPackages = with pkgs; [ # General util-linux @@ -44,17 +45,5 @@ usbutils pciutils hardinfo2 - - # Tooling - git - curl - - jq - yq-go - gawk - gnused - - p7zip - gnumake ]; } diff --git a/hosts/vinox/installer.nix b/hosts/vinox/installer.nix index 601f0c1a..1a25a0c2 100644 --- a/hosts/vinox/installer.nix +++ b/hosts/vinox/installer.nix @@ -1,7 +1,6 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let dot = pkgs.writeShellScriptBin "dot" '' - #!/usr/bin/env bash - # Cleanup rm -rf dotfiles set -euo pipefail @@ -37,7 +36,8 @@ gum style --foreground 124 --bold --align left 'Knock, knock, Neo.' && sleep 1 reboot ''; -in { +in +{ environment.systemPackages = with pkgs; [ dot # My interactive installer gum diff --git a/hosts/zion/default.nix b/hosts/zion/default.nix index 38e34701..392246c2 100644 --- a/hosts/zion/default.nix +++ b/hosts/zion/default.nix @@ -1,14 +1,15 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ imports = [ ./hardware-configuration.nix - ../../modules/nixos ]; # Host specific configuration - hostConfiguration = { + hostConfig = { boot = { - armSupport = false; - supportedFilesystems = ["ntfs"]; + enable = true; + armSupport = true; + supportedFilesystems = [ "ntfs" ]; }; user = { @@ -16,11 +17,12 @@ extraGroups = [ "networkmanager" "wireshark" + "i2c" ]; extraOptions = { initialHashedPassword = "$y$j9T$DZQaaK3xGqarN8KE8qnw..$dvgiS7dso5LboGRRf0dcyct/LQUFp4J0LUo2ZRRdTr8"; }; - keys = []; + keys = [ ]; }; services = { @@ -52,7 +54,7 @@ }; environment = { - systemPackages = with pkgs; [qt6.qtwayland]; + systemPackages = with pkgs; [ qt6.qtwayland ]; sessionVariables = { WLR_NO_HARDWARE_CURSORS = "1"; @@ -60,6 +62,8 @@ }; }; + hardware.i2c.enable = true; + services.udev.packages = with pkgs; [ qmk-udev-rules ]; diff --git a/hosts/zion/hardware-configuration.nix b/hosts/zion/hardware-configuration.nix index 8417cd36..11d7d9c9 100644 --- a/hosts/zion/hardware-configuration.nix +++ b/hosts/zion/hardware-configuration.nix @@ -1,22 +1,23 @@ -# Do not modify this file! It was generated by β€˜nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. { config, lib, modulesPath, ... -}: { - imports = [(modulesPath + "/installer/scan/not-detected.nix")]; +}: +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot = { initrd.availableKernelModules = [ "nvme" "xhci_pci" # USB-3.0 Controller "usbhid" ]; - initrd.kernelModules = ["amdgpu"]; - kernelModules = ["kvm-amd"]; - extraModulePackages = []; + initrd.kernelModules = [ "amdgpu" ]; + kernelModules = [ + "kvm-amd" + "i2c-dev" + ]; + extraModulePackages = [ ]; }; fileSystems."/" = { diff --git a/hosts/zion/home.nix b/hosts/zion/home.nix new file mode 100644 index 00000000..1912ee81 --- /dev/null +++ b/hosts/zion/home.nix @@ -0,0 +1,40 @@ +{ + lib, + pkgs, + config, + ... +}: +{ + home = { + username = "rap"; + homeDirectory = lib.mkDefault "/home/${config.home.username}"; + stateVersion = lib.mkDefault "22.05"; + }; + + roles = { + work = false; + email = "mail@rapsn.me"; + + desktop = { + hyprland = { + enable = true; + package = pkgs.hyprland; + + hyprlock.enable = true; + hypridle = { + enable = true; + cmd = "${pkgs.hyprlock}/bin/hyprlock"; + }; + autostart = [ + "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" # Needed for thunar + "firefox" + "ddcutil --display 2 setvcp 60 0x09" # Focus secondary display + ]; + }; + }; + + desktop.niri = { + enable = true; + }; + }; +} diff --git a/lib/default.nix b/lib/default.nix index be551f75..831c1f53 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -1,9 +1,9 @@ { lib }: -with lib; { - mkOpt = type: description: mkOption { inherit type description; }; + mkOpt = type: description: lib.mkOption { inherit type description; }; mkOpt' = type: default: description: - mkOption { inherit type default description; }; + lib.mkOption { inherit type default description; }; + } diff --git a/modules/home-manager/cli/default.nix b/modules/home-manager/cli/default.nix deleted file mode 100644 index 5be499f6..00000000 --- a/modules/home-manager/cli/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - imports = [ - ./zsh - ./programs - ./packages - - # Terminals - ./terminals/alacritty.nix - ./terminals/addons - ]; -} diff --git a/modules/home-manager/cli/packages/default.nix b/modules/home-manager/cli/packages/default.nix deleted file mode 100644 index 6735a53f..00000000 --- a/modules/home-manager/cli/packages/default.nix +++ /dev/null @@ -1,71 +0,0 @@ -{ - pkgs, - config, - lib, - outputs, - ... -}: -let - workpkgs = outputs.packages.${pkgs.stdenv.hostPlatform.system}; -in -{ - home.packages = - with pkgs; - [ - # Core utility - coreutils # cp, mv, etc. - moreutils # parallel, pee, etc. - dnsutils # dig, nslookup, etc. - gnumake - gnutar - gzip - unzip - gnused - gnugrep - killall - - pciutils - - # Inspection - htop - - # Network tools - inetutils - curl - wget - - # Network inspetion - termshark - nmap - netcat - tcpdump - - # Text processing - jq - yq-go - gawk - - # Find utils - fd - ripgrep - - # Copy tools - rclone - - # SSH / Security - openssh - libfido2 - keepassxc - sops - - # Clipboard - wl-clipboard - - # Note taking - ] - ++ lib.optionals config.roles.workdevice [ - workpkgs.gardenctl - workpkgs.gardenlogin - brightnessctl - ]; -} diff --git a/modules/home-manager/cli/programs/containers/k9s-workplugins.nix b/modules/home-manager/cli/programs/containers/k9s-workplugins.nix deleted file mode 100644 index c1e4930a..00000000 --- a/modules/home-manager/cli/programs/containers/k9s-workplugins.nix +++ /dev/null @@ -1,93 +0,0 @@ -{ - reconcile = { - description = "Reconcile resource"; - shortCut = "r"; - scopes = [ - "shoots" - # all resources in extensions.gardener.cloud/v1alpha1 - "backupbuckets" - "backupentries" - "bastions" - "clusters" - "containerruntimes" - "controlplanes" - "dnsrecords" - "extensions" - "infrastructures" - "networks" - "operatingsystemconfigs" - "workers" - ]; - command = "kubectl"; - background = true; - args = [ - "annotate" - "-n" - "$NAMESPACE" - "$RESOURCE_NAME" - "$NAME" - "gardener.cloud/operation=reconcile" - ]; - }; - - reconcile-seed = { - description = "Reconcile seed"; - shortCut = "r"; - scopes = ["managedseeds"]; - command = "kubectl"; - background = true; - args = [ - "annotate" - "$RESOURCE_NAME" - "$NAME" - "gardener.cloud/operation=reconcile" - ]; - }; - - retry-shoot = { - description = "Retry shoot operation"; - shortCut = "t"; - scopes = ["shoots"]; - command = "kubectl"; - background = true; - args = [ - "annotate" - "-n" - "$NAMESPACE" - "$RESOURCE_NAME" - "$NAME" - "gardener.cloud/operation=retry" - ]; - }; - - confirm-deletion = { - description = "Confirm deletion"; - shortCut = "o"; - scopes = [ - "projects" - "extensions" - "shoots" - "backupentries" - "etcds" - "infrastructure" - "controlplanes" - "machinedeployments" - "machinesets" - "machineclasses" - "namespaces" - "worker" - "dnsrecords" - "operatingsystemconfig" - ]; - command = "kubectl"; - background = false; - args = [ - "annotate" - "-n" - "$NAMESPACE" - "$RESOURCE_NAME" - "$NAME" - "confirmation.gardener.cloud/deletion=true" - ]; - }; -} diff --git a/modules/home-manager/cli/programs/containers/k9s.nix b/modules/home-manager/cli/programs/containers/k9s.nix deleted file mode 100644 index e6503c3a..00000000 --- a/modules/home-manager/cli/programs/containers/k9s.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - lib, - config, - ... -}: let - defaultPlugins = { - edit-secret = { - description = "Edit Decoded Secret"; - shortCut = "Ctrl-X"; - scopes = ["secrets"]; - command = "kubectl"; - background = false; - args = [ - "modify-secret" - "-n" - "$NAMESPACE" - "$NAME" - ]; - }; - }; - workPlugins = import ./k9s-workplugins.nix; -in { - catppuccin.k9s.enable = true; - programs.k9s = { - enable = true; - plugins = - defaultPlugins - // lib.optionalAttrs config.roles.workdevice workPlugins; - }; -} diff --git a/modules/home-manager/cli/programs/containers/podman.nix b/modules/home-manager/cli/programs/containers/podman.nix deleted file mode 100644 index 04e2043a..00000000 --- a/modules/home-manager/cli/programs/containers/podman.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - services.podman.enable = true; -} diff --git a/modules/home-manager/cli/programs/default.nix b/modules/home-manager/cli/programs/default.nix deleted file mode 100644 index 6eb7aada..00000000 --- a/modules/home-manager/cli/programs/default.nix +++ /dev/null @@ -1,37 +0,0 @@ -let - withTheme = { - bat.enable = true; - fzf.enable = true; - btop.enable = true; - yazi.enable = true; - }; -in { - imports = [ - # Langs - ./langs/go.nix - ./langs/rust.nix - - # Git tools - ./git.nix - ./lazygit.nix - - # Editor - ./nvim.nix - - # Security - ./sops.nix - ./keyring.nix - - # Container tools - ./containers - ]; - - catppuccin = withTheme; - programs = - { - eza.enable = true; - } - // withTheme; - - services.ssh-agent.enable = true; -} diff --git a/modules/home-manager/cli/programs/nvim.nix b/modules/home-manager/cli/programs/nvim.nix deleted file mode 100644 index 4b42fbfd..00000000 --- a/modules/home-manager/cli/programs/nvim.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - programs.neonix.enable = true; -} diff --git a/modules/home-manager/cli/programs/sops.nix b/modules/home-manager/cli/programs/sops.nix deleted file mode 100644 index 85a64c12..00000000 --- a/modules/home-manager/cli/programs/sops.nix +++ /dev/null @@ -1,6 +0,0 @@ -{config, ...}: { - sops.age = { - generateKey = true; - keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt"; - }; -} diff --git a/modules/home-manager/cli/terminals/addons/default.nix b/modules/home-manager/cli/terminals/addons/default.nix deleted file mode 100644 index f3979e00..00000000 --- a/modules/home-manager/cli/terminals/addons/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - imports = [ - ./eza.nix - ./pet.nix - ./atuin.nix - ./direnv.nix - ./zoxide.nix - ./font.nix - ]; -} diff --git a/modules/home-manager/cli/terminals/addons/eza.nix b/modules/home-manager/cli/terminals/addons/eza.nix deleted file mode 100644 index 69a4b68d..00000000 --- a/modules/home-manager/cli/terminals/addons/eza.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - programs.eza.enable = true; -} diff --git a/modules/home-manager/cli/terminals/addons/font.nix b/modules/home-manager/cli/terminals/addons/font.nix deleted file mode 100644 index 9fcafc8e..00000000 --- a/modules/home-manager/cli/terminals/addons/font.nix +++ /dev/null @@ -1,7 +0,0 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - nerd-fonts.caskaydia-cove - ]; - - fonts.fontconfig.enable = true; -} diff --git a/modules/home-manager/cli/terminals/addons/zoxide.nix b/modules/home-manager/cli/terminals/addons/zoxide.nix deleted file mode 100644 index c4b45304..00000000 --- a/modules/home-manager/cli/terminals/addons/zoxide.nix +++ /dev/null @@ -1,3 +0,0 @@ -{ - programs.zoxide.enable = true; -} diff --git a/modules/home-manager/cli/terminals/alacritty.nix b/modules/home-manager/cli/terminals/alacritty.nix deleted file mode 100644 index 6b26b20b..00000000 --- a/modules/home-manager/cli/terminals/alacritty.nix +++ /dev/null @@ -1,46 +0,0 @@ -{pkgs, ...}: { - catppuccin.alacritty.enable = true; - programs.alacritty = { - enable = true; - package = pkgs.alacritty; - settings = { - terminal.shell.program = "zsh"; - env.TERM = "xterm-256color"; - - selection = { - save_to_clipboard = true; - }; - window = { - padding = { - x = 3; - y = 3; - }; - }; - - font = let - fontname = "CaskaydiaCove Nerd Font"; - in { - normal = { - family = fontname; - style = "SemiBold"; - }; - bold = { - family = fontname; - style = "Bold"; - }; - italic = { - family = fontname; - style = "Italic"; - }; - size = 13; - }; - - mouse.bindings = [ - { - mouse = "Right"; - action = "Paste"; - } - ]; - }; - }; -} diff --git a/modules/home-manager/cli/zsh/default.nix b/modules/home-manager/cli/zsh/default.nix deleted file mode 100644 index 3fb6043d..00000000 --- a/modules/home-manager/cli/zsh/default.nix +++ /dev/null @@ -1,112 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: -with lib; { - imports = [ - ./shellScripts.nix - ./starship.nix - ]; - - home.packages = [pkgs.zsh-completions]; - - catppuccin.zsh-syntax-highlighting.enable = true; - - programs.zsh = { - enable = true; - - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - autocd = true; - dotDir = "${config.home.homeDirectory}/.config/zsh"; - - enableCompletion = true; - - sessionVariables = { - EDITOR = "vim"; - VISUAL = "vim"; - - # disable highlight of history-substring-search - HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND = ""; - }; - - history = { - expireDuplicatesFirst = true; - ignoreDups = true; - ignoreSpace = true; - save = 1000000000; - size = 1000000000; - share = true; - }; - - # TODO: readd this - # # Gardenctl - # [ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen) - # source <(gardenctl completion zsh) - # eval $(gardenctl kubectl-env zsh) - initContent = mkMerge [ - (mkOrder 500 - '''') - (mkOrder 1000 - '' - [ -n "$GCTL_SESSION_ID" ] || [ -n "$TERM_SESSION_ID" ] || export GCTL_SESSION_ID=$(uuidgen) - '') - (mkOrder 1500 - '''') - ]; - - shellAliases = { - # Overwrites - cat = "bat"; - ls = "exa --icons"; - ll = "exa --icons -la"; - cd = "z"; - j = "z"; - n = "nix-shell -p"; - - # Shortcuts - clr = "clear"; - tf = "terraform"; - - g = "gardenctl"; - gtcp = "gardenctl target control-plane"; - gos = "eval $(gardenctl provider-env zsh)"; - o = "openstack"; - - k = "kubectl"; - kk = "k9s"; - kns = "kubectl ns"; - selc = "source select_kc"; - - clean = "nix-collect-garbage -d && nix-store --gc && nix-store --verify --check-contents --repair"; - }; - - oh-my-zsh = { - enable = true; - plugins = [ - "git" - "kubectl" - ]; - }; - - plugins = with pkgs; [ - { - name = "zsh-autopair"; - src = fetchFromGitHub { - owner = "hlissner"; - repo = "zsh-autopair"; - rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49"; - sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1"; - }; - file = "autopair.zsh"; - } - { - name = "zsh-nix-shell"; - file = "nix-shell.plugin.zsh"; - src = "${zsh-nix-shell}/share/zsh-nix-shell"; - } - ]; - }; -} diff --git a/modules/home-manager/common/default.nix b/modules/home-manager/common/default.nix deleted file mode 100644 index 6bc02d13..00000000 --- a/modules/home-manager/common/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - inputs, - lib, - config, - ... -}: { - imports = [ - # module inputs - inputs.catppuccin.homeModules.catppuccin - inputs.neonix.homeManagerModules.neonix - inputs.krewfile.homeManagerModules.krewfile - inputs.sops-nix.homeManagerModules.sops - - # custom module config definition - ./modules.nix - - # global nix & nixpkgs settings - ../../nix.nix - ]; - - sops.secrets.ssh_config = { - sopsFile = ./secrets.yaml; - path = "${config.home.homeDirectory}/.ssh/config"; - mode = "600"; - }; - - programs.home-manager.enable = true; - xdg.enable = true; - - news = { - display = "silent"; - json = lib.mkForce {}; - entries = lib.mkForce []; - }; -} diff --git a/modules/home-manager/common/modules.nix b/modules/home-manager/common/modules.nix deleted file mode 100644 index f325b111..00000000 --- a/modules/home-manager/common/modules.nix +++ /dev/null @@ -1,7 +0,0 @@ -{lib, ...}: -with lib; { - options.roles = { - workdevice = mkEnableOption "Set device as workdevice, to enable special config."; - autostart = with types; mkOption {type = listOf str;}; - }; -} diff --git a/modules/home-manager/common/secrets.yaml b/modules/home-manager/common/secrets.yaml deleted file mode 100644 index 2f0d5e12..00000000 --- a/modules/home-manager/common/secrets.yaml +++ /dev/null @@ -1,26 +0,0 @@ -ssh_config: ENC[AES256_GCM,data:vGa5w0lLAscKQgoMREat343g/pKGNQ2bPdp0O1RmePLuBYu2S2euVBzMY6vbC09rMVViIrnR8LVLbdyJFi2Us1DBAZByck5dYDB2JJ04hemHVyKeuF5IlKb4zEcRfzFAGc6TlaBr0Y1A8TtrmmnlzQIw9kP0+8CKLaM6KtJSgjBA3EP+NKuSK/kHBwEPyS008NuXTIjxt348gPq6Q+eA4Jf6LqAY5SzQso02ELtVHblxD7E8ICQfCl4r/fDIpfycYNSTOI2CoTIyS6/WsapQrrBW/9hcDvr7iP0Nap5q7v7fZrazCtuaSOEcxp+xzVWcCcVT3e7/uVVcz/f1U1HZ1DOM31yBuT3NH0ISJzy4XrbRSPNT6EBNv3yr8ChCiTiKx6NckH7QpHIR4mWpCtydUygT2kc5P99WL/WYU2lFC8uu+dG5+mamO5iw7pOiLqjRdZuYac5nqmzaV3MbsKygYdg63l+f7WUud9+nf90DaUyf6xHAkvsMTzY=,iv:mywy0TtgZwPIg568Lx4xYqVYHYFllI3nVdSEhkHzl7k=,tag:IgkWvNn4QNiW3ENDldy0tw==,type:str] -atuin: ENC[AES256_GCM,data:ZgSp0GB28ofHD2Jx+xICoMLiPD9Hi0aL1E8uUxsHRpKuWa7OfYzuknQj3PMKU1NUJCcwCSfGG0LF7Jt44n8Yd+sh98fBxhPxFLR6PegHTfF8kkPpMz7cHKfFRK+JjOvTDzPr6A5ZAjlBuwQOcdBN5yatb7pMl0uXJoSPJ1DFTIoUvmw0FhbXHuc2HRDqR5PHyA==,iv:hhnVj2xP7Bpw7PldRuNoBs8mpee/6fOzK6BrPm5aFIk=,tag:KG1Z8yKQbKr79JBt/rDlKQ==,type:str] -sops: - age: - - recipient: age1y8vwxjyzhftr8n0mry5zkq34ra5g69z927p9s3qrj04gzqwasc8q3fqlgf - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBTcFF4SHFrUHhXS0xNaTJh - TXM3Q01INjF3dXAwT09rTlBFZnFyVHlleUZJCmhaZ1V6UkJvTWVNQVR3WjRoeHRv - KzlsVEo1RzNoUEJ4aWNONmx0SEZFTFUKLS0tIEJXZGNZcnJ2YXl2Q2swK2w1bDhP - Skc2TTZjUExCbVNpTnczbXB2WGxQVnMKaHNV5OjS1ODvot1yG+AY85T61YxnxIMk - FYP+uxfm5mCs0M2hJx3nfMOZA4vH6Q9nGNZSX4q0nWxq88L5KpaAsg== - -----END AGE ENCRYPTED FILE----- - - recipient: age13ps3kkzfn3eyaqc50reudytr5ws80ssamzh09kj6878a6lgxususuu58wp - enc: | - -----BEGIN AGE ENCRYPTED FILE----- - YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBGNVdaUXgweDk3YWVnS2xC - L1FVWkVnVjduOU1pWTdzanQvb2dNd3pCeG5jCmh6ZUhRY1hUSmpvdkdGc3JDNC9m - RE5YdS9CaU4vSG82Z052UFBHeEgvVEUKLS0tIERqWG5EMGlVNmZHQm9ncjljekE0 - bURQd1VuZ1VRYnhVNEJGY21BdFNOdncKLArYp3z6H2gu8ZP/+LxXu4bd0wEFQO+6 - m33V0qCP/EDkyXgTj07+8M2B/z75Kx2+b1FFCi/dN0aF/jpVYdwdWQ== - -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-12-02T15:03:44Z" - mac: ENC[AES256_GCM,data:gCuKWTJ5vCRe6M5/bpXZvFBKxfSRzGlwgQ6XctJ56kX/eVd5mztYp1aAZExn4+pRrd+8MpIdposfKmFpy59dD/g4jb1e5dvplQx+9Yv2okMnhLgS/zxCc70+HuFwqUFI1wA4C5YF3qFldKPxByQr1+z/HMFuCpByYZ5YZ0kiAbY=,iv:HCf3NB3PucaybWpmG3kdrLx6w1m4uJf35oE7igAqQMk=,tag:zOXCxQ5C6c5sNr6DXpV3EA==,type:str] - unencrypted_suffix: _unencrypted - version: 3.11.0 diff --git a/modules/home-manager/desktop/addons/default.nix b/modules/home-manager/desktop/addons/default.nix deleted file mode 100644 index 09db5d28..00000000 --- a/modules/home-manager/desktop/addons/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - imports = [ - ./swaync - ./waybar - ./wlogout - ./qt.nix - ./gtk.nix - ./fuzzel.nix - ]; -} diff --git a/modules/home-manager/desktop/addons/gtk.nix b/modules/home-manager/desktop/addons/gtk.nix deleted file mode 100644 index 607404df..00000000 --- a/modules/home-manager/desktop/addons/gtk.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - gtk = lib.mkForce { - enable = true; - - theme = { - name = "Catppuccin-GTK-Purple-Dark"; - package = pkgs.magnetic-catppuccin-gtk.override { - tweaks = ["black"]; - accent = ["purple"]; - }; - }; - - iconTheme = { - name = "Papirus-Dark"; - package = pkgs.catppuccin-papirus-folders; - }; - }; - - home = let - name = "catppuccin-mocha-mauve-cursors"; - size = 35; - in { - pointerCursor = lib.mkForce { - enable = true; - inherit name size; - package = pkgs.catppuccin-cursors.mochaMauve; - gtk.enable = true; - }; - }; -} diff --git a/modules/home-manager/desktop/addons/swaync/default.nix b/modules/home-manager/desktop/addons/swaync/default.nix deleted file mode 100644 index c5e1ecd7..00000000 --- a/modules/home-manager/desktop/addons/swaync/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{pkgs, ...}: { - # swaynotificationcenter like "dunst" - home.packages = with pkgs; [swaynotificationcenter]; - - xdg.configFile."swaync/style.css".source = ./swaync.css; - xdg.configFile."swaync/config.json".source = ./swaync.json; -} diff --git a/modules/home-manager/desktop/default.nix b/modules/home-manager/desktop/default.nix deleted file mode 100644 index efeb7532..00000000 --- a/modules/home-manager/desktop/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ - imports = [ - ./hyprland - ./addons - ./programs - ]; -} diff --git a/modules/home-manager/desktop/hyprland/addons/hyprpaper.nix b/modules/home-manager/desktop/hyprland/addons/hyprpaper.nix deleted file mode 100644 index cadd26b1..00000000 --- a/modules/home-manager/desktop/hyprland/addons/hyprpaper.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ - pkgs, - inputs, - ... -}: let - path = "${inputs.self.outPath}/extra/wallpapers"; - shuffle-wallpaper = pkgs.writeShellScriptBin "shuffle-wallpaper" '' - #!/usr/bin/env bash - - WALLPAPER_PATH="${path}" - readarray -t MONITORS < <(hyprctl monitors -j | jq -r '.[].name') - COUNT=''${#MONITORS[@]} - - readarray -t PAPERS < <(find "$WALLPAPER_PATH" -type f | shuf -n "$COUNT") - - for ((i = 0; i < COUNT; i++)); do - MON="''${MONITORS[i]}" - PAPER="''${PAPERS[i]}" - hyprctl hyprpaper preload "$PAPER" - hyprctl hyprpaper wallpaper "$MON,$PAPER" - hyprctl hyprpaper unload unused - done - ''; -in { - home.packages = [shuffle-wallpaper]; - - services.hyprpaper = { - enable = true; - settings = { - splash = false; - }; - }; - - systemd.user.services.set-wallpaper = { - Unit = { - Description = "set-wallpaper"; - After = ["graphical-session.target"]; - }; - Service = { - Type = "oneshot"; - ExecStart = "${shuffle-wallpaper}/bin/shuffle-wallpaper"; - Restart = "on-failure"; - }; - Install = { - WantedBy = ["graphical-session.target"]; - }; - }; -} diff --git a/modules/home-manager/desktop/hyprland/config/decoration.nix b/modules/home-manager/desktop/hyprland/config/decoration.nix deleted file mode 100644 index 7640e073..00000000 --- a/modules/home-manager/desktop/hyprland/config/decoration.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ - blur = { - enabled = true; - size = 3; - passes = 2; - ignore_opacity = true; - new_optimizations = true; - }; - rounding = 5; - active_opacity = 0.98; - inactive_opacity = 0.85; -} diff --git a/modules/home-manager/desktop/hyprland/config/programs.nix b/modules/home-manager/desktop/hyprland/config/programs.nix deleted file mode 100644 index 92240964..00000000 --- a/modules/home-manager/desktop/hyprland/config/programs.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - bind = [ - "SUPER,RETURN, exec, uwsm app -- alacritty" - "SUPER,E, exec, uwsm app -- fuzzel" - "SUPER,P, exec, wlogout" - "SUPER,Q, killactive" - - # Mumble - "SUPER,Z, exec, mumble rpc togglemute" - "SUPER+SHIFT,Z, exec, mumble rpc toggledeaf" - - # Notification center - "SUPER,N, exec, swaync-client -t" - ]; -} diff --git a/modules/home-manager/desktop/hyprland/config/windows.nix b/modules/home-manager/desktop/hyprland/config/windows.nix deleted file mode 100644 index 6a666d01..00000000 --- a/modules/home-manager/desktop/hyprland/config/windows.nix +++ /dev/null @@ -1,66 +0,0 @@ -{ - windowrule = [ - # Force floating - "float, class:steam" - "float, class:com.nextcloud.desktopclient.nextcloud" - - # Resize - "size 20% 50%, class:com.nextcloud.desktopclient.nextcloud" - "move 78% 4%, class:com.nextcloud.desktopclient.nextcloud" - "move 68% 4%, class:^(.*ZSTray.*)$" - "move 40% 40%, title:^(.*Mumble Server Connect.*)$" - ]; - - windowrulev2 = [ - "workspace 4, class:^(firefox_firefox)$" - "workspace 5, class:^(chromium-browser)$" - - "workspace special:aux silent, class:^(.*mumble.*)$" - "workspace special:aux silent, class:^(.*keepassxc.*)$" - ]; - - bind = [ - # Window actions - "SUPER,F, fullscreen, 1" - "SUPER+SHIFT,F, fullscreen" - - # Movement - "SUPER,H, movefocus, l" - "SUPER,J, movefocus, d" - "SUPER,K, movefocus, u" - "SUPER,L, movefocus, r" - - # Window movement - "SUPER+SHIFT,H, movewindow,l" - "SUPER+SHIFT,J, movewindow, d" - "SUPER+SHIFT,K, movewindow, u" - "SUPER+SHIFT,L, movewindow, r" - - # Layout toggle - "SUPER,T, togglesplit," - "SUPER,U, togglefloating," - ]; - - extraConfig = '' - # Resize mouse - bindm = SUPER, mouse:272, movewindow - bindm = SUPER, mouse:273, resizewindow - - # Resize mode - bind = SUPER, R, submap, resize - submap = resize - bind = , H, resizeactive, -60 0 - bind = , J, resizeactive, 0 60 - bind = , K, resizeactive, 0 -60 - bind = , L, resizeactive, 60 0 - - bind = SHIFT, H, resizeactive, -20 0 - bind = SHIFT, J, resizeactive, 0 20 - bind = SHIFT, K, resizeactive, 0 -20 - bind = SHIFT, L, resizeactive, 20 0 - - bind = , return, submap, reset - bind = , escape, submap, reset - submap = reset - ''; -} diff --git a/modules/home-manager/desktop/hyprland/config/workspaces.nix b/modules/home-manager/desktop/hyprland/config/workspaces.nix deleted file mode 100644 index cf70fe2b..00000000 --- a/modules/home-manager/desktop/hyprland/config/workspaces.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - workspace = [ - # Special - "special:scratchy" - "special:aux" - - # Assignment work (upper usb-c slot) - "1,monitor:DP-8,default:true" - "2,monitor:DP-8" - "3,monitor:DP-8" - "4,monitor:DP-9,default:true" - "5,monitor:DP-9" - "6,monitor:DP-9" - - "1,monitor:DP-1" - ]; - - bind = [ - # Workspace selection - "SUPER,1, workspace, 1" - "SUPER,2, workspace, 2" - "SUPER,3, workspace, 3" - "SUPER,4, workspace, 4" - "SUPER,5, workspace, 5" - "SUPER,6, workspace, 6" - "SUPER,7, workspace, 7" - "SUPER,8, workspace, 8" - "SUPER,9, workspace, 9" - - # Workspace window movement - "ALT,1, movetoworkspace, 1" - "ALT,2, movetoworkspace, 2" - "ALT,3, movetoworkspace, 3" - "ALT,4, movetoworkspace, 4" - "ALT,5, movetoworkspace, 5" - "ALT,6, movetoworkspace, 6" - - # Special workpace handling - "SUPER,O, togglespecialworkspace, scratchy" - "SUPER,M, togglespecialworkspace, aux" - "SUPER SHIFT,O, movetoworkspace, special:scratchy" - "SUPER SHIFT,M, movetoworkspace, special:aux" - ]; -} diff --git a/modules/home-manager/desktop/hyprland/default.nix b/modules/home-manager/desktop/hyprland/default.nix deleted file mode 100644 index b5182b0d..00000000 --- a/modules/home-manager/desktop/hyprland/default.nix +++ /dev/null @@ -1,129 +0,0 @@ -{ - pkgs, - lib, - mylib, - config, - ... -}: -with lib; -with mylib; -let - cfg = config.roles.desktop.hyprland; -in -{ - imports = [ - # Addons - ./addons/hyprpaper.nix - ./addons/hyprlock.nix - ./addons/hypridle.nix - ]; - - options.roles.desktop.hyprland = { - enable = mkEnableOption "Enable hyprland"; - package = mkOption { type = types.nullOr types.pkgs; }; - - hyprlock = { - enable = mkEnableOption "Enable hyprlock"; - }; - hypridle = { - enable = mkEnableOption "Enable hypridle"; - cmd = mkOpt types.str "Path to locking binary"; - }; - }; - - config = - let - windows = import ./config/windows.nix; - programs = import ./config/programs.nix; - workspaces = import ./config/workspaces.nix; - in - mkIf cfg.enable { - catppuccin.hyprland.enable = true; - - wayland.windowManager.hyprland = { - enable = true; - inherit (cfg) package; - systemd.enable = false; # Disable for uswm - - portalPackage = pkgs.xdg-desktop-portal-wlr; - inherit (windows) extraConfig; - - settings = { - general = { - gaps_in = 8; - gaps_out = 10; - border_size = 3; - }; - - # Auto tile new windows - dwindle = { - preserve_split = "yes"; - special_scale_factor = 0.8; - }; - - xwayland = { - force_zero_scaling = true; - }; - - monitor = [ - "DP-8,1920x1080@60.0,auto,auto" - "DP-9,1920x1080@60.0,auto,auto" - ]; - - input = { - kb_layout = "eu"; - repeat_rate = 45; - repeat_delay = 150; - accel_profile = "flat"; - sensitivity = 1; # -1.0 - 1.0, 0 means no modification. - }; - - decoration = import ./config/decoration.nix; - - exec-once = [ - "uwsm app -- ${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1" - "[ workspace special:scratchy silent ] alacritty -t scratchy" - "sleep 5 && hyprctl dispatch closewindow class:ZSTray" - "sleep 5 && uwsm app -- mumble --tray" - ]; - - inherit (windows) windowrule windowrulev2; - inherit (workspaces) workspace; - - bind = windows.bind ++ programs.bind ++ workspaces.bind; - - # source = [ - # "~/.config/hypr/monitors.conf" - # "~/.config/hypr/workspaces.conf" - # ]; - }; - }; - - home.packages = with pkgs; [ - hyprland-qtutils - slurp - ]; - - xdg.portal = { - enable = true; - config = { - common = { - default = [ - "hyprland" - "gtk" - ]; - }; - }; - extraPortals = with pkgs; [ - xdg-desktop-portal-wlr - xdg-desktop-portal-hyprland - ]; - }; - - # environment.d defines environment variables for the user session, beyond shell level. - # It is processed by `systemd --user`, basically after login. - xdg.configFile."environment.d/envvars.conf".text = '' - PATH="$HOME/.nix-profile/bin:$PATH" - ''; - }; -} diff --git a/modules/home-manager/desktop/programs/audio.nix b/modules/home-manager/desktop/programs/audio.nix deleted file mode 100644 index b8cbf775..00000000 --- a/modules/home-manager/desktop/programs/audio.nix +++ /dev/null @@ -1,6 +0,0 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ - pavucontrol - spek - ]; -} diff --git a/modules/home-manager/desktop/programs/chromium.nix b/modules/home-manager/desktop/programs/chromium.nix deleted file mode 100644 index e5ba9bb1..00000000 --- a/modules/home-manager/desktop/programs/chromium.nix +++ /dev/null @@ -1,13 +0,0 @@ -{pkgs, ...}: { - programs.chromium = { - enable = true; - package = pkgs.chromium; - commandLineArgs = [ - "--enable-features=UseOzonePlatform" - "--ozone-platform=wayland" - "--enable-wayland-ime" - # TODO: wait for next hl tag/release see https://github.com/hyprwm/Hyprland/discussions/11843 - "--disable-features=WaylandWpColorManagerV1" - ]; - }; -} diff --git a/modules/home-manager/desktop/programs/default.nix b/modules/home-manager/desktop/programs/default.nix deleted file mode 100644 index 08f309f5..00000000 --- a/modules/home-manager/desktop/programs/default.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - pkgs, - lib, - config, - ... -}: { - imports = [ - # Tools - ./audio.nix - ./tray.nix - - # Programs - ./spotify.nix - ./nextcloud.nix - - # Browsers - ./firefox.nix - ./chromium.nix - ]; - - # Default desktop programs - home.packages = with pkgs; - [ - xfce.thunar - vlc - grimblast - nwg-displays - nwg-look - gparted - gnome-disk-utility - wf-recorder - ] - ++ lib.optionals config.roles.workdevice [ - stackit-cli - openstackclient-full - vault-bin - ]; -} diff --git a/modules/home-manager/desktop/programs/nextcloud.nix b/modules/home-manager/desktop/programs/nextcloud.nix deleted file mode 100644 index 4822bc39..00000000 --- a/modules/home-manager/desktop/programs/nextcloud.nix +++ /dev/null @@ -1,6 +0,0 @@ -_: { - home.packages = [ - # TODO: reactivate if needed - # pkgs.nextcloud-client - ]; -} diff --git a/modules/home-manager/desktop/programs/spotify.nix b/modules/home-manager/desktop/programs/spotify.nix deleted file mode 100644 index 9d0a14f8..00000000 --- a/modules/home-manager/desktop/programs/spotify.nix +++ /dev/null @@ -1,5 +0,0 @@ -{ - programs = { - spotify-player.enable = true; - }; -} diff --git a/modules/home-manager/firefly.nix b/modules/home-manager/firefly.nix deleted file mode 100644 index f5c89fb5..00000000 --- a/modules/home-manager/firefly.nix +++ /dev/null @@ -1,38 +0,0 @@ -{ - lib, - config, - ... -}: { - imports = [ - ./common - - ./cli - ./desktop - ]; - - roles = { - workdevice = true; - - desktop.hyprland = { - enable = true; - package = null; - - hyprlock.enable = false; - hypridle = { - enable = true; - cmd = "${config.home.homeDirectory}/Projects/swaywm/swaylock/build/swaylock"; - }; - }; - }; - - targets.genericLinux = { - enable = true; - gpu.enable = true; - }; - - home = { - username = "rapsn"; - homeDirectory = lib.mkDefault "/home/rapsn"; - stateVersion = lib.mkDefault "22.05"; - }; -} diff --git a/modules/home-manager/zion.nix b/modules/home-manager/zion.nix deleted file mode 100644 index 7f33eae2..00000000 --- a/modules/home-manager/zion.nix +++ /dev/null @@ -1,25 +0,0 @@ -{lib, ...}: { - imports = [ - ./common - - ./cli - ./desktop - ]; - - roles = { - workdevice = false; - - desktop = { - hyprland = { - enable = true; - hyprlock = true; - }; - }; - }; - - home = { - username = "rap"; - homeDirectory = lib.mkDefault "/home/rap"; - stateVersion = lib.mkDefault "22.05"; - }; -} diff --git a/modules/home/browsers/chromium/default.nix b/modules/home/browsers/chromium/default.nix new file mode 100644 index 00000000..3c1c5c3d --- /dev/null +++ b/modules/home/browsers/chromium/default.nix @@ -0,0 +1,15 @@ +{ + pkgs, + ... +}: +{ + programs.chromium = { + enable = true; + package = pkgs.chromium; + commandLineArgs = [ + "--enable-features=UseOzonePlatform" + "--ozone-platform=wayland" + "--enable-features=VaapiVideoDecodeLinuxGL,VaapiVideoEncoder,Vulkan,VulkanFromANGLE,DefaultANGLEVulkan,VaapiIgnoreDriverChecks,VaapiVideoDecoder,PlatformHEVCDecoderSupport,UseMultiPlaneFormatForHardwareVideo" + ]; + }; +} diff --git a/modules/home-manager/desktop/programs/firefox.nix b/modules/home/browsers/firefox/default.nix similarity index 71% rename from modules/home-manager/desktop/programs/firefox.nix rename to modules/home/browsers/firefox/default.nix index 14c7294a..7d5d0996 100644 --- a/modules/home-manager/desktop/programs/firefox.nix +++ b/modules/home/browsers/firefox/default.nix @@ -1,11 +1,13 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let csshacks = pkgs.fetchFromGitHub { owner = "MrOtherGuy"; repo = "firefox-csshacks"; rev = "bedf5da5134360f5031dbd5ea78f0ccb2937c99b"; sha256 = "sha256-XmBzgKFCHz3uE45NhUpbAYi4OP939wE8biufgudDzrc="; }; -in { +in +{ programs.firefox = { enable = true; profiles.default = { @@ -50,33 +52,18 @@ in { search = { force = true; - default = "Kagi"; + default = "ddg"; order = [ - "Kagi" + "ddg" "NixOS Options" "Nix Packages" "GitHub" "HackerNews" ]; engines = { - "Kagi" = { - urls = [ - { - template = "https://kagi.com/search"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - metaData.hideOneOffButton = true; - }; - "Nix Packages" = { icon = "https://nixos.org/_astro/flake-blue.Bf2X2kC4_Z1yqDoT.svg"; - definedAliases = ["@np"]; + definedAliases = [ "@np" ]; urls = [ { template = "https://search.nixos.org/packages"; @@ -101,7 +88,7 @@ in { "NixOS Options" = { icon = "https://nixos.org/_astro/flake-blue.Bf2X2kC4_Z1yqDoT.svg"; - definedAliases = ["@no"]; + definedAliases = [ "@no" ]; urls = [ { template = "https://search.nixos.org/options"; @@ -120,27 +107,9 @@ in { metaData.hideOneOffButton = true; }; - "SourceGraph" = { - icon = "https://sourcegraph.com/.assets/img/sourcegraph-mark.svg"; - definedAliases = ["@sg"]; - - urls = [ - { - template = "https://sourcegraph.com/search"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - metaData.hideOneOffButton = true; - }; - "GitHub" = { icon = "https://github.com/favicon.ico"; - definedAliases = ["@gh"]; + definedAliases = [ "@gh" ]; urls = [ { @@ -158,11 +127,11 @@ in { "Home Manager" = { icon = "https://home-manager-options.extranix.com/images/home-manager-option-search2.png"; - definedAliases = ["@hm"]; + definedAliases = [ "@hm" ]; urls = [ { - template = "https://mipmip.github.io/home-manager-option-search/"; + template = "https://home-manager-options.extranix.com/?&release=master"; params = [ { name = "query"; @@ -173,24 +142,6 @@ in { ]; metaData.hideOneOffButton = true; }; - - "HackerNews" = { - icon = "https://news.ycombinator.com/favicon.ico"; - definedAliases = ["@hn"]; - - urls = [ - { - template = "https://hn.algolia.com/"; - params = [ - { - name = "q"; - value = "{searchTerms}"; - } - ]; - } - ]; - metaData.hideOneOffButton = true; - }; }; }; }; diff --git a/modules/home/cli/shells/zsh/default.nix b/modules/home/cli/shells/zsh/default.nix new file mode 100644 index 00000000..452dc244 --- /dev/null +++ b/modules/home/cli/shells/zsh/default.nix @@ -0,0 +1,105 @@ +{ + pkgs, + lib, + mylib, + config, + ... +}: +{ + options.roles.cli.zsh.zshrc = mylib.mkOpt' lib.types.str "" "Extra content for zshrc"; + + config = { + home.packages = [ pkgs.zsh-completions ]; + + catppuccin.zsh-syntax-highlighting.enable = true; + + programs.zsh = { + enable = true; + + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + autocd = true; + dotDir = "${config.home.homeDirectory}/.config/zsh"; + + enableCompletion = true; + + sessionVariables = { + EDITOR = "vim"; + VISUAL = "vim"; + + # disable highlight of history-substring-search + HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND = ""; + }; + + history = { + expireDuplicatesFirst = true; + ignoreDups = true; + ignoreSpace = true; + save = 1000000000; + size = 1000000000; + share = true; + }; + + initContent = lib.mkMerge [ + (lib.mkOrder 500 "") + (lib.mkOrder 1000 '' + export GOPATH=$(go env GOPATH) + ${config.roles.cli.zsh.zshrc} + '') + (lib.mkOrder 1500 "") + ]; + + shellAliases = { + # Overwrites + cat = "bat"; + ls = "exa --icons"; + ll = "exa --icons -la"; + cd = "z"; + j = "z"; + n = "nix-shell -p"; + + # Shortcuts + clr = "clear"; + tf = "terraform"; + + g = "gardenctl"; + gtcp = "gardenctl target control-plane"; + gos = "eval $(gardenctl provider-env zsh)"; + o = "openstack"; + + k = "kubectl"; + kk = "k9s -c pods"; + kns = "kubectl ns"; + selc = "source selc_"; + + clean = "nix-collect-garbage -d && nix-store --gc && nix-store --verify --check-contents --repair"; + }; + + oh-my-zsh = { + enable = true; + plugins = [ + "git" + "kubectl" + ]; + }; + + plugins = [ + { + name = "zsh-autopair"; + src = pkgs.fetchFromGitHub { + owner = "hlissner"; + repo = "zsh-autopair"; + rev = "34a8bca0c18fcf3ab1561caef9790abffc1d3d49"; + sha256 = "1h0vm2dgrmb8i2pvsgis3lshc5b0ad846836m62y8h3rdb3zmpy1"; + }; + file = "autopair.zsh"; + } + { + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = "${pkgs.zsh-nix-shell}/share/zsh-nix-shell"; + } + ]; + }; + }; +} diff --git a/modules/home/cli/terminals/alacritty/default.nix b/modules/home/cli/terminals/alacritty/default.nix new file mode 100644 index 00000000..b5cb6b8e --- /dev/null +++ b/modules/home/cli/terminals/alacritty/default.nix @@ -0,0 +1,73 @@ +{ pkgs, ... }: +{ + catppuccin.alacritty.enable = true; + + home.packages = with pkgs; [ + nerd-fonts.caskaydia-cove + ]; + + fonts.fontconfig.enable = true; + + programs.alacritty = { + enable = true; + package = pkgs.alacritty; + settings = { + terminal.shell.program = "zsh"; + env.TERM = "xterm-256color"; + + selection = { + save_to_clipboard = true; + }; + + window = { + padding = { + x = 3; + y = 3; + }; + }; + + hints.enabled = [ + # Hint to copy uuids + { + action = "Copy"; + hyperlinks = true; + post_processing = true; + # URL, email, ipv4/6, UUID, Git-Hash + regex = ''(?:(?:https?://|ssh://)[^\\s<>"']+|[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}|(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}|\\[(?:[0-9A-Fa-f]{0,4}:){2,7}[0-9A-Fa-f]{0,4}\\]|(?:[0-9A-Fa-f]{0,4}:){2,7}[0-9A-Fa-f]{0,4}|[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|[0-9a-fA-F]{7,40})''; + + binding = { + key = "H"; + mods = "Control|Shift"; + }; + } + ]; + + font = + let + fontname = "CaskaydiaCove Nerd Font"; + in + { + normal = { + family = fontname; + style = "SemiBold"; + }; + bold = { + family = fontname; + style = "Bold"; + }; + italic = { + family = fontname; + style = "Italic"; + }; + size = 12; + }; + + mouse.bindings = [ + { + mouse = "Right"; + action = "Paste"; + } + ]; + }; + }; +} diff --git a/modules/home-manager/cli/terminals/addons/atuin.nix b/modules/home/cli/tools/atuin/default.nix similarity index 100% rename from modules/home-manager/cli/terminals/addons/atuin.nix rename to modules/home/cli/tools/atuin/default.nix diff --git a/modules/home/cli/tools/core/default.nix b/modules/home/cli/tools/core/default.nix new file mode 100644 index 00000000..ccf22c23 --- /dev/null +++ b/modules/home/cli/tools/core/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./packages.nix + ./programs.nix + ]; +} diff --git a/modules/home/cli/tools/core/packages.nix b/modules/home/cli/tools/core/packages.nix new file mode 100644 index 00000000..e2fd46f7 --- /dev/null +++ b/modules/home/cli/tools/core/packages.nix @@ -0,0 +1,56 @@ +{ pkgs, ... }: +{ + home.packages = with pkgs; [ + # Core utility + coreutils # cp, mv, etc. + dnsutils # dig, nslookup, etc. + gnumake + gnutar + gzip + unzip + gnused + gnugrep + killall + pciutils + parallel + + # Inspection + htop + + # Network tools + inetutils + curl + wget + + # Network inspection + termshark + nmap + netcat + tcpdump + iproute2 + + # Text processing + jq + yq-go + gawk + + # Find utils + fd + ripgrep + + # Copy tools + rclone + + # SSH / Security + openssh + libfido2 + keepassxc + sops + + # Clipboard + wl-clipboard + + # Monitor / I2C com + ddcutil + ]; +} diff --git a/modules/home/cli/tools/core/programs.nix b/modules/home/cli/tools/core/programs.nix new file mode 100644 index 00000000..ca28f4fe --- /dev/null +++ b/modules/home/cli/tools/core/programs.nix @@ -0,0 +1,17 @@ +{ + catppuccin = { + bat.enable = true; + fzf.enable = true; + btop.enable = true; + }; + + programs = { + bat.enable = true; + fzf.enable = true; + btop.enable = true; + + zoxide.enable = true; + neonix.enable = true; + eza.enable = true; + }; +} diff --git a/modules/home/cli/tools/custom/default.nix b/modules/home/cli/tools/custom/default.nix new file mode 100644 index 00000000..58b56c44 --- /dev/null +++ b/modules/home/cli/tools/custom/default.nix @@ -0,0 +1 @@ +{ imports = [ ./shell-scripts.nix ]; } diff --git a/modules/home-manager/cli/zsh/shellScripts.nix b/modules/home/cli/tools/custom/shell-scripts.nix similarity index 61% rename from modules/home-manager/cli/zsh/shellScripts.nix rename to modules/home/cli/tools/custom/shell-scripts.nix index 8519baeb..5121259a 100644 --- a/modules/home-manager/cli/zsh/shellScripts.nix +++ b/modules/home/cli/tools/custom/shell-scripts.nix @@ -1,27 +1,26 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let # nix helpers nix-run = pkgs.writeShellScriptBin "nr" '' - #!/usr/bin/env bash nix run $(printf 'nixpkgs#%s ' "$@") ''; nix-shell = pkgs.writeShellScriptBin "ns" '' - #!/usr/bin/env bash nix shell $(printf 'nixpkgs#%s ' "$@") ''; # kubeconfig selector - select-kc = pkgs.writeShellScriptBin "select_kc" '' - #!/usr/bin/env bash - BASE_PATH=$HOME/.config/kubeconfig + selc_ = pkgs.writeShellScriptBin "selc_" '' + BASE_PATH=$HOME/.config/kubeconfigs YAMLS=$(find "$BASE_PATH" -name '*.yaml' | awk -F/ '{ print $NF }') KUBECONFIG=$(fzf <<<"$YAMLS") - export KUBECONFIG=$BASE_PATH/$KUBECONFIG + printf 'export KUBECONFIG=%q\n' "$BASE_PATH/$KUBECONFIG" ''; -in { +in +{ home.packages = [ nix-run nix-shell - select-kc + selc_ ]; } diff --git a/modules/home-manager/cli/terminals/addons/direnv.nix b/modules/home/cli/tools/direnv/default.nix similarity index 100% rename from modules/home-manager/cli/terminals/addons/direnv.nix rename to modules/home/cli/tools/direnv/default.nix diff --git a/modules/home-manager/cli/programs/git.nix b/modules/home/cli/tools/git/default.nix similarity index 55% rename from modules/home-manager/cli/programs/git.nix rename to modules/home/cli/tools/git/default.nix index 50ed62e5..490ddf40 100644 --- a/modules/home-manager/cli/programs/git.nix +++ b/modules/home/cli/tools/git/default.nix @@ -2,15 +2,33 @@ pkgs, config, ... -}: let - email = - if config.roles.workdevice - then "raphael.groemmer@stackit.cloud" - else "github@rapsn.me"; -in { - home.packages = with pkgs; [ - gh - ]; +}: +{ + home.packages = + let + # Search through release notes + ghr-grep = pkgs.writeShellScriptBin "ghr-grep" '' + set -euo pipefail + usage='usage: ghr-grep org/repo "search_term"' + repo="''${1:?$usage}" + count="''${2:?$usage}" + search_term="''${3:?$usage}" + release_tags=$(gh release list -R "$repo" --limit "$count" | awk '{print $1}') + + for tag in $release_tags; do + body="$(gh release view "$tag" -R "$repo" --json body -q .body)" + if grep -qi -- "$search_term" <<<"$body"; then + echo -e "\033[0;32m=== $tag ===\033[0m" + grep -i -- "$search_term" <<<"$body" + echo + fi + done + ''; + in + [ + pkgs.gh + ghr-grep + ]; programs = { git = { @@ -34,7 +52,7 @@ in { settings = { user = { name = "RAPSNX"; - inherit email; + inherit (config.roles) email; }; credential.helper = "${pkgs.gitFull}/bin/git-credential-libsecret"; @@ -62,11 +80,17 @@ in { includes = [ { - condition = "gitdir:~/Projects/rgroemmer/**"; + condition = "gitdir:~/Projects/rapsnx/**"; contents = { user.email = "github@rapsn.me"; }; } + { + condition = "gitdir:~/Projects/schwarzit/**"; + contents = { + user.name = "Raphael Groemmer"; + }; + } ]; }; delta = { diff --git a/modules/home-manager/cli/programs/containers/default.nix b/modules/home/cli/tools/k8s/default.nix similarity index 88% rename from modules/home-manager/cli/programs/containers/default.nix rename to modules/home/cli/tools/k8s/default.nix index 46e0541c..0a15b7b8 100644 --- a/modules/home-manager/cli/programs/containers/default.nix +++ b/modules/home/cli/tools/k8s/default.nix @@ -1,8 +1,8 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ imports = [ ./k9s.nix ./krewfile.nix - ./podman.nix ./kubecolor.nix ]; diff --git a/modules/home/cli/tools/k8s/k9s.nix b/modules/home/cli/tools/k8s/k9s.nix new file mode 100644 index 00000000..f513d387 --- /dev/null +++ b/modules/home/cli/tools/k8s/k9s.nix @@ -0,0 +1,123 @@ +{ + lib, + config, + ... +}: +let + defaultPlugins = { + edit-secret = { + description = "Edit Decoded Secret"; + shortCut = "Ctrl-X"; + scopes = [ "secrets" ]; + command = "kubectl"; + background = false; + args = [ + "modify-secret" + "-n" + "$NAMESPACE" + "$NAME" + ]; + }; + }; + workPlugins = { + reconcile = { + description = "Reconcile resource"; + shortCut = "r"; + scopes = [ + "shoots" + # all resources in extensions.gardener.cloud/v1alpha1 + "backupbuckets" + "backupentries" + "bastions" + "clusters" + "containerruntimes" + "controlplanes" + "dnsrecords" + "extensions" + "infrastructures" + "networks" + "operatingsystemconfigs" + "workers" + ]; + command = "kubectl"; + background = true; + args = [ + "annotate" + "-n" + "$NAMESPACE" + "$RESOURCE_NAME" + "$NAME" + "gardener.cloud/operation=reconcile" + ]; + }; + + reconcile-seed = { + description = "Reconcile seed"; + shortCut = "r"; + scopes = [ "managedseeds" ]; + command = "kubectl"; + background = true; + args = [ + "annotate" + "$RESOURCE_NAME" + "$NAME" + "gardener.cloud/operation=reconcile" + ]; + }; + + retry-shoot = { + description = "Retry shoot operation"; + shortCut = "t"; + scopes = [ "shoots" ]; + command = "kubectl"; + background = true; + args = [ + "annotate" + "-n" + "$NAMESPACE" + "$RESOURCE_NAME" + "$NAME" + "gardener.cloud/operation=retry" + ]; + }; + + confirm-deletion = { + description = "Confirm deletion"; + shortCut = "o"; + scopes = [ + "projects" + "extensions" + "shoots" + "backupentries" + "etcds" + "infrastructure" + "controlplanes" + "machinedeployments" + "machinesets" + "machineclasses" + "namespaces" + "worker" + "dnsrecords" + "operatingsystemconfig" + ]; + command = "kubectl"; + background = false; + args = [ + "annotate" + "-n" + "$NAMESPACE" + "$RESOURCE_NAME" + "$NAME" + "confirmation.gardener.cloud/deletion=true" + ]; + }; + }; +in +{ + catppuccin.k9s.enable = true; + + programs.k9s = { + enable = true; + plugins = defaultPlugins // lib.optionalAttrs config.roles.work workPlugins; + }; +} diff --git a/modules/home-manager/cli/programs/containers/krewfile.nix b/modules/home/cli/tools/k8s/krewfile.nix similarity index 94% rename from modules/home-manager/cli/programs/containers/krewfile.nix rename to modules/home/cli/tools/k8s/krewfile.nix index 8ec294ca..b4285923 100644 --- a/modules/home-manager/cli/programs/containers/krewfile.nix +++ b/modules/home/cli/tools/k8s/krewfile.nix @@ -13,6 +13,7 @@ "node-shell" "ns" "ctx" + "klock" ]; }; } diff --git a/modules/home-manager/cli/programs/containers/kubecolor.nix b/modules/home/cli/tools/k8s/kubecolor.nix similarity index 100% rename from modules/home-manager/cli/programs/containers/kubecolor.nix rename to modules/home/cli/tools/k8s/kubecolor.nix diff --git a/modules/home/cli/tools/langs/default.nix b/modules/home/cli/tools/langs/default.nix new file mode 100644 index 00000000..966a2031 --- /dev/null +++ b/modules/home/cli/tools/langs/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./go.nix + ./rust.nix + ]; +} diff --git a/modules/home-manager/cli/programs/langs/go.nix b/modules/home/cli/tools/langs/go.nix similarity index 98% rename from modules/home-manager/cli/programs/langs/go.nix rename to modules/home/cli/tools/langs/go.nix index 7af19dd5..b2375cd0 100644 --- a/modules/home-manager/cli/programs/langs/go.nix +++ b/modules/home/cli/tools/langs/go.nix @@ -2,7 +2,8 @@ pkgs, config, ... -}: { +}: +{ programs.go = { enable = true; package = pkgs.go; diff --git a/modules/home-manager/cli/programs/langs/rust.nix b/modules/home/cli/tools/langs/rust.nix similarity index 51% rename from modules/home-manager/cli/programs/langs/rust.nix rename to modules/home/cli/tools/langs/rust.nix index c8d4517c..46983a2a 100644 --- a/modules/home-manager/cli/programs/langs/rust.nix +++ b/modules/home/cli/tools/langs/rust.nix @@ -3,12 +3,13 @@ config, lib, ... -}: { - config = lib.mkIf (!config.roles.workdevice) { +}: +{ + config = lib.mkIf (!config.roles.work) { home.packages = with pkgs; [ rustup clang ]; - home.sessionPath = ["$HOME/.cargo/bin"]; + home.sessionPath = [ "$HOME/.cargo/bin" ]; }; } diff --git a/modules/home-manager/cli/programs/lazygit.nix b/modules/home/cli/tools/lazygit/default.nix similarity index 94% rename from modules/home-manager/cli/programs/lazygit.nix rename to modules/home/cli/tools/lazygit/default.nix index 1a4d65f3..6f8cc54a 100644 --- a/modules/home-manager/cli/programs/lazygit.nix +++ b/modules/home/cli/tools/lazygit/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ catppuccin.lazygit.enable = true; programs.lazygit = { enable = true; diff --git a/modules/home-manager/cli/terminals/addons/pet.nix b/modules/home/cli/tools/pet/default.nix similarity index 98% rename from modules/home-manager/cli/terminals/addons/pet.nix rename to modules/home/cli/tools/pet/default.nix index 9648f598..b8090478 100644 --- a/modules/home-manager/cli/terminals/addons/pet.nix +++ b/modules/home/cli/tools/pet/default.nix @@ -2,7 +2,8 @@ lib, inputs, ... -}: { +}: +{ programs.pet = { enable = true; settings = { diff --git a/modules/home-manager/cli/zsh/starship.nix b/modules/home/cli/tools/starship/default.nix similarity index 89% rename from modules/home-manager/cli/zsh/starship.nix rename to modules/home/cli/tools/starship/default.nix index e441adf6..5da04f91 100644 --- a/modules/home-manager/cli/zsh/starship.nix +++ b/modules/home/cli/tools/starship/default.nix @@ -2,7 +2,8 @@ lib, pkgs, ... -}: { +}: +{ catppuccin.starship.enable = true; programs.starship = { @@ -65,7 +66,7 @@ kubernetes = { disabled = false; - detect_env_vars = ["KUBECONFIG"]; + detect_env_vars = [ "KUBECONFIG" ]; format = "[$symbol$context( \\($namespace\\))]($style) "; }; @@ -80,13 +81,13 @@ staged = "+$count"; renamed = "Β»$count"; deleted = "✘$count"; - format = "[ $all_status ]($style)"; + format = "([$all_status$ahead_behind ]($style))"; style = "fg:base bg:yellow"; }; git_metrics = { disabled = false; - format = "([ +$added ]($added_style))([-$deleted ]($deleted_style) )"; + format = "([ +$added ]($added_style))([-$deleted ]($deleted_style))"; added_style = "fg:green bg:base"; deleted_style = "fg:red bg:base"; }; @@ -123,7 +124,11 @@ description = "The currently used proxy"; when = ''test -n "$http_proxy"''; command = ''echo "$http_proxy"''; - shell = ["${lib.getExe pkgs.bash}" "--noprofile" "--norc"]; + shell = [ + "${lib.getExe pkgs.bash}" + "--noprofile" + "--norc" + ]; symbol = "πŸ”€ "; style = "bright-yellow"; format = "[$symbol$output]($style) "; @@ -132,7 +137,11 @@ description = "The currently targeted openstack tenant"; when = ''test -n "$OS_TENANT_NAME"''; command = ''echo "$OS_TENANT_NAME"''; - shell = ["${lib.getExe pkgs.bash}" "--noprofile" "--norc"]; + shell = [ + "${lib.getExe pkgs.bash}" + "--noprofile" + "--norc" + ]; symbol = "☁️ "; style = "bright-red"; format = "[$symbol$output]($style) "; diff --git a/modules/home/common/default.nix b/modules/home/common/default.nix new file mode 100644 index 00000000..2a92cbee --- /dev/null +++ b/modules/home/common/default.nix @@ -0,0 +1,14 @@ +{ lib, ... }: +{ + imports = [ ./roles.nix ]; + + programs.home-manager.enable = true; + xdg.enable = true; + + news = { + display = "silent"; + json = lib.mkForce { }; + entries = lib.mkForce [ ]; + }; + +} diff --git a/modules/home/common/roles.nix b/modules/home/common/roles.nix new file mode 100644 index 00000000..5bc2e338 --- /dev/null +++ b/modules/home/common/roles.nix @@ -0,0 +1,42 @@ +{ + lib, + mylib, + pkgs, + config, + ... +}: +{ + options.roles = { + work = lib.mkEnableOption "Device is used for work."; + email = mylib.mkOpt lib.types.str "Email address of the user."; + + apparmor-gen = + mylib.mkOpt' (lib.types.listOf lib.types.package) [ ] + "List of packages to create apparmor rule for userns."; + }; + + config = + let + apparmorRuleGen = app: path: '' + cat </etc/apparmor.d/${app}-nix + # Warning this is auto-generated apparmor profile via nix. + abi , + include + + profile ${app}-nix ${path} flags=(unconfined) { + userns, + } + EOF + ''; + + apparmorProfilesGen = lib.strings.concatStrings ( + (map (pkg: apparmorRuleGen pkg.pname (lib.getExe pkg)) config.roles.apparmor-gen) + ++ [ "sudo systemctl reload apparmor" ] + ); + in + lib.mkIf (config.roles.apparmor-gen != [ ]) { + home.activation.apparmor-gen = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + run warnEcho "sudo ${pkgs.writeShellScript "apparmor-gen" apparmorProfilesGen}" + ''; + }; +} diff --git a/modules/home-manager/desktop/addons/fuzzel.nix b/modules/home/desktops/addons/fuzzel/default.nix similarity index 100% rename from modules/home-manager/desktop/addons/fuzzel.nix rename to modules/home/desktops/addons/fuzzel/default.nix index e05712b4..52653e80 100644 --- a/modules/home-manager/desktop/addons/fuzzel.nix +++ b/modules/home/desktops/addons/fuzzel/default.nix @@ -1,4 +1,4 @@ { - programs.fuzzel.enable = true; catppuccin.fuzzel.enable = true; + programs.fuzzel.enable = true; } diff --git a/modules/home/desktops/addons/gtk/default.nix b/modules/home/desktops/addons/gtk/default.nix new file mode 100644 index 00000000..722ee32f --- /dev/null +++ b/modules/home/desktops/addons/gtk/default.nix @@ -0,0 +1,42 @@ +{ + pkgs, + lib, + ... +}: +{ + # TODO: Check if this force is necessary + # gtk = lib.mkForce { + gtk = { + enable = true; + colorScheme = "dark"; + + theme = { + name = "Catppuccin-GTK-Mauve-Dark"; + package = pkgs.magnetic-catppuccin-gtk.override { + tweaks = [ "black" ]; + accent = [ "mauve" ]; + }; + }; + + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.catppuccin-papirus-folders; + }; + + gtk4.theme = null; # Legacy default due to stateVersion + }; + + home = + let + name = "catppuccin-mocha-mauve-cursors"; + size = 35; + in + { + pointerCursor = lib.mkForce { + enable = true; + inherit name size; + package = pkgs.catppuccin-cursors.mochaMauve; + gtk.enable = true; + }; + }; +} diff --git a/modules/home/desktops/addons/kanshi/default.nix b/modules/home/desktops/addons/kanshi/default.nix new file mode 100644 index 00000000..231566d1 --- /dev/null +++ b/modules/home/desktops/addons/kanshi/default.nix @@ -0,0 +1,134 @@ +{ pkgs, lib, ... }: +{ + services.kanshi = + let + hyprctl = lib.getExe' pkgs.hyprland "hyprctl"; + workspaceSetup = pkgs.writeShellScriptBin "workspaceSetup" '' + primary="''${1:?missing primary monitor name}" + secondary="''${2:?missing secondary monitor name}" + + # Switch away so workspaces to pin, are unfocused before rewriting the config. + ${hyprctl} dispatch focusmonitor $primary && ${hyprctl} dispatch workspace 9 + ${hyprctl} dispatch focusmonitor $secondary && ${hyprctl} dispatch workspace 10 + ${hyprctl} dispatch focusmonitor $primary + + cat > "$HOME/.config/hypr/workspaces.conf" <