code rules
All checks were successful
MCP Tests / mcp-tests (push) Successful in 19s

This commit is contained in:
Danilo Reyes
2026-03-23 15:49:51 -06:00
parent 32729627b1
commit 66483c89ac
75 changed files with 530 additions and 512 deletions

View File

@@ -37,6 +37,7 @@ let
in
{
options.my = {
dev.gameDev.enable = lib.mkEnableOption "game development tools and engines";
apps.art = {
enable = lib.mkEnableOption "digital art and creative applications";
users = lib.mkOption {
@@ -45,7 +46,6 @@ in
description = "Users to install art packages for";
};
};
dev.gameDev.enable = lib.mkEnableOption "game development tools and engines";
};
config.users.users =
let

View File

@@ -21,8 +21,8 @@ let
);
in
{
imports = [ inputs.nix-gaming.nixosModules.platformOptimizations ];
options.my.apps = {
switch.enable = lib.mkEnableOption "Nintendo Switch homebrew tools";
gaming = {
enable = lib.mkEnableOption "gaming applications and emulators";
users = lib.mkOption {
@@ -31,8 +31,8 @@ in
description = "Users to install gaming packages for";
};
};
switch.enable = lib.mkEnableOption "Nintendo Switch homebrew tools";
};
imports = [ inputs.nix-gaming.nixosModules.platformOptimizations ];
config = lib.mkIf config.my.apps.gaming.enable {
# sops.secrets.switch-presence = lib.mkIf config.my.apps.gaming.switch.enable {
# sopsFile = ../../secrets/env.yaml;
@@ -40,16 +40,6 @@ in
# owner = config.users.users.jawz.name;
# inherit (config.users.users.jawz) group;
# };
programs = {
gamemode.enable = true;
steam = {
enable = true;
gamescopeSession.enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
platformOptimizations.enable = true;
};
};
services = lib.mkIf config.my.apps.switch.enable {
switch-boot.enable = true;
# switch-presence = {
@@ -80,5 +70,15 @@ in
};
in
inputs.self.lib.mkUserPackages lib config.my.apps.gaming.users packages;
programs = {
gamemode.enable = true;
steam = {
enable = true;
gamescopeSession.enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
platformOptimizations.enable = true;
};
};
};
}

View File

@@ -19,6 +19,13 @@ let
];
};
cfg = config.my.apps.internet;
krisp-patch = builtins.readFile (
pkgs.fetchurl {
url = "https://pastebin.com/raw/8tQDsMVd";
sha256 = "sha256-IdXv0MfRG1/1pAAwHLS2+1NESFEz2uXrbSdvU9OvdJ8=";
}
);
krisp-patcher = pkgs.writers.writePython3Bin "krisp-patcher" krisp-settings krisp-patch;
krisp-settings = {
libraries = builtins.attrValues {
inherit (pkgs.python3Packages)
@@ -32,13 +39,6 @@ let
"F405"
];
};
krisp-patch = builtins.readFile (
pkgs.fetchurl {
url = "https://pastebin.com/raw/8tQDsMVd";
sha256 = "sha256-IdXv0MfRG1/1pAAwHLS2+1NESFEz2uXrbSdvU9OvdJ8=";
}
);
krisp-patcher = pkgs.writers.writePython3Bin "krisp-patcher" krisp-settings krisp-patch;
in
{
options.my.apps.internet.enable = lib.mkEnableOption "internet browsers and communication apps";

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.cc = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "C/C++ development shell";
};
my.dev.cc = {
enable = lib.mkEnableOption "Install C/C++ tooling globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install C/C++ packages for";
};
};
devShells.cc = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "C/C++ development shell";
};
};
}

View File

@@ -28,8 +28,10 @@ in
my.dev.docker.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
home.sessionVariables.DOCKER_CONFIG = "${config.xdg.configHome}/docker";
home = {
inherit (feature) packages;
sessionVariables.DOCKER_CONFIG = "${config.xdg.configHome}/docker";
};
})
];
}

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.docker = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Docker and Dockerfile tooling shell";
};
my.dev.docker = {
enable = lib.mkEnableOption "Install Docker tooling globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install Docker packages for";
};
};
devShells.docker = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Docker and Dockerfile tooling shell";
};
};
}

View File

