admin: add group www

This commit is contained in:
ooks-io 2024-11-01 12:47:49 +11:00
parent 1e5e9b9dfd
commit d9f629f3a9
5 changed files with 100 additions and 0 deletions

View file

@ -0,0 +1,31 @@
{
lib,
config,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption;
inherit (lib.types) str;
cfg = config.ooknet.gaming;
in {
options.ooknet.gaming = {
enable = mkEnableOption;
gamesPath = mkOption {
type = str;
default = "${config.home.homeDirectory}/Games";
description = "Location where games will be stored.";
};
prefixPath = mkOption {
type = str;
default = "${cfg.gamesPath}/prefixes";
};
compatDataPath = mkOption {
type = str;
default = "${cfg.prefixPath}/compatdata";
};
};
config = mkIf cfg.enable {
xdg.userDirs.XDG_GAMES_DIR = cfg.gamesPath;
};
}

View file

@ -0,0 +1,55 @@
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption;
inherit (lib.types) str package;
inherit (config.ooknet) gaming;
gamesDir = config.xdg.userDirs.extraConfig.XDG_GAMES_DIR;
cfg = config.ooknet.gaming.world-of-warcraft;
in {
options.ooknet.gaming.world-of-warcraft = {
enable = mkEnableOption "Enable the World of Warcraft module";
proton = {
package = mkOption {
type = package;
default = pkgs.proton-ge-custom;
};
prefix = {
path = mkOption {
type = str;
default = "${gaming.prefixPath}/WoW";
};
};
compatDataPath = mkOption {
type = str;
default = "${gaming.compatDataPath}/";
};
};
gamePrefixPath = mkOption {
type = str;
default = "${cfg.winePrefixesPath}/WoW";
description = "Location where the World of Warcraft prefix will be stored.";
};
gamePath = mkOption {
type = str;
default = "${cfg.world-of-warcraft.gamePrefixPath}/drive_c/Program Files (x86)/World of Warcraft";
description = "Location where the World of Warcraft installation will be symlinked.";
};
gameSharedPath = mkOption {
type = str;
default = "${cfg.wineProgramsPath}/World Of Warcraft";
description = "Location where World of Warcraft game files are stored.";
};
};
config =
mkIf cfg.enable {
};
}

View file

@ -2,6 +2,7 @@
lib,
osConfig,
pkgs,
self',
...
}: let
inherit (lib) mkIf elem;

View file

@ -30,6 +30,7 @@ in {
"libvirtd"
"streamer"
"torrenter"
"www"
];
};
};

View file

@ -0,0 +1,12 @@
{
keys,
config,
...
}: let
inherit (config.ooknet.host) admin;
in {
users = {
groups.builder = {};
users.builder = (key: ''command="nix-daemon --stdio",no-agent-forwarding,no-port-forwarding,no-pty,no-user-rc,no-X11-forwarding ${key}'') keys.users.${admin.name};
};
}