feat: massive refactor

This commit is contained in:
2025-12-20 12:57:47 +08:00
parent f4c1b313ce
commit 454ad5885d
97 changed files with 1023 additions and 960 deletions

View File

@@ -1,13 +1,13 @@
{ config, lib, ... }:
lib.my.makeSwitch {
inherit config;
optionName = "all desktop media things";
optionPath = [
"desktop"
"media"
"all"
];
config' = {
let
cfg = config.my.desktop.media.all;
in
{
options.my.desktop.media.all = {
enable = lib.mkEnableOption "all desktop media things";
};
config = lib.mkIf cfg.enable {
my.desktop.media = {
mpv.enable = true;
shotwell.enable = true;

View File

@@ -4,13 +4,15 @@
pkgs,
...
}:
lib.my.makeHomePackageConfig {
inherit config pkgs;
packageName = "mpv";
packagePath = [ "mpv" ];
optionPath = [
"desktop"
"media"
"mpv"
];
let
cfg = config.my.desktop.media.mpv;
in
{
options.my.desktop.media.mpv = {
enable = lib.mkEnableOption "mpv";
};
config = lib.mkIf cfg.enable {
my.hm.home.packages = [ pkgs.mpv ];
};
}

View File

@@ -4,13 +4,15 @@
pkgs,
...
}:
lib.my.makeHomePackageConfig {
inherit config pkgs;
packageName = "shotwell";
packagePath = [ "shotwell" ];
optionPath = [
"desktop"
"media"
"shotwell"
];
let
cfg = config.my.desktop.media.shotwell;
in
{
options.my.desktop.media.shotwell = {
enable = lib.mkEnableOption "shotwell";
};
config = lib.mkIf cfg.enable {
my.hm.home.packages = [ pkgs.shotwell ];
};
}

View File

@@ -4,13 +4,15 @@
pkgs,
...
}:
lib.my.makeHomePackageConfig {
inherit config pkgs;
packageName = "spotify";
packagePath = [ "spotify" ];
optionPath = [
"desktop"
"media"
"spotify"
];
let
cfg = config.my.desktop.media.spotify;
in
{
options.my.desktop.media.spotify = {
enable = lib.mkEnableOption "spotify";
};
config = lib.mkIf cfg.enable {
my.hm.home.packages = [ pkgs.spotify ];
};
}

View File

@@ -4,16 +4,16 @@
pkgs,
...
}:
lib.my.makeHomePackageConfig {
inherit config pkgs;
packageName = "spotube";
packagePath = [ "spotube" ];
optionPath = [
"desktop"
"media"
"spotube"
];
extraConfig = {
let
cfg = config.my.desktop.media.spotube;
in
{
options.my.desktop.media.spotube = {
enable = lib.mkEnableOption "spotube";
};
config = lib.mkIf cfg.enable {
my.hm.home.packages = [ pkgs.spotube ];
my.persist.homeDirs = [
".local/share/oss.krtirtho.spotube"
];

View File

@@ -4,16 +4,16 @@
pkgs,
...
}:
lib.my.makeHomePackageConfig {
inherit config pkgs;
packageName = "thunderbird";
packagePath = [ "thunderbird" ];
optionPath = [
"desktop"
"media"
"thunderbird"
];
extraConfig = {
let
cfg = config.my.desktop.media.thunderbird;
in
{
options.my.desktop.media.thunderbird = {
enable = lib.mkEnableOption "thunderbird";
};
config = lib.mkIf cfg.enable {
my.hm.home.packages = [ pkgs.thunderbird ];
my.persist.homeDirs = [
".thunderbird"
];

View File

@@ -4,13 +4,15 @@
pkgs,
...
}:
lib.my.makeHomePackageConfig {
inherit config pkgs;
packageName = "vlc";
packagePath = [ "vlc" ];
optionPath = [
"desktop"
"media"
"vlc"
];
let
cfg = config.my.desktop.media.vlc;
in
{
options.my.desktop.media.vlc = {
enable = lib.mkEnableOption "vlc";
};
config = lib.mkIf cfg.enable {
my.hm.home.packages = [ pkgs.vlc ];
};
}