@@ -25,8 +25,8 @@ let
};
in
{
imports = [ inputs.doom-emacs.homeModule ];
options.my.emacs.enable = lib.mkEnableOption "Doom Emacs configuration";
imports = [ inputs.doom-emacs.homeModule ];
config = lib.mkMerge [
{
my.emacs.enable = lib.mkDefault hm.enabledByDefault;

View File

@@ -5,8 +5,8 @@
}:
let
emacs = import ./common.nix {
lib = pkgs.lib;
inherit pkgs;
lib = pkgs.lib;
stylixEnabled = false;
emacsExtraConfig = "";
emacsExtraPackages = _epkgs: [ ];
@@ -41,21 +41,21 @@ let
../../../modules/home-manager.nix
../../../config/home-manager.nix
{
programs.home-manager.enable = true;
nixpkgs.config.allowUnfree = true;
home = {
username = "portable";
homeDirectory = if pkgs.stdenv.isDarwin then "/Users/portable" else "/home/portable";
stateVersion = "23.05";
};
programs.home-manager.enable = true;
nixpkgs.config.allowUnfree = true;
my = {
emacs.enable = true;
shell.tools.enable = true;
dev = {
nix.enable = true;
python.enable = true;
sh.enable = true;
};
shell.tools.enable = true;
};
}
];

View File

@@ -28,8 +28,10 @@ in
my.dev.go.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
home.sessionVariables.GOPATH = "${config.xdg.dataHome}/go";
home = {
inherit (feature) packages;
sessionVariables.GOPATH = "${config.xdg.dataHome}/go";
};
})
];
}

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.go = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Go development shell with Emacs tooling, REPL, formatter, and linter";
};
my.dev.go = {
enable = lib.mkEnableOption "Install Go tooling globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install Go packages for";
};
};
devShells.go = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Go development shell with Emacs tooling, REPL, formatter, and linter";
};
};
}

View File

@@ -28,11 +28,13 @@ in
my.dev.haskell.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
home.sessionVariables = {
CABAL_DIR = "${config.xdg.cacheHome}/cabal";
STACK_ROOT = "${config.xdg.dataHome}/stack";
GHCUP_USE_XDG_DIRS = "true";
home = {
inherit (feature) packages;
sessionVariables = {
CABAL_DIR = "${config.xdg.cacheHome}/cabal";
STACK_ROOT = "${config.xdg.dataHome}/stack";
GHCUP_USE_XDG_DIRS = "true";
};
};
})
];

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.haskell = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Haskell development shell";
};
my.dev.haskell = {
enable = lib.mkEnableOption "Install Haskell tooling globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install Haskell packages for";
};
};
devShells.haskell = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Haskell development shell";
};
};
}

View File

@@ -14,12 +14,12 @@ in
echo "📦 JavaScript dev environment"
'';
};
sessionVariables = {
NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc";
PNPM_HOME = "\${XDG_DATA_HOME}/pnpm";
};
sessionPath = [
"\${XDG_DATA_HOME}/npm/bin"
"\${XDG_DATA_HOME}/pnpm"
];
sessionVariables = {
NPM_CONFIG_USERCONFIG = "\${XDG_CONFIG_HOME}/npm/npmrc";
PNPM_HOME = "\${XDG_DATA_HOME}/pnpm";
};
}

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.javascript = lib.mkOption {
type = lib.types.package;
default = javascript.devShell;
description = "JavaScript/Node development shell with npm/pnpm support";
};
my.dev.javascript = {
enable = lib.mkEnableOption "Install JavaScript tooling globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install JavaScript packages for";
};
};
devShells.javascript = lib.mkOption {
type = lib.types.package;
default = javascript.devShell;
description = "JavaScript/Node development shell with npm/pnpm support";
};
};
}

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.julia = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Julia development shell";
};
my.dev.julia = {
enable = lib.mkEnableOption "Install Julia globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install Julia packages for";
};
};
devShells.julia = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Julia development shell";
};
};
}

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.mcp = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "MCP dev shell for this repo";
};
my.dev.mcp = {
enable = lib.mkEnableOption "Install MCP tooling globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install MCP packages for";
};
};
devShells.mcp = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "MCP dev shell for this repo";
};
};
}

View File

@@ -13,6 +13,11 @@ let
in
{
options = {
devShells.nix = lib.mkOption {
type = lib.types.package;
default = nix.devShell;
description = "Nix/NixOS development shell with formatter, linter, LSP, and Cachix";
};
my.dev.nix = {
enable = lib.mkEnableOption "Install Nix tooling globally";
users = lib.mkOption {
@@ -21,10 +26,5 @@ in
description = "Users to install Nix packages for";
};
};
devShells.nix = lib.mkOption {
type = lib.types.package;
default = nix.devShell;
description = "Nix/NixOS development shell with formatter, linter, LSP, and Cachix";
};
};
}

