more progress

This commit is contained in:
Chris Kruining 2025-07-24 11:33:23 +02:00
parent ef6c049068
commit 2d0b2b5070
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
31 changed files with 256 additions and 487 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -0,0 +1,36 @@
{ config, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkDefault;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) nullOr enum;
cfg = config.${namespace}.themes;
in {
options.${namespace}.themes = {
enable = mkEnableOption "Theming (Stylix)";
theme = mkOption {
type = nullOr (enum [ "everforest" "catppuccin-latte" "chalk" ]);
default = "everforest";
description = "The theme to set the system to";
example = "everforest";
};
polarity = mkOption {
type = nullOr (enum [ "dark" "light" ]);
default = "dark";
description = "determine if system is in dark or light mode";
};
};
config = mkIf cfg.enable {
${namespace}.theming.enable = true;
stylix = {
base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml";
image = ./${cfg.theme}.jpg;
polarity = cfg.polarity;
targets.qt.platform = mkDefault "kde6";
};
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 KiB

View file

@ -8,7 +8,7 @@ in
{
options.${namespace} = {
preset = mkOption {
type = nullOr enum [ "server" "desktop" ];
type = nullOr (enum [ "server" "desktop" ]);
default = null;
example = "desktop";
description = "Which defaults profile to start with";
@ -27,14 +27,15 @@ in
animated = true;
};
desktop.use = "kde";
desktop.use = "plasma";
theming.enable = true;
};
})
(mkIf (cfg.preset == "server") {
${namespace} = mkDefault {
services = {
ssh.enable = true;
networking.ssh.enable = true;
};
};
})

View file

@ -1,4 +1,4 @@
{ lib, config, namespace, ... }:
{ lib, config, namespace, inputs, ... }:
let
inherit (lib) mkIf mkOption mkEnableOption mkMerge;
inherit (lib.types) nullOr enum;
@ -6,6 +6,10 @@ let
cfg = config.${namespace}.desktop;
in
{
imports = [
inputs.grub2-themes.nixosModules.default
];
options.${namespace}.desktop = {
use = mkOption {
type = nullOr (enum [ "plasma" "gamescope" "gnome" ]);
@ -28,8 +32,8 @@ in
};
})
(mkIf (cfg.use != null) {
${namespace}.desktop.${cfg.use}.enable = true;
})
# (mkIf (cfg.use != null) {
# ${namespace}.desktop.${cfg.use}.enable = true;
# })
];
}

View file

@ -1,4 +1,5 @@
{ lib, config, namespace, inputs, ... }:let
{ lib, config, namespace, inputs, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.desktop.gamescope;
@ -7,11 +8,13 @@ in
imports = [ inputs.jovian.nixosModules.default ];
options.${namespace}.desktop.gamescope = {
enable = mkEnableOption "Enable Steamdeck ui";
enable = mkEnableOption "Enable Steamdeck ui" // {
default = (config.${namespace}.desktop.use == "gamescope");
};
};
config = mkIf cfg.enable {
"${namespace}".desktop.kde.enable = true;
${namespace}.desktop.plasma.enable = true;
jovian = {
steam = {

View file

@ -1,11 +1,14 @@
{ lib, config, namespace, ... }:let
{ lib, config, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.desktop.gnome;
in
{
options.${namespace}.desktop.gnome = {
enable = mkEnableOption "Enable Gnome";
enable = mkEnableOption "Enable Gnome" // {
default = (config.${namespace}.desktop.use == "gnome");
};
};
config = mkIf cfg.enable {

View file

@ -1,11 +1,14 @@
{ pkgs, lib, config, namespace, ... }:let
{ pkgs, lib, config, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.desktop.plasma;
in
{
options.${namespace}.desktop.plasma = {
enable = mkEnableOption "Enable KDE Plasma";
enable = mkEnableOption "Enable KDE Plasma" // {
default = (config.${namespace}.desktop.use == "plasma");
};
};
config = mkIf cfg.enable {

View file

@ -2,12 +2,12 @@
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.hardware.has.gpu.amd;
cfg = config.${namespace}.hardware.has.gpu;
in
{
options.${namespace}.hardware.has.gpu.amd = mkEnableOption "Enable AMD gpu configuration";
config = mkIf cfg {
config = mkIf cfg.amd {
services.xserver.videoDrivers = [ "amd" ];
hardware = {

View file

@ -40,12 +40,6 @@ in
yt-dlp
];
# need to permit these outdated packages until servarr finally upgrades at some point...
permittedInsecurePackages = [
"dotnet-sdk-6.0.428"
"aspnetcore-runtime-6.0.36"
];
#=========================================================================
# Prepare system
#=========================================================================
@ -58,14 +52,14 @@ in
};
systemd.tmpfiles.rules = [
"d '${cfg.directory}/series' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.directory}/movies' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.directory}/music' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.directory}/qbittorrent' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.directory}/sabnzbd' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.directory}/reiverr/config' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.directory}/downloads/incomplete' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.directory}/downloads/done' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.path}/series' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.path}/movies' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.path}/music' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.path}/qbittorrent' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.path}/sabnzbd' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.path}/reiverr/config' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.path}/downloads/incomplete' 0700 ${cfg.user} ${cfg.group} - -"
"d '${cfg.path}/downloads/done' 0700 ${cfg.user} ${cfg.group} - -"
];
#=========================================================================
@ -98,8 +92,11 @@ in
qbittorrent = {
enable = true;
openFirewall = true;
dataDir = "${cfg.directory}/qbittorrent";
port = 5000;
webuiPort = 5000;
serverConfig = {
LegalNotice.Accepted = true;
};
user = cfg.user;
group = cfg.group;
@ -108,7 +105,7 @@ in
sabnzbd = {
enable = true;
openFirewall = true;
configFile = "${cfg.directory}/sabnzbd/config.ini";
configFile = "${cfg.path}/sabnzbd/config.ini";
user = cfg.user;
group = cfg.group;
@ -131,7 +128,7 @@ in
systemd.services.jellyfin.serviceConfig.killSignal = lib.mkForce "SIGKILL";
modules.virtualisation.podman.enable = true;
${namespace}.services.virtualisation.podman.enable = true;
virtualisation = {
oci-containers = {
@ -148,7 +145,7 @@ in
image = "ghcr.io/aleksilassila/reiverr:v2.2.0";
autoStart = true;
ports = [ "127.0.0.1:9494:9494" ];
volumes = [ "${cfg.directory}/reiverr/config:/config" ];
volumes = [ "${cfg.path}/reiverr/config:/config" ];
};
};
};

View file

@ -0,0 +1,23 @@
{ config, options, lib, pkgs, namespace, ... }:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.services.virtualisation.podman;
in
{
options.${namespace}.services.virtualisation.podman = {
enable = mkEnableOption "enable podman";
};
config = mkIf cfg.enable {
virtualisation = {
containers.enable = true;
podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
};
};
}