Compare commits

...

8 commits

16 changed files with 262 additions and 295 deletions

View file

@ -8,6 +8,5 @@
in { in {
leyla = lib.mkIf users.leyla.isNormalUser (import ./leyla); leyla = lib.mkIf users.leyla.isNormalUser (import ./leyla);
eve = lib.mkIf users.eve.isNormalUser (import ./eve); 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); git = lib.mkIf (osConfig.services.forgejo.enable or false) (import ./git);
} }

View file

@ -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";
};
};
}

View file

@ -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;
})
];
};
}

View file

@ -52,7 +52,7 @@ in {
signal-desktop-bin.enable = true; signal-desktop-bin.enable = true;
calibre.enable = true; calibre.enable = true;
obsidian.enable = true; obsidian.enable = true;
jetbrains.idea-community.enable = true; jetbrains.idea-oss.enable = true;
vscode.enable = true; vscode.enable = true;
firefox.enable = true; firefox.enable = true;
steam.enable = true; steam.enable = true;
@ -72,6 +72,9 @@ in {
noita-entangled-worlds.enable = true; noita-entangled-worlds.enable = true;
tor-browser.enable = true; tor-browser.enable = true;
gdx-liftoff.enable = true; gdx-liftoff.enable = true;
proton-mail-pwa.enable = true;
proton-calendar-pwa.enable = true;
matrix-cyberia-pwa.enable = true;
}) })
]; ];
} }

View file

@ -254,8 +254,6 @@
enable = true; enable = true;
exposePort = true; exposePort = true;
acceleration = false;
environmentVariables = { environmentVariables = {
OLLAMA_KEEP_ALIVE = "24h"; OLLAMA_KEEP_ALIVE = "24h";
}; };

View file

@ -32,7 +32,6 @@
isPrincipleUser = true; isPrincipleUser = true;
}; };
eve.isDesktopUser = true; eve.isDesktopUser = true;
ivy.isDesktopUser = true;
}; };
hardware = { hardware = {
@ -90,13 +89,10 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
cachefilesd cachefilesd
webtoon-dl webtoon-dl
android-tools
]; ];
services.cachefilesd.enable = true; services.cachefilesd.enable = true;
programs = {
adb.enable = true;
};
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
hostName = "horizon"; # Define your hostname. hostName = "horizon"; # Define your hostname.

193
flake.lock generated
View file