View File

@@ -10,6 +10,10 @@ let
in
{
options = {
devShells.python = lib.mkOption {
type = lib.types.package;
default = python.devShell;
};
my.dev.python = {
enable = lib.mkEnableOption "Install Python tools globally";
users = lib.mkOption {
@@ -18,9 +22,5 @@ in
description = "Users to install Python packages for";
};
};
devShells.python = lib.mkOption {
type = lib.types.package;
default = python.devShell;
};
};
}

View File

@@ -28,11 +28,13 @@ in
my.dev.ruby.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
home.sessionVariables = {
GEM_HOME = "${config.xdg.dataHome}/ruby/gems";
GEM_PATH = "${config.xdg.dataHome}/ruby/gems";
GEM_SPEC_CACHE = "${config.xdg.dataHome}/ruby/specs";
home = {
inherit (feature) packages;
sessionVariables = {
GEM_HOME = "${config.xdg.dataHome}/ruby/gems";
GEM_PATH = "${config.xdg.dataHome}/ruby/gems";
GEM_SPEC_CACHE = "${config.xdg.dataHome}/ruby/specs";
};
};
})
];

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.ruby = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Ruby development shell with interpreter and Solargraph LSP";
};
my.dev.ruby = {
enable = lib.mkEnableOption "Install Ruby tooling globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install Ruby packages for";
};
};
devShells.ruby = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Ruby development shell with interpreter and Solargraph LSP";
};
};
}

View File

@@ -28,8 +28,10 @@ in
my.dev.rust.enable = lib.mkDefault hm.enabledByDefault;
}
(lib.mkIf cfg.enable {
home.packages = feature.packages;
home.sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
home = {
inherit (feature) packages;
sessionVariables.CARGO_HOME = "${config.xdg.dataHome}/cargo";
};
})
];
}

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.rust = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Rust development shell with cargo and rust-analyzer";
};
my.dev.rust = {
enable = lib.mkEnableOption "Install Rust tooling globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install Rust packages for";
};
};
devShells.rust = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Rust development shell with cargo and rust-analyzer";
};
};
}

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.sh = lib.mkOption {
type = lib.types.package;
default = sh.devShell;
description = "Shell scripting dev shell";
};
my.dev.sh = {
enable = lib.mkEnableOption "Install shell scripting tools globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install shell scripting packages for";
};
};
devShells.sh = lib.mkOption {
type = lib.types.package;
default = sh.devShell;
description = "Shell scripting dev shell";
};
};
}

View File

@@ -10,6 +10,11 @@ let
in
{
options = {
devShells.zig = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Zig development shell with compiler and LSP";
};
my.dev.zig = {
enable = lib.mkEnableOption "Install Zig tooling globally";
users = lib.mkOption {
@@ -18,10 +23,5 @@ in
description = "Users to install Zig packages for";
};
};
devShells.zig = lib.mkOption {
type = lib.types.package;
default = feature.devShell;
description = "Zig development shell with compiler and LSP";
};
};
}

View File

@@ -65,41 +65,43 @@
lib.mkMerge (
lib.mapAttrsToList (user: packages: inputs.self.lib.mkUserPackages lib user packages) userMap
);
systemd.user.services =
config.my.scripts
|> lib.mapAttrs' (
_name: script:
lib.nameValuePair "${script.name}" (
lib.mkIf (script.enable && script.service) {
restartIfChanged = true;
inherit (script) description;
wantedBy = [ "default.target" ];
path = [
pkgs.nix
script.package
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart = "${script.package}/bin/${script.name}";
};
}
)
);
systemd.user.timers =
config.my.scripts
|> lib.mapAttrs' (
_name: script:
lib.nameValuePair "${script.name}" (
lib.mkIf (script.enable && script.service) {
enable = true;
inherit (script) description;
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = script.timer;
};
}
)
);
systemd.user = {
services =
config.my.scripts
|> lib.mapAttrs' (
_name: script:
lib.nameValuePair "${script.name}" (
lib.mkIf (script.enable && script.service) {
restartIfChanged = true;
inherit (script) description;
wantedBy = [ "default.target" ];
path = [
pkgs.nix
script.package
];
serviceConfig = {
Restart = "on-failure";
RestartSec = 30;
ExecStart = "${script.package}/bin/${script.name}";
};
}
)
);
timers =
config.my.scripts
|> lib.mapAttrs' (
_name: script:
lib.nameValuePair "${script.name}" (
lib.mkIf (script.enable && script.service) {
enable = true;
inherit (script) description;
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = script.timer;
};
}
)
);
};
};
}

