nixos/home/app/nixos.nix
2025-01-13 11:52:09 +08:00

44 lines
720 B
Nix

{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.users;
in
{
options.users.home.persistApp = {
files = mkOption {
type =
with types;
listOf (oneOf [
str
(attrsOf str)
]);
default = [ ];
};
directories = mkOption {
type =
with types;
listOf (oneOf [
str
(attrsOf str)
]);
default = [ ];
};
};
config = {
users.profiles.app = {
uid = 5800;
description = "Insecure Applications";
picture = ../picture/app.png;
};
# extra persistence specific to the app user
environment.persistence."/nix/persist".users.app = cfg.home.persistApp;
};
}