diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-07-23 08:29:48 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-07-23 08:29:48 -0400 |
commit | e4781a2c772c1bd6802e65847629f2248ba37336 (patch) | |
tree | d4d068c4dc5ce499b138daaf023e8310d8d8bffc /modules | |
parent | 93280382da83e885d919d3b13f4383c2ac6102d3 (diff) | |
download | nix-config-e4781a2c772c1bd6802e65847629f2248ba37336.tar.gz nix-config-e4781a2c772c1bd6802e65847629f2248ba37336.tar.bz2 nix-config-e4781a2c772c1bd6802e65847629f2248ba37336.zip |
2025-07-23
Diffstat (limited to 'modules')
-rw-r--r-- | modules/desktop/apps/browsers/firefox.nix | 4 | ||||
-rw-r--r-- | modules/desktop/apps/editors/vscode.nix | 2 | ||||
-rw-r--r-- | modules/desktop/apps/games/freeciv.nix | 24 | ||||
-rw-r--r-- | modules/desktop/apps/games/openttd.nix | 28 | ||||
-rw-r--r-- | modules/desktop/apps/games/prism.nix | 2 | ||||
-rw-r--r-- | modules/desktop/apps/games/unciv.nix | 24 | ||||
-rw-r--r-- | modules/desktop/apps/games/vintagestory.nix | 21 | ||||
-rw-r--r-- | modules/desktop/apps/mutt-wizard.nix | 22 | ||||
-rw-r--r-- | modules/desktop/apps/vpn.nix | 23 | ||||
-rw-r--r-- | modules/desktop/greetd.nix | 1 | ||||
-rw-r--r-- | modules/desktop/hyprland.nix | 11 | ||||
-rw-r--r-- | modules/hardware/gpu.nix | 7 | ||||
-rw-r--r-- | modules/security.nix | 8 | ||||
-rw-r--r-- | modules/shell/zsh.nix | 2 |
14 files changed, 161 insertions, 18 deletions
diff --git a/modules/desktop/apps/browsers/firefox.nix b/modules/desktop/apps/browsers/firefox.nix index 16cd3fd..2c87bd5 100644 --- a/modules/desktop/apps/browsers/firefox.nix +++ b/modules/desktop/apps/browsers/firefox.nix @@ -34,7 +34,7 @@ in } + "/user.js"); search = { force = true; - default = "DuckDuckGo"; + default = "ddg"; engines = { "Nix Packages" = { urls = [{ @@ -48,7 +48,7 @@ in }; "NixOS Wiki" = { urls = [{ template = "https://wiki.nixos.org/index.php?search={searchTerms}"; }]; - iconUpdateURL = "https://wiki.nixos.org/favicon.png"; + icon = "https://wiki.nixos.org/favicon.png"; updateInterval = 24 * 60 * 60 * 1000; definedAliases = [ "@nw" ]; }; diff --git a/modules/desktop/apps/editors/vscode.nix b/modules/desktop/apps/editors/vscode.nix index 23bf15d..a775be8 100644 --- a/modules/desktop/apps/editors/vscode.nix +++ b/modules/desktop/apps/editors/vscode.nix @@ -18,7 +18,7 @@ in { config = lib.mkIf (codeConf.enable) { home.manager.programs.vscode = { enable = true; - extensions = with pkgs.vscode-extensions; [ + profiles.default.extensions = with pkgs.vscode-extensions; [ catppuccin.catppuccin-vsc catppuccin.catppuccin-vsc-icons ms-dotnettools.csharp ]; diff --git a/modules/desktop/apps/games/freeciv.nix b/modules/desktop/apps/games/freeciv.nix new file mode 100644 index 0000000..cb5e462 --- /dev/null +++ b/modules/desktop/apps/games/freeciv.nix @@ -0,0 +1,24 @@ +{ + config, + options, + lib, + pkgs, + rootPath, + ... +}: let + freecivConf = config.modules.desktop.apps.games.freeciv; + configDir = config.nixosConfig.configDir; +in { + options.modules.desktop.apps.games.freeciv = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + }; + }; + + config = lib.mkIf (freecivConf.enable) { + home.packages = with pkgs; [ + (callPackage (rootPath + /packages/freeciv/default.nix) {}) + ]; + }; +} diff --git a/modules/desktop/apps/games/openttd.nix b/modules/desktop/apps/games/openttd.nix new file mode 100644 index 0000000..f66ccc0 --- /dev/null +++ b/modules/desktop/apps/games/openttd.nix @@ -0,0 +1,28 @@ +{ + config, + options, + lib, + pkgs, + rootPath, + ... +}: let + openttdConf = config.modules.desktop.apps.games.openttd; + configDir = config.nixosConfig.configDir; +in { + options.modules.desktop.apps.games.openttd = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + }; + }; + + config = lib.mkIf (openttdConf.enable) { + home.packages = with pkgs; [ + openttd + ]; + + fonts.packages = with pkgs; [ + openttd-ttf + ]; + }; +} diff --git a/modules/desktop/apps/games/prism.nix b/modules/desktop/apps/games/prism.nix index 4eb0a5f..d3ceee7 100644 --- a/modules/desktop/apps/games/prism.nix +++ b/modules/desktop/apps/games/prism.nix @@ -5,7 +5,7 @@ pkgs, ... }: let - prismConf = config.modules.desktop.apps.games; + prismConf = config.modules.desktop.apps.games.prism; configDir = config.nixosConfig.configDir; in { options.modules.desktop.apps.games.prism = { diff --git a/modules/desktop/apps/games/unciv.nix b/modules/desktop/apps/games/unciv.nix new file mode 100644 index 0000000..1eec540 --- /dev/null +++ b/modules/desktop/apps/games/unciv.nix @@ -0,0 +1,24 @@ +{ + config, + options, + lib, + pkgs, + rootPath, + ... +}: let + uncivConf = config.modules.desktop.apps.games.unciv; + configDir = config.nixosConfig.configDir; +in { + options.modules.desktop.apps.games.unciv = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + }; + }; + + config = lib.mkIf (uncivConf.enable) { + home.packages = with pkgs; [ + (callPackage (rootPath + /packages/unciv/default.nix) {}) + ]; + }; +} diff --git a/modules/desktop/apps/games/vintagestory.nix b/modules/desktop/apps/games/vintagestory.nix index ec82058..a15935a 100644 --- a/modules/desktop/apps/games/vintagestory.nix +++ b/modules/desktop/apps/games/vintagestory.nix @@ -3,12 +3,29 @@ options, lib, pkgs, + rootPath, ... }: let - gamesConf = config.modules.desktop.apps.games; + vsConf = config.modules.desktop.apps.games.vintagestory; configDir = config.nixosConfig.configDir; in { - config = lib.mkIf (gamesConf.enable) { + options.modules.desktop.apps.games.vintagestory = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + }; + }; + + config = lib.mkIf (vsConf.enable) { + home.manager.xdg.mimeApps = { + defaultApplications = { + "x-scheme-handler/vintagestoryjoin" = [ "Vintagestory_url_connect.desktop" ]; + "x-scheme-handler/vintagestorymodinstall" = [ "Vintagestory_url_mod.desktop" ]; + }; + }; + home.packages = with pkgs; [ + (callPackage (rootPath + /packages/vintagestory/default.nix) {}) + ]; }; } diff --git a/modules/desktop/apps/mutt-wizard.nix b/modules/desktop/apps/mutt-wizard.nix index 3b8a5db..da7b779 100644 --- a/modules/desktop/apps/mutt-wizard.nix +++ b/modules/desktop/apps/mutt-wizard.nix @@ -21,6 +21,26 @@ in pkgs.isync pkgs.lynx pkgs.mutt-wizard - ]; + ]; + + systemd.timers."auto-mailsync" = { + wantedBy = [ "timers.target" ]; + timerConfig = { + OnBootSec = "10m"; + OnUnitActiveSec = "10m"; + Unit = "auto-mailsync.service"; + }; + }; + + systemd.services."auto-mailsync" = { + script = '' + set -eu + /run/current-system/sw/bin/bash -l -c '${pkgs.mutt-wizard}/bin/mailsync -Y' + ''; + serviceConfig = { + Type = "oneshot"; + User = "jon"; + }; + }; }; } diff --git a/modules/desktop/apps/vpn.nix b/modules/desktop/apps/vpn.nix new file mode 100644 index 0000000..8cddb39 --- /dev/null +++ b/modules/desktop/apps/vpn.nix @@ -0,0 +1,23 @@ +{ + config, + options, + lib, + pkgs, + ... +}: let + vpnConfig = config.modules.desktop.apps.vpn; +in +{ + options.modules.desktop.apps.vpn = { + enable = lib.mkOption { + type = lib.types.bool; + default = false; + }; + }; + + config = lib.mkIf (vpnConfig.enable) { + home.packages = [ + pkgs.mullvad-vpn + ]; + }; +} diff --git a/modules/desktop/greetd.nix b/modules/desktop/greetd.nix index f9b6f90..0bc5208 100644 --- a/modules/desktop/greetd.nix +++ b/modules/desktop/greetd.nix @@ -18,5 +18,6 @@ in { services.greetd = { enable = true; }; + security.pam.services.greetd.enableGnomeKeyring = true; }; } diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 7d594e1..45ad967 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -10,8 +10,6 @@ defaultApps = config.modules.desktop.defaultApplications.apps; configDir = config.nixosConfig.configDir; - screenshotarea = "hyprctl keyword animation 'fadeOut,0,0,default'; grimblast --notify copysave area; hyprctl keyword animation 'fadeOut,1,4,default'"; - # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} workspaces = builtins.concatLists (builtins.genList ( x: let @@ -79,7 +77,10 @@ "$mod, D, exec, wofi --show drun" "$mod, Return, exec, ${defaultApps.terminal.cmd}" "$mod, W, exec, ${defaultApps.browser.cmd}" - "$mod ALTL, B, exec, killall -SIGUSR2 waybar" + "$mod ALT, B, exec, killall -SIGUSR2 waybar" + + #Screenshot + "$mod, Print, exec, slurp | grim -g - ~/pic/$(date +%s).png" ] ++ workspaces; @@ -108,6 +109,10 @@ in { pkgs.wdisplays pkgs.swaylock pkgs.swayidle + pkgs.slurp + pkgs.grim + pkgs.mako + pkgs.libnotify pkgs.wofi pkgs.jq pkgs.swww diff --git a/modules/hardware/gpu.nix b/modules/hardware/gpu.nix index be2ab58..fb333ed 100644 --- a/modules/hardware/gpu.nix +++ b/modules/hardware/gpu.nix @@ -36,13 +36,14 @@ in { environment.variables.VDPAU_DRIVER = "va_gl"; }) (lib.mkIf (device.gpu == "nvidia") { + hardware.graphics.extraPackages = with pkgs; [ nvidia-vaapi-driver ]; services.xserver.videoDrivers = ["nvidia"]; - boot.initrd.kernelModules = [ "nvidia" ]; hardware.nvidia = { modesetting.enable = true; - powerManagement.enable = false; - powerManagement.finegrained = false; + + powerManagement.enable = true; + open = true; nvidiaSettings = true; package = config.boot.kernelPackages.nvidiaPackages.latest; diff --git a/modules/security.nix b/modules/security.nix index c88fe0c..3100f54 100644 --- a/modules/security.nix +++ b/modules/security.nix @@ -9,19 +9,19 @@ in { config = { security.polkit.enable = true; + services.pcscd.enable = true; + services.gnome.gnome-keyring.enable = true; programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; - environment.systemPackages = [ - pkgs.pinentry-curses - ]; - home.packages = [ (pkgs.pass.withExtensions (exts: [exts.pass-otp ])) + pkgs.gcr + pkgs.seahorse pkgs.pinentry-qt ]; }; diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix index c39ec7a..c844564 100644 --- a/modules/shell/zsh.nix +++ b/modules/shell/zsh.nix @@ -39,7 +39,7 @@ in { }; zsh = { enable = true; - enableAutosuggestions = true; + autosuggestion.enable = true; enableCompletion = true; syntaxHighlighting.enable = true; autocd = true; |