View File

@@ -53,6 +53,7 @@ in
};
ips = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
description = "Set of IP's for all my computers.";
default = {
router = "192.168.100.1";
server = "192.168.100.15";
@@ -73,35 +74,34 @@ in
wg-friend5 = "10.8.0.6";
wg-friend6 = "10.8.0.7";
};
description = "Set of IP's for all my computers.";
};
subnets = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
description = "Set of subnets for WireGuard networks.";
default = {
wg-homelab = "10.77.0.0/24";
wg-friends = "10.8.0.0/24";
wg-guests = "10.9.0.0/24";
};
description = "Set of subnets for WireGuard networks.";
};
wgInterfaces = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
description = "WireGuard interface IPs for the VPS.";
default = {
wg-homelab = "10.77.0.1/24";
wg-friends = "10.8.0.1/24";
wg-guests = "10.9.0.1/24";
};
description = "WireGuard interface IPs for the VPS.";
};
interfaces = lib.mkOption {
type = lib.types.attrsOf lib.types.str;
description = "Set of network interface names for all my computers.";
default = {
server = "enp0s31f6";
miniserver = "enp2s0";
workstation = "enp5s0";
vps = "eth0";
};
description = "Set of network interface names for all my computers.";
};
mainServer = lib.mkOption {
type = lib.types.str;
@@ -130,6 +130,7 @@ in
};
ports = lib.mkOption {
type = lib.types.attrsOf lib.types.port;
description = "Common port assignments for local services and firewall rules.";
default = {
comfyui = 8188;
giteaSsh = 22;
@@ -147,7 +148,6 @@ in
wg = 51820;
ssh = 3456;
};
description = "Common port assignments for local services and firewall rules.";
};
email = lib.mkOption {
type = lib.types.str;
@@ -168,6 +168,7 @@ in
};
toggleUsers = lib.mkOption {
type = lib.types.attrsOf (lib.types.either lib.types.str (lib.types.listOf lib.types.str));
description = "Map toggle categories to users. Can be a single user (string) or multiple users (list). Determines which user(s) get packages from each toggle category.";
default = {
apps = "jawz";
dev = "jawz";
@@ -176,7 +177,6 @@ in
services = "jawz";
stylix = "jawz";
};
description = "Map toggle categories to users. Can be a single user (string) or multiple users (list). Determines which user(s) get packages from each toggle category.";
example = {
apps = "jawz";
dev = "bearded_dragonn";

View File

@@ -30,8 +30,8 @@
description = "Maximum number of parallel jobs (null = auto-detect)";
};
};
config = {
nix.settings = lib.mkMerge [
config.nix = {
settings = lib.mkMerge [
{
system-features = config.my.nix.features;
}
@@ -42,6 +42,6 @@
max-jobs = config.my.nix.maxJobs;
})
];
nix.buildMachines = lib.mkIf (config.my.nix.buildMachines != [ ]) config.my.nix.buildMachines;
buildMachines = lib.mkIf (config.my.nix.buildMachines != [ ]) config.my.nix.buildMachines;
};
}

View File

@@ -12,8 +12,8 @@ let
inputs.self.lib.hmOnlyUser config osConfig "jawz"
&& (osConfig.my.units.download.enable || osConfig.my.units.downloadManga.enable);
download = import ./common.nix {
config = if osConfig == null then { } else osConfig;
inherit inputs lib pkgs;
config = if osConfig == null then { } else osConfig;
};
in
{

View File

@@ -11,13 +11,13 @@ in
options.my.servers.drpp = setup.mkOptions "drpp" "drpp" 0;
config.virtualisation.oci-containers.containers.drpp = lib.mkIf cfg.enable {
image = "ghcr.io/phin05/discord-rich-presence-plex:latest";
environment = {
DRPP_UID = toString config.users.users.jawz.uid;
DRPP_GID = toString config.users.groups.users.gid;
};
volumes = [
"${config.my.containerData}/drpp:/app/data"
"/run/user/${toString config.users.users.jawz.uid}:/run/app"
];
environment = {
DRPP_UID = toString config.users.users.jawz.uid;
DRPP_GID = toString config.users.groups.users.gid;
};
};
}

