This commit is contained in:
Asaki Yuki 2026-04-14 10:49:57 +07:00
parent f360b98731
commit 787584f141
4 changed files with 35 additions and 24 deletions

View file

@ -1,7 +0,0 @@
[General]
RememberOpenedTabs=false
ModifiedStartupSettings=true
FilterBar=true
[ContextMenu]
ShowOpenTerminal=false

View file

@ -1,16 +1,12 @@
{ {...}: {
lib, programs.dolphin.configs = {
config, General = {
... RememberOpenedTabs = false;
}: { ModifiedStartupSettings = true;
home = { FilterBar = true;
packages = [ };
(lib.mkIf config.programs.dolphin.enable config.programs.dolphin.package) ContextMenu = {
]; ShowOpenTerminal = false;
file.".config/dolphinrc" = {
text = "";
force = true;
}; };
}; };
} }

View file

@ -1,8 +1,27 @@
{ {
lib, lib,
pkgs, pkgs,
config,
... ...
}: { }: let
sanitize = lib.mapAttrsRecursive (
path: value:
if lib.isList value
then lib.concatStringsSep "," value
else value
);
in {
config = lib.mkIf config.programs.dolphin.enable {
home.packages = [
config.programs.dolphin.package
];
home.file.".config/dolphinrc" = {
text = lib.generators.toINI {} (sanitize config.programs.dolphin.configs);
force = true;
};
};
options.programs.dolphin = { options.programs.dolphin = {
enable = lib.mkEnableOption "dolphin"; enable = lib.mkEnableOption "dolphin";
package = lib.mkOption { package = lib.mkOption {
@ -10,7 +29,7 @@
default = pkgs.kdePackages.dolphin; default = pkgs.kdePackages.dolphin;
}; };
config = { configs = {
General = { General = {
DoubleClickViewAction = lib.mkOption { DoubleClickViewAction = lib.mkOption {
type = lib.types.str; type = lib.types.str;
@ -58,7 +77,7 @@
}; };
HomeUrl = lib.mkOption { HomeUrl = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = "~"; default = config.home.homeDirectory;
}; };
RememberOpenedTabs = lib.mkOption { RememberOpenedTabs = lib.mkOption {
type = lib.types.bool; type = lib.types.bool;
@ -148,6 +167,10 @@
type = lib.types.bool; type = lib.types.bool;
default = false; default = false;
}; };
ModifiedStartupSettings = lib.mkOption {
type = lib.types.bool;
default = false;
};
}; };
CompactMode = { CompactMode = {

View file

@ -3,7 +3,6 @@
../../modules/features/home/ghostty.nix ../../modules/features/home/ghostty.nix
../../modules/features/home/kitty.nix ../../modules/features/home/kitty.nix
../../modules/features/home/browsers.nix ../../modules/features/home/browsers.nix
# ../../modules/features/home/neovide.nix
../../modules/features/home/bash.nix ../../modules/features/home/bash.nix
../../modules/features/home/starship.nix ../../modules/features/home/starship.nix