diff --git a/configurations/home-manager/default.nix b/configurations/home-manager/default.nix index 3f88481..a7fa478 100644 --- a/configurations/home-manager/default.nix +++ b/configurations/home-manager/default.nix @@ -8,6 +8,5 @@ in { leyla = lib.mkIf users.leyla.isNormalUser (import ./leyla); eve = lib.mkIf users.eve.isNormalUser (import ./eve); - ivy = lib.mkIf users.ivy.isNormalUser (import ./ivy); git = lib.mkIf (osConfig.services.forgejo.enable or false) (import ./git); } diff --git a/configurations/home-manager/ivy/default.nix b/configurations/home-manager/ivy/default.nix deleted file mode 100644 index 48a3cae..0000000 --- a/configurations/home-manager/ivy/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{osConfig, ...}: let - userConfig = osConfig.host.users.ivy; -in { - imports = [ - ./packages.nix - ]; - - home = { - username = userConfig.name; - homeDirectory = osConfig.users.users.ivy.home; - - # This value determines the Home Manager release that your configuration is - # compatible with. This helps avoid breakage when a new Home Manager release - # introduces backwards incompatible changes. - # - # You should not change this value, even if you update Home Manager. If you do - # want to update the value, then make sure to first check the Home Manager - # release notes. - stateVersion = "23.11"; # Please read the comment before changing. - - # Home Manager is pretty good at managing dotfiles. The primary way to manage - # plain files is through 'home.file'. - file = { - # # Building this configuration will create a copy of 'dotfiles/screenrc' in - # # the Nix store. Activating the configuration will then make '~/.screenrc' a - # # symlink to the Nix store copy. - # ".screenrc".source = dotfiles/screenrc; - - # # You can also set the file content immediately. - # ".gradle/gradle.properties".text = '' - # org.gradle.console=verbose - # org.gradle.daemon.idletimeout=3600000 - # ''; - }; - - # Home Manager can also manage your environment variables through - # 'home.sessionVariables'. If you don't want to manage your shell through Home - # Manager then you have to manually source 'hm-session-vars.sh' located at - # either - # - # ~/.nix-profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh - # - # or - # - # /etc/profiles/per-user/ivy/etc/profile.d/hm-session-vars.sh - # - sessionVariables = { - # EDITOR = "emacs"; - }; - }; -} diff --git a/configurations/home-manager/ivy/packages.nix b/configurations/home-manager/ivy/packages.nix deleted file mode 100644 index 3c2a3d9..0000000 --- a/configurations/home-manager/ivy/packages.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ - lib, - pkgs, - config, - osConfig, - ... -}: { - config = { - nixpkgs.config = { - allowUnfree = true; - }; - - # Programs that need to be installed with some extra configuration - programs = lib.mkMerge [ - { - # Let Home Manager install and manage itself. - home-manager.enable = true; - } - (lib.mkIf (config.user.isDesktopUser || config.user.isTerminalUser) { - # git = { - # enable = true; - # userName = "Ivy"; - # userEmail = "ivy@example.com"; # Update this with actual email - # extraConfig.init.defaultBranch = "main"; - # }; - - openssh = { - enable = true; - hostKeys = [ - { - type = "ed25519"; - path = "${config.home.username}_${osConfig.networking.hostName}_ed25519"; - } - ]; - }; - }) - (lib.mkIf config.user.isDesktopUser { - vscode = { - enable = true; - package = pkgs.vscodium; - mutableExtensionsDir = false; - - profiles.default = { - enableUpdateCheck = false; - enableExtensionUpdateCheck = false; - - extraExtensions = { - # Cline extension (Claude AI assistant) - claudeDev.enable = true; - # Auto Rename Tag - autoRenameTag.enable = true; - # Live Server - liveServer.enable = true; - }; - - extensions = let - extension-pkgs = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version; - in ( - with extension-pkgs.open-vsx; [ - streetsidesoftware.code-spell-checker - ] - ); - }; - }; - - firefox.enable = true; - discord.enable = true; - signal-desktop-bin.enable = true; - claude-code.enable = true; - }) - ]; - }; -} diff --git a/configurations/home-manager/leyla/packages/default.nix b/configurations/home-manager/leyla/packages/default.nix index 0917d04..ae9b1a9 100644 --- a/configurations/home-manager/leyla/packages/default.nix +++ b/configurations/home-manager/leyla/packages/default.nix @@ -52,7 +52,7 @@ in { signal-desktop-bin.enable = true; calibre.enable = true; obsidian.enable = true; - jetbrains.idea-community.enable = true; + jetbrains.idea-oss.enable = true; vscode.enable = true; firefox.enable = true; steam.enable = true; @@ -72,6 +72,9 @@ in { noita-entangled-worlds.enable = true; tor-browser.enable = true; gdx-liftoff.enable = true; + proton-mail-pwa.enable = true; + proton-calendar-pwa.enable = true; + matrix-cyberia-pwa.enable = true; }) ]; } diff --git a/configurations/nixos/defiant/configuration.nix b/configurations/nixos/defiant/configuration.nix index 182b8c0..9aa2e34 100644 --- a/configurations/nixos/defiant/configuration.nix +++ b/configurations/nixos/defiant/configuration.nix @@ -254,8 +254,6 @@ enable = true; exposePort = true; - acceleration = false; - environmentVariables = { OLLAMA_KEEP_ALIVE = "24h"; }; diff --git a/configurations/nixos/horizon/configuration.nix b/configurations/nixos/horizon/configuration.nix index dd5975c..b81a895 100644 --- a/configurations/nixos/horizon/configuration.nix +++ b/configurations/nixos/horizon/configuration.nix @@ -32,7 +32,6 @@ isPrincipleUser = true; }; eve.isDesktopUser = true; - ivy.isDesktopUser = true; }; hardware = { @@ -90,13 +89,10 @@ environment.systemPackages = with pkgs; [ cachefilesd webtoon-dl + android-tools ]; services.cachefilesd.enable = true; - programs = { - adb.enable = true; - }; - networking = { networkmanager.enable = true; hostName = "horizon"; # Define your hostname. diff --git a/flake.lock b/flake.lock index f6ac272..bfef144 100644 --- a/flake.lock +++ b/flake.lock @@ -1,23 +1,5 @@ { "nodes": { - "devshell": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1741473158, - "narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=", - "owner": "numtide", - "repo": "devshell", - "rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "devshell", - "type": "github" - } - }, "disko": { "inputs": { "nixpkgs": [ @@ -25,11 +7,11 @@ ] }, "locked": { - "lastModified": 1764350888, - "narHash": "sha256-6Rp18zavTlnlZzcoLoBTJMBahL2FycVkw2rAEs3cQvo=", + "lastModified": 1766150702, + "narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=", "owner": "nix-community", "repo": "disko", - "rev": "2055a08fd0e2fd41318279a5355eb8a161accf26", + "rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378", "type": "github" }, "original": { @@ -46,11 +28,11 @@ }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1764332086, - "narHash": "sha256-sQTS3T4nNU/he+X62q5aflqSLx2zs4A8/cx3QsLc0Vw=", + "lastModified": 1767911574, + "narHash": "sha256-JsYIPaTgbJHEb1rgzwS9H+c0hCy/Sr1WaxNgtvu6xro=", "owner": "rycee", "repo": "nur-expressions", - "rev": "fdc5a0a8a7cf1eb4d134ee42f62c56f293781a0e", + "rev": "0d02843bec4ca8a16f7f08c25fe4e40cd829de0f", "type": "gitlab" }, "original": { @@ -62,11 +44,11 @@ }, "flake-compat": { "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", "owner": "edolstra", "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", "type": "github" }, "original": { @@ -75,6 +57,24 @@ "type": "github" } }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1767609335, + "narHash": "sha256-feveD98mQpptwrAEggBQKJTYbvwwglSbOv53uCfH9PY=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "250481aafeb741edfe23d29195671c19b36b6dca", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -93,24 +93,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1731533236, - "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "flakey-profile": { "locked": { "lastModified": 1712898590, @@ -133,11 +115,11 @@ ] }, "locked": { - "lastModified": 1764361670, - "narHash": "sha256-jgWzgpIaHbL3USIq0gihZeuy1lLf2YSfwvWEwnfAJUw=", + "lastModified": 1767909183, + "narHash": "sha256-u/bcU0xePi5bgNoRsiqSIwaGBwDilKKFTz3g0hqOBAo=", "owner": "nix-community", "repo": "home-manager", - "rev": "780be8ef503a28939cf9dc7996b48ffb1a3e04c6", + "rev": "cd6e96d56ed4b2a779ac73a1227e0bb1519b3509", "type": "github" }, "original": { @@ -194,11 +176,11 @@ ] }, "locked": { - "lastModified": 1763435414, - "narHash": "sha256-i2467FddWfd19q5Qoj+1/BAeg6LZmM5m4mYGRSQn/as=", + "lastModified": 1767364176, + "narHash": "sha256-l6YdEBYQxXjD8ujqvc0tKdwWc3K8UQOi+E4Y3DKQ318=", "ref": "refs/heads/main", - "rev": "192c92b603731fbc1bade6c1b18c8d8a0086f703", - "revCount": 169, + "rev": "1688100bba140492658d597f6b307c327f35c780", + "revCount": 179, "type": "git", "url": "https://git.lix.systems/lix-project/nixos-module.git" }, @@ -209,18 +191,17 @@ }, "mcp-nixos": { "inputs": { - "devshell": "devshell", - "flake-utils": "flake-utils_2", + "flake-parts": "flake-parts", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1760821194, - "narHash": "sha256-UCsJ8eDuHL14u2GFIYEY/drtZ6jht5zN/G/6QNlEy2g=", + "lastModified": 1767822362, + "narHash": "sha256-rnpIDY/sy/uV+1dsW+MrFwAFE/RHg5K/6aa5k7Yt1Dc=", "owner": "utensils", "repo": "mcp-nixos", - "rev": "0ae453f38d0f088c31d4678da3a12b183165986f", + "rev": "9706014c1530ba12ff36ca8d9d1717b1e61d29db", "type": "github" }, "original": { @@ -236,11 +217,11 @@ ] }, "locked": { - "lastModified": 1764161084, - "narHash": "sha256-HN84sByg9FhJnojkGGDSrcjcbeioFWoNXfuyYfJ1kBE=", + "lastModified": 1767718503, + "narHash": "sha256-V+VkFs0aSG0ca8p/N3gib7FAf4cq9jyr5Gm+ZBrHQpo=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "e95de00a471d07435e0527ff4db092c84998698e", + "rev": "9f48ffaca1f44b3e590976b4da8666a9e86e6eb1", "type": "github" }, "original": { @@ -277,11 +258,11 @@ ] }, "locked": { - "lastModified": 1764294946, - "narHash": "sha256-8BObMeUmCAZW1BTMUQGRGiz9tpNkVt/6/+blpS9Xxgk=", + "lastModified": 1767838417, + "narHash": "sha256-UJ6qBXzOh/FMYgP/OlM8QeKolpQYN0198onIu8oB6dM=", "owner": "nix-community", "repo": "nix-vscode-extensions", - "rev": "134c052c3213dc69ed881e41383b8ed29c5ffe72", + "rev": "4e92639f25e4f530990a99a32da696ee9117eb1e", "type": "github" }, "original": { @@ -292,11 +273,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1764328224, - "narHash": "sha256-hFyF1XQd+XrRx7WZCrGJp544dykexD8Q5SrJJZpEQYg=", + "lastModified": 1767185284, + "narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "d62603a997438e19182af69d3ce7be07565ecad4", + "rev": "40b1a28dce561bea34858287fbb23052c3ee63fe", "type": "github" }, "original": { @@ -308,27 +289,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1722073938, - "narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "e36e9f57337d0ff0cf77aceb58af4c805472bfae", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1764242076, - "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=", + "lastModified": 1767767207, + "narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4", + "rev": "5912c1772a44e31bf1c63c0390b90501e5026886", "type": "github" }, "original": { @@ -338,7 +303,22 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs-lib": { + "locked": { + "lastModified": 1765674936, + "narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1759070547, "narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=", @@ -356,16 +336,16 @@ }, "noita-entangled-worlds": { "inputs": { - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "rust-overlay": "rust-overlay", - "systems": "systems_3" + "systems": "systems_2" }, "locked": { - "lastModified": 1764349553, - "narHash": "sha256-ZOWEZK/pZLri/jEK1J8TEbjtwpIjXwCTH9F4gbor9qQ=", + "lastModified": 1765628894, + "narHash": "sha256-7q1foPZ6ZlspMNa48oRT7iMl89cvMMaWtdrJweE6B8I=", "owner": "IntQuant", "repo": "noita_entangled_worlds", - "rev": "01aac406df2c6d0a10faa19083d608bdf90cf3a9", + "rev": "266c6871b2878cf3b6f180c6d299da88f12c9f8e", "type": "github" }, "original": { @@ -388,7 +368,7 @@ "nix-syncthing": "nix-syncthing", "nix-vscode-extensions": "nix-vscode-extensions", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", "noita-entangled-worlds": "noita-entangled-worlds", "secrets": "secrets", "sops-nix": "sops-nix" @@ -418,11 +398,11 @@ "secrets": { "flake": false, "locked": { - "lastModified": 1759945215, - "narHash": "sha256-xmUzOuhJl6FtTjR5++OQvSoAnXe7/VA5QFCZDyFwBXo=", + "lastModified": 1765740994, + "narHash": "sha256-aBs7m69yuiixzGzhUlWAAN+zBziBNII+BFEC/5mPcSI=", "ref": "refs/heads/main", - "rev": "444229a105445339fb028d15a8d866063c5f8141", - "revCount": 21, + "rev": "6e90a73ed2e1e81ba37628fc5e5494a80d22b526", + "revCount": 22, "type": "git", "url": "ssh://git@git.jan-leila.com/jan-leila/nix-config-secrets.git" }, @@ -438,11 +418,11 @@ ] }, "locked": { - "lastModified": 1764021963, - "narHash": "sha256-1m84V2ROwNEbqeS9t37/mkry23GBhfMt8qb6aHHmjuc=", + "lastModified": 1767826491, + "narHash": "sha256-WSBENPotD2MIhZwolL6GC9npqgaS5fkM7j07V2i/Ur8=", "owner": "Mic92", "repo": "sops-nix", - "rev": "c482a1c1bbe030be6688ed7dc84f7213f304f1ec", + "rev": "ea3adcb6d2a000d9a69d0e23cad1f2cacb3a9fbe", "type": "github" }, "original": { @@ -467,21 +447,6 @@ } }, "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { "flake": false, "locked": { "lastModified": 1681028828, diff --git a/modules/home-manager-modules/programs/calibre.nix b/modules/home-manager-modules/programs/calibre.nix index 74a0cf4..f41ced7 100644 --- a/modules/home-manager-modules/programs/calibre.nix +++ b/modules/home-manager-modules/programs/calibre.nix @@ -4,10 +4,6 @@ config, ... }: { - options.programs.calibre = { - enable = lib.mkEnableOption "enable calibre"; - }; - config = lib.mkIf config.programs.calibre.enable (lib.mkMerge [ { home.packages = with pkgs; [ diff --git a/modules/home-manager-modules/programs/default.nix b/modules/home-manager-modules/programs/default.nix index 5b3a169..916eb31 100644 --- a/modules/home-manager-modules/programs/default.nix +++ b/modules/home-manager-modules/programs/default.nix @@ -46,5 +46,8 @@ ./gdx-liftoff.nix ./tor-browser.nix ./vmware-workstation.nix + ./proton-mail-pwa.nix + ./proton-calendar-pwa.nix + ./matrix-cyberia-pwa.nix ]; } diff --git a/modules/home-manager-modules/programs/idea.nix b/modules/home-manager-modules/programs/idea.nix index ec9d7d6..b195096 100644 --- a/modules/home-manager-modules/programs/idea.nix +++ b/modules/home-manager-modules/programs/idea.nix @@ -4,14 +4,14 @@ config, ... }: { - options.programs.jetbrains.idea-community = { - enable = lib.mkEnableOption "enable idea-community"; + options.programs.jetbrains.idea-oss = { + enable = lib.mkEnableOption "enable idea-oss"; }; - config = lib.mkIf config.programs.jetbrains.idea-community.enable (lib.mkMerge [ + config = lib.mkIf config.programs.jetbrains.idea-oss.enable (lib.mkMerge [ { home.packages = with pkgs; [ - jetbrains.idea-community + jetbrains.idea-oss ]; } ( diff --git a/modules/home-manager-modules/programs/matrix-cyberia-pwa.nix b/modules/home-manager-modules/programs/matrix-cyberia-pwa.nix new file mode 100644 index 0000000..644df92 --- /dev/null +++ b/modules/home-manager-modules/programs/matrix-cyberia-pwa.nix @@ -0,0 +1,56 @@ +{ + lib, + pkgs, + config, + ... +}: let + cfg = config.programs.matrix-cyberia-pwa; + isChromium = cfg.package == pkgs.chromium; + isBrowserImpermanenceSupported = cfg.package == pkgs.chromium; +in { + options.programs.matrix-cyberia-pwa = { + enable = lib.mkEnableOption "enable Matrix Cyberia PWA"; + package = lib.mkOption { + type = lib.types.package; + default = pkgs.chromium; + description = "Browser package to use for the PWA"; + }; + impermanence = { + enable = lib.mkOption { + type = lib.types.bool; + default = isBrowserImpermanenceSupported; + description = "Enable impermanence configuration for the PWA. Only automatically enabled when using chromium."; + }; + }; + }; + + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + warnings = + lib.optional (config.impermanence.enable && !isBrowserImpermanenceSupported) + "matrix-cyberia-pwa: Using unsupported package. You will need to manually configure pwa for ${cfg.package.pname}. Supported package(s) ${pkgs.chromium.pname}"; + } + ( + lib.mkIf isChromium { + xdg.desktopEntries.matrix-cyberia-pwa = { + name = "Matrix (Cyberia)"; + type = "Application"; + exec = "${cfg.package}/bin/${cfg.package.pname} --app=https://chat.cyberia.club/"; + icon = "matrix"; + terminal = false; + categories = ["Network" "InstantMessaging"]; + }; + } + ) + ( + lib.mkIf (config.impermanence.enable && cfg.impermanence.enable && isChromium) { + home.persistence."/persist${config.home.homeDirectory}" = { + directories = [ + "${config.xdg.configHome}/chromium" + ]; + allowOther = true; + }; + } + ) + ]); +} diff --git a/modules/home-manager-modules/programs/proton-calendar-pwa.nix b/modules/home-manager-modules/programs/proton-calendar-pwa.nix new file mode 100644 index 0000000..33796e2 --- /dev/null +++ b/modules/home-manager-modules/programs/proton-calendar-pwa.nix @@ -0,0 +1,55 @@ +{ + lib, + pkgs, + config, + ... +}: let + cfg = config.programs.proton-calendar-pwa; + isChromium = cfg.package == pkgs.chromium; + isBrowserImpermanenceSupported = cfg.package == pkgs.chromium; +in { + options.programs.proton-calendar-pwa = { + enable = lib.mkEnableOption "enable Proton Calendar PWA"; + package = lib.mkOption { + type = lib.types.package; + default = pkgs.chromium; + description = "Browser package to use for the PWA"; + }; + impermanence = { + enable = lib.mkOption { + type = lib.types.bool; + default = isBrowserImpermanenceSupported; + description = "Enable impermanence configuration for the PWA. Only automatically enabled when using chromium."; + }; + }; + }; + + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + warnings = + lib.optional (config.impermanence.enable && !isBrowserImpermanenceSupported) + "proton-calendar-pwa: Using unsupported package. You will need to manually configure pwa for ${cfg.package.pname}. Supported package(s) ${pkgs.chromium.pname}"; + } + ( + lib.mkIf isChromium { + xdg.desktopEntries.proton-calendar-pwa = { + name = "Proton Calendar"; + type = "Application"; + exec = "${cfg.package}/bin/${cfg.package.pname} --app=https://calendar.proton.me"; + icon = "chrome-ojibjkjikcpjonjjngfkegflhmffeemk-Default"; + terminal = false; + }; + } + ) + ( + lib.mkIf (config.impermanence.enable && cfg.impermanence.enable && isChromium) { + home.persistence."/persist${config.home.homeDirectory}" = { + directories = [ + "${config.xdg.configHome}/chromium" + ]; + allowOther = true; + }; + } + ) + ]); +} diff --git a/modules/home-manager-modules/programs/proton-mail-pwa.nix b/modules/home-manager-modules/programs/proton-mail-pwa.nix new file mode 100644 index 0000000..3a3fe89 --- /dev/null +++ b/modules/home-manager-modules/programs/proton-mail-pwa.nix @@ -0,0 +1,55 @@ +{ + lib, + pkgs, + config, + ... +}: let + cfg = config.programs.proton-mail-pwa; + isChromium = cfg.package == pkgs.chromium; + isBrowserImpermanenceSupported = cfg.package == pkgs.chromium; +in { + options.programs.proton-mail-pwa = { + enable = lib.mkEnableOption "enable Proton Mail PWA"; + package = lib.mkOption { + type = lib.types.package; + default = pkgs.chromium; + description = "Browser package to use for the PWA"; + }; + impermanence = { + enable = lib.mkOption { + type = lib.types.bool; + default = isBrowserImpermanenceSupported; + description = "Enable impermanence configuration for the PWA. Only automatically enabled when using chromium."; + }; + }; + }; + + config = lib.mkIf cfg.enable (lib.mkMerge [ + { + warnings = + lib.optional (config.impermanence.enable && !isBrowserImpermanenceSupported) + "proton-mail-pwa: Using unsupported package. You will need to manually configure pwa for ${cfg.package.pname}. Supported package(s) ${pkgs.chromium.pname}"; + } + ( + lib.mkIf isChromium { + xdg.desktopEntries.proton-mail-pwa = { + name = "Proton Mail"; + type = "Application"; + exec = "${cfg.package}/bin/${cfg.package.pname} --app=https://mail.proton.me"; + icon = "chrome-jnpecgipniidlgicjocehkhajgdnjekh-Default"; + terminal = false; + }; + } + ) + ( + lib.mkIf (config.impermanence.enable && cfg.impermanence.enable && isChromium) { + home.persistence."/persist${config.home.homeDirectory}" = { + directories = [ + "${config.xdg.configHome}/chromium" + ]; + allowOther = true; + }; + } + ) + ]); +} diff --git a/modules/nixos-modules/users.nix b/modules/nixos-modules/users.nix index d97fe46..8a384e3 100644 --- a/modules/nixos-modules/users.nix +++ b/modules/nixos-modules/users.nix @@ -15,7 +15,8 @@ uids = { leyla = 1000; eve = 1002; - ivy = 1004; + # ester = 1003; + # ivy = 1004; jellyfin = 2000; forgejo = 2002; hass = 2004; @@ -36,7 +37,8 @@ gids = { leyla = 1000; eve = 1002; - ivy = 1004; + # ester = 1003 + # ivy = 1004; users = 100; jellyfin_media = 2001; jellyfin = 2000; @@ -59,7 +61,6 @@ users = config.users.users; leyla = users.leyla.name; eve = users.eve.name; - ivy = users.ivy.name; in { config = lib.mkMerge [ { @@ -97,10 +98,6 @@ in { neededForUsers = true; sopsFile = "${inputs.secrets}/user-passwords.yaml"; }; - "passwords/ivy" = { - neededForUsers = true; - sopsFile = "${inputs.secrets}/user-passwords.yaml"; - }; }; }; @@ -134,19 +131,6 @@ in { group = config.users.users.eve.name; }; - ivy = { - uid = lib.mkForce uids.ivy; - name = lib.mkForce host.users.ivy.name; - description = "Ivy"; - extraGroups = - lib.optionals host.users.ivy.isNormalUser ["networkmanager"] - ++ (lib.lists.optionals host.users.ivy.isPrincipleUser ["wheel"]); - hashedPasswordFile = config.sops.secrets."passwords/ivy".path; - isNormalUser = host.users.ivy.isNormalUser; - isSystemUser = !host.users.ivy.isNormalUser; - group = config.users.users.ivy.name; - }; - jellyfin = { uid = lib.mkForce uids.jellyfin; isSystemUser = true; @@ -254,19 +238,11 @@ in { ]; }; - ivy = { - gid = lib.mkForce gids.ivy; - members = [ - ivy - ]; - }; - users = { gid = lib.mkForce gids.users; members = [ leyla eve - ivy ]; }; @@ -280,7 +256,6 @@ in { users.lidarr.name leyla eve - ivy ]; }; @@ -314,7 +289,6 @@ in { users.syncthing.name leyla eve - ivy ]; }; diff --git a/modules/system-modules/users.nix b/modules/system-modules/users.nix index dda9ed3..cd9c900 100644 --- a/modules/system-modules/users.nix +++ b/modules/system-modules/users.nix @@ -89,11 +89,6 @@ in { isDesktopUser = lib.mkDefault false; isTerminalUser = lib.mkDefault false; }; - ivy = { - isPrincipleUser = lib.mkDefault false; - isDesktopUser = lib.mkDefault false; - isTerminalUser = lib.mkDefault false; - }; }; assertions = diff --git a/nix-config-secrets b/nix-config-secrets index 444229a..6e90a73 160000 --- a/nix-config-secrets +++ b/nix-config-secrets @@ -1 +1 @@ -Subproject commit 444229a105445339fb028d15a8d866063c5f8141 +Subproject commit 6e90a73ed2e1e81ba37628fc5e5494a80d22b526