View File

@@ -15,9 +15,7 @@ in
flameSecret = setup.mkOptions "flameSecret" "qampqwn4wprhqny8h8zj" 5007;
};
config = lib.mkIf enable {
sops.secrets = {
flame.sopsFile = ../../secrets/env.yaml;
};
sops.secrets.flame.sopsFile = ../../secrets/env.yaml;
virtualisation.oci-containers.containers = lib.mkIf enable {
flame = lib.mkIf cfg.enable {
autoStart = true;

View File

@@ -9,11 +9,11 @@ let
cfg = config.my.servers.gitea;
in
{
options.my.servers.gitea = setup.mkOptions "gitea" "git" 9083;
imports = [
../nix/gitea-actions-runners/nixos.nix
../nix/gitea-actions-runners/docker.nix
];
options.my.servers.gitea = setup.mkOptions "gitea" "git" 9083;
config = lib.mkIf (cfg.enable && config.my.secureHost) {
sops.secrets.gitea.sopsFile = ../../secrets/env.yaml;
users.groups.gitea.gid = 974;

View File

@@ -154,8 +154,8 @@
icon = "${name}.png";
href = url;
widget = {
type = name;
inherit url;
type = name;
username = "{{HOMEPAGE_VAR_QBIT_USERNAME}}";
password = "{{HOMEPAGE_VAR_QBIT_PASSWORD}}";
};
@@ -169,8 +169,8 @@
icon = "${name}.png";
href = url;
widget = {
type = name;
inherit url;
type = name;
key = "{{HOMEPAGE_VAR_SABNZBD}}";
};
};
@@ -231,9 +231,9 @@
icon = "paperless.png";
href = url;
widget = {
inherit url;
type = name;
key = "{{HOMEPAGE_VAR_PAPERLESS}}";
inherit url;
fields = [
"total"
"inbox"
@@ -262,9 +262,9 @@
icon = "${name}.png";
href = url;
widget = {
inherit url;
type = name;
key = "{{HOMEPAGE_VAR_STASH}}";
inherit url;
fields = [
"scenes"
"images"

View File

@@ -22,14 +22,12 @@
{
openweathermap = {
label = "Apodaca";
format.maximumFractionDigits = 1;
latitude = 25.760339;
longitude = -100.2190662;
units = "metric";
provider = "openweathermap";
cache = 5;
format = {
maximumFractionDigits = 1;
};
};
}
]

View File

@@ -54,11 +54,9 @@ in
};
timers.sub-sync = {
enable = true;
timerConfig.OnCalendar = "20:00";
description = "syncronizes subtitles downloaded & modified today";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "20:00";
};
};
};
})

View File

@@ -13,11 +13,6 @@ in
autoStart = true;
image = "linuxserver/lidarr:latest";
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
environment = {
TZ = config.my.timeZone;
PUID = toString config.users.users.jawz.uid;
PGID = toString config.users.groups.piracy.gid;
};
volumes = [
"/srv/pool/multimedia:/data"
"/srv/pool/multimedia/media/Music:/music"
@@ -31,5 +26,10 @@ in
extraOptions = [
"--network=host"
];
environment = {
TZ = config.my.timeZone;
PUID = toString config.users.users.jawz.uid;
PGID = toString config.users.groups.piracy.gid;
};
};
}

View File

@@ -15,6 +15,7 @@ in
image = "krateng/maloja:latest";
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
environmentFiles = [ config.sops.secrets.maloja.path ];
volumes = [ "${config.my.containerData}/maloja:/mljdata" ];
environment = {
TZ = config.my.timeZone;
MALOJA_TIMEZONE = "-6";
@@ -23,7 +24,6 @@ in
MALOJA_DATA_DIRECTORY = "/mljdata";
MALOJA_SKIP_SETUP = "true";
};
volumes = [ "${config.my.containerData}/maloja:/mljdata" ];
};
};
}

View File

