diff --git a/host/desktop/device.nix b/host/desktop/device.nix index 0ff53f4..3f7cb6f 100644 --- a/host/desktop/device.nix +++ b/host/desktop/device.nix @@ -51,9 +51,7 @@ in { flatpak.enable = true; files = { - force = { - ".config/dolphinrc" = true; - }; + force = {}; mkForce = { ".mozilla/firefox/default/search.json.mozlz4" = true; @@ -63,8 +61,6 @@ in { ".config/qt5ct/colors/Catppuccin-Mocha.conf" = "${pkgs.catppuccin-qt5ct}/share/qt5ct/colors/catppuccin-mocha-sapphire.conf"; ".config/qt6ct/colors/Catppuccin-Mocha.conf" = "${pkgs.catppuccin-qt5ct}/share/qt6ct/colors/catppuccin-mocha-sapphire.conf"; - ".config/dolphinrc" = libs.root "/configs/dolphinrc"; - ".local/share/kio/servicemenus/copy-server-public-url.desktop" = libs.root "/configs/services-menu/copy-server-public-url.desktop"; ".local/share/kio/servicemenus/open-with-code.desktop" = diff --git a/modules/features/home/dolphin.nix b/modules/features/home/dolphin.nix new file mode 100644 index 0000000..d51f2f5 --- /dev/null +++ b/modules/features/home/dolphin.nix @@ -0,0 +1,16 @@ +{ + lib, + config, + ... +}: { + home = { + packages = [ + (lib.mkIf config.programs.dolphin.enable config.programs.dolphin.package) + ]; + + file.".config/dolphinrc" = { + text = ""; + force = true; + }; + }; +} diff --git a/modules/features/home/packages.nix b/modules/features/home/packages.nix index 8dce78a..22a02f0 100644 --- a/modules/features/home/packages.nix +++ b/modules/features/home/packages.nix @@ -6,7 +6,6 @@ }: { home.packages = [ - (lib.mkIf config.programs.dolphin.enable config.programs.dolphin.package) (lib.mkIf config.programs.catppuccin.enable config.programs.catppuccin.package) (lib.mkIf config.programs.antigravity.enable config.programs.antigravity.package) diff --git a/options/home/programs/dolphin.nix b/options/home/programs/dolphin.nix index 4a3a2df..bb31087 100644 --- a/options/home/programs/dolphin.nix +++ b/options/home/programs/dolphin.nix @@ -3,12 +3,386 @@ pkgs, ... }: { - options.programs = { - dolphin = { - enable = lib.mkEnableOption "dolphin"; - package = lib.mkOption { - type = lib.types.package; - default = pkgs.kdePackages.dolphin; + options.programs.dolphin = { + enable = lib.mkEnableOption "dolphin"; + package = lib.mkOption { + type = lib.types.package; + default = pkgs.kdePackages.dolphin; + }; + + config = { + General = { + DoubleClickViewAction = lib.mkOption { + type = lib.types.str; + default = "edit_select_all"; + }; + DoubleClickViewCustomAction = lib.mkOption { + type = lib.types.str; + default = ""; + }; + EditableUrl = lib.mkOption { + type = lib.types.bool; + default = false; + }; + UrlCompletionMode = lib.mkOption { + type = lib.types.int; + default = 1; + }; + ShowFullPath = lib.mkOption { + type = lib.types.bool; + default = false; + }; + ShowFullPathInTitlebar = lib.mkOption { + type = lib.types.bool; + default = false; + }; + OpenExternallyCalledFolderInNewTab = lib.mkOption { + type = lib.types.bool; + default = false; + }; + AlwaysShowTabBar = lib.mkOption { + type = lib.types.bool; + default = false; + }; + ShowCloseButtonOnTabs = lib.mkOption { + type = lib.types.bool; + default = true; + }; + TabStyle = lib.mkOption { + type = lib.types.enum ["AutoSize" "FullWidth" "FixedSize"]; + default = "AutoSize"; + }; + Version = lib.mkOption { + type = lib.types.int; + default = 0; + }; + HomeUrl = lib.mkOption { + type = lib.types.str; + default = "~"; + }; + RememberOpenedTabs = lib.mkOption { + type = lib.types.bool; + default = true; + }; + SplitView = lib.mkOption { + type = lib.types.bool; + default = false; + }; + FilterBar = lib.mkOption { + type = lib.types.bool; + default = false; + }; + GlobalViewProps = lib.mkOption { + type = lib.types.bool; + default = true; + }; + BrowseThroughArchives = lib.mkOption { + type = lib.types.bool; + default = false; + }; + ConfirmClosingMultipleTabs = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ConfirmClosingTerminalRunningProgram = lib.mkOption { + type = lib.types.bool; + default = true; + }; + RenameInline = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowSelectionToggle = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowPasteBarAfterCopying = lib.mkOption { + type = lib.types.bool; + default = true; + }; + UseTabForSwitchingSplitView = lib.mkOption { + type = lib.types.bool; + default = false; + }; + CloseSplitViewChoice = lib.mkOption { + type = lib.types.enum ["ActiveView" "InactiveView" "RightView"]; + default = "ActiveView"; + }; + OpenNewTabAfterLastTab = lib.mkOption { + type = lib.types.bool; + default = false; + }; + ShowToolTips = lib.mkOption { + type = lib.types.bool; + default = false; + }; + AutoExpandFolders = lib.mkOption { + type = lib.types.bool; + default = false; + }; + ShowStatusBar = lib.mkOption { + type = lib.types.enum ["Small" "FullWidth" "Disabled"]; + default = "Small"; + }; + ShowZoomSlider = lib.mkOption { + type = lib.types.bool; + default = false; + }; + LockPanels = lib.mkOption { + type = lib.types.bool; + default = true; + }; + EnlargeSmallPreviews = lib.mkOption { + type = lib.types.bool; + default = true; + }; + SortingChoice = lib.mkOption { + type = lib.types.enum ["NaturalSorting" "CaseInsensitiveSorting" "CaseSensitiveSorting"]; + default = "NaturalSorting"; + }; + HideXTrashFile = lib.mkOption { + type = lib.types.bool; + default = false; + }; + DynamicView = lib.mkOption { + type = lib.types.bool; + default = false; + }; + }; + + CompactMode = { + UseSystemFont = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ViewFont = lib.mkOption { + type = lib.types.str; + default = "System Font"; + }; + IconSize = lib.mkOption { + type = lib.types.int; + default = 22; + }; + PreviewSize = lib.mkOption { + type = lib.types.int; + default = 48; + }; + MaximumTextWidthIndex = lib.mkOption { + type = lib.types.int; + default = 0; + }; + }; + + ContentDisplay = { + DirectorySizeMode = lib.mkOption { + type = lib.types.enum ["ContentCount" "ContentSize" "None"]; + default = "ContentCount"; + }; + RecursiveDirectorySizeLimit = lib.mkOption { + type = lib.types.int; + default = 10; + }; + UseShortRelativeDates = lib.mkOption { + type = lib.types.bool; + default = true; + }; + UsePermissionsFormat = lib.mkOption { + type = lib.types.enum ["SymbolicFormat" "NumericFormat" "CombinedFormat"]; + default = "SymbolicFormat"; + }; + ElidingMode = lib.mkOption { + type = lib.types.enum ["Right" "Middle"]; + default = "Middle"; + }; + }; + + ContextMenu = { + ShowCopyMoveMenu = lib.mkOption { + type = lib.types.bool; + default = false; + }; + ShowAddToPlaces = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowSortBy = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowViewMode = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowOpenInNewTab = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowOpenInNewWindow = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowOpenInSplitView = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowCopyLocation = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowDuplicateHere = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowOpenTerminal = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowCopyToOtherSplitView = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ShowMoveToOtherSplitView = lib.mkOption { + type = lib.types.bool; + default = true; + }; + }; + + DetailsMode = { + UseSystemFont = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ViewFont = lib.mkOption { + type = lib.types.str; + default = "System Font"; + }; + IconSize = lib.mkOption { + type = lib.types.int; + default = 16; + }; + PreviewSize = lib.mkOption { + type = lib.types.int; + default = 48; + }; + ColumnPositions = lib.mkOption { + type = lib.types.str; + default = "0,1,2,3,4,5,6,7,8"; + }; + LeftPadding = lib.mkOption { + type = lib.types.int; + default = 20; + }; + RightPadding = lib.mkOption { + type = lib.types.int; + default = 20; + }; + HighlightEntireRow = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ExpandableFolders = lib.mkOption { + type = lib.types.bool; + default = true; + }; + }; + + IconsMode = { + UseSystemFont = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ViewFont = lib.mkOption { + type = lib.types.str; + default = "System Font"; + }; + IconSize = lib.mkOption { + type = lib.types.int; + default = 32; + }; + PreviewSize = lib.mkOption { + type = lib.types.int; + default = 64; + }; + TextWidthIndex = lib.mkOption { + type = lib.types.int; + default = 1; + }; + MaximumTextLines = lib.mkOption { + type = lib.types.int; + default = 3; + }; + }; + + Settings = { + HiddenFilesShown = lib.mkOption { + type = lib.types.bool; + default = false; + }; + }; + + Dolphin = { + Version = lib.mkOption { + type = lib.types.int; + default = -1; + }; + ViewMode = lib.mkOption { + type = lib.types.int; + default = 0; + }; + PreviewsShown = lib.mkOption { + type = lib.types.bool; + default = true; + }; + GroupedSorting = lib.mkOption { + type = lib.types.bool; + default = false; + }; + SortRole = lib.mkOption { + type = lib.types.str; + default = "text"; + }; + SortOrder = lib.mkOption { + type = lib.types.int; + default = 0; + }; + SortFoldersFirst = lib.mkOption { + type = lib.types.bool; + default = true; + }; + SortHiddenLast = lib.mkOption { + type = lib.types.bool; + default = false; + }; + VisibleRoles = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = []; + }; + HeaderColumnWidths = lib.mkOption { + type = lib.types.str; + default = ""; + }; + }; + + NotificationMessages = { + ConfirmOpenManyFolders = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ConfirmOpenManyTerminals = lib.mkOption { + type = lib.types.bool; + default = true; + }; + ConfirmRenameFileType = lib.mkOption { + type = lib.types.bool; + default = true; + }; + }; + + VersionControl = { + enabledPlugins = lib.mkOption { + type = lib.types.listOf lib.types.str; + default = []; + }; }; }; }; diff --git a/users/asakiyuki/programs.nix b/users/asakiyuki/programs.nix index ce921d9..2fcd88f 100644 --- a/users/asakiyuki/programs.nix +++ b/users/asakiyuki/programs.nix @@ -14,6 +14,7 @@ ../../modules/features/home/xdg.nix ../../modules/features/home/packages.nix ../../modules/features/home/git.nix + ../../modules/features/home/dolphin.nix ../../modules/programs/nixvim/_nixvim.nix ../../modules/programs/nixcord/default.nix