diff --git a/dotfiles/dolphinrc b/dotfiles/dolphinrc new file mode 100644 index 0000000..2f11ee4 --- /dev/null +++ b/dotfiles/dolphinrc @@ -0,0 +1,24 @@ +MenuBar=Disabled + +[DetailsMode] +PreviewSize=16 + +[General] +BrowseThroughArchives=true +EditableUrl=true +GlobalViewProps=false +ShowFullPath=true +ShowStatusBar=FullWidth +ShowZoomSlider=true +Version=202 + + +[KFileDialog Settings] +Places Icons Auto-resize=false +Places Icons Static Size=22 + +[MainWindow] +MenuBar=Disabled + +[PreviewSettings] +Plugins=audiothumbnail,avif,blenderthumbnail,comicbookthumbnail,cursorthumbnail,djvuthumbnail,ebookthumbnail,exrthumbnail,directorythumbnail,fontthumbnail,imagethumbnail,jpegthumbnail,jxl,kraorathumbnail,windowsexethumbnail,windowsimagethumbnail,mobithumbnail,opendocumentthumbnail,gsthumbnail,rawthumbnail,svgthumbnail,gdk-pixbuf-thumbnailer,ffmpegthumbs,gsf-office diff --git a/dotfiles/konsolerc b/dotfiles/konsolerc new file mode 100644 index 0000000..7f417e8 --- /dev/null +++ b/dotfiles/konsolerc @@ -0,0 +1,9 @@ +[Desktop Entry] +DefaultProfile=My Default.profile + +[MainWindow] +StatusBar=Disabled +ToolBarsMovable=Disabled + +[UiSettings] +ColorScheme=Default diff --git a/flake.nix b/flake.nix index 3b4f7b7..59c9ce0 100644 --- a/flake.nix +++ b/flake.nix @@ -81,7 +81,7 @@ ] ++ (if desktop then [ ./homes/desktop.nix ] else [ ]) ++ (if (desktop && os == "linux") then [ ./homes/linux-desktop.nix - plasma-manager.homeModules.plasma-manager + plasma-manager.homeManagerModules.plasma-manager ] else [ ]) ++ extraModules; extraSpecialArgs = { diff --git a/homes/common.nix b/homes/common.nix index 78d70a0..078bdd5 100644 --- a/homes/common.nix +++ b/homes/common.nix @@ -1,4 +1,13 @@ -{ config, lib, pkgs, pkgs-unstable, custom-pkgs, ... }: { +{ config, lib, pkgs, pkgs-unstable, ... }: +let + runic_version = "1.5.0"; + runic = pkgs.fetchFromGitHub { + owner = "fredrikekre"; + repo = "Runic.jl"; + rev = "v${runic_version}"; + hash = "sha256-y+kiBA94vUMHH0fEEBg7+c9PEgzjGqh6nCuSRnawhQI="; + }; +in { imports = [ ./../programs/shells.nix ./../programs/bat.nix @@ -11,6 +20,16 @@ ]; home = { stateVersion = "23.11"; + file = { + ".local/bin/runic" = { + source = runic + "/bin/runic"; + executable = true; + }; + ".local/bin/git-runic" = { + source = runic + "/bin/git-runic"; + executable = true; + }; + }; packages = with pkgs; [ agenix btop @@ -34,8 +53,6 @@ pipx python3 zulu17 - custom-pkgs.jlfmt - custom-pkgs.runic ]; sessionVariables = { PAGER = "most"; @@ -70,6 +87,14 @@ micromamba = "mamba"; }; sessionPath = [ "$HOME/.local/bin" ]; + activation = { + installRunic = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + run ${pkgs.julia-bin}/bin/julia --project=@runic --startup-file=no -e 'using Pkg; Pkg.add(name="Runic", version="${runic_version}")' + ''; + installJuliaFormatter = lib.hm.dag.entryAfter [ "writeBoundary" ] '' + run ${pkgs.julia-bin}/bin/julia --project=@JuliaFormatter --startup-file=no -e 'using Pkg; Pkg.add(name="JuliaFormatter", version="2.1.6")' + ''; + }; }; programs = { home-manager.enable = true; diff --git a/homes/linux-desktop.nix b/homes/linux-desktop.nix index 2516d48..6d78716 100644 --- a/homes/linux-desktop.nix +++ b/homes/linux-desktop.nix @@ -113,12 +113,20 @@ in { configFile = { "plasma-workspace/env/ZED_WINDOW_DECORATIONS.sh".text = "export ZED_WINDOW_DECORATIONS=server"; + "dolphinrc".source = + mkOutOfStoreSymlink "${home-manager-repo}/dotfiles/dolphinrc"; + "konsolerc".source = + mkOutOfStoreSymlink "${home-manager-repo}/dotfiles/konsolerc"; "onedrive/config".text = '' force_session_upload = "true" delay_inotify_processing = "true" ''; + "yakuakerc".source = + mkOutOfStoreSymlink "${home-manager-repo}/dotfiles/yakuakerc"; }; dataFile = { + "konsole/My Default.profile".source = + mkOutOfStoreSymlink "${home-manager-repo}/dotfiles/MyDefault.profile"; "kio/servicemenus/kate.desktop".source = ./../dotfiles/kate.desktop; "kio/servicemenus/vlc.desktop".source = ./../dotfiles/vlc.desktop; "kio/servicemenus/word-to-pdf.desktop".source = diff --git a/pkgs/default.nix b/pkgs/default.nix index 8178242..2e0c11e 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,7 +1,6 @@ { pkgs, ... }: -with pkgs; { - ark = callPackage ./ark.nix { }; - jlfmt = callPackage ./jlfmt.nix { }; - runic = callPackage ./runic.nix { }; - sc4pac = callPackage ./sc4pac.nix { }; + +{ + ark = pkgs.callPackage ./ark.nix { }; + sc4pac = pkgs.callPackage ./sc4pac.nix { }; } diff --git a/pkgs/jlfmt.nix b/pkgs/jlfmt.nix deleted file mode 100644 index 21916a4..0000000 --- a/pkgs/jlfmt.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, ... }: -with pkgs; -let - juliaWithPkgs = julia-bin.withPackages.override { setDefaultDepot = false; } - [ "JuliaFormatter" ]; - depotWithPkgs = runCommand "getDepot" { } '' - ${juliaWithPkgs}/bin/julia -e 'println(first(DEPOT_PATH))' | tee $out - ''; -in writeShellScriptBin "jlfmt" '' - export JULIA_DEPOT_PATH=$(< ${depotWithPkgs}) - exec ${juliaWithPkgs}/bin/julia --startup-file=no -e 'using JuliaFormatter; print(format_text(String(read(stdin))));' -- "$@" -'' diff --git a/pkgs/runic.nix b/pkgs/runic.nix deleted file mode 100644 index b91b550..0000000 --- a/pkgs/runic.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ pkgs, ... }: -with pkgs; -let - juliaWithRunic = - julia-bin.withPackages.override { setDefaultDepot = false; } [ "Runic" ]; - depotWithRunic = runCommand "getRunicDepot" { } '' - ${juliaWithRunic}/bin/julia -e 'println(first(DEPOT_PATH))' | tee $out - ''; -in writeShellScriptBin "runic" '' - export JULIA_DEPOT_PATH=$(< ${depotWithRunic}) - exec ${juliaWithRunic}/bin/julia --startup-file=no -e 'using Runic; exit(Runic.main(ARGS))' -- "$@" -'' diff --git a/programs/konsole.nix b/programs/konsole.nix deleted file mode 100644 index 66043de..0000000 --- a/programs/konsole.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ ... }: { - programs.konsole = { - enable = true; - defaultProfile = "millironx"; - profiles.millironx = { - colorScheme = "Breeze"; - font = { - name = "MesloLGS NF"; - size = 10; - }; - extraConfig = { - "Cursor Options".CursorShape = 1; - General.RemoteTabTitleFormat = "[SSH] %H"; - "Interaction Options" = { - CopyTextAsHTML = false; - MouseWheelZoomEnabled = false; - UnderlineFilesEnabled = true; - }; - "Terminal Features".BlinkingCursorEnabled = true; - }; - }; - }; -} diff --git a/programs/plasma.nix b/programs/plasma.nix index 2fdd769..ea0b6e7 100644 --- a/programs/plasma.nix +++ b/programs/plasma.nix @@ -1,177 +1,7 @@ { config, ... }: { - - imports = [ ./konsole.nix ./yakuake.nix ]; - programs.plasma = { enable = true; - overrideConfig = true; - shortcuts = { yakuake.toggle-window-state = "Ctrl+`"; }; - configFile = { - dolphinrc = { - DetailsMode.PreviewSize = 16; - General = { - BrowseThroughArchives = true; - EditableUrl = true; - GlobalViewProps = false; - ShowFullPath = true; - ShowStatusBar = "FullWidth"; - ShowZoomSlider = true; - }; - "KFileDialog Settings" = { - "Places Icons Auto-resize" = false; - "Places Icons Static Size" = 22; - }; - PreviewSettings.Plugins = - "audiothumbnail,avif,blenderthumbnail,comicbookthumbnail,cursorthumbnail,djvuthumbnail,ebookthumbnail,exrthumbnail,directorythumbnail,fontthumbnail,imagethumbnail,jpegthumbnail,jxl,kraorathumbnail,windowsexethumbnail,windowsimagethumbnail,mobithumbnail,opendocumentthumbnail,gsthumbnail,rawthumbnail,svgthumbnail,gdk-pixbuf-thumbnailer,ffmpegthumbs,gsf-office"; - }; - }; - input.mice = [{ - enable = true; - name = "Logitech M705"; - vendorId = "046d"; - productId = "406d"; - naturalScroll = true; - }]; - kwin = { - cornerBarrier = false; - titlebarButtons = { - left = [ "close" "minimize" "maximize" ]; - right = [ "help" ]; - }; - virtualDesktops = { - number = 2; - rows = 1; - }; - }; - panels = [ - ### Screen 0 panels ### - ##### Top: Fedora menu | App switcher | Menu bar | CPU monitor | Memory monitor | Network monitor | System tray | clock ##### - { - location = "top"; - floating = true; - height = 27; - lengthMode = "fill"; - opacity = "adaptive"; - hiding = "normalpanel"; - screen = 0; - widgets = [ - { kickoff = { icon = "fedora-logo-icon"; }; } - "org.kde.plasma.marginsseparator" - "org.kde.plasma.windowlist" - "org.kde.plasma.appmenu" - "org.kde.plasma.panelspacer" - { - name = "org.kde.plasma.systemmonitor.cpu"; - config = { - Appearance.chartFace = "org.kde.ksysguard.barchart"; - Sensors.highPrioritySensorIds = "[${ - builtins.concatStringsSep "," (builtins.genList - (i: ''"cpu/cpu${builtins.toString i}/usage"'') 12) - }]"; - }; - } - { - name = "org.kde.plasma.systemmonitor.memory"; - config.Appearance.chartFace = "org.kde.ksysguard.horizontalbars"; - } - { - name = "org.kde.plasma.systemmonitor.net"; - config = { - Appearance.chartFace = "org.kde.ksysguard.horizontalbars"; - Sensors.highPrioritySensorIds = - ''[ "network/all/download","network/all/upload" ]''; - # These are the values needed to make the network indicator - # actually useful, but it appears that plasma-manager doesn't - # support nesting this deep yet. Disable for now. - # "org.kde.ksysguard.horizontalbars".General = { - # rangeAuto = false; - # rangeFromMultiplier = 1048576; - # rangeFromUnit = 202; - # rangeToMultiplier = 1048576; - # rangeToUnit = 202; - # }; - }; - } - { systemTray = { }; } - { digitalClock = { }; } - ]; - } - ##### Bottom: Virtual desktop pager | Full-name taskbar w/ pins | Downloads folder | Trash folder - { - location = "bottom"; - floating = true; - height = 44; - lengthMode = "fill"; - opacity = "adaptive"; - hiding = "normalpanel"; - screen = 0; - widgets = [ - "org.kde.plasma.pager" - { - iconTasks = { - iconsOnly = false; - behavior.showTasks.onlyInCurrentScreen = true; - launchers = [ - "applications:systemsettings.desktop" - "applications:org.kde.discover.desktop" - "preferred://filemanager" - "preferred://browser" - "applications:net.thunderbird.Thunderbird.desktop" - "applications:io.github.alainm23.planify.desktop" - "applications:dev.zed.Zed.desktop" - "applications:com.logseq.Logseq.desktop" - "applications:net.lutris.Lutris.desktop" - ]; - }; - } - "org.kde.plasma.panelspacer" - "org.kde.plasma.marginsseparator" - { - name = "org.kde.plasma.folder"; - config = { - General.url = "file://${config.home.homeDirectory}/Downloads"; - }; - } - "org.kde.plasma.trash" - ]; - } - - ### Screen 1 panels ### - ##### Top: App switcher | Menu bar ##### - { - location = "top"; - floating = true; - height = 27; - lengthMode = "fill"; - opacity = "adaptive"; - hiding = "normalpanel"; - screen = 1; - widgets = [ "org.kde.plasma.windowlist" "org.kde.plasma.appmenu" ]; - } - ##### Bottom: Virtual desktop pager | Full-name taskbar w/o pins ##### - { - location = "bottom"; - floating = true; - height = 44; - lengthMode = "fill"; - opacity = "adaptive"; - hiding = "normalpanel"; - screen = 1; - widgets = [ - "org.kde.plasma.pager" - { - iconTasks = { - iconsOnly = false; - behavior.showTasks.onlyInCurrentScreen = true; - launchers = [ ]; - }; - } - ]; - } - ]; - powerdevil.AC.autoSuspend.action = "nothing"; workspace = { - lookAndFeel = "org.kde.breezedark.desktop"; wallpaperFillMode = "preserveAspectCrop"; wallpaperSlideShow = { interval = 86400; diff --git a/programs/yakuake.nix b/programs/yakuake.nix deleted file mode 100644 index f8b86a7..0000000 --- a/programs/yakuake.nix +++ /dev/null @@ -1,19 +0,0 @@ -# Note: this file uses the lower-level `programs.plasma.configFile` syntax -# since plasma-manager does not yet support a high-level module for Yakuake -{ ... }: { - programs.plasma.configFile.yakuakerc = { - "Desktop Entry".DefaultProfile = "millironx.profile"; - Shortcuts = { - next-session = "Shift+Right; Ctrl+Shift+Tab"; - previous-terminal = "none"; - }; - Window = { - DynamicTabTitles = true; - Height = 60; - Screen = 1; - ShowSystrayIcon = false; - Width = 60; - }; - Dialogs.FirstRun = false; - }; -} diff --git a/programs/zed.nix b/programs/zed.nix index 6985d69..dfbbef0 100644 --- a/programs/zed.nix +++ b/programs/zed.nix @@ -43,7 +43,19 @@ } ]; languages = { - Julia = { formatter = { external = { command = "jlfmt"; }; }; }; + Julia = { + formatter = { + external = { + command = "julia"; + arguments = [ + "--project=@JuliaFormatter" + "--startup-file=no" + "-e" + "using JuliaFormatter; print(format_text(String(read(stdin))));" + ]; + }; + }; + }; LaTeX = { formatter = { external = {