admin: add group www
This commit is contained in:
parent
1e5e9b9dfd
commit
d9f629f3a9
5 changed files with 100 additions and 0 deletions
31
modules/home/workstation/gaming/options.nix
Normal file
31
modules/home/workstation/gaming/options.nix
Normal 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;
|
||||
};
|
||||
}
|
||||
55
modules/home/workstation/gaming/world-of-warcraft.nix
Normal file
55
modules/home/workstation/gaming/world-of-warcraft.nix
Normal 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 {
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
self',
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf elem;
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ in {
|
|||
"libvirtd"
|
||||
"streamer"
|
||||
"torrenter"
|
||||
"www"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
12
modules/nixos/base/builder.nix
Normal file
12
modules/nixos/base/builder.nix
Normal 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};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue