From bdf72eb68d748c1457006d57f4ce00eab0b577b1 Mon Sep 17 00:00:00 2001 From: martyTF Date: Wed, 7 Jan 2026 20:39:43 +0100 Subject: [PATCH] gaming, mail, fixes, and stuff! --- flake.lock | 142 +++++++++++++++--- flake.nix | 8 +- hosts/marty-pc/home.nix | 6 +- modules/connectivity/default.nix | 1 + modules/connectivity/internet/default.nix | 2 + modules/connectivity/internet/mail.nix | 34 +++++ modules/connectivity/internet/rss.nix | 19 +++ .../social-media/default.nix | 0 .../social-media/messaging/default.nix | 0 modules/default.nix | 1 - modules/defaults/desktop.nix | 5 + modules/defaults/laptop.nix | 5 + modules/desktop/hyprland.nix | 19 ++- modules/gaming/default.nix | 3 +- modules/gaming/minecraft.nix | 20 +++ modules/gaming/modding.nix | 21 +++ modules/misc/default.nix | 1 + modules/misc/secrets.nix | 17 +++ 18 files changed, 272 insertions(+), 32 deletions(-) create mode 100644 modules/connectivity/internet/mail.nix create mode 100644 modules/connectivity/internet/rss.nix rename modules/{ => connectivity}/social-media/default.nix (100%) rename modules/{ => connectivity}/social-media/messaging/default.nix (100%) create mode 100644 modules/gaming/minecraft.nix create mode 100644 modules/gaming/modding.nix create mode 100644 modules/misc/secrets.nix diff --git a/flake.lock b/flake.lock index da442d0..236c678 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,26 @@ { "nodes": { + "agenix": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "nixpkgs": "nixpkgs", + "systems": "systems" + }, + "locked": { + "lastModified": 1762618334, + "narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=", + "owner": "ryantm", + "repo": "agenix", + "rev": "fcdea223397448d35d9b31f798479227e80183f6", + "type": "github" + }, + "original": { + "owner": "ryantm", + "repo": "agenix", + "type": "github" + } + }, "aquamarine": { "inputs": { "hyprutils": [ @@ -33,10 +54,32 @@ "type": "github" } }, + "darwin": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1744478979, + "narHash": "sha256-dyN+teG9G82G+m+PX/aSAagkC+vUv0SgUw3XkPhQodQ=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "43975d782b418ebf4969e9ccba82466728c2851b", + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, "elephant": { "inputs": { - "nixpkgs": "nixpkgs", - "systems": "systems" + "nixpkgs": "nixpkgs_2", + "systems": "systems_2" }, "locked": { "lastModified": 1766069388, @@ -141,6 +184,27 @@ } }, "home-manager": { + "inputs": { + "nixpkgs": [ + "agenix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1745494811, + "narHash": "sha256-YZCh2o9Ua1n9uCvrvi5pRxtuVNml8X2a03qIFfRKpFs=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "abfad3d2958c9e6300a883bd443512c55dfeb1be", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { "inputs": { "nixpkgs": [ "nixpkgs" @@ -229,9 +293,9 @@ "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", "hyprwire": "hyprwire", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "pre-commit-hooks": "pre-commit-hooks", - "systems": "systems_2", + "systems": "systems_3", "xdph": "xdph" }, "locked": { @@ -513,7 +577,7 @@ "inputs": { "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "optnix": "optnix" }, "locked": { @@ -532,16 +596,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1764242076, - "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=", + "lastModified": 1754028485, + "narHash": "sha256-IiiXB3BDTi6UqzAZcf2S797hWEPCRZOwyNThJIYhUfk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4", + "rev": "59e69648d345d6e8fef86158c555730fa12af9de", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable", + "ref": "nixos-25.05", "repo": "nixpkgs", "type": "github" } @@ -562,6 +626,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1764242076, + "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1766070988, "narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=", @@ -577,7 +657,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { "lastModified": 1764527385, "narHash": "sha256-nA5ywiGKl76atrbdZ5Aucd8SjF/v8ew9b9QsC+MKL14=", @@ -593,7 +673,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1759070547, "narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=", @@ -609,7 +689,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1766309749, "narHash": "sha256-3xY8CZ4rSnQ0NqGhMKAy5vgC+2IVK0NoVEzDoOh4DA4=", @@ -625,7 +705,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1757068644, "narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=", @@ -644,7 +724,7 @@ "optnix": { "inputs": { "flake-compat": "flake-compat_3", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1765418479, @@ -685,28 +765,29 @@ }, "root": { "inputs": { + "agenix": "agenix", "elephant": "elephant", - "home-manager": "home-manager", + "home-manager": "home-manager_2", "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", "nixos-cli": "nixos-cli", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "walker": "walker", "zen-browser": "zen-browser" } }, "systems": { "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", "type": "github" }, "original": { "owner": "nix-systems", - "repo": "default-linux", + "repo": "default", "type": "github" } }, @@ -740,13 +821,28 @@ "type": "github" } }, + "systems_4": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, "walker": { "inputs": { "elephant": [ "elephant" ], - "nixpkgs": "nixpkgs_6", - "systems": "systems_3" + "nixpkgs": "nixpkgs_7", + "systems": "systems_4" }, "locked": { "lastModified": 1766324177, diff --git a/flake.nix b/flake.nix index e401aaf..0f48b44 100644 --- a/flake.nix +++ b/flake.nix @@ -23,6 +23,9 @@ url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; }; + agenix = { + url = "github:ryantm/agenix"; + }; }; outputs = @@ -33,6 +36,7 @@ walker, nixos-cli, zen-browser, + agenix, ... }: let @@ -48,6 +52,7 @@ ./configuration.nix home-manager.nixosModules.home-manager nixos-cli.nixosModules.nixos-cli + agenix.nixosModules.default ]; }; marty-pc = nixpkgs.lib.nixosSystem { @@ -58,6 +63,7 @@ ./configuration.nix home-manager.nixosModules.home-manager nixos-cli.nixosModules.nixos-cli + agenix.nixosModules.default ]; }; marty-server = nixpkgs.lib.nixosSystem { @@ -68,7 +74,7 @@ ./configuration.nix home-manager.nixosModules.home-manager nixos-cli.nixosModules.nixos-cli - + agenix.nixosModules.default ]; }; }; diff --git a/hosts/marty-pc/home.nix b/hosts/marty-pc/home.nix index f387d97..16ebc57 100644 --- a/hosts/marty-pc/home.nix +++ b/hosts/marty-pc/home.nix @@ -103,7 +103,11 @@ ]; }; }; - gaming.steam.enable = true; + gaming = { + steam.enable = true; + minecraft.enable = true; + modding.enable = true; + }; imports = [ inputs.walker.homeManagerModules.default diff --git a/modules/connectivity/default.nix b/modules/connectivity/default.nix index 6abd027..7671b68 100644 --- a/modules/connectivity/default.nix +++ b/modules/connectivity/default.nix @@ -10,5 +10,6 @@ ./internet ./bluetooth ./mounts + ./social-media ]; } diff --git a/modules/connectivity/internet/default.nix b/modules/connectivity/internet/default.nix index 72d62a9..3743b9e 100644 --- a/modules/connectivity/internet/default.nix +++ b/modules/connectivity/internet/default.nix @@ -10,5 +10,7 @@ ./librewolf.nix ./zen-browser.nix ./tor.nix + ./mail.nix + ./rss.nix ]; } diff --git a/modules/connectivity/internet/mail.nix b/modules/connectivity/internet/mail.nix new file mode 100644 index 0000000..6d7db5a --- /dev/null +++ b/modules/connectivity/internet/mail.nix @@ -0,0 +1,34 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + options = { + internet = { + mail.enable = lib.mkEnableOption "enable e-mail"; + mail.providers.protonmail.enable = lib.mkEnableOption "enable protonmail"; + }; + }; + config = { + programs = { + thunderbird = lib.mkIf config.internet.mail.enable { + enable = true; + profiles."default" = { + isDefault = true; + }; + }; + }; + services = { + protonmail-bridge = lib.mkIf config.internet.mail.providers.protonmail.enable { + enable = true; + package = pkgs.protonmail-bridge; + extraPackages = with pkgs; [ + gnome-keyring + ]; + }; + }; + }; +} diff --git a/modules/connectivity/internet/rss.nix b/modules/connectivity/internet/rss.nix new file mode 100644 index 0000000..078fba3 --- /dev/null +++ b/modules/connectivity/internet/rss.nix @@ -0,0 +1,19 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + options = { + internet = { + rss.enable = lib.mkEnableOption "enable rss"; + }; + }; + config = { + home.packages = with pkgs; [ + (lib.mkIf (config.internet.rss.enable) newsflash) + ]; + }; +} diff --git a/modules/social-media/default.nix b/modules/connectivity/social-media/default.nix similarity index 100% rename from modules/social-media/default.nix rename to modules/connectivity/social-media/default.nix diff --git a/modules/social-media/messaging/default.nix b/modules/connectivity/social-media/messaging/default.nix similarity index 100% rename from modules/social-media/messaging/default.nix rename to modules/connectivity/social-media/messaging/default.nix diff --git a/modules/default.nix b/modules/default.nix index b6e3215..e8b3377 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -15,7 +15,6 @@ ./gaming ./connectivity ./media - ./social-media ./server ]; } diff --git a/modules/defaults/desktop.nix b/modules/defaults/desktop.nix index 806ceac..3bfccbe 100644 --- a/modules/defaults/desktop.nix +++ b/modules/defaults/desktop.nix @@ -37,6 +37,11 @@ enable = true; }; }; + mail = { + enable = true; + providers.protonmail.enable = true; + }; + rss.enable = true; }; bluetooth.enable = true; media = { diff --git a/modules/defaults/laptop.nix b/modules/defaults/laptop.nix index 5056c20..4ad557f 100644 --- a/modules/defaults/laptop.nix +++ b/modules/defaults/laptop.nix @@ -34,6 +34,11 @@ enable = true; }; }; + mail = { + enable = true; + providers.protonmail.enable = true; + }; + rss.enable = true; }; bluetooth.enable = true; media = { diff --git a/modules/desktop/hyprland.nix b/modules/desktop/hyprland.nix index 96a03fa..1d4ce75 100644 --- a/modules/desktop/hyprland.nix +++ b/modules/desktop/hyprland.nix @@ -52,7 +52,16 @@ ]; extraPortals = [ inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland + pkgs.xdg-desktop-portal-xapp + pkgs.xdg-desktop-portal-gtk + ]; + config.common = { + "org.freedesktop.portal.OpenURI" = [ + "*" + "hyprland" + ]; + }; }; programs = { hyprlock = { @@ -70,12 +79,12 @@ monitor = config.desktop.hyprland.monitors; workspace = config.desktop.hyprland.workspaces.workspaces; exec-once = [ - "hyprctl plugin load " + #"hyprctl plugin load " (lib.mkIf (config.desktop.walker.enable) "elephant") (lib.mkIf (config.desktop.waybar.enable) "waybar") (lib.mkIf (config.desktop.wallpaper.enable) "waypaper --restore --random") - (lib.mkIf (config.gaming.steam.enable) "adwaita-steam-gtk - i; steam --silent") - + (lib.mkIf (config.gaming.steam.enable) "adwaita-steam-gtk -u; steam -silent") + (lib.mkIf (config.internet.mail.providers.protonmail.enable) "protonmail-bridge -n") ]; "$mod" = "SUPER"; "$shiftmod" = "SUPER_SHIFT"; @@ -98,8 +107,8 @@ "$mod, S, togglespecialworkspace, magic" "$mod, O, exec, zen" "$shiftmod, S, movetoworkspace, special:magic" - "$controlmod, right, workspace, m-1" - "$controlmod, left, workspace, m+1" + "$controlmod, right, workspace, m+1" + "$controlmod, left, workspace, m-1" "$mod, mouse_down, workspace, m-1" "$mod, mouse_up, workspace, m+1" "$mod, left, movefocus, l" diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix index 9e06180..63e19df 100644 --- a/modules/gaming/default.nix +++ b/modules/gaming/default.nix @@ -8,6 +8,7 @@ { imports = [ ./steam.nix - + ./modding.nix + ./minecraft.nix ]; } diff --git a/modules/gaming/minecraft.nix b/modules/gaming/minecraft.nix new file mode 100644 index 0000000..f078028 --- /dev/null +++ b/modules/gaming/minecraft.nix @@ -0,0 +1,20 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + options = { + gaming = { + minecraft.enable = lib.mkEnableOption "enable minecraft"; + }; + }; + + config = lib.mkIf config.gaming.minecraft.enable { + home.packages = with pkgs; [ + prismlauncher + ]; + }; +} diff --git a/modules/gaming/modding.nix b/modules/gaming/modding.nix new file mode 100644 index 0000000..567ac60 --- /dev/null +++ b/modules/gaming/modding.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + options = { + gaming = { + modding.enable = lib.mkEnableOption "enable game modding"; + }; + }; + + config = lib.mkIf config.gaming.modding.enable { + home.packages = with pkgs; [ + nexusmods-app-unfree + r2modman + ]; + }; +} diff --git a/modules/misc/default.nix b/modules/misc/default.nix index 2ec9703..5e37656 100644 --- a/modules/misc/default.nix +++ b/modules/misc/default.nix @@ -9,5 +9,6 @@ imports = [ ./bitwarden.nix ./syncthing.nix + ./secrets.nix ]; } diff --git a/modules/misc/secrets.nix b/modules/misc/secrets.nix new file mode 100644 index 0000000..35fe641 --- /dev/null +++ b/modules/misc/secrets.nix @@ -0,0 +1,17 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + home.packages = with pkgs; [ + pass + gnome-keyring + seahorse + libsecret + gcr + ]; + services.gnome-keyring.enable = true; +}