@@ -15,6 +15,7 @@ in
image = "foxxmd/multi-scrobbler:latest";
ports = [ "${toString cfg.port}:${toString cfg.port}" ];
environmentFiles = [ config.sops.secrets.multi-scrobbler.path ];
volumes = [ "${config.my.containerData}/multi-scrobbler:/config" ];
environment = {
TZ = config.my.timeZone;
PUID = toString config.users.users.jawz.uid;
@@ -25,7 +26,6 @@ in
PLEX_URL = "http://192.168.100.15:32400";
WS_ENABLE = "true";
};
volumes = [ "${config.my.containerData}/multi-scrobbler:/config" ];
};
};
}

View File

@@ -21,8 +21,8 @@ let
version = "12.70";
in
{
pname = "Image-ExifTool";
inherit version;
pname = "Image-ExifTool";
src = pkgs.fetchurl {
url = "https://exiftool.org/Image-ExifTool-${version}.tar.gz";
hash = "sha256-TLJSJEXMPj870TkExq6uraX8Wl4kmNerrSlX3LQsr/4=";
@@ -54,7 +54,9 @@ in
"openssl-1.1.1v"
];
users = {
groups.nextcloud = { inherit gid; };
groups.nextcloud = {
inherit gid;
};
users.nextcloud = {
inherit uid;
isSystemUser = true;
@@ -189,20 +191,24 @@ in
go-vod = lib.mkIf config.my.servers.go-vod.enable {
autoStart = true;
image = "radialapps/go-vod:latest";
volumes = [ "ncdata:/var/www/html:ro" ];
extraOptions = [
"--device=/dev/dri" # VA-API (omit for NVENC)
];
environment = {
TZ = config.my.timeZone;
NEXTCLOUD_HOST = "https://${config.services.nextcloud.hostName}";
NVIDIA_VISIBLE_DEVICES = "all";
};
volumes = [ "ncdata:/var/www/html:ro" ];
extraOptions = [
"--device=/dev/dri" # VA-API (omit for NVENC)
];
};
collabora = lib.mkIf cfgC.enable {
autoStart = true;
image = "collabora/code:latest";
ports = [ "${toString cfgC.port}:${toString cfgC.port}" ];
extraOptions = [
"--cap-add"
"MKNOD"
];
environment = {
TZ = config.my.timeZone;
domain = cfg.host;
@@ -219,10 +225,6 @@ in
DONT_GEN_SSL_CERT = "1";
SLEEPFORDEBUGGER = "0";
};
extraOptions = [
"--cap-add"
"MKNOD"
];
};
};
systemd = lib.mkIf cfg.enableCron {
@@ -248,11 +250,9 @@ in
};
timers.nextcloud-cronjob = {
enable = true;
timerConfig.OnCalendar = "*:0/10";
description = "Runs various nextcloud-related cronjobs";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "*:0/10";
};
};
};
})

View File

@@ -99,16 +99,6 @@ in
};
user = {
services = {
qbit_manage = {
restartIfChanged = true;
description = "Tidy up my torrents";
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "oneshot";
TimeoutStartSec = "5min";
ExecStart = "${qbit_manageEnv}/bin/python ${qbit_manage}/qbit_manage.py -r -c /home/jawz/.config/qbit_manage/config.yml";
};
};
unpackerr = lib.mkIf config.my.servers.unpackerr.enable {
enable = true;
restartIfChanged = true;
@@ -130,6 +120,16 @@ in
ExecStart = "${pkgs.unpackerr}/bin/unpackerr";
};
};
qbit_manage = {
restartIfChanged = true;
description = "Tidy up my torrents";
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "oneshot";
TimeoutStartSec = "5min";
ExecStart = "${qbit_manageEnv}/bin/python ${qbit_manage}/qbit_manage.py -r -c /home/jawz/.config/qbit_manage/config.yml";
};
};
};
timers.qbit_manage = {
enable = true;

View File

@@ -15,13 +15,13 @@ in
image = "ghcr.io/ignisda/ryot:v10";
ports = [ "${toString cfg.port}:8000" ];
environmentFiles = [ config.sops.secrets.ryot.path ];
volumes = [ "${config.my.postgresSocket}:${config.my.postgresSocket}" ];
environment = {
RUST_LOG = "ryot=debug,sea_orm=debug";
TZ = config.my.timeZone;
DATABASE_URL = "postgres:///ryot?host=${config.my.postgresSocket}";
FRONTEND_INSECURE_COOKIES = "true";
};
volumes = [ "${config.my.postgresSocket}:${config.my.postgresSocket}" ];
};
};
}

View File

