diff --git a/aspects/base/fish.nix b/aspects/base/fish.nix deleted file mode 100644 index 8ed326a..0000000 --- a/aspects/base/fish.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ ... }: -{ - flake.modules = { - nixos.fish = - { ... }: - { - programs.fish.enable = true; - }; - homeManager.fish = - { - config, - lib, - pkgs, - ... - }: - { - programs.fish = { - enable = true; - interactiveShellInit = '' - set fish_greeting - ${lib.getExe pkgs.nix-your-shell} fish | source - ''; - loginShellInit = "${lib.getExe pkgs.nix-your-shell} fish | source"; - plugins = [ - { - name = "bang-bang"; - src = pkgs.fetchFromGitHub { - owner = "oh-my-fish"; - repo = "plugin-bang-bang"; - rev = "f969c618301163273d0a03d002614d9a81952c1e"; - sha256 = "sha256-A8ydBX4LORk+nutjHurqNNWFmW6LIiBPQcxS3x4nbeQ="; - }; - } - { - name = "z"; - src = pkgs.fetchFromGitHub { - owner = "jethrokuan"; - repo = "z"; - rev = "067e867debee59aee231e789fc4631f80fa5788e"; - sha256 = "sha256-emmjTsqt8bdI5qpx1bAzhVACkg0MNB/uffaRjjeuFxU="; - }; - } - ]; - }; - }; - }; -} diff --git a/aspects/base/ssh.nix b/aspects/base/ssh.nix deleted file mode 100644 index 03fa556..0000000 --- a/aspects/base/ssh.nix +++ /dev/null @@ -1,32 +0,0 @@ -{ ... }: - -{ - flake.modules.nixos.ssh = - { ... }: - { - services.openssh = { - enable = true; - settings.PermitRootLogin = "no"; - extraConfig = '' - PrintLastLog no - ''; - }; - programs = { - bash.interactiveShellInit = '' - if { [ -n "$SSH_CONNECTION" ] && [ -z "$IN_NIX_SHELL" ]; } || [ -z "$TMUX" ]; then - export TERM=xterm-256color - clear - fastfetch - fi - ''; - fish.interactiveShellInit = '' - set fish_greeting - if set -q SSH_CONNECTION; and not set -q IN_NIX_SHELL; or not set -q TMUX - export TERM=xterm-256color - clear - fastfetch - end - ''; - }; - }; -} diff --git a/aspects/systems/cli.nix b/aspects/cli/cli.nix similarity index 78% rename from aspects/systems/cli.nix rename to aspects/cli/cli.nix index 1d379e8..8a11616 100644 --- a/aspects/systems/cli.nix +++ b/aspects/cli/cli.nix @@ -3,18 +3,13 @@ { flake.modules = { nixos.cli = - { pkgs, ... }: + { ... }: { imports = with inputs.self.modules.nixos; [ btop helix tmux ]; - - environment.systemPackages = with pkgs; [ - p7zip - rclone - ]; }; homeManager.cli = { ... }: diff --git a/aspects/base/boot.nix b/aspects/common/boot.nix similarity index 92% rename from aspects/base/boot.nix rename to aspects/common/boot.nix index ec8593d..b74b68c 100644 --- a/aspects/base/boot.nix +++ b/aspects/common/boot.nix @@ -1,6 +1,6 @@ { ... }: { - flake.modules.nixos.boot = + flake.modules.nixos.common-boot = { pkgs, ... }: { boot = { diff --git a/aspects/base/console.nix b/aspects/common/console.nix similarity index 75% rename from aspects/base/console.nix rename to aspects/common/console.nix index 6bb7be4..128b914 100644 --- a/aspects/base/console.nix +++ b/aspects/common/console.nix @@ -1,6 +1,6 @@ { ... }: { - flake.modules.nixos.console = + flake.modules.nixos.common-console = { ... }: { console = { diff --git a/aspects/base/firewall.nix b/aspects/common/firewall.nix similarity index 76% rename from aspects/base/firewall.nix rename to aspects/common/firewall.nix index 68ffa6e..0e5297d 100644 --- a/aspects/base/firewall.nix +++ b/aspects/common/firewall.nix @@ -1,6 +1,6 @@ { ... }: { - flake.modules.nixos.firewall = + flake.modules.nixos.common-firewall = { ... }: { networking = { diff --git a/aspects/base/locale.nix b/aspects/common/locale.nix similarity index 93% rename from aspects/base/locale.nix rename to aspects/common/locale.nix index 4d0c716..a6b5754 100644 --- a/aspects/base/locale.nix +++ b/aspects/common/locale.nix @@ -1,6 +1,6 @@ { ... }: { - flake.modules.nixos.locale = + flake.modules.nixos.common-locale = { ... }: { time.timeZone = "America/Bahia"; diff --git a/aspects/base/nix.nix b/aspects/common/nix.nix similarity index 96% rename from aspects/base/nix.nix rename to aspects/common/nix.nix index 16397a9..7fa6e49 100644 --- a/aspects/base/nix.nix +++ b/aspects/common/nix.nix @@ -1,6 +1,6 @@ { ... }: { - flake.modules.nixos.nix = + flake.modules.nixos.common-nix = { inputs, ... }: { imports = [ inputs.nixos-cli.nixosModules.nixos-cli ]; diff --git a/aspects/common/openssh.nix b/aspects/common/openssh.nix new file mode 100644 index 0000000..b8179f2 --- /dev/null +++ b/aspects/common/openssh.nix @@ -0,0 +1,14 @@ +{ ... }: +{ + flake.modules.nixos.common-openssh = + { ... }: + { + services.openssh = { + enable = true; + settings.PermitRootLogin = "no"; + extraConfig = '' + PrintLastLog no + ''; + }; + }; +} diff --git a/aspects/systems/base.nix b/aspects/common/programs.nix similarity index 51% rename from aspects/systems/base.nix rename to aspects/common/programs.nix index 5fef6b9..ccdf185 100644 --- a/aspects/systems/base.nix +++ b/aspects/common/programs.nix @@ -1,23 +1,16 @@ -{ inputs, ... }: +{ ... }: { - flake.modules.nixos.base = + flake.modules.nixos.common-programs = { lib, pkgs, ... }: { - imports = with inputs.self.modules.nixos; [ - boot - console - firewall - fish - locale - nix - security - ssh - ]; environment = { systemPackages = with pkgs; [ + ### Dev Tools ### git + ### System Utilities ### fastfetch nixos-firewall-tool + nvd sysz wget yazi @@ -29,15 +22,18 @@ }; }; - programs.command-not-found.enable = false; - - services = { - dbus.implementation = "broker"; - irqbalance.enable = true; - fstrim.enable = true; - tailscale = { + programs = { + command-not-found.enable = false; + fish = { enable = true; - extraUpFlags = [ "--operator=user" ]; + interactiveShellInit = '' + set fish_greeting + if set -q SSH_CONNECTION; and not set -q IN_NIX_SHELL; or not set -q TMUX + export TERM=xterm-256color + clear + fastfetch + end + ''; }; }; }; diff --git a/aspects/base/security.nix b/aspects/common/security.nix similarity index 81% rename from aspects/base/security.nix rename to aspects/common/security.nix index 310e345..2ad04a0 100644 --- a/aspects/base/security.nix +++ b/aspects/common/security.nix @@ -1,6 +1,6 @@ { ... }: { - flake.modules.nixos.security = + flake.modules.nixos.common-security = { ... }: { security.sudo = { diff --git a/aspects/common/services.nix b/aspects/common/services.nix new file mode 100644 index 0000000..e05dcf0 --- /dev/null +++ b/aspects/common/services.nix @@ -0,0 +1,12 @@ +{ ... }: +{ + flake.modules.nixos.common-services = + { ... }: + { + services = { + dbus.implementation = "broker"; + irqbalance.enable = true; + fstrim.enable = true; + }; + }; +} diff --git a/aspects/common/tailscale.nix b/aspects/common/tailscale.nix new file mode 100644 index 0000000..74381ac --- /dev/null +++ b/aspects/common/tailscale.nix @@ -0,0 +1,11 @@ +{ ... }: +{ + flake.modules.nixos.common-tailscale = + { ... }: + { + services.tailscale = { + enable = true; + extraUpFlags = [ "--operator=user" ]; + }; + }; +} diff --git a/aspects/desktop/boot.nix b/aspects/desktop/boot.nix new file mode 100644 index 0000000..cd0fa9c --- /dev/null +++ b/aspects/desktop/boot.nix @@ -0,0 +1,34 @@ +{ ... }: +{ + flake.modules.nixos.desktop-boot = + { + config, + lib, + pkgs, + ... + }: + { + boot = { + plymouth.enable = true; + initrd.systemd.enable = true; + loader.efi.efiSysMountPoint = "/boot/efi"; + kernelPackages = pkgs.linuxPackages_xanmod_latest; + extraModprobeConfig = '' + options bluetooth disable_ertm=1 + ''; + kernel.sysctl = { + "net.ipv4.tcp_mtu_probing" = 1; + }; + kernelParams = [ + "quiet" + "splash" + "i2c-dev" + "i2c-piix4" + "loglevel=3" + "udev.log_priority=3" + "rd.udev.log_level=3" + "rd.systemd.show_status=false" + ]; + }; + }; +} diff --git a/aspects/desktop/desktop.nix b/aspects/desktop/desktop.nix new file mode 100644 index 0000000..fb54f55 --- /dev/null +++ b/aspects/desktop/desktop.nix @@ -0,0 +1,307 @@ +{ + inputs, + ... +}: +{ + flake.modules = { + nixos.desktop-desktop = + { + config, + lib, + pkgs, + ... + }: + { + imports = [ + inputs.niri-flake.nixosModules.niri + inputs.nix-flatpak.nixosModules.nix-flatpak + ]; + + environment = { + sessionVariables = { + KDEHOME = "$XDG_CONFIG_HOME/kde4"; # Stops kde from placing a .kde4 folder in the home dir + NIXOS_OZONE_WL = "1"; # Forces chromium and most electron apps to run in wayland + }; + systemPackages = with pkgs; [ + ### Web ### + bitwarden-desktop + fragments + nextcloud-client + tor-browser + vesktop + inputs.zen-browser.packages."${system}".default + ### Office & Productivity ### + aspell + aspellDicts.de + aspellDicts.en + aspellDicts.en-computers + aspellDicts.pt_BR + papers + presenterm + rnote + ### Graphics & Design ### + gimp + inkscape + plasticity + ### System Utilities ### + adwaita-icon-theme + ghostty + gnome-disk-utility + junction + libfido2 + mission-center + nautilus + p7zip + rclone + toggleaudiosink + unrar + ### Media ### + decibels + loupe + obs-studio + showtime + ]; + }; + + services = { + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + wireplumber.enable = true; + }; + greetd = { + enable = true; + settings = { + default_session = { + command = "${lib.getExe pkgs.tuigreet} --user-menu --time --remember --asterisks --cmd ${config.programs.niri.package}/bin/niri-session"; + user = "greeter"; + }; + } + // lib.optionalAttrs (config.networking.hostName == "io") { + initial_session = { + command = "${config.programs.niri.package}/bin/niri-session"; + user = "user"; + }; + }; + }; + flatpak = { + enable = true; + packages = [ + ### Office & Productivity ### + "com.collabora.Office" + ### Graphics & Design ### + "com.boxy_svg.BoxySVG" + rec { + appId = "io.github.softfever.OrcaSlicer"; + sha256 = "0hdx5sg6fknj1pfnfxvlfwb5h6y1vjr6fyajbsnjph5gkp97c6p1"; + bundle = "${pkgs.fetchurl { + url = "https://github.com/SoftFever/OrcaSlicer/releases/download/v2.3.0/OrcaSlicer-Linux-flatpak_V2.3.0_x86_64.flatpak"; + inherit sha256; + }}"; + } + ### System Utilities ### + "com.github.tchx84.Flatseal" + "com.rustdesk.RustDesk" + ]; + uninstallUnmanaged = true; + update.auto.enable = true; + }; + gvfs.enable = true; + }; + + security.rtkit.enable = true; # Needed for pipewire to acquire realtime priority + + users = { + users.greeter = { + isSystemUser = true; + group = "greeter"; + }; + groups.greeter = { }; + }; + + programs = { + niri = { + enable = true; + package = inputs.niri.packages.${pkgs.system}.niri; + }; + kdeconnect = { + enable = true; + package = pkgs.valent; + }; + dconf.enable = true; + appimage = { + enable = true; + binfmt = true; + }; + }; + + niri-flake.cache.enable = false; + + fonts = { + fontDir.enable = true; + packages = with pkgs; [ + corefonts + inter + nerd-fonts.fira-code + noto-fonts-cjk-sans + noto-fonts-color-emoji + roboto + ]; + }; + + xdg.portal = { + extraPortals = with pkgs; [ + xdg-desktop-portal-gnome + xdg-desktop-portal-gtk + ]; + config = { + common.default = "*"; + niri.default = [ + "gtk" + "gnome" + ]; + }; + }; + }; + + homeManager.desktop-desktop = + { + config, + lib, + pkgs, + inputs, + ... + }: + { + imports = [ inputs.vicinae.homeManagerModules.default ]; + + fonts.fontconfig.enable = true; + + home.packages = with pkgs; [ xwayland-satellite ]; + + services.vicinae = { + enable = true; + systemd = { + enable = true; + autoStart = true; + }; + }; + + programs = { + ghostty = { + enable = true; + settings = { + cursor-style = "block"; + shell-integration-features = "no-cursor"; + cursor-style-blink = false; + custom-shader = "${builtins.fetchurl { + url = "https://raw.githubusercontent.com/hackr-sh/ghostty-shaders/cb6eb4b0d1a3101c869c62e458b25a826f9dcde3/cursor_blaze.glsl"; + sha256 = "sha256:0g2lgqjdrn3c51glry7x2z30y7ml0y61arl5ykmf4yj0p85s5f41"; + }}"; + bell-features = ""; + gtk-titlebar-style = "tabs"; + keybind = [ "shift+enter=text:\\x1b\\r" ]; + }; + }; + + password-store = { + enable = true; + package = pkgs.pass-wayland; + }; + }; + + xdg = { + enable = true; + userDirs.enable = true; + mimeApps = { + enable = true; + defaultApplications = { + "text/html" = [ + "re.sonny.Junction.desktop" + "zen-browser.desktop" + "torbrowser.desktop" + ]; + "x-scheme-handler/http" = [ + "re.sonny.Junction.desktop" + "zen-browser.desktop" + "torbrowser.desktop" + ]; + "x-scheme-handler/https" = [ + "re.sonny.Junction.desktop" + "zen-browser.desktop" + "torbrowser.desktop" + ]; + "x-scheme-handler/about" = [ + "re.sonny.Junction.desktop" + "zen-browser.desktop" + "torbrowser.desktop" + ]; + "x-scheme-handler/unknown" = [ + "re.sonny.Junction.desktop" + "zen-browser.desktop" + "torbrowser.desktop" + ]; + "image/jpeg" = "org.gnome.Loupe.desktop"; + "image/png" = "org.gnome.Loupe.desktop"; + "image/gif" = "org.gnome.Loupe.desktop"; + "image/webp" = "org.gnome.Loupe.desktop"; + "image/bmp" = "org.gnome.Loupe.desktop"; + "image/svg+xml" = "org.gnome.Loupe.desktop"; + "image/tiff" = "org.gnome.Loupe.desktop"; + "video/mp4" = "io.bassi.Showtime.desktop"; + "video/x-matroska" = "io.bassi.Showtime.desktop"; + "video/webm" = "io.bassi.Showtime.desktop"; + "video/mpeg" = "io.bassi.Showtime.desktop"; + "video/x-msvideo" = "io.bassi.Showtime.desktop"; + "video/quicktime" = "io.bassi.Showtime.desktop"; + "video/x-flv" = "io.bassi.Showtime.desktop"; + "audio/mpeg" = "io.bassi.Showtime.desktop"; + "audio/flac" = "io.bassi.Showtime.desktop"; + "audio/ogg" = "io.bassi.Showtime.desktop"; + "audio/wav" = "io.bassi.Showtime.desktop"; + "audio/mp4" = "io.bassi.Showtime.desktop"; + "audio/x-opus+ogg" = "io.bassi.Showtime.desktop"; + "application/pdf" = [ + "org.gnome.Papers.desktop" + "zen-browser.desktop" + ]; + "text/plain" = "Helix.desktop"; + "text/markdown" = "Helix.desktop"; + "text/x-log" = "Helix.desktop"; + "application/x-shellscript" = "Helix.desktop"; + "application/vnd.openxmlformats-officedocument.wordprocessingml.document" = + "com.collabora.Office.desktop"; # DOCX + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = + "com.collabora.Office.desktop"; # XLSX + "application/vnd.openxmlformats-officedocument.presentationml.presentation" = + "com.collabora.Office.desktop"; # PPTX + "application/vnd.oasis.opendocument.text" = "com.collabora.Office.desktop"; # ODT + "application/vnd.oasis.opendocument.spreadsheet" = "com.collabora.Office.desktop"; # ODS + "application/vnd.oasis.opendocument.presentation" = "com.collabora.Office.desktop"; # ODP + "application/msword" = "com.collabora.Office.desktop"; # DOC + "application/vnd.ms-excel" = "com.collabora.Office.desktop"; # XLS + "application/vnd.ms-powerpoint" = "com.collabora.Office.desktop"; # PPT + "application/zip" = "org.gnome.FileRoller.desktop"; + "application/x-tar" = "org.gnome.FileRoller.desktop"; + "application/x-compressed-tar" = "org.gnome.FileRoller.desktop"; + "application/x-bzip-compressed-tar" = "org.gnome.FileRoller.desktop"; + "application/x-xz-compressed-tar" = "org.gnome.FileRoller.desktop"; + "application/x-7z-compressed" = "org.gnome.FileRoller.desktop"; + "application/x-rar" = "org.gnome.FileRoller.desktop"; + "application/gzip" = "org.gnome.FileRoller.desktop"; + "application/x-bzip" = "org.gnome.FileRoller.desktop"; + "inode/directory" = "org.gnome.Nautilus.desktop"; + }; + }; + }; + + # Set Ghostty as default terminal + home.sessionVariables = { + TERMINAL = "ghostty"; + }; + }; + }; +} diff --git a/aspects/desktop/niri.nix b/aspects/desktop/niri.nix index adb3f80..cdd02ac 100644 --- a/aspects/desktop/niri.nix +++ b/aspects/desktop/niri.nix @@ -1,251 +1,228 @@ -{ inputs, ... }: +{ ... }: { - flake.modules = { - nixos.niri = - { - config, - lib, - pkgs, - ... - }: - { - imports = [ inputs.niri-flake.nixosModules.niri ]; + flake.modules.homeManager.desktop-niri = + { + config, + lib, + pkgs, + inputs, + hostname ? null, + ... + }: + let + isRotterdam = hostname == "rotterdam"; + in + { + imports = [ inputs.noctalia.homeModules.default ]; - services.greetd.settings = { - default_session.command = "${lib.getExe pkgs.tuigreet} --user-menu --time --remember --asterisks --cmd ${config.programs.niri.package}/bin/niri-session"; - }; - - programs.niri.enable = true; - - xdg.portal.config.niri.default = [ - "gtk" - "gnome" + services.kanshi = { + enable = true; + settings = [ + { + profile.name = "default"; + profile.outputs = [ + { + criteria = "*"; + scale = 1.0; + } + ]; + } ]; }; - homeManager.niri = - { - config, - lib, - pkgs, - inputs, - hostname ? null, - ... - }: - let - isRotterdam = hostname == "rotterdam"; - in - { - imports = [ inputs.noctalia.homeModules.default ]; - services.kanshi = { - enable = true; - settings = [ - { - profile.name = "default"; - profile.outputs = [ - { - criteria = "*"; - scale = 1.0; - } - ]; - } - ]; - }; - - home = { - packages = with pkgs; [ - xwayland-satellite - inputs.noctalia.packages.${pkgs.system}.default - ]; - sessionVariables.QT_QPA_PLATFORMTHEME = "gtk3"; - }; - - xdg.configFile."niri/config.kdl".text = '' - input { - keyboard { - xkb { - layout "us" - variant "altgr-intl" - } - } - touchpad { - tap - dwt - drag true - drag-lock - natural-scroll - accel-speed 0.2 - accel-profile "flat" - scroll-method "two-finger" - middle-emulation - } - mouse { - natural-scroll - accel-speed 0.2 - accel-profile "flat" - } - warp-mouse-to-focus mode="center-xy" - focus-follows-mouse - } - - layout { - gaps 8 - center-focused-column "never" - auto-center-when-space-available - preset-column-widths { - ${ - if isRotterdam then - '' - proportion 0.33333 - proportion 0.5 - proportion 0.66667 - '' - else - '' - proportion 0.5 - proportion 1.0 - '' - } - } - default-column-width { proportion ${if isRotterdam then "0.33333" else "0.5"}; } - focus-ring { - off - } - border { - width 4 - active-color "#ffc87f" - inactive-color "#505050" - urgent-color "#9b0000" - } - tab-indicator { - width 4 - gap 4 - place-within-column - } - } - - overview { - zoom 0.65 - } - - spawn-at-startup "noctalia-shell" "-d" - layer-rule { - match namespace="^noctalia-overview*" - place-within-backdrop true - } - - hotkey-overlay { - skip-at-startup - } - - prefer-no-csd - screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" - - animations { - slowdown 0.3 - } - - window-rule { - match app-id="zen" - default-column-width { proportion ${if isRotterdam then "0.5" else "1.0"}; } - } - - window-rule { - geometry-corner-radius 12 - clip-to-geometry true - } - - config-notification { - disable-failed - } - - binds { - Alt+Space repeat=false { spawn "vicinae" "toggle"; } - XF86AudioRaiseVolume allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "increase"; } - XF86AudioLowerVolume allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; } - XF86AudioMute allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput"; } - XF86MonBrightnessUp allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "increase"; } - XF86MonBrightnessDown allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "decrease"; } - XF86AudioPlay allow-when-locked=true { spawn "${lib.getExe pkgs.playerctl}" "play-pause"; } - XF86AudioStop allow-when-locked=true { spawn "${lib.getExe pkgs.playerctl}" "stop"; } - XF86AudioPrev allow-when-locked=true { spawn "${lib.getExe pkgs.playerctl}" "previous"; } - XF86AudioNext allow-when-locked=true { spawn "${lib.getExe pkgs.playerctl}" "next"; } - Mod+V repeat=false { spawn "vicinae" "vicinae://extensions/vicinae/clipboard/history"; } - Mod+Shift+L repeat=false { spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock"; } - Mod+Return { spawn "ghostty"; } - Ctrl+Alt+Shift+A allow-when-locked=true { spawn "toggleaudiosink"; } - Mod+W repeat=false { toggle-overview; } - Mod+Q { close-window; } - Alt+Shift+Q { close-window;} - Mod+Shift+Q { close-window; } - Alt+F4 { close-window; } - Mod+Left { focus-column-left; } - Mod+Down { focus-window-or-workspace-down; } - Mod+Up { focus-window-or-workspace-up; } - Mod+Right { focus-column-right; } - Mod+H { focus-column-left; } - Mod+L { focus-column-right; } - Mod+J { focus-window-or-workspace-down; } - Mod+K { focus-window-or-workspace-up; } - Mod+Ctrl+Left { move-column-left; } - Mod+Ctrl+Down { move-window-down-or-to-workspace-down; } - Mod+Ctrl+Up { move-window-up-or-to-workspace-up; } - Mod+Ctrl+Right { move-column-right; } - Mod+Ctrl+H { move-column-left; } - Mod+Ctrl+J { move-window-down-or-to-workspace-down; } - Mod+Ctrl+K { move-window-up-or-to-workspace-up; } - Mod+Ctrl+L { move-column-right; } - Mod+Home { focus-column-first; } - Mod+End { focus-column-last; } - Mod+Ctrl+Home { move-column-to-first; } - Mod+Ctrl+End { move-column-to-last; } - Mod+Alt+Left { focus-monitor-left; } - Mod+Alt+Down { focus-monitor-down; } - Mod+Alt+Up { focus-monitor-up; } - Mod+Alt+Right { focus-monitor-right; } - Mod+Alt+H { focus-monitor-left; } - Mod+Alt+J { focus-monitor-down; } - Mod+Alt+K { focus-monitor-up; } - Mod+Alt+L { focus-monitor-right; } - Mod+Alt+Ctrl+Left { move-column-to-monitor-left; } - Mod+Alt+Ctrl+Down { move-column-to-monitor-down; } - Mod+Alt+Ctrl+Up { move-column-to-monitor-up; } - Mod+Alt+Ctrl+Right { move-column-to-monitor-right; } - Mod+Alt+Ctrl+H { move-column-to-monitor-left; } - Mod+Alt+Ctrl+J { move-column-to-monitor-down; } - Mod+Alt+Ctrl+K { move-column-to-monitor-up; } - Mod+Alt+Ctrl+L { move-column-to-monitor-right; } - Mod+Ctrl+U { move-workspace-down; } - Mod+Ctrl+I { move-workspace-up; } - Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } - Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } - Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } - Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } - Mod+Shift+WheelScrollDown { focus-column-right; } - Mod+Shift+WheelScrollUp { focus-column-left; } - Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } - Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } - Mod+BracketLeft { consume-or-expel-window-left; } - Mod+BracketRight { consume-or-expel-window-right; } - Mod+Comma { consume-window-into-column; } - Mod+Period { expel-window-from-column; } - Mod+R { switch-preset-column-width; } - Mod+F { maximize-column; } - Mod+Ctrl+F { fullscreen-window; } - Mod+C { center-visible-columns; } - Mod+Ctrl+C { center-column; } - Mod+Space { toggle-window-floating; } - Mod+Ctrl+Space { switch-focus-between-floating-and-tiling; } - Mod+T { toggle-column-tabbed-display; } - Print { screenshot-screen; } - Mod+Print { screenshot; } - Ctrl+Print { screenshot-window; } - Mod+Backspace allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } - Mod+Alt+E { spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle"; } - Ctrl+Alt+Delete { spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle"; } - Mod+Ctrl+P { power-off-monitors; } - } - ''; + home = { + packages = with pkgs; [ + xwayland-satellite + inputs.noctalia.packages.${pkgs.system}.default + ]; + sessionVariables.QT_QPA_PLATFORMTHEME = "gtk3"; }; - }; + + xdg.configFile."niri/config.kdl".text = '' + input { + keyboard { + xkb { + layout "us" + variant "altgr-intl" + } + } + touchpad { + tap + dwt + drag true + drag-lock + natural-scroll + accel-speed 0.2 + accel-profile "flat" + scroll-method "two-finger" + middle-emulation + } + mouse { + natural-scroll + accel-speed 0.2 + accel-profile "flat" + } + warp-mouse-to-focus mode="center-xy" + focus-follows-mouse + } + + layout { + gaps 8 + center-focused-column "never" + auto-center-when-space-available + preset-column-widths { + ${ + if isRotterdam then + '' + proportion 0.33333 + proportion 0.5 + proportion 0.66667 + '' + else + '' + proportion 0.5 + proportion 1.0 + '' + } + } + default-column-width { proportion ${if isRotterdam then "0.33333" else "0.5"}; } + focus-ring { + off + } + border { + width 4 + active-color "#ffc87f" + inactive-color "#505050" + urgent-color "#9b0000" + } + tab-indicator { + width 4 + gap 4 + place-within-column + } + } + + overview { + zoom 0.65 + } + + spawn-at-startup "noctalia-shell" "-d" + layer-rule { + match namespace="^noctalia-overview*" + place-within-backdrop true + } + + hotkey-overlay { + skip-at-startup + } + + prefer-no-csd + screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" + + animations { + slowdown 0.3 + } + + window-rule { + match app-id="zen" + default-column-width { proportion ${if isRotterdam then "0.5" else "1.0"}; } + } + + window-rule { + geometry-corner-radius 12 + clip-to-geometry true + } + + config-notification { + disable-failed + } + + binds { + Alt+Space repeat=false { spawn "vicinae" "toggle"; } + XF86AudioRaiseVolume allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "increase"; } + XF86AudioLowerVolume allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "decrease"; } + XF86AudioMute allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "volume" "muteOutput"; } + XF86MonBrightnessUp allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "increase"; } + XF86MonBrightnessDown allow-when-locked=true { spawn "noctalia-shell" "ipc" "call" "brightness" "decrease"; } + XF86AudioPlay allow-when-locked=true { spawn "${lib.getExe pkgs.playerctl}" "play-pause"; } + XF86AudioStop allow-when-locked=true { spawn "${lib.getExe pkgs.playerctl}" "stop"; } + XF86AudioPrev allow-when-locked=true { spawn "${lib.getExe pkgs.playerctl}" "previous"; } + XF86AudioNext allow-when-locked=true { spawn "${lib.getExe pkgs.playerctl}" "next"; } + Mod+V repeat=false { spawn "vicinae" "vicinae://extensions/vicinae/clipboard/history"; } + Mod+Shift+L repeat=false { spawn "noctalia-shell" "ipc" "call" "lockScreen" "lock"; } + Mod+Return { spawn "ghostty"; } + Ctrl+Alt+Shift+A allow-when-locked=true { spawn "toggleaudiosink"; } + Mod+W repeat=false { toggle-overview; } + Mod+Q { close-window; } + Alt+Shift+Q { close-window;} + Mod+Shift+Q { close-window; } + Alt+F4 { close-window; } + Mod+Left { focus-column-left; } + Mod+Down { focus-window-or-workspace-down; } + Mod+Up { focus-window-or-workspace-up; } + Mod+Right { focus-column-right; } + Mod+H { focus-column-left; } + Mod+L { focus-column-right; } + Mod+J { focus-window-or-workspace-down; } + Mod+K { focus-window-or-workspace-up; } + Mod+Ctrl+Left { move-column-left; } + Mod+Ctrl+Down { move-window-down-or-to-workspace-down; } + Mod+Ctrl+Up { move-window-up-or-to-workspace-up; } + Mod+Ctrl+Right { move-column-right; } + Mod+Ctrl+H { move-column-left; } + Mod+Ctrl+J { move-window-down-or-to-workspace-down; } + Mod+Ctrl+K { move-window-up-or-to-workspace-up; } + Mod+Ctrl+L { move-column-right; } + Mod+Home { focus-column-first; } + Mod+End { focus-column-last; } + Mod+Ctrl+Home { move-column-to-first; } + Mod+Ctrl+End { move-column-to-last; } + Mod+Alt+Left { focus-monitor-left; } + Mod+Alt+Down { focus-monitor-down; } + Mod+Alt+Up { focus-monitor-up; } + Mod+Alt+Right { focus-monitor-right; } + Mod+Alt+H { focus-monitor-left; } + Mod+Alt+J { focus-monitor-down; } + Mod+Alt+K { focus-monitor-up; } + Mod+Alt+L { focus-monitor-right; } + Mod+Alt+Ctrl+Left { move-column-to-monitor-left; } + Mod+Alt+Ctrl+Down { move-column-to-monitor-down; } + Mod+Alt+Ctrl+Up { move-column-to-monitor-up; } + Mod+Alt+Ctrl+Right { move-column-to-monitor-right; } + Mod+Alt+Ctrl+H { move-column-to-monitor-left; } + Mod+Alt+Ctrl+J { move-column-to-monitor-down; } + Mod+Alt+Ctrl+K { move-column-to-monitor-up; } + Mod+Alt+Ctrl+L { move-column-to-monitor-right; } + Mod+Ctrl+U { move-workspace-down; } + Mod+Ctrl+I { move-workspace-up; } + Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; } + Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; } + Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; } + Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; } + Mod+Shift+WheelScrollDown { focus-column-right; } + Mod+Shift+WheelScrollUp { focus-column-left; } + Mod+Ctrl+Shift+WheelScrollDown { move-column-right; } + Mod+Ctrl+Shift+WheelScrollUp { move-column-left; } + Mod+BracketLeft { consume-or-expel-window-left; } + Mod+BracketRight { consume-or-expel-window-right; } + Mod+Comma { consume-window-into-column; } + Mod+Period { expel-window-from-column; } + Mod+R { switch-preset-column-width; } + Mod+F { maximize-column; } + Mod+Ctrl+F { fullscreen-window; } + Mod+C { center-visible-columns; } + Mod+Ctrl+C { center-column; } + Mod+Space { toggle-window-floating; } + Mod+Ctrl+Space { switch-focus-between-floating-and-tiling; } + Mod+T { toggle-column-tabbed-display; } + Print { screenshot-screen; } + Mod+Print { screenshot; } + Ctrl+Print { screenshot-window; } + Mod+Backspace allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit; } + Mod+Alt+E { spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle"; } + Ctrl+Alt+Delete { spawn "noctalia-shell" "ipc" "call" "sessionMenu" "toggle"; } + Mod+Ctrl+P { power-off-monitors; } + } + ''; + }; } diff --git a/aspects/desktop/nix.nix b/aspects/desktop/nix.nix new file mode 100644 index 0000000..3a9e71e --- /dev/null +++ b/aspects/desktop/nix.nix @@ -0,0 +1,21 @@ +{ inputs, ... }: +{ + flake.modules.nixos.desktop-nix = + { + config, + lib, + pkgs, + ... + }: + { + environment.etc."channels/nixpkgs".source = inputs.nixpkgs.outPath; + + nix = { + registry.nixpkgs.flake = inputs.nixpkgs; + nixPath = [ + "nixpkgs=${inputs.nixpkgs}" + "/nix/var/nix/profiles/per-user/root/channels" + ]; + }; + }; +} diff --git a/aspects/desktop/services.nix b/aspects/desktop/services.nix new file mode 100644 index 0000000..eb9482a --- /dev/null +++ b/aspects/desktop/services.nix @@ -0,0 +1,23 @@ +{ ... }: +{ + flake.modules.nixos.desktop-services = + { + config, + lib, + pkgs, + ... + }: + { + services = { + printing.enable = true; + udev.packages = with pkgs; [ yubikey-personalization ]; + keyd = { + enable = true; + keyboards.all = { + ids = [ "*" ]; + settings.main.capslock = "overload(meta, esc)"; + }; + }; + }; + }; +} diff --git a/aspects/hosts/alexandria.nix b/aspects/hosts/alexandria.nix index d05639d..dedbed9 100644 --- a/aspects/hosts/alexandria.nix +++ b/aspects/hosts/alexandria.nix @@ -16,11 +16,21 @@ ((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_alexandria) ] ++ (with inputs.self.modules.nixos; [ - # system aspects - base cli - # user aspects + # Common aspects (always included) + common-boot + common-console + common-firewall + common-locale + common-nix + common-openssh + common-programs + common-security + common-services + common-tailscale + + # User aspects user root diff --git a/aspects/hosts/io.nix b/aspects/hosts/io.nix index 6944555..ee610fa 100644 --- a/aspects/hosts/io.nix +++ b/aspects/hosts/io.nix @@ -19,22 +19,36 @@ }) ] ++ (with inputs.self.modules.nixos; [ - # system aspects - base cli - desktop - # user aspects + # Common aspects (always included) + common-boot + common-console + common-firewall + common-locale + common-nix + common-openssh + common-programs + common-security + common-services + common-tailscale + + # User aspects user root + # Desktop aspects + desktop-boot + desktop-desktop + desktop-nix + desktop-services + # Other aspects ai bluetooth dev libvirtd networkmanager - niri podman ]); }; diff --git a/aspects/hosts/rotterdam.nix b/aspects/hosts/rotterdam.nix index ad4192e..4a91769 100644 --- a/aspects/hosts/rotterdam.nix +++ b/aspects/hosts/rotterdam.nix @@ -19,27 +19,41 @@ }) ] ++ (with inputs.self.modules.nixos; [ - # system aspects - base cli - desktop - # user aspects + # Common aspects (always included) + common-boot + common-console + common-firewall + common-locale + common-nix + common-openssh + common-programs + common-security + common-services + common-tailscale + + # User aspects user root + # Desktop aspects + desktop-boot + desktop-desktop + desktop-nix + desktop-services + # Other aspects based on tags ai bluetooth dev fwupd - gaming-flatpak - gaming-hardware - gaming-launchers gaming-steam + gaming-hardware + gaming-flatpak + gaming-launchers libvirtd networkmanager - niri podman ]); }; diff --git a/aspects/hosts/trantor.nix b/aspects/hosts/trantor.nix index e7934ab..4b8b4b2 100644 --- a/aspects/hosts/trantor.nix +++ b/aspects/hosts/trantor.nix @@ -12,17 +12,30 @@ inputs.self.overlays.default ]; } - ((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_trantor) + + # Factory-generated ephemeral module (inputs.self.factory.ephemeral { rootDevice = "/dev/disk/by-id/scsi-360b207ed25d84372a95d1ecf842f8e20-part2"; }) + + ((inputs.import-tree.initFilter (p: lib.hasSuffix ".nix" p)) ./_trantor) ] ++ (with inputs.self.modules.nixos; [ - # system aspects - base cli - # user aspects + # Common aspects (always included) + common-boot + common-console + common-firewall + common-locale + common-nix + common-openssh + common-programs + common-security + common-services + common-tailscale + + # User aspects user root diff --git a/aspects/desktop/graphics.nix b/aspects/programs/graphics.nix similarity index 93% rename from aspects/desktop/graphics.nix rename to aspects/programs/graphics.nix index 7d1ed6d..4b7a16b 100644 --- a/aspects/desktop/graphics.nix +++ b/aspects/programs/graphics.nix @@ -1,7 +1,7 @@ { ... }: { - flake.modules.nixos.graphics = + flake.modules.nixos.programs-graphics = { pkgs, ... }: { environment.systemPackages = with pkgs; [ diff --git a/aspects/desktop/media.nix b/aspects/programs/media.nix similarity index 95% rename from aspects/desktop/media.nix rename to aspects/programs/media.nix index ed6a767..7daaa87 100644 --- a/aspects/desktop/media.nix +++ b/aspects/programs/media.nix @@ -2,7 +2,7 @@ { flake.modules = { - nixos.media = + nixos.programs-media = { pkgs, ... }: { environment.systemPackages = with pkgs; [ diff --git a/aspects/desktop/office.nix b/aspects/programs/office.nix similarity index 89% rename from aspects/desktop/office.nix rename to aspects/programs/office.nix index fe41d1d..c3349f3 100644 --- a/aspects/desktop/office.nix +++ b/aspects/programs/office.nix @@ -1,7 +1,7 @@ { ... }: { - flake.modules.nixos.office = + flake.modules.nixos.programs-office = { pkgs, ... }: { environment.systemPackages = with pkgs; [ diff --git a/aspects/programs/utilities.nix b/aspects/programs/utilities.nix new file mode 100644 index 0000000..4a207af --- /dev/null +++ b/aspects/programs/utilities.nix @@ -0,0 +1,62 @@ +{ ... }: + +{ + flake.modules = { + nixos.programs-utilities = + { pkgs, ... }: + { + environment.systemPackages = with pkgs; [ + ghostty + gnome-disk-utility + mission-center + nautilus + p7zip + rclone + unrar + # Desktop Integration + adwaita-icon-theme + junction + libfido2 + toggleaudiosink + # Xwayland Support + xwayland-satellite + ]; + + services.flatpak.packages = [ + "com.github.tchx84.Flatseal" + "com.rustdesk.RustDesk" + ]; + }; + + homeManager.programs-utilities = + { pkgs, ... }: + { + programs = { + ghostty = { + enable = true; + settings = { + cursor-style = "block"; + shell-integration-features = "no-cursor"; + cursor-style-blink = false; + custom-shader = "${builtins.fetchurl { + url = "https://raw.githubusercontent.com/hackr-sh/ghostty-shaders/cb6eb4b0d1a3101c869c62e458b25a826f9dcde3/cursor_blaze.glsl"; + sha256 = "sha256:0g2lgqjdrn3c51glry7x2z30y7ml0y61arl5ykmf4yj0p85s5f41"; + }}"; + bell-features = ""; + gtk-titlebar-style = "tabs"; + keybind = [ "shift+enter=text:\\x1b\\r" ]; + }; + }; + + password-store = { + enable = true; + package = pkgs.pass-wayland; + }; + }; + + home.sessionVariables = { + TERMINAL = "ghostty"; + }; + }; + }; +} diff --git a/aspects/desktop/web.nix b/aspects/programs/web.nix similarity index 89% rename from aspects/desktop/web.nix rename to aspects/programs/web.nix index f661218..a11ca57 100644 --- a/aspects/desktop/web.nix +++ b/aspects/programs/web.nix @@ -1,7 +1,7 @@ { ... }: { - flake.modules.nixos.web = + flake.modules.nixos.programs-web = { inputs, pkgs, diff --git a/aspects/server/boot.nix b/aspects/server/boot.nix new file mode 100644 index 0000000..38634d1 --- /dev/null +++ b/aspects/server/boot.nix @@ -0,0 +1,14 @@ +# aspects/server/boot.nix +{ ... }: +{ + flake.modules.nixos.server-boot = + { + config, + lib, + pkgs, + ... + }: + { + boot.kernelPackages = pkgs.linuxPackages_hardened; + }; +} diff --git a/aspects/systems/server.nix b/aspects/server/nix.nix similarity index 51% rename from aspects/systems/server.nix rename to aspects/server/nix.nix index c3c24f0..1cb8e8b 100644 --- a/aspects/systems/server.nix +++ b/aspects/server/nix.nix @@ -1,7 +1,7 @@ +# aspects/server/nix.nix { inputs, ... }: - { - flake.modules.nixos.server = + flake.modules.nixos.server-nix = { config, lib, @@ -9,14 +9,6 @@ ... }: { - boot = { - kernelPackages = pkgs.linuxPackages_hardened; - kernel.sysctl = { - "net.ipv4.ip_forward" = 1; - "net.ipv6.conf.all.forwarding" = 1; - }; - }; - environment.etc."channels/nixpkgs".source = inputs.nixpkgs-stable.outPath; nix = { @@ -26,11 +18,5 @@ "/nix/var/nix/profiles/per-user/root/channels" ]; }; - - services.tailscale = { - extraSetFlags = [ "--advertise-exit-node" ]; - useRoutingFeatures = "server"; - }; - }; } diff --git a/aspects/server/tailscale.nix b/aspects/server/tailscale.nix new file mode 100644 index 0000000..cf2fa4b --- /dev/null +++ b/aspects/server/tailscale.nix @@ -0,0 +1,22 @@ +# aspects/server/tailscale.nix +{ ... }: +{ + flake.modules.nixos.server-tailscale = + { + config, + lib, + pkgs, + ... + }: + { + services.tailscale = { + extraSetFlags = [ "--advertise-exit-node" ]; + useRoutingFeatures = "server"; + }; + + boot.kernel.sysctl = { + "net.ipv4.ip_forward" = 1; + "net.ipv6.conf.all.forwarding" = 1; + }; + }; +} diff --git a/aspects/base/bash.nix b/aspects/shell/bash.nix similarity index 82% rename from aspects/base/bash.nix rename to aspects/shell/bash.nix index 6ba97ef..e451148 100644 --- a/aspects/base/bash.nix +++ b/aspects/shell/bash.nix @@ -1,6 +1,6 @@ { ... }: { - flake.modules.homeManager.bash = + flake.modules.homeManager.shell-bash = { config, lib, diff --git a/aspects/shell/fish.nix b/aspects/shell/fish.nix new file mode 100644 index 0000000..22c0f5c --- /dev/null +++ b/aspects/shell/fish.nix @@ -0,0 +1,40 @@ +{ ... }: +{ + flake.modules.homeManager.shell-fish = + { + config, + lib, + pkgs, + ... + }: + { + programs.fish = { + enable = true; + interactiveShellInit = '' + set fish_greeting + ${lib.getExe pkgs.nix-your-shell} fish | source + ''; + loginShellInit = "${lib.getExe pkgs.nix-your-shell} fish | source"; + plugins = [ + { + name = "bang-bang"; + src = pkgs.fetchFromGitHub { + owner = "oh-my-fish"; + repo = "plugin-bang-bang"; + rev = "f969c618301163273d0a03d002614d9a81952c1e"; + sha256 = "sha256-A8ydBX4LORk+nutjHurqNNWFmW6LIiBPQcxS3x4nbeQ="; + }; + } + { + name = "z"; + src = pkgs.fetchFromGitHub { + owner = "jethrokuan"; + repo = "z"; + rev = "067e867debee59aee231e789fc4631f80fa5788e"; + sha256 = "sha256-emmjTsqt8bdI5qpx1bAzhVACkg0MNB/uffaRjjeuFxU="; + }; + } + ]; + }; + }; +} diff --git a/aspects/systems/desktop.nix b/aspects/systems/desktop.nix deleted file mode 100644 index 39fd0e0..0000000 --- a/aspects/systems/desktop.nix +++ /dev/null @@ -1,207 +0,0 @@ -{ - inputs, - ... -}: -{ - flake.modules = { - nixos.desktop = - { - config, - lib, - pkgs, - ... - }: - { - imports = [ - inputs.nix-flatpak.nixosModules.nix-flatpak - ] - ++ (with inputs.self.modules.nixos; [ - graphics - media - office - web - ]); - - boot = { - plymouth.enable = true; - initrd.systemd.enable = true; - loader.efi.efiSysMountPoint = "/boot/efi"; - kernelPackages = pkgs.linuxPackages_xanmod_latest; - extraModprobeConfig = '' - options bluetooth disable_ertm=1 - ''; - kernel.sysctl = { - "net.ipv4.tcp_mtu_probing" = 1; - }; - kernelParams = [ - "quiet" - "splash" - "i2c-dev" - "i2c-piix4" - "loglevel=3" - "udev.log_priority=3" - "rd.udev.log_level=3" - "rd.systemd.show_status=false" - ]; - }; - - nix = { - registry.nixpkgs.flake = inputs.nixpkgs; - nixPath = [ - "nixpkgs=${inputs.nixpkgs}" - "/nix/var/nix/profiles/per-user/root/channels" - ]; - }; - - environment = { - etc."channels/nixpkgs".source = inputs.nixpkgs.outPath; - sessionVariables = { - KDEHOME = "$XDG_CONFIG_HOME/kde4"; # Stops kde from placing a .kde4 folder in the home dir - NIXOS_OZONE_WL = "1"; # Forces chromium and most electron apps to run in wayland - }; - systemPackages = with pkgs; [ - adwaita-icon-theme - ghostty - gnome-disk-utility - junction - libfido2 - mission-center - nautilus - toggleaudiosink - unrar - ]; - }; - - services = { - printing.enable = true; - udev.packages = with pkgs; [ yubikey-personalization ]; - keyd = { - enable = true; - keyboards.all = { - ids = [ "*" ]; - settings.main.capslock = "overload(meta, esc)"; - }; - }; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - wireplumber.enable = true; - }; - greetd = { - enable = true; - settings.default_session.user = "greeter"; - }; - flatpak = { - enable = true; - packages = [ - "com.github.tchx84.Flatseal" - "com.rustdesk.RustDesk" - ]; - uninstallUnmanaged = true; - update.auto.enable = true; - }; - gvfs.enable = true; - }; - - security.rtkit.enable = true; # Needed for pipewire to acquire realtime priority - - users = { - users.greeter = { - isSystemUser = true; - group = "greeter"; - }; - groups.greeter = { }; - }; - - programs = { - kdeconnect = { - enable = true; - package = pkgs.valent; - }; - dconf.enable = true; - appimage = { - enable = true; - binfmt = true; - }; - }; - - fonts = { - fontDir.enable = true; - packages = with pkgs; [ - corefonts - inter - nerd-fonts.fira-code - noto-fonts-cjk-sans - noto-fonts-color-emoji - roboto - ]; - }; - - xdg.portal = { - extraPortals = with pkgs; [ - xdg-desktop-portal-gnome - xdg-desktop-portal-gtk - ]; - config.common.default = "*"; - }; - }; - - homeManager.desktop = - { - config, - lib, - pkgs, - inputs, - ... - }: - { - imports = [ inputs.vicinae.homeManagerModules.default ]; - - fonts.fontconfig.enable = true; - - home = { - packages = with pkgs; [ xwayland-satellite ]; - sessionVariables.TERMINAL = "ghostty"; - }; - - services.vicinae = { - enable = true; - systemd = { - enable = true; - autoStart = true; - }; - }; - - programs = { - ghostty = { - enable = true; - settings = { - cursor-style = "block"; - shell-integration-features = "no-cursor"; - cursor-style-blink = false; - custom-shader = "${builtins.fetchurl { - url = "https://raw.githubusercontent.com/hackr-sh/ghostty-shaders/cb6eb4b0d1a3101c869c62e458b25a826f9dcde3/cursor_blaze.glsl"; - sha256 = "sha256:0g2lgqjdrn3c51glry7x2z30y7ml0y61arl5ykmf4yj0p85s5f41"; - }}"; - bell-features = ""; - gtk-titlebar-style = "tabs"; - keybind = [ "shift+enter=text:\\x1b\\r" ]; - }; - }; - - password-store = { - enable = true; - package = pkgs.pass-wayland; - }; - }; - - xdg = { - enable = true; - userDirs.enable = true; - }; - }; - }; -} diff --git a/aspects/users/_user/git.nix b/aspects/users/_user/git.nix index 40a5714..9c1fb20 100644 --- a/aspects/users/_user/git.nix +++ b/aspects/users/_user/git.nix @@ -1,4 +1,4 @@ -{ ... }: +{ pkgs, ... }: { programs = {