diff --git a/flake.lock b/flake.lock index e6484b5..88e943c 100644 --- a/flake.lock +++ b/flake.lock @@ -374,11 +374,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1749540031, - "narHash": "sha256-11k6hq/4Tao2PNBFQpSNTlFFKmKGswL17caKuZIE0sM=", + "lastModified": 1749657143, + "narHash": "sha256-3MiuAUQBo9Luk0lNzNSuomx1WMMBua2feVjXNfg9Dws=", "owner": "hyprwm", "repo": "hyprland", - "rev": "6bdb1f413e4c592f73d91bef33dfb202503ef7ab", + "rev": "412c7dc7f79cb6b04af41692504e82d4417e6e13", "type": "github" }, "original": { @@ -760,11 +760,11 @@ ] }, "locked": { - "lastModified": 1749533342, - "narHash": "sha256-cQzKzqsPQmDBRDjcX4UFEQKNeAyibLIKkF+BBhE2JnI=", + "lastModified": 1749674850, + "narHash": "sha256-5V6Jmiyg820PCLwskW6gp1sojo0F8hze6eR/xgp2d4U=", "ref": "refs/heads/master", - "rev": "2b01a75679a03bd6557cf11c20b1588f436d6b94", - "revCount": 571, + "rev": "2a8479d635958e6c2ced68767001da4638b6f197", + "revCount": 572, "type": "git", "url": "https://git.outfoxxed.me/outfoxxed/quickshell" }, diff --git a/hosts/hermit/configuration.nix b/hosts/hermit/configuration.nix index aa72fd3..0d00934 100644 --- a/hosts/hermit/configuration.nix +++ b/hosts/hermit/configuration.nix @@ -28,7 +28,6 @@ modules = { wms.wayland.enable = true; desktops.hyprland.enable = false; - desktops.niri.enable = true; theming = { gtk.enable = true; @@ -36,6 +35,8 @@ }; system = { + systemType = "laptop"; + boot = { systemd-boot.enable = true; lanzaboote.enable = true; diff --git a/hosts/hermit/programs.nix b/hosts/hermit/programs.nix index 93994b2..8e374eb 100644 --- a/hosts/hermit/programs.nix +++ b/hosts/hermit/programs.nix @@ -23,7 +23,6 @@ fselect gcc gh - ghostty grc gparted git diff --git a/hosts/temperance/programs.nix b/hosts/temperance/programs.nix index ac6f3d3..2cac95c 100644 --- a/hosts/temperance/programs.nix +++ b/hosts/temperance/programs.nix @@ -1,5 +1,4 @@ -{pkgs, ...}: let -in { +{pkgs, ...}: { environment.systemPackages = builtins.attrValues { inherit (pkgs) @@ -17,11 +16,9 @@ in { difftastic dnsutils devenv - element-desktop evince gcc gh - ghostty gnumake gparted halloy diff --git a/modules/options/system/module.nix b/modules/options/system/module.nix index bce1197..3c5f9fd 100644 --- a/modules/options/system/module.nix +++ b/modules/options/system/module.nix @@ -5,7 +5,10 @@ }: let inherit (builtins) elemAt; inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) enum listOf str nullOr bool package; + inherit (lib.types) enum listOf str nullOr bool oneOf; + inherit (lib.lists) elem; + + inherit (config.modules.system) systemType; in { imports = [ # configuration options for nixos activation scripts @@ -44,7 +47,7 @@ in { users = mkOption { type = listOf str; - default = ["charlie"]; + default = ["cr"]; description = "A list of users on the system."; }; @@ -57,6 +60,23 @@ in { ''; }; + systemType = mkOption { + type = nullOr (enum ["desktop" "laptop" "server"]); + default = null; + description = '' + The type of the current system. This is used to determine whether things like graphical + environments and power-saving programs should be installed or not. + ''; + }; + + isGraphical = mkOption { + type = bool; + default = elem systemType ["desktop" "laptop"]; + description = '' + Whether the current system is a graphical system. + ''; + }; + yubikeySupport = { enable = mkEnableOption "yubikey support"; deviceType = mkOption { @@ -72,6 +92,7 @@ in { impermanence = { enable = mkEnableOption "Enable Impermanence"; }; + video = { enable = mkEnableOption "video drivers and programs that require a graphical user interface"; nvidia = mkEnableOption "Nvidia graphics drivers"; @@ -92,15 +113,6 @@ in { default = []; description = "A list of extra drivers to enable for printing"; }; - - "3d" = { - enable = mkEnableOption "3D printing suite"; - extraPrograms = mkOption { - type = listOf package; - default = []; - description = "A list of extra programs to enable for 3D printing"; - }; - }; }; }; } diff --git a/modules/other/users.nix b/modules/other/users.nix index cdc7f02..ba2fd02 100644 --- a/modules/other/users.nix +++ b/modules/other/users.nix @@ -7,7 +7,7 @@ }: let inherit (builtins) elemAt; inherit (lib.options) mkOption; - inherit (lib.types) listOf str; + inherit (lib.types) listOf str package; inherit (config.meta.mainUser) username; in { @@ -27,6 +27,7 @@ in { The main user for each system. This is the first element of the list of users by default. ''; }; + gitSigningKey = mkOption { type = str; description = '' @@ -36,9 +37,28 @@ in { ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAAWEDj/Yib6Mqs016jx7rtecWpytwfVl28eoHtPYCM9TVLq81VIHJSN37lbkc/JjiXCdIJy2Ta3A3CVV5k3Z37NbgAu23oKA2OcHQNaRTLtqWlcBf9fk9suOkP1A3NzAqzivFpBnZm3ytaXwU8LBJqxOtNqZcFVruO6fZxJtg2uE34mAw== ''; }; + + # TODO: clean this up and move it somewhere else. + defaultShell = { + name = mkOption { + type = str; + default = "nushell"; + description = '' + The default shell of a user. This is not the main system shell, but the shell used in terminals. + ''; + }; + package = mkOption { + type = package; + default = pkgs.nushell; + }; + }; }; }; config = { + programs.zsh = { + enable = true; + enableBashCompletion = true; + }; users = { mutableUsers = true; users = { @@ -53,6 +73,7 @@ in { "nix" "docker" ]; + # shell = self.packages.${pkgs.stdenv.system}.fish; shell = pkgs.zsh; # hashedPasswordFile = "/etc/passwords/cr"; }; diff --git a/modules/programs/gui/ghostty/module.nix b/modules/programs/gui/ghostty/module.nix new file mode 100644 index 0000000..45fddb5 --- /dev/null +++ b/modules/programs/gui/ghostty/module.nix @@ -0,0 +1,47 @@ +{ + config, + lib, + pkgs, + ... +}: let + inherit (lib.lists) elem; + inherit (lib.meta) getExe; + + inherit (config.meta.mainUser.defaultShell) name package; + inherit (config.modules.style.colorScheme) slug; + + # Shell integration for ghostty only supports + # bash, fish and zsh for now. + shell-integration = + if elem name ["bash" "fish" "zsh"] + then name + else "none"; + + ghostty-settings = pkgs.writeText "config" '' + font-family = JetBrainsMono Nerd Font Mono + window-padding-x = 8 + window-padding-y = 8 + background-opacity = 0.85 + gtk-single-instance = true + font-size = 14 + theme = ${slug} + resize-overlay-duration = 0s + cursor-style-blink = false + + shell-integration = ${shell-integration} + command = ${getExe package} + ''; + + ghostty-wrapped = pkgs.symlinkJoin { + name = "ghostty-wrapped"; + paths = [pkgs.ghostty]; + nativeBuildInputs = [pkgs.makeWrapper]; + postBuild = '' + wrapProgram $out/bin/ghostty --add-flags "--config-file=${ghostty-settings}" + ''; + }; +in { + environment.systemPackages = builtins.attrValues { + inherit ghostty-wrapped; + }; +} diff --git a/modules/services/kanata/module.nix b/modules/services/kanata/module.nix index c919c5b..e79947d 100644 --- a/modules/services/kanata/module.nix +++ b/modules/services/kanata/module.nix @@ -24,7 +24,7 @@ in { }; keyboards.dell-keyboard = { - devices = ["/dev/input/by-path/usb-Dell_Dell_USB_Keyboard-event-kbd "]; + devices = ["/dev/input/by-id/usb-Dell_Dell_USB_Keyboard-event-kbd"]; config = builtins.readFile (./. + "/main.kbd"); }; }; diff --git a/modules/wms/wayland/niri/config.kdl b/modules/wms/wayland/niri/config.kdl index eb586d7..b00ac9a 100644 --- a/modules/wms/wayland/niri/config.kdl +++ b/modules/wms/wayland/niri/config.kdl @@ -79,8 +79,6 @@ environment { } // prefer no client side decorations prefer-no-csd -// no saving screenshots -screenshot-path null switch-events { lid-close { spawn "swaylock" @@ -108,7 +106,12 @@ window-rule { open-on-workspace "browser" } window-rule { - match app-id="^org\\.keepassxc\\.KeePassXC$" + match app-id="org.keepassxc.KeePassXC" + block-out-from "screen-capture" + open-on-workspace "keepassxc" +} +window-rule { + match app-id="thunderbird" block-out-from "screen-capture" open-on-workspace "keepassxc" } @@ -169,7 +172,7 @@ binds { close-window } Mod+H { - focus-column-left + focus-column-or-monitor-left } Mod+J { focus-window-or-workspace-down @@ -178,10 +181,10 @@ binds { focus-window-or-workspace-up } Mod+L { - focus-column-right + focus-column-or-monitor-right } Mod+Shift+H { - move-column-left + move-column-left-or-to-monitor-left } Mod+Shift+J { move-window-down-or-to-workspace-down @@ -190,7 +193,7 @@ binds { move-window-up-or-to-workspace-up } Mod+Shift+L { - move-column-right + move-column-right-or-to-monitor-right } Mod+Home { focus-column-first @@ -405,13 +408,13 @@ binds { toggle-overview } Print { - screenshot + screenshot write-to-disk=false } Ctrl+Print { screenshot-screen } Alt+Print { - screenshot-window + screenshot write-to-disk=true } Mod+Escape allow-inhibiting=false { toggle-keyboard-shortcuts-inhibit diff --git a/modules/wms/wayland/niri/module.nix b/modules/wms/wayland/niri/module.nix index 6c731d0..ced7ddb 100644 --- a/modules/wms/wayland/niri/module.nix +++ b/modules/wms/wayland/niri/module.nix @@ -7,35 +7,39 @@ inherit (lib.modules) mkForce mkIf; inherit (lib.options) mkEnableOption; + inherit (config.modules.system) isGraphical; cfg = config.modules.desktops.niri; in { options.modules.desktops.niri.enable = mkEnableOption "Niri, a scolling tiling wayland compositor"; - config = mkIf cfg.enable { - programs.niri = { - enable = true; - package = pkgs.niri; - }; - # The niri module auto enables the gnome keyring, - # which is something I direly want to avoid. - services.gnome.gnome-keyring.enable = mkForce false; - # set niri's config location to /etc/niri/config.kdl. - environment.etc."niri/config.kdl".source = ./config.kdl; + config = + mkIf (cfg.enable + || isGraphical) + { + programs.niri = { + enable = true; + package = pkgs.niri; + }; + # The niri module auto enables the gnome keyring, + # which is something I direly want to avoid. + services.gnome.gnome-keyring.enable = mkForce false; - environment.systemPackages = builtins.attrValues { - inherit (pkgs) xwayland-satellite avizo; - }; + environment.etc."niri/config.kdl".source = ./config.kdl; - xdg.portal = { - enable = true; - xdgOpenUsePortal = true; - extraPortals = [ - pkgs.xdg-desktop-portal-gtk - ]; - config = { - common.default = ["*"]; - hyprland.default = ["gtk"]; + environment.systemPackages = builtins.attrValues { + inherit (pkgs) xwayland-satellite avizo; + }; + + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + ]; + config = { + common.default = ["*"]; + hyprland.default = ["gtk"]; + }; }; }; - }; } diff --git a/packages/fish/fishinit.nix b/packages/fish/fishinit.nix index b243b06..2ec5749 100644 --- a/packages/fish/fishinit.nix +++ b/packages/fish/fishinit.nix @@ -8,7 +8,16 @@ pkgs.writeTextDir "${vendorConf}/blox_config.fish" '' # source ${pkgs.fishPlugins.sponge}/share/zsh-defer/zsh-defer.plugin.zsh ${pkgs.atuin}/bin/atuin init fish | source + bind up _atuin_bind_up + ${pkgs.zoxide}/bin/zoxide init fish | source + # abbr --erase cd &>/dev/null + # alias cd=__zoxide_z + + # abbr --erase ci &>/dev/null + # alias ci=__zoxide_zi + + ${pkgs.starship}/bin/starship init fish | source ${pkgs.direnv}/bin/direnv hook fish | source ${pkgs.pay-respects}/bin/pay-respects fish --alias f --nocnf | source diff --git a/packages/fish/packages.nix b/packages/fish/packages.nix index 745fc27..b78b7d0 100644 --- a/packages/fish/packages.nix +++ b/packages/fish/packages.nix @@ -50,7 +50,7 @@ builtins.attrValues { wget cpufetch watchman - yt-dlp + # yt-dlp # borked check phase tealdeer hyperfine imagemagick diff --git a/packages/helix/languages.nix b/packages/helix/languages.nix index c71a6e0..82c0343 100644 --- a/packages/helix/languages.nix +++ b/packages/helix/languages.nix @@ -162,7 +162,7 @@ config = { check = { command = "clippy"; - extraArgs = ["--" "-W" "clippy::pedantic" "-W" "clippy::nursery" "-W" "clippy::perf"]; + extraArgs = ["--" "-D" "clippy::pedantic" "-W" "clippy::nursery" "-W" "clippy::perf"]; }; cargo.features = "all"; };