@@ -28,8 +28,12 @@ in
config = lib.mkMerge [
(lib.mkIf (cfg.enable && config.my.secureHost) {
my.servers = {
synapse = { inherit domain; };
element = { inherit domain; };
synapse = {
inherit domain;
};
element = {
inherit domain;
};
};
users.groups.matrix-synapse = { inherit gid; };
users.users.matrix-synapse = {

View File

@@ -17,8 +17,8 @@ let
version ? "git",
}:
pkgs.stdenvNoCC.mkDerivation {
name = "${libname}-${version}";
inherit src;
name = "${libname}-${version}";
installPhase = ''
runHook preInstall
mkdir -p "$out/lib/haxe/${withCommas libname}/${withCommas version}"

View File

@@ -18,6 +18,7 @@ in
ports = [ "${toString cfg.port}:8000" ];
dependsOn = [ "yamtrack-redis" ];
environmentFiles = [ config.sops.secrets.yamtrack.path ];
volumes = [ "${config.my.postgresSocket}:${config.my.postgresSocket}" ];
environment = {
TZ = config.my.timeZone;
URLS = cfg.url;
@@ -31,7 +32,6 @@ in
REDIS_URL = "redis://yamtrack-redis:6379/0";
SOCIAL_PROVIDERS = "allauth.socialaccount.providers.openid_connect";
};
volumes = [ "${config.my.postgresSocket}:${config.my.postgresSocket}" ];
};
};
};

View File

@@ -38,18 +38,6 @@ in
"${config.my.localhost6}:53"
]
++ lib.optionals config.my.services.wireguard.enable wgListenAddrs;
query_log = {
file = "/var/lib/dnscrypt-proxy/query.log";
format = "tsv";
};
sources.public-resolvers = {
urls = [
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
];
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
};
server_names = [
"adfilter-adl"
"adfilter-adl-ipv6"
@@ -65,6 +53,18 @@ in
"quad9-dnscrypt-ip6-filter-pri"
"ibksturm"
];
query_log = {
file = "/var/lib/dnscrypt-proxy/query.log";
format = "tsv";
};
sources.public-resolvers = {
urls = [
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
];
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
};
};
};
};

View File

@@ -29,8 +29,10 @@
open = config.networking.hostName == "workstation";
package = config.boot.kernelPackages.nvidiaPackages.stable;
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
powerManagement = {
enable = true;
finegrained = false;
};
};
};
};

View File

@@ -11,10 +11,12 @@
security.rtkit.enable = true; # make pipewire realtime-capable
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
wireplumber.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
# lowLatency = {
# enable = true;
# quantum = 64;

View File

@@ -49,10 +49,6 @@ in
relaysEnabled = false;
globalAnnounceEnabled = false;
};
gui = {
user = "jawz";
password = config.sops.secrets.syncthing_password.path;
};
devices =
let
mkWgDevice = name: id: {
@@ -75,6 +71,10 @@ in
wg-friend4 = mkWgDevice "wg-friend4" "7YPUQ4Y-2UVEAXI-KBQVU7R-B6R5O36-GDQPTOY-3R3OG7H-BVWVOTD-EX52VQM";
wg-friend6 = mkWgDevice "wg-friend6" "STQGYJV-YNFX6PB-NK63JBV-7HS74L4-AMF2QWA-KAFLXZA-3FELLSB-TE65ZQI";
};
gui = {
user = "jawz";
password = config.sops.secrets.syncthing_password.path;
};
folders = {
cache = mkMobile "~/Downloads/cache/";
friends = mkMobile "~/Pictures/Artist/friends/";

View File

@@ -11,9 +11,7 @@ let
'';
in
{
options.my.websites.lidarrMbReport = {
enableProxy = lib.mkEnableOption "lidarr mb report static site";
};
options.my.websites.lidarrMbReport.enableProxy = lib.mkEnableOption "lidarr mb report static site";
config = lib.mkIf (cfg.enableProxy && config.my.enableProxy) {
services.nginx.virtualHosts."mb-report.lebubu.org" = {
forceSSL = true;

View File

@@ -57,9 +57,7 @@ let
};
in
{
options.my.websites.portfolio = {
enableProxy = lib.mkEnableOption "portfolio and blog static sites";
};
options.my.websites.portfolio.enableProxy = lib.mkEnableOption "portfolio and blog static sites";
config = lib.mkIf (cfg.enableProxy && config.my.enableProxy) {
services.nginx.virtualHosts = {
"www.danilo-reyes.com" = {