@ -1,23 +1,5 @@
{ {
"nodes": { "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": { "disko": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -25,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764350888, "lastModified": 1766150702,
"narHash": "sha256-6Rp18zavTlnlZzcoLoBTJMBahL2FycVkw2rAEs3cQvo=", "narHash": "sha256-P0kM+5o+DKnB6raXgFEk3azw8Wqg5FL6wyl9jD+G5a4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "2055a08fd0e2fd41318279a5355eb8a161accf26", "rev": "916506443ecd0d0b4a0f4cf9d40a3c22ce39b378",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -46,11 +28,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1764332086, "lastModified": 1767911574,
"narHash": "sha256-sQTS3T4nNU/he+X62q5aflqSLx2zs4A8/cx3QsLc0Vw=", "narHash": "sha256-JsYIPaTgbJHEb1rgzwS9H+c0hCy/Sr1WaxNgtvu6xro=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "fdc5a0a8a7cf1eb4d134ee42f62c56f293781a0e", "rev": "0d02843bec4ca8a16f7f08c25fe4e40cd829de0f",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -62,11 +44,11 @@
}, },
"flake-compat": { "flake-compat": {
"locked": { "locked": {
"lastModified": 1761588595, "lastModified": 1767039857,
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -75,6 +57,24 @@
"type": "github" "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": { "flake-utils": {
"inputs": { "inputs": {
"systems": "systems" "systems": "systems"
@ -93,24 +93,6 @@
"type": "github" "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": { "flakey-profile": {
"locked": { "locked": {
"lastModified": 1712898590, "lastModified": 1712898590,
@ -133,11 +115,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764361670, "lastModified": 1767909183,
"narHash": "sha256-jgWzgpIaHbL3USIq0gihZeuy1lLf2YSfwvWEwnfAJUw=", "narHash": "sha256-u/bcU0xePi5bgNoRsiqSIwaGBwDilKKFTz3g0hqOBAo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "780be8ef503a28939cf9dc7996b48ffb1a3e04c6", "rev": "cd6e96d56ed4b2a779ac73a1227e0bb1519b3509",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -194,11 +176,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1763435414, "lastModified": 1767364176,
"narHash": "sha256-i2467FddWfd19q5Qoj+1/BAeg6LZmM5m4mYGRSQn/as=", "narHash": "sha256-l6YdEBYQxXjD8ujqvc0tKdwWc3K8UQOi+E4Y3DKQ318=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "192c92b603731fbc1bade6c1b18c8d8a0086f703", "rev": "1688100bba140492658d597f6b307c327f35c780",
"revCount": 169, "revCount": 179,
"type": "git", "type": "git",
"url": "https://git.lix.systems/lix-project/nixos-module.git" "url": "https://git.lix.systems/lix-project/nixos-module.git"
}, },
@ -209,18 +191,17 @@
}, },
"mcp-nixos": { "mcp-nixos": {
"inputs": { "inputs": {
"devshell": "devshell", "flake-parts": "flake-parts",
"flake-utils": "flake-utils_2",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ]
}, },
"locked": { "locked": {
"lastModified": 1760821194, "lastModified": 1767822362,
"narHash": "sha256-UCsJ8eDuHL14u2GFIYEY/drtZ6jht5zN/G/6QNlEy2g=", "narHash": "sha256-rnpIDY/sy/uV+1dsW+MrFwAFE/RHg5K/6aa5k7Yt1Dc=",
"owner": "utensils", "owner": "utensils",
"repo": "mcp-nixos", "repo": "mcp-nixos",
"rev": "0ae453f38d0f088c31d4678da3a12b183165986f", "rev": "9706014c1530ba12ff36ca8d9d1717b1e61d29db",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -236,11 +217,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764161084, "lastModified": 1767718503,
"narHash": "sha256-HN84sByg9FhJnojkGGDSrcjcbeioFWoNXfuyYfJ1kBE=", "narHash": "sha256-V+VkFs0aSG0ca8p/N3gib7FAf4cq9jyr5Gm+ZBrHQpo=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "e95de00a471d07435e0527ff4db092c84998698e", "rev": "9f48ffaca1f44b3e590976b4da8666a9e86e6eb1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -277,11 +258,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764294946, "lastModified": 1767838417,
"narHash": "sha256-8BObMeUmCAZW1BTMUQGRGiz9tpNkVt/6/+blpS9Xxgk=", "narHash": "sha256-UJ6qBXzOh/FMYgP/OlM8QeKolpQYN0198onIu8oB6dM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "134c052c3213dc69ed881e41383b8ed29c5ffe72", "rev": "4e92639f25e4f530990a99a32da696ee9117eb1e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -292,11 +273,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1764328224, "lastModified": 1767185284,
"narHash": "sha256-hFyF1XQd+XrRx7WZCrGJp544dykexD8Q5SrJJZpEQYg=", "narHash": "sha256-ljDBUDpD1Cg5n3mJI81Hz5qeZAwCGxon4kQW3Ho3+6Q=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "d62603a997438e19182af69d3ce7be07565ecad4", "rev": "40b1a28dce561bea34858287fbb23052c3ee63fe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -308,27 +289,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1722073938, "lastModified": 1767767207,
"narHash": "sha256-OpX0StkL8vpXyWOGUD6G+MA26wAXK6SpT94kLJXo6B4=", "narHash": "sha256-Mj3d3PfwltLmukFal5i3fFt27L6NiKXdBezC1EBuZs4=",
"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=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4", "rev": "5912c1772a44e31bf1c63c0390b90501e5026886",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -338,7 +303,22 @@
"type": "github" "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": { "locked": {
"lastModified": 1759070547, "lastModified": 1759070547,
"narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=", "narHash": "sha256-JVZl8NaVRYb0+381nl7LvPE+A774/dRpif01FKLrYFQ=",
@ -356,16 +336,16 @@
}, },
"noita-entangled-worlds": { "noita-entangled-worlds": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_3", "nixpkgs": "nixpkgs_2",
"rust-overlay": "rust-overlay", "rust-overlay": "rust-overlay",
"systems": "systems_3" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1764349553, "lastModified": 1765628894,
"narHash": "sha256-ZOWEZK/pZLri/jEK1J8TEbjtwpIjXwCTH9F4gbor9qQ=", "narHash": "sha256-7q1foPZ6ZlspMNa48oRT7iMl89cvMMaWtdrJweE6B8I=",
"owner": "IntQuant", "owner": "IntQuant",
"repo": "noita_entangled_worlds", "repo": "noita_entangled_worlds",
"rev": "01aac406df2c6d0a10faa19083d608bdf90cf3a9", "rev": "266c6871b2878cf3b6f180c6d299da88f12c9f8e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -388,7 +368,7 @@
"nix-syncthing": "nix-syncthing", "nix-syncthing": "nix-syncthing",
"nix-vscode-extensions": "nix-vscode-extensions", "nix-vscode-extensions": "nix-vscode-extensions",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs",
"noita-entangled-worlds": "noita-entangled-worlds", "noita-entangled-worlds": "noita-entangled-worlds",
"secrets": "secrets", "secrets": "secrets",
"sops-nix": "sops-nix" "sops-nix": "sops-nix"
@ -418,11 +398,11 @@
"secrets": { "secrets": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1759945215, "lastModified": 1765740994,
"narHash": "sha256-xmUzOuhJl6FtTjR5++OQvSoAnXe7/VA5QFCZDyFwBXo=", "narHash": "sha256-aBs7m69yuiixzGzhUlWAAN+zBziBNII+BFEC/5mPcSI=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "444229a105445339fb028d15a8d866063c5f8141", "rev": "6e90a73ed2e1e81ba37628fc5e5494a80d22b526",
"revCount": 21, "revCount": 22,
"type": "git", "type": "git",
"url": "ssh://git@git.jan-leila.com/jan-leila/nix-config-secrets.git" "url": "ssh://git@git.jan-leila.com/jan-leila/nix-config-secrets.git"
}, },
@ -438,11 +418,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764021963, "lastModified": 1767826491,
"narHash": "sha256-1m84V2ROwNEbqeS9t37/mkry23GBhfMt8qb6aHHmjuc=", "narHash": "sha256-WSBENPotD2MIhZwolL6GC9npqgaS5fkM7j07V2i/Ur8=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "c482a1c1bbe030be6688ed7dc84f7213f304f1ec", "rev": "ea3adcb6d2a000d9a69d0e23cad1f2cacb3a9fbe",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -467,21 +447,6 @@
} }
}, },
"systems_2": { "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, "flake": false,
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,

View file

@ -4,10 +4,6 @@
config, config,
... ...
}: { }: {
options.programs.calibre = {
enable = lib.mkEnableOption "enable calibre";
};
config = lib.mkIf config.programs.calibre.enable (lib.mkMerge [ config = lib.mkIf config.programs.calibre.enable (lib.mkMerge [
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -46,5 +46,8 @@
./gdx-liftoff.nix ./gdx-liftoff.nix
./tor-browser.nix ./tor-browser.nix
./vmware-workstation.nix ./vmware-workstation.nix
./proton-mail-pwa.nix
./proton-calendar-pwa.nix
./matrix-cyberia-pwa.nix
]; ];
} }

View file

@ -4,14 +4,14 @@
config, config,
... ...
}: { }: {
options.programs.jetbrains.idea-community = { options.programs.jetbrains.idea-oss = {
enable = lib.mkEnableOption "enable idea-community"; 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; [ home.packages = with pkgs; [
jetbrains.idea-community jetbrains.idea-oss
]; ];
} }
( (

View file

@ -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;
};
}
)
]);
}

View file

@ -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;
};
}
)
]);
}

