diff options
| author | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2025-11-19 21:02:52 +0100 |
|---|---|---|
| committer | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2025-11-19 21:02:52 +0100 |
| commit | 892de67a9f64d0b0cdb023d830a019d8feec0a57 (patch) | |
| tree | 0c5fd0c60ef93bb5cdc5f83c8cade0c5dddb4899 /home-modules | |
| parent | f5b37610b3835ea26757ef36d554ec598d53100c (diff) | |
Nix fmt
Diffstat (limited to 'home-modules')
| -rw-r--r-- | home-modules/apps/default.nix | 100 | ||||
| -rw-r--r-- | home-modules/apps/desktop/default.nix | 200 | ||||
| -rw-r--r-- | home-modules/apps/desktop/floorp.nix | 3 | ||||
| -rw-r--r-- | home-modules/apps/desktop/ghidra.nix | 4 | ||||
| -rw-r--r-- | home-modules/apps/desktop/wine.nix | 11 | ||||
| -rw-r--r-- | home-modules/apps/nvim/default.nix | 90 | ||||
| -rw-r--r-- | home-modules/apps/zsh.nix | 14 | ||||
| -rw-r--r-- | home-modules/default.nix | 21 | ||||
| -rw-r--r-- | home-modules/desktop/default.nix | 8 | ||||
| -rw-r--r-- | home-modules/desktop/hyprland.nix | 407 | ||||
| -rw-r--r-- | home-modules/desktop/wayland/default.nix | 8 | ||||
| -rw-r--r-- | home-modules/desktop/wayland/mako.nix | 14 | ||||
| -rw-r--r-- | home-modules/desktop/wayland/waybar.nix | 220 | ||||
| -rw-r--r-- | home-modules/services/default.nix | 11 | ||||
| -rw-r--r-- | home-modules/services/direnv.nix | 17 | ||||
| -rw-r--r-- | home-modules/services/syncthing.nix | 14 | ||||
| -rw-r--r-- | home-modules/services/vdirsyncer.nix | 43 | ||||
| -rw-r--r-- | home-modules/theming.nix | 50 |
18 files changed, 685 insertions, 550 deletions
diff --git a/home-modules/apps/default.nix b/home-modules/apps/default.nix index 5c920fd..ba19780 100644 --- a/home-modules/apps/default.nix +++ b/home-modules/apps/default.nix @@ -1,39 +1,44 @@ -{lib, pkgs, inputs, config, ...}: +{ + lib, + pkgs, + inputs, + config, + ... +}: with lib; let -cfg = config.homeapps.presets; -in + cfg = config.homeapps.presets; +in { - imports = [ - ./nvim - ./desktop - ./zsh.nix - ]; + imports = [ + ./nvim + ./desktop + ./zsh.nix + ]; options.homeapps.presets = { - base.enable = lib.mkOption { - type = lib.types.bool; - default = true; - description ="Enable basics for home-config"; - } ; - full.enable = lib.mkEnableOption "Enable everything" ; + base.enable = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Enable basics for home-config"; + }; + full.enable = lib.mkEnableOption "Enable everything"; email.enable = lib.mkEnableOption "Enable email-related config"; browser.enable = lib.mkEnableOption "Enable the browser (librewolf)"; comms.enable = lib.mkEnableOption "Enable communication-related config"; - utils.enable = lib.mkEnableOption "Enable utilities" ; - note-taking.enable = lib.mkEnableOption "Enable note taking apps"; - art.enable = lib.mkEnableOption "Enable art apps config"; - work.enable = lib.mkEnableOption "Enable research-related config"; - dev.enable = lib.mkEnableOption "Enable development apps"; - connectivity.enable = lib.mkEnableOption "Enable connectivity"; - multimedia.enable = lib.mkEnableOption "Enable multimedia apps"; - games.enable = lib.mkEnableOption "Enable games"; + utils.enable = lib.mkEnableOption "Enable utilities"; + note-taking.enable = lib.mkEnableOption "Enable note taking apps"; + art.enable = lib.mkEnableOption "Enable art apps config"; + work.enable = lib.mkEnableOption "Enable research-related config"; + dev.enable = lib.mkEnableOption "Enable development apps"; + connectivity.enable = lib.mkEnableOption "Enable connectivity"; + multimedia.enable = lib.mkEnableOption "Enable multimedia apps"; + games.enable = lib.mkEnableOption "Enable games"; }; - config = lib.mkMerge [ (lib.mkIf cfg.full.enable { - homeapps.presets = { + homeapps.presets = { base.enable = true; email.enable = true; browser.enable = true; @@ -50,11 +55,11 @@ in }) (lib.mkIf cfg.base.enable { home.packages = with pkgs; [ - lm_sensors + lm_sensors nix-output-monitor ]; - homeapps.zsh.enable = true; - homeapps.nvim.enable = true; + homeapps.zsh.enable = true; + homeapps.nvim.enable = true; }) (lib.mkIf cfg.email.enable { home.packages = with pkgs; [ @@ -68,11 +73,11 @@ in (lib.mkIf cfg.utils.enable { home.packages = with pkgs; [ htop - btop - nmap + btop + nmap dig - ripgrep - unzip + ripgrep + unzip unrar sshfs xdg-user-dirs @@ -82,17 +87,18 @@ in ]; }) (lib.mkIf cfg.note-taking.enable { - home.packages = with pkgs; [ ]; - # Todo force synthing to be on here + home.packages = [ ]; + # Todo force synthing to be on here }) (lib.mkIf cfg.work.enable { home.packages = with pkgs; [ + inputs.tatuin.packages.${pkgs.system}.default ]; }) (lib.mkIf cfg.dev.enable { home.packages = with pkgs; [ - cmake - ( hiPrio gcc) + cmake + (hiPrio gcc) gnumake clang rustup @@ -103,11 +109,11 @@ in }) (lib.mkIf cfg.connectivity.enable { home.packages = with pkgs; [ - eduvpn-client + eduvpn-client ]; # services.syncthing = { - # enable = true; - # }; + # enable = true; + # }; }) (lib.mkIf cfg.multimedia.enable { home.packages = with pkgs; [ @@ -115,23 +121,23 @@ in playerctl ]; - services.playerctld.enable = true; + services.playerctld.enable = true; services.spotifyd = { - enable = true; + enable = true; settings = { global = { - use-mpris = true; - device_name = "Apocalypse Nix"; - }; + use-mpris = true; + device_name = "Apocalypse Nix"; + }; discovery = { - zeroconf_port = 5352; + zeroconf_port = 5352; }; audio = { - backend="pulse"; + backend = "pulse"; }; - ## Fixes spotifyd for some reason + ## Fixes spotifyd for some reason # FIXME: Add a hook for notifications - }; + }; }; }) (lib.mkIf cfg.games.enable { diff --git a/home-modules/apps/desktop/default.nix b/home-modules/apps/desktop/default.nix index 5eb14f3..c326607 100644 --- a/home-modules/apps/desktop/default.nix +++ b/home-modules/apps/desktop/default.nix @@ -1,100 +1,108 @@ -{lib, pkgs, config ,hostconfig, ...}: -let - cfg = config.homeapps.presets; -in { - imports = [ + lib, + pkgs, + config, + hostconfig, + ... +}: +let + cfg = config.homeapps.presets; +in +{ + imports = [ ./floorp.nix ]; - - config = lib.mkIf hostconfig.addons.desktop.enable or false (lib.mkMerge [ - (lib.mkIf cfg.base.enable { - home.packages = with pkgs; [ - # Base - evince - kitty - mpv - #Theme - qt6Packages.qt6ct - kdePackages.qtstyleplugin-kvantum - (catppuccin-kvantum.override { - accent = "pink"; - variant = "mocha"; - }) - ]; - }) - (lib.mkIf cfg.email.enable { - home.packages = with pkgs; [ - thunderbird - ]; - }) - (lib.mkIf cfg.comms.enable { - home.packages = with pkgs; [ - element-desktop - vesktop - ]; - }) - (lib.mkIf cfg.utils.enable { - home.packages = with pkgs; [ - kdePackages.filelight - qalculate-qt - gparted - ]; - }) - (lib.mkIf cfg.note-taking.enable { - home.packages = with pkgs; [ obsidian ]; - # Todo force synthing to be on here - }) - (lib.mkIf cfg.art.enable { - home.packages = with pkgs; [ - krita - inkscape - ]; - }) - (lib.mkIf cfg.browser.enable { - home.packages = with pkgs; [ - librewolf - ]; - }) - (lib.mkIf cfg.work.enable { - home.packages = with pkgs; [ - libreoffice-qt6-fresh - zotero - ]; - }) - (lib.mkIf cfg.dev.enable { - home.packages = with pkgs; [ - hugo - wireshark-qt - ]; - }) - (lib.mkIf cfg.connectivity.enable { - home.packages = with pkgs; [ - kdePackages.kdeconnect-kde - eduvpn-client - ]; - services.syncthing = { - tray = { - enable = true; - command = "syncthingtray --wait"; - }; - }; - }) - (lib.mkIf cfg.multimedia.enable { - home.packages = with pkgs; [ - ani-cli - vlc - # Spotify (The proprietary frontend) - riff - ]; - }) - (lib.mkIf cfg.games.enable { - home.packages = with pkgs; [ - # Games - prismlauncher - openttd - anki-bin - ]; - }) - ]); + + config = lib.mkIf hostconfig.addons.desktop.enable or false ( + lib.mkMerge [ + (lib.mkIf cfg.base.enable { + home.packages = with pkgs; [ + # Base + evince + kitty + mpv + #Theme + qt6Packages.qt6ct + kdePackages.qtstyleplugin-kvantum + (catppuccin-kvantum.override { + accent = "pink"; + variant = "mocha"; + }) + ]; + }) + (lib.mkIf cfg.email.enable { + home.packages = with pkgs; [ + thunderbird + ]; + }) + (lib.mkIf cfg.comms.enable { + home.packages = with pkgs; [ + element-desktop + vesktop + ]; + }) + (lib.mkIf cfg.utils.enable { + home.packages = with pkgs; [ + kdePackages.filelight + qalculate-qt + gparted + ]; + }) + (lib.mkIf cfg.note-taking.enable { + home.packages = with pkgs; [ obsidian ]; + # Todo force synthing to be on here + }) + (lib.mkIf cfg.art.enable { + home.packages = with pkgs; [ + krita + inkscape + ]; + }) + (lib.mkIf cfg.browser.enable { + home.packages = with pkgs; [ + librewolf + ]; + }) + (lib.mkIf cfg.work.enable { + home.packages = with pkgs; [ + libreoffice-qt6-fresh + zotero + ]; + }) + (lib.mkIf cfg.dev.enable { + home.packages = with pkgs; [ + hugo + wireshark-qt + ]; + }) + (lib.mkIf cfg.connectivity.enable { + home.packages = with pkgs; [ + kdePackages.kdeconnect-kde + eduvpn-client + ]; + services.syncthing = { + tray = { + enable = true; + command = "syncthingtray --wait"; + }; + }; + }) + (lib.mkIf cfg.multimedia.enable { + home.packages = with pkgs; [ + ani-cli + vlc + # Spotify (The proprietary frontend) + riff + ]; + }) + (lib.mkIf cfg.games.enable { + home.packages = with pkgs; [ + # Games + prismlauncher + openttd + anki-bin + ]; + }) + ] + ); } diff --git a/home-modules/apps/desktop/floorp.nix b/home-modules/apps/desktop/floorp.nix index 2d8cadb..b5b2cec 100644 --- a/home-modules/apps/desktop/floorp.nix +++ b/home-modules/apps/desktop/floorp.nix @@ -1,2 +1,3 @@ -{pkgs, config, ...}: { +{ pkgs, config, ... }: +{ } diff --git a/home-modules/apps/desktop/ghidra.nix b/home-modules/apps/desktop/ghidra.nix index 7bbcd0a..6e5b8c3 100644 --- a/home-modules/apps/desktop/ghidra.nix +++ b/home-modules/apps/desktop/ghidra.nix @@ -1,3 +1,3 @@ -{pkgs, ...}: +{ pkgs, ... }: { -} +} diff --git a/home-modules/apps/desktop/wine.nix b/home-modules/apps/desktop/wine.nix index 4aa00b6..a23f44a 100644 --- a/home-modules/apps/desktop/wine.nix +++ b/home-modules/apps/desktop/wine.nix @@ -1,7 +1,12 @@ -{pkgs, config, lib, ...}: { - home.packages = with pkgs; [ + pkgs, + config, + lib, + ... +}: +{ + home.packages = with pkgs; [ wineWowPackages.waylandFull winetricks - ]; + ]; } diff --git a/home-modules/apps/nvim/default.nix b/home-modules/apps/nvim/default.nix index 58a7dda..f45095f 100644 --- a/home-modules/apps/nvim/default.nix +++ b/home-modules/apps/nvim/default.nix @@ -1,26 +1,32 @@ -{ pkgs, config, lib,...}: +{ + pkgs, + config, + lib, + ... +}: let -ts_ls=pkgs.typescript-language-server; -vue_ls=pkgs.vue-language-server; -in { + ts_ls = pkgs.typescript-language-server; + vue_ls = pkgs.vue-language-server; +in +{ options.homeapps.nvim = { - enable = lib.mkEnableOption "Enables neovim configuration"; + enable = lib.mkEnableOption "Enables neovim configuration"; }; - config = lib.mkIf config.homeapps.nvim.enable { + config = lib.mkIf config.homeapps.nvim.enable { programs.neovim = { - enable = true; - defaultEditor = true; - viAlias = true; - vimAlias = true; - vimdiffAlias = true; - withPython3 = true; - withNodeJs = true; - withRuby = true; - - coc.enable = false; - plugins = [ - ]; + enable = true; + defaultEditor = true; + viAlias = true; + vimAlias = true; + vimdiffAlias = true; + withPython3 = true; + withNodeJs = true; + withRuby = true; + + coc.enable = false; + plugins = [ + ]; }; home.file."./.config/nvim/lua/wilkuu/init.lua".text = '' @@ -36,28 +42,34 @@ in { home.sessionPath = [ "/home/wilkuu/.npm/bin/" - ]; + ]; - home.packages = with pkgs; [ - lua - lua-language-server - gopls - go - typescript - nodejs_22 - rustup - nil - statix - nixfmt-rfc-style - # phpactor - pyright - nodePackages.intelephense - texlive.combined.scheme-medium - texlab - mermaid-cli - ltex-ls - deno - ] ++ [ ts_ls vue_ls]; + home.packages = + with pkgs; + [ + lua + lua-language-server + gopls + go + typescript + nodejs_22 + rustup + nil + statix + nixfmt-rfc-style + # phpactor + pyright + nodePackages.intelephense + texlive.combined.scheme-medium + texlab + mermaid-cli + ltex-ls + deno + ] + ++ [ + ts_ls + vue_ls + ]; }; } diff --git a/home-modules/apps/zsh.nix b/home-modules/apps/zsh.nix index b979a83..9a7c84d 100644 --- a/home-modules/apps/zsh.nix +++ b/home-modules/apps/zsh.nix @@ -1,4 +1,10 @@ -{config ,pkgs, lib, ...}: { +{ + config, + pkgs, + lib, + ... +}: +{ options.homeapps.zsh = { enable = lib.mkEnableOption "Enable ZSH shell"; }; @@ -6,10 +12,10 @@ config = lib.mkIf config.homeapps.zsh.enable { programs.zsh = { - enable = true; + enable = true; enableCompletion = true; oh-my-zsh = { - enable = true; + enable = true; theme = "clean"; }; plugins = [ @@ -24,6 +30,6 @@ }; } ]; - }; + }; }; } diff --git a/home-modules/default.nix b/home-modules/default.nix index 46db559..dec54f1 100644 --- a/home-modules/default.nix +++ b/home-modules/default.nix @@ -1,9 +1,20 @@ -{pkgs, config ,...}: { - imports = [./theming.nix ./apps ./desktop ./services ]; +{ + pkgs, + config, + input, + ... +}: +{ + imports = [ + ./theming.nix + ./apps + ./desktop + ./services + ]; sops = { - age.keyFile = "/home/${config.home.username}/.config/sops/age/keys.txt"; - defaultSopsFile = ../secrets/secrets.yaml; + age.keyFile = "/home/${config.home.username}/.config/sops/age/keys.txt"; + defaultSopsFile = ../secrets/secrets.yaml; }; -} +} diff --git a/home-modules/desktop/default.nix b/home-modules/desktop/default.nix index d02f217..6e88a5c 100644 --- a/home-modules/desktop/default.nix +++ b/home-modules/desktop/default.nix @@ -1,4 +1,8 @@ -{pkgs, hostconfig, ...}: { - imports = [./wayland ./hyprland.nix]; +{ pkgs, hostconfig, ... }: +{ + imports = [ + ./wayland + ./hyprland.nix + ]; } diff --git a/home-modules/desktop/hyprland.nix b/home-modules/desktop/hyprland.nix index 6f36b2f..f714650 100644 --- a/home-modules/desktop/hyprland.nix +++ b/home-modules/desktop/hyprland.nix @@ -1,4 +1,10 @@ -{lib, pkgs, config, hostconfig , ...}: +{ + lib, + pkgs, + config, + hostconfig, + ... +}: with lib; { config = mkIf hostconfig.addons.desktop.hyprland.enable { @@ -7,248 +13,261 @@ with lib; wofi hyprshot networkmanagerapplet - xdg-desktop-portal-gnome + xdg-desktop-portal-gnome xdg-desktop-portal-hyprland wl-clipboard brightnessctl ]; - services.hyprpolkitagent.enable = true; + services.hyprpolkitagent.enable = true; homeprogs.waybar.enable = true; homeprogs.mako.enable = true; # Environment variables for hyprland. # This can be used to configure wayland/hyprland-specific things home.file.".config/uwsm/env-hyprland".text = '' - export XDG_SESSION_TYPE=wayland - export GDK_BACKEND=wayland - export GTK_USE_PORTAL=1 - export QT_QPA_PLATFORM=wayland;xcb - export QT_STYLE_OVERRIDE=kvantum - export QT_QPA_PLATFORM_THEME=kvantum - export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 - export QT_AUTO_SCREEN_SCALE_FACTOR=1 - export MOZ_ENABLE_WAYLAND=1 - export -n GTK_IM_MODULE + export XDG_SESSION_TYPE=wayland + export GDK_BACKEND=wayland + export GTK_USE_PORTAL=1 + export QT_QPA_PLATFORM=wayland;xcb + export QT_STYLE_OVERRIDE=kvantum + export QT_QPA_PLATFORM_THEME=kvantum + export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 + export QT_AUTO_SCREEN_SCALE_FACTOR=1 + export MOZ_ENABLE_WAYLAND=1 + export -n GTK_IM_MODULE ''; - # Hyprland + # Hyprland wayland.windowManager.hyprland = { - systemd.enable = false; - enable = true; - xwayland.enable = true; - settings = { - exec-once = map (s: "uwsm app -- " + s) [ - "kitty &" - "waybar &" - "nm-applet &" - "blueman-tray &" - "blueman-applet &" - "hyprctl setcursor Catppuccin-Mocha-Dark-Cursors 24" - "kdeconnect-indicator &" - # "fcitx5 -d" - ] ++ [ + systemd.enable = false; + enable = true; + xwayland.enable = true; + settings = { + exec-once = + map (s: "uwsm app -- " + s) [ + "kitty &" + "waybar &" + "nm-applet &" + "blueman-tray &" + "blueman-applet &" + "hyprctl setcursor Catppuccin-Mocha-Dark-Cursors 24" + "kdeconnect-indicator &" + # "fcitx5 -d" + ] + ++ [ "systemctl --user start hypridle.service" "systemctl --user start hyprpaper.service" "systemctl --user start hyprpolkitagent.service" "uwsm finalize QT_QPA_PLATFORM QT_PLUGIN_PATH" - ]; - general = { - gaps_in = 3; - gaps_out = 8; - border_size = 1; + ]; + general = { + gaps_in = 3; + gaps_out = 8; + border_size = 1; - "col.active_border" = "rgba(ed45b8ee) rgba(611449ee) 45deg"; - "col.inactive_border" = "rgba(595959aa)"; + "col.active_border" = "rgba(ed45b8ee) rgba(611449ee) 45deg"; + "col.inactive_border" = "rgba(595959aa)"; + + resize_on_border = true; + allow_tearing = true; + layout = "dwindle"; + }; + + animations = { + enabled = true; + bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; + animation = [ + "windows, 1, 7, myBezier" + "windowsOut, 1, 7, default, popin 80%" + "border, 1, 10, default" + "borderangle, 1, 8, default" + "fade, 1, 7, default" + "workspaces, 1, 6, default" + ]; + }; - resize_on_border = true; - allow_tearing = true; - layout = "dwindle"; - }; + decoration = { + rounding = 10; - animations = { - enabled = true; - bezier = "myBezier, 0.05, 0.9, 0.1, 1.05"; - animation = [ - "windows, 1, 7, myBezier" - "windowsOut, 1, 7, default, popin 80%" - "border, 1, 10, default" - "borderangle, 1, 8, default" - "fade, 1, 7, default" - "workspaces, 1, 6, default" - ]; - }; - - decoration = { - rounding = 10; + # Change transparency of focused and unfocused windows + active_opacity = "1.0"; + inactive_opacity = "1.0"; - # Change transparency of focused and unfocused windows - active_opacity = "1.0"; - inactive_opacity = "1.0"; + # drop_shadow = true; + # shadow_range = 4; + # shadow_render_power = 3; + # "col.shadow" = "rgba(1a1a1aee)"; - # drop_shadow = true; - # shadow_range = 4; - # shadow_render_power = 3; - # "col.shadow" = "rgba(1a1a1aee)"; + # https://wiki.hyprland.org/Configuring/Variables/#blur + blur = { + enabled = true; + size = 3; + passes = 1; - # https://wiki.hyprland.org/Configuring/Variables/#blur - blur = { - enabled = true; - size = 3; - passes = 1; - - vibrancy = "0.1696"; - }; - }; - dwindle = { - pseudotile = true; - preserve_split = true; - }; + vibrancy = "0.1696"; + }; + }; + dwindle = { + pseudotile = true; + preserve_split = true; + }; - #master = { - # new_is_master = true; - #}; - input = { - kb_layout = "pl"; - kb_variant = ""; - kb_model = ""; - kb_options = ""; - kb_rules = ""; + #master = { + # new_is_master = true; + #}; + input = { + kb_layout = "pl"; + kb_variant = ""; + kb_model = ""; + kb_options = ""; + kb_rules = ""; - follow_mouse = 1; + follow_mouse = 1; - sensitivity = 0; # -1.0 - 1.0, 0 means no modification. + sensitivity = 0; # -1.0 - 1.0, 0 means no modification. - touchpad = { - natural_scroll = true; - }; + touchpad = { + natural_scroll = true; }; - # Deprecated - # gestures = { - # workspace_swipe = true; - # }; - misc = { - force_default_wallpaper = "-1"; # Set to 0 or 1 to disable the anime mascot wallpapers - disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :( - }; - monitor= [ ",preferred,auto,1" ]; - - # Mod key - "$mod" = "SUPER"; - - # Programs - "$terminal" = "kitty"; - "$fileManager" = "thunar"; - "$menu" = "wofi --show drun"; - "$screenshot" = "hyprshot -m region -f screenshots/screenshot_$(date +'%y-%m-%d_%H-%M-%S').png"; + }; + # Deprecated + # gestures = { + # workspace_swipe = true; + # }; + misc = { + force_default_wallpaper = "-1"; # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :( + }; + monitor = [ ",preferred,auto,1" ]; + + # Mod key + "$mod" = "SUPER"; - bind = [ - # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more - "$mod, RETURN, exec, $terminal" - "$mod, Q, killactive," - "$mod SHIFT, M, exec, uwsm stop" - "$mod, E, exec, uwsm app -- $fileManager" - "$mod, V, togglefloating," - "$mod, R, exec, uwsm app -- $menu" - "$mod, P, pseudo" - "$mod, J, togglesplit" - "$mod, L, exec, uwsm app -- hyprlock" - ",Print, exec, uwsm app -- $screenshot " + # Programs + "$terminal" = "kitty"; + "$fileManager" = "thunar"; + "$menu" = "wofi --show drun"; + "$screenshot" = "hyprshot -m region -f screenshots/screenshot_$(date +'%y-%m-%d_%H-%M-%S').png"; - # Move focus with mod + arrow keys - "$mod, left, movefocus, l" - "$mod, right, movefocus, r" - "$mod, up, movefocus, u" - "$mod, down, movefocus, d" + bind = [ + # Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more + "$mod, RETURN, exec, $terminal" + "$mod, Q, killactive," + "$mod SHIFT, M, exec, uwsm stop" + "$mod, E, exec, uwsm app -- $fileManager" + "$mod, V, togglefloating," + "$mod, R, exec, uwsm app -- $menu" + "$mod, P, pseudo" + "$mod, J, togglesplit" + "$mod, L, exec, uwsm app -- hyprlock" + ",Print, exec, uwsm app -- $screenshot " - # Example special workspace (scratchpad) - "$mod, S, togglespecialworkspace, magic" - "$mod SHIFT, S, movetoworkspace, special:magic" + # Move focus with mod + arrow keys + "$mod, left, movefocus, l" + "$mod, right, movefocus, r" + "$mod, up, movefocus, u" + "$mod, down, movefocus, d" - # Scroll through existing workspaces with mod + scroll - "$mod, mouse_down, workspace, e+1" - "$mod, mouse_up, workspace, e-1" - ] ++ ( + # Example special workspace (scratchpad) + "$mod, S, togglespecialworkspace, magic" + "$mod SHIFT, S, movetoworkspace, special:magic" + + # Scroll through existing workspaces with mod + scroll + "$mod, mouse_down, workspace, e+1" + "$mod, mouse_up, workspace, e-1" + ] + ++ ( # workspaces - builtins.concatLists (builtins.genList ( - x: let - ws = let - c = (x + 1) / 10; - in + builtins.concatLists ( + builtins.genList ( + x: + let + ws = + let + c = (x + 1) / 10; + in builtins.toString (x + 1 - (c * 10)); - in [ + in + [ # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} "$mod, ${ws}, workspace, ${toString (x + 1)}" "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" - + # Move workspace {1..10} to current monitor - "CTRL ALT $mod , ${ws}, focusworkspaceoncurrentmonitor, ${toString(x + 1)}" + "CTRL ALT $mod , ${ws}, focusworkspaceoncurrentmonitor, ${toString (x + 1)}" ] - ) - 10) - ) ++ ( - # Monitor {0..4} --> Key {1..5} - builtins.concatLists (builtins.genList ( - x: let - mon = builtins.toString(x); - key = builtins.toString(x + 1); - in [ - + ) 10 + ) + ) + ++ ( + # Monitor {0..4} --> Key {1..5} + builtins.concatLists ( + builtins.genList ( + x: + let + mon = builtins.toString (x); + key = builtins.toString (x + 1); + in + [ + # Move current workspace to a monitor {1..4} "CTRL ALT SHIFT $mod, ${key}, movecurrentworkspacetomonitor, ${mon} " - ] - ) 4)); + ] + ) 4 + ) + ); - bindm = [ - "$mod, mouse:272, movewindow" - "$mod, mouse:273, resizewindow" - ]; - - bindl = [ - "$mod, O, exec, sleep 1 && hyprctl dispatch dpms toggle" - ] ++ (lib.optionals config.homeapps.presets.multimedia.enable [ - # Playerctl binds if playerctl is enabled - " , XF86AudioNext, exec, playerctl next" - " , XF86AudioPause, exec, playerctl play-pause" - " , XF86AudioPlay, exec, playerctl play-pause" - " , XF86AudioPrev, exec, playerctl previous" - ]); + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; - bindel = [ - # Laptop multimedia keys for volume and LCD brightness - " ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" - " ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" - " ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" - " ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" - " ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+" - " ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-" - ]; + bindl = [ + "$mod, O, exec, sleep 1 && hyprctl dispatch dpms toggle" + ] + ++ (lib.optionals config.homeapps.presets.multimedia.enable [ + # Playerctl binds if playerctl is enabled + " , XF86AudioNext, exec, playerctl next" + " , XF86AudioPause, exec, playerctl play-pause" + " , XF86AudioPlay, exec, playerctl play-pause" + " , XF86AudioPrev, exec, playerctl previous" + ]); + bindel = [ + # Laptop multimedia keys for volume and LCD brightness + " ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+" + " ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + " ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + " ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle" + " ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+" + " ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-" + ]; - windowrulev2 = [ - "suppressevent maximize, class:.*" # You'll probably like this. - ]; + windowrulev2 = [ + "suppressevent maximize, class:.*" # You'll probably like this. + ]; - source = [ - "~/.config/hypr/hypr_test.conf" - ]; - }; - }; + source = [ + "~/.config/hypr/hypr_test.conf" + ]; + }; + }; services.hyprpaper = { - enable = true; + enable = true; settings = { ipc = "on"; splash = false; splash_offset = 2.0; preload = [ "${./wallpaper.png}" ]; - wallpaper= [ ",${./wallpaper.png}" ]; + wallpaper = [ ",${./wallpaper.png}" ]; }; - }; + }; programs.hyprlock = { - enable=true; + enable = true; settings = { general = { disable_loading_bar = true; @@ -283,25 +302,25 @@ with lib; }; }; - services.hypridle.enable = true; + services.hypridle.enable = true; services.hypridle.settings = { general = { - lock_cmd ="pidof hyprlock || hyprlock"; - before_sleep_cmd="loginctl lock-session"; - ignore_dbus_inhibit=false; - after_sleep_cmd="hyprctl_dispatch dpms on"; + lock_cmd = "pidof hyprlock || hyprlock"; + before_sleep_cmd = "loginctl lock-session"; + ignore_dbus_inhibit = false; + after_sleep_cmd = "hyprctl_dispatch dpms on"; }; listener = [ { timeout = 120; - on-timeout = "hyprlock"; - } + on-timeout = "hyprlock"; + } { timeout = 300; on-timeout = "hyprctl dispatch dpms off"; - on-resume = "hyprctl dispatch dpms on"; + on-resume = "hyprctl dispatch dpms on"; } ]; }; - }; + }; } diff --git a/home-modules/desktop/wayland/default.nix b/home-modules/desktop/wayland/default.nix index 9be2fe9..ebf5439 100644 --- a/home-modules/desktop/wayland/default.nix +++ b/home-modules/desktop/wayland/default.nix @@ -1,3 +1,7 @@ -{pkgs, hostconfig, ...}: { - imports = [./waybar.nix ./mako.nix]; +{ pkgs, hostconfig, ... }: +{ + imports = [ + ./waybar.nix + ./mako.nix + ]; } diff --git a/home-modules/desktop/wayland/mako.nix b/home-modules/desktop/wayland/mako.nix index 15c7969..7dac41c 100644 --- a/home-modules/desktop/wayland/mako.nix +++ b/home-modules/desktop/wayland/mako.nix @@ -1,12 +1,18 @@ -{pkgs, config, hostconfig, lib,...}: { +{ + pkgs, + config, + hostconfig, + lib, + ... +}: +{ options.homeprogs.mako.enable = lib.mkEnableOption "Enable Mako notification manager"; config = lib.mkIf config.homeprogs.mako.enable { services.mako = { enable = true; }; - xdg.configFile."mako/config".source = ./mako.ini; - - }; + xdg.configFile."mako/config".source = ./mako.ini; + }; } diff --git a/home-modules/desktop/wayland/waybar.nix b/home-modules/desktop/wayland/waybar.nix index 5f3c532..6088cee 100644 --- a/home-modules/desktop/wayland/waybar.nix +++ b/home-modules/desktop/wayland/waybar.nix @@ -1,120 +1,141 @@ -{pkgs, hostconfig, lib, config,...}: { +{ + pkgs, + hostconfig, + lib, + config, + ... +}: +{ options.homeprogs.waybar.enable = lib.mkEnableOption "Enable waybar"; config = lib.mkIf config.homeprogs.waybar.enable { - programs.waybar = { - enable = true; - settings = [{ - layer = "top"; - position = "top"; - height = 30; - spacing = 6; - modules-left = [ - "hyprland/workspaces" - "hyprland/window" - ]; + programs.waybar = { + enable = true; + settings = [ + { + layer = "top"; + position = "top"; + height = 30; + spacing = 6; + modules-left = [ + "hyprland/workspaces" + "hyprland/window" + ]; - modules-center = [ - "clock" - "hyprland/language" - "tray" - "battery" - ]; + modules-center = [ + "clock" + "hyprland/language" + "tray" + "battery" + ]; - modules-right = [ - "idle_inhibitor" - "wireplumber" - "network" - "cpu" - "memory" - "disk" - "temperature" - "backlight" - ]; - wireplumber = { - scroll-step = 1; #%, can be a float + modules-right = [ + "idle_inhibitor" + "wireplumber" + "network" + "cpu" + "memory" + "disk" + "temperature" + "backlight" + ]; + wireplumber = { + scroll-step = 1; # %, can be a float format = "{volume}% "; format-muted = "Muted"; on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; - on-click-right = "pavucontrol"; - }; + on-click-right = "pavucontrol"; + }; - network = { + network = { # interface = "wlp2*"; # (Optional) To force the use of this interface format-wifi = "({signalStrength}%) "; format-ethernet = "{ifname} "; tooltip-format = "{ifname} via {gwaddr} "; format-linked = "{ifname} (No IP) "; format-disconnected = "Disconnected ⚠"; - format-alt= "{essid}: {ipaddr}/{cidr}"; - }; + format-alt = "{essid}: {ipaddr}/{cidr}"; + }; - "hyprland/workspaces" = { - all-outputs = false; - active-only = false; - format = "{name}"; - format-icons = { - urgent = ""; - focused = ""; - default = ""; - }; - }; - - "hyprland/window" = { - max-length = 200; - separate-outputs = true; - }; + "hyprland/workspaces" = { + all-outputs = false; + active-only = false; + format = "{name}"; + format-icons = { + urgent = ""; + focused = ""; + default = ""; + }; + }; + "hyprland/window" = { + max-length = 200; + separate-outputs = true; + }; - keyboard-state = { - numlock = false; - format = "{name} {icon}"; - format-icons = { + keyboard-state = { + numlock = false; + format = "{name} {icon}"; + format-icons = { locked = ""; unlocked = ""; + }; }; - }; - idle_inhibitor = { - format = "{icon}"; - format-icons = { + idle_inhibitor = { + format = "{icon}"; + format-icons = { activated = ""; deactivated = ""; + }; }; - }; - tray = { - icon-size = 21; - spacing = 10; - }; - clock = { - timezone = "Europe/Amsterdam"; - tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; - format-alt = "{:%Y-%m-%d}"; - }; - cpu = { - format = "{usage}% "; - tooltip = false; - }; - memory = { - format = "{}% "; - }; - temperature = { - thermal-zone = 1; - # hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input"; - critical-threshold = 80; - # format-critical = "{temperatureC}°C {icon}"; - format = "{temperatureC}°C {icon}"; - format-icons = ["" "" ""]; - }; - "backlight" = { - # device = "acpi_video1"; - format = "{percent}{icon}"; - format-icons = ["" "" "" "" "" "" "" "" ""]; - }; - battery = { + tray = { + icon-size = 21; + spacing = 10; + }; + clock = { + timezone = "Europe/Amsterdam"; + tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; + format-alt = "{:%Y-%m-%d}"; + }; + cpu = { + format = "{usage}% "; + tooltip = false; + }; + memory = { + format = "{}% "; + }; + temperature = { + thermal-zone = 1; + # hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input"; + critical-threshold = 80; + # format-critical = "{temperatureC}°C {icon}"; + format = "{temperatureC}°C {icon}"; + format-icons = [ + "" + "" + "" + ]; + }; + "backlight" = { + # device = "acpi_video1"; + format = "{percent}{icon}"; + format-icons = [ + "" + "" + "" + "" + "" + "" + "" + "" + "" + ]; + }; + battery = { states = { - # good = 95; - warning = 30; - critical = 15; + # good = 95; + warning = 30; + critical = 15; }; format = "{capacity}% {icon}"; format-charging = "{capacity}% "; @@ -122,10 +143,17 @@ format-alt = "{time} {icon}"; # format-good = ""; // An empty format will hide the module # format-full = ""; - format-icons = ["" "" "" "" ""]; - }; - }]; + format-icons = [ + "" + "" + "" + "" + "" + ]; + }; + } + ]; style = ./waybar.css; - }; + }; }; } diff --git a/home-modules/services/default.nix b/home-modules/services/default.nix index 7506f86..9f13709 100644 --- a/home-modules/services/default.nix +++ b/home-modules/services/default.nix @@ -1,7 +1,12 @@ -{lib, pkgs ,...}: { - imports = [./vdirsyncer.nix ./direnv.nix ./syncthing.nix]; +{ lib, pkgs, ... }: +{ + imports = [ + ./vdirsyncer.nix + ./direnv.nix + ./syncthing.nix + ]; - # Gnome keyring, very smort + # Gnome keyring, very smort services.gnome-keyring.enable = true; home.packages = [ pkgs.gcr ]; } diff --git a/home-modules/services/direnv.nix b/home-modules/services/direnv.nix index 7e68f99..9ddab97 100644 --- a/home-modules/services/direnv.nix +++ b/home-modules/services/direnv.nix @@ -1,11 +1,16 @@ -{pkgs, config, lib ,...}: { - options.homesv.direnv.enable = lib.mkEnableOption "Enable Direnv support"; - config = lib.mkIf config.homesv.direnv.enable { + pkgs, + config, + lib, + ... +}: +{ + options.homesv.direnv.enable = lib.mkEnableOption "Enable Direnv support"; + config = lib.mkIf config.homesv.direnv.enable { programs.direnv = { - enable = true; - enableZshIntegration = true; - nix-direnv.enable = true; + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; }; }; } diff --git a/home-modules/services/syncthing.nix b/home-modules/services/syncthing.nix index b264433..b518dd6 100644 --- a/home-modules/services/syncthing.nix +++ b/home-modules/services/syncthing.nix @@ -1,9 +1,13 @@ -{ config, pkgs, lib ,... }: { - config = lib.mkIf config.homeapps.presets.connectivity.enable { + config, + pkgs, + lib, + ... +}: +{ + config = lib.mkIf config.homeapps.presets.connectivity.enable { services.syncthing = { - enable = true; + enable = true; }; - }; + }; } - diff --git a/home-modules/services/vdirsyncer.nix b/home-modules/services/vdirsyncer.nix index c5dd2cc..a849637 100644 --- a/home-modules/services/vdirsyncer.nix +++ b/home-modules/services/vdirsyncer.nix @@ -1,29 +1,35 @@ -{pkgs, inputs, config, lib, ...}: -let - cfg = config.homesv.vdirsyncer; -in -{ +{ + pkgs, + inputs, + config, + lib, + ... +}: +let + cfg = config.homesv.vdirsyncer; +in +{ options.homesv.vdirsyncer = { - enable = lib.mkEnableOption "Enable syncing via vdirsyncer"; - user = lib.mkOption { default = config.home.username; }; - server = lib.mkOption { default= "https://webdav.wilkuu.xyz/dav.php"; }; + enable = lib.mkEnableOption "Enable syncing via vdirsyncer"; + user = lib.mkOption { default = config.home.username; }; + server = lib.mkOption { default = "https://webdav.wilkuu.xyz/dav.php"; }; }; config = lib.mkIf cfg.enable { sops.secrets.webdav_uname = { sopsFile = ../../secrets/secrets.yaml; - key="${cfg.user}/webdav/username"; - }; + key = "${cfg.user}/webdav/username"; + }; sops.secrets.webdav_pass = { sopsFile = ../../secrets/secrets.yaml; - key="${cfg.user}/webdav/password"; - }; + key = "${cfg.user}/webdav/password"; + }; services.vdirsyncer = { - enable = true; + enable = true; frequency = "*:0/5"; # About once in 5 minutes - }; + }; systemd.user.services.vdirsyncer.unitConfig.After = [ "sops-nix.service" ]; - + sops.templates."vdirsyncer_config_${cfg.user}" = { content = '' [general] @@ -67,8 +73,9 @@ in ''; }; home.file.".config/vdirsyncer/config" = { - source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."vdirsyncer_config_${cfg.user}".path; + source = + config.lib.file.mkOutOfStoreSymlink + config.sops.templates."vdirsyncer_config_${cfg.user}".path; }; }; -} - +} diff --git a/home-modules/theming.nix b/home-modules/theming.nix index 291dadc..ee6b13b 100644 --- a/home-modules/theming.nix +++ b/home-modules/theming.nix @@ -1,45 +1,49 @@ -{ hostconfig, pkgs, lib,... }: +{ + hostconfig, + pkgs, + lib, + ... +}: let - catppuccin_gtk = pkgs.catppuccin-gtk.override { - accents = ["pink"]; + catppuccin_gtk = pkgs.catppuccin-gtk.override { + accents = [ "pink" ]; size = "compact"; - tweaks = ["black"]; + tweaks = [ "black" ]; variant = "mocha"; - }; + }; in { - config = lib.mkIf hostconfig.addons.desktop.enable { - #Gtk Theming + config = lib.mkIf hostconfig.addons.desktop.enable { + #Gtk Theming gtk = { - enable=true; - theme = { - package= catppuccin_gtk; - name="catppuccin-mocha-pink-compact+black"; - }; + enable = true; + theme = { + package = catppuccin_gtk; + name = "catppuccin-mocha-pink-compact+black"; + }; iconTheme = { - package = pkgs.catppuccin-papirus-folders; + package = pkgs.catppuccin-papirus-folders; name = "Papirus-Dark"; - }; + }; }; - home.pointerCursor = { gtk.enable = true; package = pkgs.catppuccin-cursors.mochaDark; name = "catppuccin-mocha-dark-cursors"; size = 32; - }; + }; qt = { - enable = true; + enable = true; platformTheme.name = "qtct"; - style.name="kvantum"; + style.name = "kvantum"; }; - xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini {}).generate "kvantum.kvconfig" { - General.theme = "Catppuccin-Mocha-Pink"; - }; + xdg.configFile."Kvantum/kvantum.kvconfig".source = + (pkgs.formats.ini { }).generate "kvantum.kvconfig" + { + General.theme = "Catppuccin-Mocha-Pink"; + }; }; } - - |