View file

@ -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;
};
}
)
]);
}

View file

@ -15,7 +15,8 @@
uids = { uids = {
leyla = 1000; leyla = 1000;
eve = 1002; eve = 1002;
ivy = 1004; # ester = 1003;
# ivy = 1004;
jellyfin = 2000; jellyfin = 2000;
forgejo = 2002; forgejo = 2002;
hass = 2004; hass = 2004;
@ -36,7 +37,8 @@
gids = { gids = {
leyla = 1000; leyla = 1000;
eve = 1002; eve = 1002;
ivy = 1004; # ester = 1003
# ivy = 1004;
users = 100; users = 100;
jellyfin_media = 2001; jellyfin_media = 2001;
jellyfin = 2000; jellyfin = 2000;
@ -59,7 +61,6 @@
users = config.users.users; users = config.users.users;
leyla = users.leyla.name; leyla = users.leyla.name;
eve = users.eve.name; eve = users.eve.name;
ivy = users.ivy.name;
in { in {
config = lib.mkMerge [ config = lib.mkMerge [
{ {
@ -97,10 +98,6 @@ in {
neededForUsers = true; neededForUsers = true;
sopsFile = "${inputs.secrets}/user-passwords.yaml"; 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; 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 = { jellyfin = {
uid = lib.mkForce uids.jellyfin; uid = lib.mkForce uids.jellyfin;
isSystemUser = true; isSystemUser = true;
@ -254,19 +238,11 @@ in {
]; ];
}; };
ivy = {
gid = lib.mkForce gids.ivy;
members = [
ivy
];
};
users = { users = {
gid = lib.mkForce gids.users; gid = lib.mkForce gids.users;
members = [ members = [
leyla leyla
eve eve
ivy
]; ];
}; };
@ -280,7 +256,6 @@ in {
users.lidarr.name users.lidarr.name
leyla leyla
eve eve
ivy
]; ];
}; };
@ -314,7 +289,6 @@ in {
users.syncthing.name users.syncthing.name
leyla leyla
eve eve
ivy
]; ];
}; };

View file

@ -89,11 +89,6 @@ in {
isDesktopUser = lib.mkDefault false; isDesktopUser = lib.mkDefault false;
isTerminalUser = lib.mkDefault false; isTerminalUser = lib.mkDefault false;
}; };
ivy = {
isPrincipleUser = lib.mkDefault false;
isDesktopUser = lib.mkDefault false;
isTerminalUser = lib.mkDefault false;
};
}; };
assertions = assertions =

@ -1 +1 @@
Subproject commit 444229a105445339fb028d15a8d866063c5f8141 Subproject commit 6e90a73ed2e1e81ba37628fc5e5494a80d22b526