dotfiles

My PC Dotfiles & Website
commit 076293a51fe46fca4e55218d7719f95dfd441005
parent 7d50266f8aa210a7717e2612c04a983506ceb92e
Author: maydayv7 <maydayv7@gmail.com>
Date:   Thu, 18 Jan 2024 19:40:10 +0530

feat!: Add Pantheon Desktop Configuration

--> Theming + App Indicator + Flatpak
+ Cleanup XFCE Configuration
  - Shortcut for Panel Autohide
  - Consistent Theming
  - Use `docklike` instead of Plank
+ Refactor ULauncher Configuration (Add `gui.launcher`)
+ Drop `sops-nix` SSH Workaround
+ Actually set Nix substituters

Diffstat:

MREADME.md | 3++-
Mchecks/flake.nix | 1+
Mdevices/vortex.nix | 13++++++++++---
Mfiles/README.md | 1+
Afiles/colors/elementary.yaml | 18++++++++++++++++++
Afiles/firefox/elementary.css | 35+++++++++++++++++++++++++++++++++++
Rfiles/firefox/userContent.css -> files/firefox/gnome.css | 0
Mfiles/flake.nix | 9++++++++-
Afiles/pantheon/dconf.nix | 283+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Afiles/plank/launchers/google-chrome.dockitem | 2++
Afiles/plank/launchers/io.elementary.code.dockitem | 2++
Afiles/plank/launchers/io.elementary.files.dockitem | 2++
Afiles/plank/launchers/io.elementary.switchboard.dockitem | 2++
Afiles/plank/launchers/io.elementary.terminal.dockitem | 2++
Dfiles/plank/launchers/org.xfce.mousepad.dockitem | 2--
Dfiles/plank/launchers/thunar.dockitem | 2--
Dfiles/plank/launchers/xfce-settings-manager.dockitem | 2--
Dfiles/plank/launchers/xfce4-terminal.dockitem | 2--
Mfiles/ulauncher/extensions/com.github.brpaz.ulauncher-file-search.db | 0
Mfiles/ulauncher/extensions/com.github.ikorjefocur.ulauncher-commandrunner.db | 0
Afiles/ulauncher/themes/elementary/manifest.json | 12++++++++++++
Afiles/ulauncher/themes/elementary/theme-gtk-3.20.css | 10++++++++++
Afiles/ulauncher/themes/elementary/theme.css | 160+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mfiles/xfce/gtk.css | 1+
Afiles/xfce/panel/docklike-26.rc | 13+++++++++++++
Mfiles/xfce/settings/xfce4-keyboard-shortcuts.xml | 1+
Mfiles/xfce/settings/xfce4-panel.xml | 30+++++++++++++++++++++++++++---
Mflake.nix | 2+-
Mmodules/README.md | 6+++++-
Mmodules/apps/flatpak.nix | 11+++++++++--
Mmodules/apps/office.nix | 2++
Mmodules/apps/wine.nix | 33+++++++++++++++++++++------------
Mmodules/gui/desktop/gnome.nix | 4+++-
Amodules/gui/desktop/pantheon.nix | 226+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mmodules/gui/desktop/xfce.nix | 91++++++++++++++++++++++++-------------------------------------------------------
Mmodules/gui/gtk.nix | 7+++++--
Amodules/gui/launcher.nix | 78++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mmodules/gui/theme.nix | 10++++++----
Mmodules/nix/default.nix | 6+++++-
Mmodules/shell/zsh.nix | 1-
Apackages/firefox-elementary-theme/default.nix | 28++++++++++++++++++++++++++++
Apackages/firefox-elementary-theme/metadata.nix | 6++++++
Dpackages/overlays/_discord.nix | 10----------
Mpackages/overlays/nixFlakes.nix | 11+----------
Mscripts/nixos.nix | 21+++++++++++++++------
Msecrets/default.nix | 10+++-------
46 files changed, 1033 insertions(+), 138 deletions(-)

diff --git a/README.md b/README.md @@ -61,7 +61,7 @@ This [repository](https://github.com/maydayv7/dotfiles) contains the configurati | Shells | [`bash`](https://www.gnu.org/software/bash/), [`zsh`](https://www.zsh.org) | | Terminal | [Blackbox](https://gitlab.gnome.org/raggesilver/blackbox), [`xfce4` Terminal](https://docs.xfce.org/apps/terminal/start) | | Browser | [Firefox](https://www.mozilla.org/en-US/firefox/) | -| Desktop Environments | [GNOME](https://www.gnome.org), [XFCE](https://xfce.org/) | +| Desktop Environments | [GNOME](https://www.gnome.org), [XFCE](https://xfce.org/), [Pantheon](https://elementary.io/) | ## Structure @@ -393,6 +393,7 @@ You can navigate to the `README`s present in the various directories to know mor - Refactor GNOME `dconf` - Overhaul XFCE Configuration - Use ULauncher +- Add Pantheon Desktop Configuration - Add VS Code Extensions Repository - Fix Android Virtualisation - Add AppImage Support diff --git a/checks/flake.nix b/checks/flake.nix @@ -35,6 +35,7 @@ prettier = { enable = true; settings.bracketSameLine = true; + excludes = ["*.css"]; }; }; }; diff --git a/devices/vortex.nix b/devices/vortex.nix @@ -6,7 +6,7 @@ timezone = "Asia/Kolkata"; locale = "IN"; - kernel = "xanmod"; + kernel = "xanmod_latest"; kernelModules = ["nvme" "thunderbolt"]; hardware = { @@ -20,8 +20,15 @@ shell.utilities = true; apps = { - list = ["discord" "firefox" "git" "office" "vscode" "wine"]; wine.utilities = true; + list = [ + "discord" + "firefox" + "git" + "office" + "vscode" + "wine" + ]; }; nix = { @@ -30,7 +37,7 @@ }; gui = { - desktop = "xfce"; + desktop = "pantheon"; wallpaper = "Sunset"; }; diff --git a/files/README.md b/files/README.md @@ -13,6 +13,7 @@ The `files` directory is used to store all my plain-text program configuration f - [`images`](./images) - Personal Wallpapers and Profile Pictures - [`nano`](./nano) - `nano` Text Editor Global Configuration - [`neofetch`](./neofetch) - `neofetch` CLI Theming +- [`pantheon`](./pantheon) - Configuration Files for Pantheon Desktop - [`plank`](./plank) - `plank` Dock Theming - [`proprietary`](https://github.com/maydayv7/proprietary) - Custom Proprietary Files - [`repl.nix`](./repl.nix): Interactive Nix Shell to explore syntax and configuration diff --git a/files/colors/elementary.yaml b/files/colors/elementary.yaml @@ -0,0 +1,18 @@ +scheme: "Elementary OS" +author: "maydayv7" +base00: "2D363A" +base01: "073642" +base02: "073642" +base03: "94A3A5" +base04: "94A3A5" +base05: "C0BFBC" +base06: "DEDDDA" +base07: "EEEEEE" +base08: "DC322F" +base09: "CB4B16" +base0A: "B58900" +base0B: "859900" +base0C: "2AA198" +base0D: "268BD2" +base0E: "D33682" +base0F: "EC0048" diff --git a/files/firefox/elementary.css b/files/firefox/elementary.css @@ -0,0 +1,35 @@ +/* ## Firefox Elementary Theme ## */ + +@media (prefers-color-scheme: dark) { + @-moz-document url-prefix(about:home), + url-prefix(about:newtab), + url-prefix(about:preferences), + url-prefix(about:preferences#home), + url-prefix(about:preferences#search), + url-prefix(about:preferences#privacy), + url-prefix(about:preferences#sync), + url-prefix(about:preferences#moreFromMozilla), + url-prefix(about:addons) { + :root { + --newtab-background-color: #3a3a3a !important; + --newtab-background-color-secondary: #4d4d4d !important; + --newtab-element-hover-color: #616161 !important; + --newtab-overlay-color: rgba(0, 0, 0, 0.8) !important; + --newtab-primary-action-background: #1e90ff !important; + --newtab-primary-action-background-pocket: #1e90ff !important; + --in-content-page-background: #3a3a3a !important; + --in-content-box-background: #4d4d4d !important; + --in-content-box-background-odd: #4d4d4d !important; + --in-content-button-background: #4d4d4d !important; + --in-content-button-background-hover: #575757 !important; + --in-content-button-background-active: #575757 !important; + --in-content-primary-button-background: #1e90ff !important; + --in-content-primary-button-background-hover: rgba( + 150, + 210, + 255 + ) !important; + --in-content-focus-outline-color: #1e90ff !important; + } + } +} diff --git a/files/firefox/userContent.css b/files/firefox/gnome.css diff --git a/files/flake.nix b/files/flake.nix @@ -37,7 +37,11 @@ fetch = readFile ./neofetch/config.conf; # Firefox Web Browser - firefox.theme = readFile ./firefox/userContent.css; + firefox = map.files { + directory = ./firefox; + apply = readFile; + extension = ".css"; + }; # X11 Touchpad Gestures gestures = readFile ./touchegg/gestures.xml; @@ -67,6 +71,9 @@ # Pictures images.profile = ./images/Profile.png; + # Pantheon Desktop + pantheon.dconf = ./pantheon/dconf.nix; + # Plank Dock plank = { autostart = readFile ./plank/dock.desktop; diff --git a/files/pantheon/dconf.nix b/files/pantheon/dconf.nix @@ -0,0 +1,283 @@ +{ + sys, + lib, + ... +}: +with lib.hm.gvariant; let + inherit (builtins) head; + fonts = sys.fonts.fontconfig.defaultFonts; +in { + ## Dconf Keys ## + # Generated via dconf2nix: https://github.com/gvolpe/dconf2nix + dconf.settings = { + # Desktop + "io/elementary/desktop/agent-geoclue2".location-enabled = true; + "io/elementary/desktop/wingpanel".use-transparency = true; + "io/elementary/desktop/wingpanel/datetime".clock-format = "24h"; + "io/elementary/desktop/wingpanel/sound".max-volume = 100.0; + "io/elementary/desktop/wingpanel/power".show-percentage = true; + "io/elementary/desktop/wingpanel/bluetooth".bluetooth-enabled = false; + "io/elementary/switchboard/keyboard".first-launch = false; + "io/elementary/files/preferences".singleclick-select = true; + "io/elementary/settings-daemon/datetime".show-weeks = true; + + "org/gnome/desktop/session".idle-delay = mkUint32 900; + "org/gnome/desktop/datetime".automatic-timezone = true; + "org/gnome/desktop/interface" = { + clock-format = "24h"; + clock-show-weekday = true; + color-scheme = "prefer-dark"; + cursor-size = 32; + document-font-name = "${head fonts.sansSerif} 12"; + enable-animations = true; + enable-hot-corners = true; + font-name = "${head fonts.sansSerif} 12"; + gtk-enable-primary-paste = true; + locate-pointer = true; + monospace-font-name = "${head fonts.monospace} 13"; + text-scaling-factor = 1.0; + }; + + "org/gnome/desktop/background" = rec { + color-shading-type = "solid"; + picture-options = "zoom"; + picture-uri = "file://${sys.gui.wallpaper}"; + picture-uri-dark = picture-uri; + }; + + "io/elementary/notifications/applications/gala-other" = { + remember = true; + sounds = true; + }; + + "org/gnome/desktop/sound" = { + allow-volume-above-100-percent = false; + event-sounds = true; + theme-name = "elementary"; + }; + + "org/gnome/settings-daemon/plugins/power" = { + power-button-action = "interactive"; + sleep-inactive-ac-timeout = 0; + sleep-inactive-ac-type = "nothing"; + sleep-inactive-battery-timeout = 1800; + }; + + "org/gnome/desktop/peripherals/touchpad" = { + click-method = "fingers"; + tap-to-click = true; + two-finger-scrolling-enabled = true; + }; + + "org/gnome/settings-daemon/plugins/color" = { + night-light-enabled = true; + night-light-schedule-automatic = false; + night-light-schedule-from = 19.0; + night-light-schedule-to = 7.0; + night-light-temperature = mkUint32 3700; + }; + + "io/elementary/settings-daemon/housekeeping" = { + cleanup-downloads-folder = false; + cleanup-screenshots-folder = false; + old-files-age = 30; + }; + + # Window Manager + "org/pantheon/desktop/gala/appearance".button-layout = ":minimize,maximize,close"; + "org/gnome/desktop/wm/preferences".titlebar-font = "${head fonts.sansSerif} Bold 11"; + + "org/pantheon/desktop/gala/behavior" = { + hotcorner-bottomleft = "show-workspace-view"; + hotcorner-bottomright = "switch-to-workspace-next"; + hotcorner-topleft = "open-launcher"; + }; + + "org/gnome/mutter" = { + attach-modal-dialogs = true; + center-new-windows = true; + dynamic-workspaces = true; + edge-tiling = true; + focus-change-on-pointer-rest = true; + workspaces-only-on-primary = true; + }; + + "org/gnome/mutter/keybindings" = { + cancel-input-capture = ["<Super><Shift>Escape"]; + toggle-tiled-left = []; + toggle-tiled-right = []; + }; + + # Apps + "desktop/ibus/panel/emoji".font = "${head fonts.emoji} 16"; + "desktop/ibus/panel" = { + show-icon-on-systray = false; + use-custom-font = true; + custom-font = "${head fonts.sansSerif} 10"; + }; + + "com/github/stsdc/monitor/settings" = { + background-state = true; + indicator-state = true; + indicator-cpu-state = false; + indicator-gpu-state = false; + indicator-memory-state = true; + indicator-network-download-state = false; + indicator-network-upload-state = false; + indicator-temperature-state = true; + }; + + "org/gnome/epiphany" = { + ask-for-default = false; + default-search-engine = "Google"; + use-google-search-suggestions = true; + }; + + "io/elementary/terminal/settings" = { + audible-bell = false; + follow-last-tab = "true"; + font = "${head fonts.monospace} Medium 13"; + natural-copy-paste = false; + unsafe-paste-alert = true; + }; + + "net/launchpad/plank/docks/dock1" = { + current-workspace-only = true; + icon-size = 60; + pressure-reveal = true; + theme = "default"; + zoom-enabled = true; + zoom-percent = 120; + }; + + "io/elementary/code/saved-state".outline-visible = true; + "io/elementary/code/settings" = { + strip-trailing-on-save = true; + show-mini-map = true; + show-right-margin = true; + prefer-dark-style = true; + }; + + "com/github/hezral/clips" = { + first-run = false; + hide-on-startup = false; + min-column-number = 3; + persistent-mode = false; + prefer-dark-style = true; + protected-mode = true; + quick-paste = true; + shake-reveal = false; + show-close-button = false; + theme-optin = true; + }; + + # Keyboard Shortcuts + "org/gnome/desktop/wm/keybindings" = { + begin-move = []; + begin-resize = []; + close = ["<Super>q" "<Alt>F4"]; + cycle-group = []; + cycle-group-backward = []; + maximize = [""]; + minimize = ["<Super>Down"]; + move-to-monitor-down = []; + move-to-monitor-left = ["<Shift><Super>Left"]; + move-to-monitor-right = ["<Shift><Super>Right"]; + move-to-monitor-up = []; + move-to-workspace-1 = []; + move-to-workspace-2 = [""]; + move-to-workspace-3 = [""]; + move-to-workspace-4 = [""]; + move-to-workspace-5 = [""]; + move-to-workspace-6 = [""]; + move-to-workspace-7 = [""]; + move-to-workspace-8 = [""]; + move-to-workspace-9 = [""]; + move-to-workspace-down = []; + move-to-workspace-last = []; + move-to-workspace-left = ["<Primary><Super>Left"]; + move-to-workspace-right = ["<Primary><Super>Right"]; + move-to-workspace-up = []; + show-desktop = ["<Super>d"]; + switch-applications = ["<Alt>Tab"]; + switch-applications-backward = ["<Shift><Alt>Tab"]; + switch-group = ["<Super>Tab"]; + switch-group-backward = ["<Shift><Super>Tab"]; + switch-to-workspace-1 = ["<Super>Home"]; + switch-to-workspace-2 = [""]; + switch-to-workspace-3 = [""]; + switch-to-workspace-4 = [""]; + switch-to-workspace-5 = [""]; + switch-to-workspace-6 = [""]; + switch-to-workspace-7 = [""]; + switch-to-workspace-8 = [""]; + switch-to-workspace-9 = [""]; + switch-to-workspace-down = []; + switch-to-workspace-last = ["<Super>End"]; + switch-to-workspace-left = ["<Super>Left"]; + switch-to-workspace-right = ["<Super>Right"]; + switch-to-workspace-up = []; + toggle-maximized = ["<Super>Up"]; + unmaximize = []; + }; + + "org/gnome/settings-daemon/plugins/media-keys" = { + email = ["<Super>e"]; + home = ["<Super>f"]; + magnifier-zoom-in = ["<Super>equal"]; + magnifier-zoom-out = ["<Super>minus"]; + play = ["F4"]; + screenreader = []; + screensaver = ["<Super>l"]; + terminal = ["<Super>t"]; + volume-down = ["AudioLowerVolume"]; + volume-mute = [""]; + volume-up = ["AudioRaiseVolume"]; + www = ["<Super>w"]; + custom-keybindings = [ + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/" + "/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/" + ]; + }; + + "org/pantheon/desktop/gala/keybindings" = { + area-screenshot = ["Print"]; + expose-windows = [""]; + pip = [""]; + screenshot = ["<Shift>Print"]; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = { + binding = "<Primary><Alt>Return"; + command = "com.github.stsdc.monitor"; + name = "com.github.stsdc.monitor"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = { + binding = "<Super>t"; + command = "io.elementary.terminal"; + name = "io.elementary.terminal"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = { + binding = "Calculator"; + command = "io.elementary.calculator"; + name = "io.elementary.calculator"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = { + binding = "<Super>slash"; + command = "ulauncher-toggle"; + name = "ulauncher-toggle"; + }; + + "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4" = { + binding = "<Super>v"; + command = "gtk-launch com.github.hezral.clips"; + name = "gtk-launch com.github.hezral.clips"; + }; + }; +} diff --git a/files/plank/launchers/google-chrome.dockitem b/files/plank/launchers/google-chrome.dockitem @@ -0,0 +1,2 @@ +[PlankDockItemPreferences] +Launcher=file:///run/current-system/sw/share/applications/google-chrome.desktop diff --git a/files/plank/launchers/io.elementary.code.dockitem b/files/plank/launchers/io.elementary.code.dockitem @@ -0,0 +1,2 @@ +[PlankDockItemPreferences] +Launcher=file:///run/current-system/sw/share/applications/io.elementary.code.desktop diff --git a/files/plank/launchers/io.elementary.files.dockitem b/files/plank/launchers/io.elementary.files.dockitem @@ -0,0 +1,2 @@ +[PlankDockItemPreferences] +Launcher=file:///run/current-system/sw/share/applications/io.elementary.files.desktop diff --git a/files/plank/launchers/io.elementary.switchboard.dockitem b/files/plank/launchers/io.elementary.switchboard.dockitem @@ -0,0 +1,2 @@ +[PlankDockItemPreferences] +Launcher=file:///run/current-system/sw/share/applications/io.elementary.switchboard.desktop diff --git a/files/plank/launchers/io.elementary.terminal.dockitem b/files/plank/launchers/io.elementary.terminal.dockitem @@ -0,0 +1,2 @@ +[PlankDockItemPreferences] +Launcher=file:///run/current-system/sw/share/applications/io.elementary.terminal.desktop diff --git a/files/plank/launchers/org.xfce.mousepad.dockitem b/files/plank/launchers/org.xfce.mousepad.dockitem @@ -1,2 +0,0 @@ -[PlankDockItemPreferences] -Launcher=file:///run/current-system/sw/share/applications/org.xfce.mousepad.desktop diff --git a/files/plank/launchers/thunar.dockitem b/files/plank/launchers/thunar.dockitem @@ -1,2 +0,0 @@ -[PlankDockItemPreferences] -Launcher=file:///run/current-system/sw/share/applications/thunar.desktop diff --git a/files/plank/launchers/xfce-settings-manager.dockitem b/files/plank/launchers/xfce-settings-manager.dockitem @@ -1,2 +0,0 @@ -[PlankDockItemPreferences] -Launcher=file:///run/current-system/sw/share/applications/xfce-settings-manager.desktop diff --git a/files/plank/launchers/xfce4-terminal.dockitem b/files/plank/launchers/xfce4-terminal.dockitem @@ -1,2 +0,0 @@ -[PlankDockItemPreferences] -Launcher=file:///run/current-system/sw/share/applications/xfce4-terminal.desktop diff --git a/files/ulauncher/extensions/com.github.brpaz.ulauncher-file-search.db b/files/ulauncher/extensions/com.github.brpaz.ulauncher-file-search.db Binary files differ. diff --git a/files/ulauncher/extensions/com.github.ikorjefocur.ulauncher-commandrunner.db b/files/ulauncher/extensions/com.github.ikorjefocur.ulauncher-commandrunner.db Binary files differ. diff --git a/files/ulauncher/themes/elementary/manifest.json b/files/ulauncher/themes/elementary/manifest.json @@ -0,0 +1,12 @@ +{ + "manifest_version": "1", + "name": "elementary", + "display_name": "Elementary OS Dark", + "extend_theme": "light", + "css_file": "theme.css", + "css_file_gtk_3.20+": "theme-gtk-3.20.css", + "matched_text_hl_colors": { + "when_selected": "#fff", + "when_not_selected": "#fff" + } +} diff --git a/files/ulauncher/themes/elementary/theme-gtk-3.20.css b/files/ulauncher/themes/elementary/theme-gtk-3.20.css @@ -0,0 +1,10 @@ +@import url("theme.css"); + +.input { + caret-color: @caret_color; +} + +/* Workaround for GTK+ < 3.20 */ +.selected.item-box { + border: none; +} diff --git a/files/ulauncher/themes/elementary/theme.css b/files/ulauncher/themes/elementary/theme.css @@ -0,0 +1,160 @@ +/* App Window */ +@define-color bg_color rgba(51,51,51,1); +@define-color window_bg @bg_color; +@define-color prefs_backgroud #aaa; + +/* Input */ +@define-color selected_bg_color #35628d; +@define-color selected_fg_color #fff; +@define-color input_color #fff; +@define-color caret_color darker(@input_color); + +/* Result Items */ +@define-color item_name #fff; +@define-color item_text #fff; +@define-color item_box_selected #4a4a4a; +@define-color item_text_selected #fff; +@define-color item_name_selected #fff; +@define-color item_shortcut_color #afafaf; +@define-color item_shortcut_shadow darker(@bg_color); +@define-color item_shortcut_color_sel #afafaf; +@define-color item_shortcut_shadow_sel darker(@item_box_selected); + +/* Custom */ +@define-color window_inner_border_color rgba(255, 255, 255, .075); +@define-color window_outer_border_color rgba(0,0,0,.8); + +@define-color input_text_box_color #3a3a3a; +@define-color input_text_box_border #262626; +@define-color input_text_box_bottom_extra_border #3f3f3f; +@define-color input_text_box_inset_shadow rgba(0,0,0,.5); + +@define-color item_shortcut_box_color #2f2f2f; +@define-color item_shortcut_box_shadow #2a2a2a; +@define-color item_shortcut_box_color_sel #424242; +@define-color item_shortcut_box_shadow_sel #3c3c3c; + +@define-color item_divider_upper_part #222; +@define-color item_divider_lower_part #444; + +.app { + background-color: @window_bg; + border-radius: 7px; + border: 1px solid @window_inner_border_color; + box-shadow: + 0 8px 10px 0px rgba(0, 0, 0, 0.8), + 0 0 0 1px @window_outer_border_color; + margin: 0px 5px 30px 5px; +} + +.input { + font-size: 34px; + font-weight: 600; + color: @input_color; + margin: -14px -54px -16px -15px; + + /* Fix for selection box cut off */ + padding-left: 15px; + padding-right: 55px; +} + +/* Selected Text in Input */ +.input *:selected, +.input *:focus, +*:selected:focus { + background-color: alpha (@selected_bg_color, 0.9); + color: @selected_fg_color; +} + +.item-text { + color: @item_text; + font-size: 12px; + font-weight: 400; + margin-left: -13px; /* To move text left because of moved icons */ +} +.item-name { + color: @item_name; + margin-top: 2px; /* To center text to icon height */ + font-size: 16px; + font-weight: 500; +} + +.selected.item-box { + background: linear-gradient( + 180deg, + rgba(0, 0, 0, 0) 0%, + rgba(0, 0, 0, 0) 10%, + @item_box_selected 10%, + @item_box_selected 93%, + rgba(0, 0, 0, 0) 93%, + rgba(0, 0, 0, 0) 100% + ); + /* Special fix to make the selection box smaller than the actual item + box so it doesnt overlap with the window corners on the bottom */ +} + +.selected.item-box .item-text { + color: @item_text_selected; +} + +.selected.item-box .item-name { + color: @item_name_selected; +} + +.item-shortcut { + color: @item_shortcut_color; + text-shadow: 0 0; /* Remove shadow from default theme */ + + background-color: @item_shortcut_box_color; + box-shadow: 0 1px 0px @item_shortcut_box_shadow; + + margin: 16px 3px; /* Resizing shortcut box */ + padding-top: 1px; /* Recentering text as font size 10 makes text jump up 1 pixel */ + border-radius: 3px; + font-size: 10px; + font-weight: 300; +} + +.selected.item-box .item-shortcut { + color: @item_shortcut_color_sel; + text-shadow: 0 0; /* Remove shadow from default theme */ + + background-color: @item_shortcut_box_color_sel; + box-shadow: 0 1px 0px @item_shortcut_box_shadow_sel; +} + +.prefs-btn { + opacity: 0; + margin-left: -5px; /* To center button above shortcut boxes */ +} + +.prefs-btn:hover { + background-color: @bg_color; /* To make background only visible when text is behind it */ + opacity: 1; +} + +.no-window-shadow { + margin: -20px; +} + +/* Custom Styling */ +.item-icon { + margin-left: -25px; /* Moving the icons to the left and bringing them in line */ +} + +.item-container { + margin-right: -10px; /* Moving the shortcut boxes to the right */ + margin-top: 3px; /* Making space for the dividers */ + margin-bottom: 1px; /* Same as above but smaller because the dividers are 2px shadows located at the top of the items */ +} + +.result-box { + margin-bottom: -10px; /* Minimizing the distracting bottom bar */ + margin-top: -2px; /* To get rid of the bigger border under the input box when expanded */ +} + +.item-frame { + box-shadow: + inset 0px 2px @item_divider_lower_part, + inset 0px 1px @item_divider_upper_part; /* Dividers between items */ +} diff --git a/files/xfce/gtk.css b/files/xfce/gtk.css @@ -3,6 +3,7 @@ border-top-right-radius: 15px; border-bottom-left-radius: 15px; border-bottom-right-radius: 15px; + -XfcePanelWindow-autohide-size: 0; } wnck-pager:selected { diff --git a/files/xfce/panel/docklike-26.rc b/files/xfce/panel/docklike-26.rc @@ -0,0 +1,13 @@ +[user] +showWindowCount=false +showPreviews=true +onlyDisplayVisible=true +indicatorStyle=1 +inactiveIndicatorStyle=4 +indicatorOrientation=1 +indicatorColorFromTheme=true +forceIconSize=true +iconSize=64 +keyComboActive=true +keyAloneActive=true +pinned=/run/current-system/sw/share/applications/google-chrome.desktop;/run/current-system/sw/share/applications/xfce4-terminal.desktop;/run/current-system/sw/share/applications/thunar.desktop;/run/current-system/sw/share/applications/org.xfce.mousepad.desktop;/run/current-system/sw/share/applications/xfce-settings-manager.desktop; diff --git a/files/xfce/settings/xfce4-keyboard-shortcuts.xml b/files/xfce/settings/xfce4-keyboard-shortcuts.xml @@ -65,6 +65,7 @@ </property> <property name="&lt;Super&gt;e" type="string" value="exo-open --launch MailReader"/> <property name="&lt;Super&gt;slash" type="string" value="ulauncher-toggle"/> + <property name="&lt;Super&gt;p" type="string" value="xfce4-panel-toggle"/> </property> </property> <property name="xfwm4" type="empty"> diff --git a/files/xfce/settings/xfce4-panel.xml b/files/xfce/settings/xfce4-panel.xml @@ -4,6 +4,7 @@ <property name="configver" type="int" value="2"/> <property name="panels" type="array"> <value type="int" value="0"/> + <value type="int" value="1"/> <property name="dark-mode" type="bool" value="true"/> <property name="panel-0" type="empty"> <property name="autohide-behavior" type="uint" value="1"/> @@ -30,7 +31,6 @@ <value type="int" value="16"/> <value type="int" value="24"/> <value type="int" value="18"/> - <value type="int" value="21"/> <value type="int" value="3"/> <value type="int" value="4"/> <value type="int" value="19"/> @@ -53,6 +53,24 @@ <property name="span-monitors" type="bool" value="false"/> <property name="enable-struts" type="bool" value="true"/> </property> + <property name="panel-1" type="empty"> + <property name="position" type="string" value="p=0;x=961;y=1031"/> + <property name="size" type="uint" value="72"/> + <property name="plugin-ids" type="array"> + <value type="int" value="23"/> + <value type="int" value="26"/> + <value type="int" value="25"/> + </property> + <property name="mode" type="uint" value="0"/> + <property name="length" type="double" value="1"/> + <property name="position-locked" type="bool" value="true"/> + <property name="autohide-behavior" type="uint" value="1"/> + <property name="nrows" type="uint" value="1"/> + <property name="length-adjust" type="bool" value="true"/> + <property name="icon-size" type="uint" value="16"/> + <property name="enter-opacity" type="uint" value="100"/> + <property name="leave-opacity" type="uint" value="85"/> + </property> </property> <property name="plugins" type="empty"> <property name="plugin-10" type="string" value="actions"> @@ -84,7 +102,6 @@ <property name="expand" type="bool" value="false"/> <property name="style" type="uint" value="0"/> </property> - <property name="plugin-26" type="string" value="thunar-tpa"/> <property name="plugin-3" type="string" value="separator"> <property name="expand" type="bool" value="true"/> <property name="style" type="uint" value="0"/> @@ -197,6 +214,13 @@ <property name="plugin-24" type="string" value="separator"> <property name="style" type="uint" value="0"/> </property> - <property name="plugin-21" type="string" value="windowck-plugin"/> + <property name="plugin-23" type="string" value="separator"> + <property name="expand" type="bool" value="false"/> + <property name="style" type="uint" value="0"/> + </property> + <property name="plugin-25" type="string" value="separator"> + <property name="style" type="uint" value="0"/> + </property> + <property name="plugin-26" type="string" value="docklike"/> </property> </channel> diff --git a/flake.nix b/flake.nix @@ -223,7 +223,7 @@ commit-lockfile-summary = "chore(flake): Update `inputs`"; # Binary Caches - substituters = [ + trusted-substituters = [ "https://cache.nixos.org" "https://nix-community.cachix.org" "https://nixpkgs-unfree.cachix.org" diff --git a/modules/README.md b/modules/README.md @@ -26,12 +26,16 @@ Configuration [Builder](./configuration.nix) - [`gui`](./gui): Module that configures GUI Desktops/Environments and the like - - - `desktop`: Choice of GUI Desktop - `"gnome" / "xfce"` + - `desktop`: Choice of GUI Desktop - `"gnome" / "xfce" / "pantheon"` - `wallpaper`: Desktop Wallpaper Choice (taken from `files.wallpapers`) - `fonts` - - `enable`: Enable Fonts Configuration - `true / false` - `gtk` - - `enable`: Enable GTK Configuration - `true / false` + - `launcher` - + - `enable`: Enable Application Launcher - `true / false` + - `terminal`: Terminal to be used by Launcher + - `theme`: Theme to be used by Launcher - `wayland` - - `enable`: Enable Wayland Configuration - `true / false` diff --git a/modules/apps/flatpak.nix b/modules/apps/flatpak.nix @@ -19,7 +19,14 @@ in { xdg.portal.enable = true; environment.persist.directories = ["/var/lib/flatpak"]; - user.persist.directories = [".cache/flatpak" ".local/share/flatpak"]; + user.persist.directories = [".cache/flatpak" ".local/share/flatpak" ".var/app"]; + + ## TODO + # Use system Dconf Settings + /* + [Environment] + DCONF_USER_CONFIG_DIR=.config/dconf + */ services.flatpak = { enable = true; @@ -40,7 +47,7 @@ in { # Use `flatpak remote-info --log` to find commit revisions packages = [ /* - { + { appId = ""; origin = ""; commit = ""; diff --git a/modules/apps/office.nix b/modules/apps/office.nix @@ -17,6 +17,7 @@ in { # Productivity easyeffects gimp + gnome.simple-scan gscan2pdf handbrake hunspell @@ -54,6 +55,7 @@ in { ".config/onlyoffice" ".local/share/data" ".local/share/onlyoffice" + ".local/share/whatsapp-for-linux" ".cache/thunderbird" ".cache/google-chrome" ".cache/zoom" diff --git a/modules/apps/wine.nix b/modules/apps/wine.nix @@ -29,20 +29,29 @@ in { hardware.opengl.driSupport32Bit = true; # Utilities - user.persist.directories = [".wine"] ++ optionals cfg.utilities [".config/notepad++"]; - environment.systemPackages = with pkgs.wine // pkgs; + user.persist.directories = + [".wine" ".cache/wine" ".cache/winetricks"] + ++ optionals cfg.utilities [".config/notepad++"]; + + environment.systemPackages = with pkgs.wine // pkgs; ( map (name: if (name.override.__functionArgs ? wine) then name.override {wine = cfg.package;} - else name) ([mkwindowsapp-tools] - ++ optionals cfg.utilities [notepad-plus-plus]) - # Wrapped Packages - ++ optionals cfg.utilities (attrValues (util.map.modules ../../packages/wine - (name: - pkgs.callPackage name { - inherit lib pkgs; - wine = cfg.package; - build = inputs.windows.lib."${pkgs.system}"; - }))); + else name) ([ + cfg.package + winetricks + mkwindowsapp-tools + playonlinux + ] + ++ optionals cfg.utilities ([notepad-plus-plus] + # Wrapped Packages + ++ (attrValues (util.map.modules ../../packages/wine + (name: + callPackage name { + inherit lib pkgs; + wine = cfg.package; + build = inputs.windows.lib."${pkgs.system}"; + }))))) + ); }; } diff --git a/modules/gui/desktop/gnome.nix b/modules/gui/desktop/gnome.nix @@ -117,7 +117,7 @@ in { { # Firefox GNOME Theme ".mozilla/firefox/default/chrome/userChrome.css".text = ''@import "${pkgs.custom.firefox-gnome-theme}/userChrome.css";''; - ".mozilla/firefox/default/chrome/userContent.css".text = firefox.theme; + ".mozilla/firefox/default/chrome/userContent.css".text = firefox.gnome; # Workaround for NixOS/nixpkgs/47340 ".mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json".source = "${pkgs.chrome-gnome-shell}/lib/mozilla/native-messaging-hosts/org.gnome.chrome_gnome_shell.json"; @@ -235,6 +235,7 @@ in { # Persisted Files user.persist.directories = [ + ".config/evolution" ".config/forge" ".config/gnome-boxes" ".config/gnome-builder" @@ -250,6 +251,7 @@ in { ".local/share/sounds" ".local/share/telepathy" ".local/share/webkitgtk" + ".cache/evolution" ".cache/fractal" ".cache/gnome-builder" ]; diff --git a/modules/gui/desktop/pantheon.nix b/modules/gui/desktop/pantheon.nix @@ -0,0 +1,226 @@ +{ + config, + lib, + util, + pkgs, + files, + ... +}: +with files; let + inherit (config.gui) desktop; + exists = app: builtins.elem app config.apps.list; + inherit (lib) mkForce mkIf mkMerge; +in { + ## Pantheon Desktop Configuration ## + config = mkIf (desktop == "pantheon" || desktop == "pantheon-minimal") (mkMerge [ + { + # Session + services.xserver.desktopManager.pantheon.enable = true; + } + + ## Full-Fledged Pantheon Desktop Configuration + (mkIf (desktop == "pantheon") { + warnings = ["Flatpak app support is enabled by default while using Pantheon Desktop"]; + + # Desktop Integration + gui = { + fonts.enable = true; + gtk.enable = true; + launcher = { + enable = true; + theme = "elementary"; + terminal = "io.elementary.terminal"; + }; + }; + + # Essential Utilities + services = { + gnome.gnome-keyring.enable = true; + pantheon.apps.enable = true; + }; + + programs = { + pantheon-tweaks.enable = true; + seahorse.enable = true; + }; + + # Panel Indicators + services.xserver.desktopManager.pantheon.extraWingpanelIndicators = with pkgs; [ + monitor + wingpanel-indicator-ayatana + ]; + + environment = { + # QT Theme + variables = { + "QT_QPA_PLATFORMTHEME" = "gtk3"; + "QT_STYLE_OVERRIDE" = mkForce ""; + }; + + # Panel Indicator Compatibility + pathsToLink = ["/libexec"]; + + # Apps + systemPackages = with pkgs.pantheon // pkgs; [ + appeditor + gthumb + torrential + ]; + }; + + # Persisted Files + user.persist.directories = [ + ".config/evolution" + ".config/plank" + ".config/torrential" + ".local/share/contractor" + ".local/share/evolution" + ".local/share/io.elementary.code" + ".local/share/io.elementary.photos" + ".cache/evolution" + ".cache/io.elementary.appcenter" + ]; + + # Color Scheme + stylix.base16Scheme = colors.elementary; + + ## User Configuration + user.homeConfig = { + imports = [pantheon.dconf]; + + # GTK+ Theme + gtk = { + theme = { + name = "io.elementary.stylesheet.blueberry"; + package = pkgs.pantheon.elementary-gtk-theme; + }; + + # Icons + iconTheme.name = mkForce "ePapirus-Dark"; + cursorTheme = { + name = "elementary"; + package = pkgs.pantheon.elementary-icon-theme; + size = 32; + }; + }; + + # Default Applications + xdg.mimeApps.defaultApplications = util.build.mime xdg.mime { + audio = ["io.elementary.files.desktop"]; + calendar = ["io.elementary.calendar.desktop"]; + directory = ["io.elementary.files.desktop"]; + image = ["io.elementary.photos.desktop"]; + pdf = ["org.gnome.Evince.desktop"]; + text = ["io.elementary.code.desktop"]; + video = ["io.elementary.videos.desktop"]; + }; + + # App Indicator Autostart + systemd.user.services.indicator-application-gtk3 = { + Unit.Description = "Application Indicator"; + Install.wantedBy = ["graphical-session.target"]; + Service = { + Type = "Simple"; + ExecStart = "${pkgs.indicator-application-gtk3}/libexec/indicator-application/indicator-application-service"; + }; + }; + + home = { + # Cursor Theme + pointerCursor = mkForce { + package = pkgs.pantheon.elementary-icon-theme; + name = "elementary"; + size = 32; + gtk.enable = true; + x11.enable = true; + }; + + file = + { + # Plank Dock + ".config/autostart/Dock.desktop".text = plank.autostart; + ".local/share/plank/themes/default/dock.theme".text = plank.theme; + ".config/plank/dock1/launchers" = { + source = plank.launchers; + recursive = true; + force = true; + }; + + # Panel Indicators + ".config/autostart/ibus-daemon.desktop".text = '' + [Desktop Entry] + Name=IBus Daemon + Type=Application + Exec=${pkgs.ibus}/bin/ibus-daemon --daemonize --desktop=pantheon --replace --xim + Categories= + Terminal=false + NoDisplay=true + StartupNotify=false + ''; + + ".config/autostart/monitor-background.desktop".text = '' + [Desktop Entry] + Name=Monitor Indicators + Type=Application + Exec=/run/current-system/sw/bin/com.github.stsdc.monitor --start-in-background + Icon=com.github.stsdc.monitor + Categories= + Terminal=false + NoDisplay=true + StartupNotify=false''; + } + ## 3rd Party Apps Configuration + // (mkIf (exists "firefox") { + # Firefox Elementary Theme + ".mozilla/firefox/default/chrome/userChrome.css".text = ''@import "${pkgs.custom.firefox-elementary-theme}/Windows/userChrome.css";''; + ".mozilla/firefox/default/chrome/userContent.css".text = firefox.elementary; + }); + }; + + # Code Editor + programs.vscode = mkIf (exists "vscode") { + extensions = [pkgs.code.vscode-marketplace.sixpounder.elementary-theme]; + userSettings = { + "workbench.colorTheme" = "Elementary Dark"; + "terminal.external.linuxExec" = "io.elementary.terminal"; + }; + }; + }; + + # Flatpak Apps + apps.list = ["flatpak"]; + services.flatpak = { + remotes = [ + { + name = "appcenter"; + location = "https://flatpak.elementary.io/repo.flatpakrepo"; + } + ]; + + packages = [ + { + appId = "com.github.hezral.clips"; + origin = "appcenter"; + } + ]; + }; + }) + + ## Minimal Pantheon Desktop Configuration + (mkIf (desktop == "pantheon-minimal") { + # Disabled Services + services.fwupd.enable = mkForce false; + services.power-profiles-daemon.enable = mkForce false; + services.tumbler.enable = mkForce false; + services.geoclue2.enable = mkForce false; + + # Excluded Packages + environment.pantheon.excludePackages = with pkgs.pantheon; [ + elementary-camera + elementary-music + elementary-photos + elementary-videos + ]; + }) + ]); +} diff --git a/modules/gui/desktop/xfce.nix b/modules/gui/desktop/xfce.nix @@ -9,7 +9,7 @@ with files; let inherit (config.gui) desktop wallpaper; exists = app: builtins.elem app config.apps.list; - inherit (lib) mkAfter mkForce mkIf mkMerge replaceStrings; + inherit (lib) mkAfter mkForce mkIf mkMerge; # GTK+ Theme theme = { @@ -53,18 +53,21 @@ in { gui = { fonts.enable = true; gtk.enable = true; + launcher = { + enable = true; + theme = theme.name; + terminal = "xfce4-terminal"; + }; }; - environment.variables.GTK_THEME = theme.name; + # Essential Utilities services = { - bamf.enable = true; blueman.enable = true; touchegg.enable = true; gnome.gnome-keyring.enable = true; xserver.displayManager.lightdm.greeters.gtk = {inherit theme;}; }; - # Plugins programs = { xfconf.enable = true; seahorse.enable = true; @@ -79,8 +82,9 @@ in { }; environment = { - # QT Theme + # Theming etc."xdg/Kvantum/kvantum.kvconfig".text = mkAfter "theme=KvArcDark"; + variables."GTK_THEME" = theme.name; # Utilities systemPackages = with pkgs.xfce // pkgs; [ @@ -93,8 +97,8 @@ in { plank system-config-printer transmission-gtk - ulauncher xfce4-clipman-plugin + xfce4-docklike-plugin xfce4-eyes-plugin xfce4-notes-plugin xfce4-panel-profiles @@ -105,18 +109,28 @@ in { xfce4-whiskermenu-plugin xfce4-windowck-plugin xorg.xkill + + (writeShellApplication { + name = "xfce4-panel-toggle"; + runtimeInputs = [xfce.xfconf]; + text = '' + for num in {0,1} + do + current=$(xfconf-query -c xfce4-panel -p /panels/panel-"$num"/autohide-behavior) + if [[ current -eq 1 ]]; then next=0; else next=1; fi + xfconf-query -c xfce4-panel -p /panels/panel-"$num"/autohide-behavior -s $next + done + ''; + }) ]; }; # Persisted Files user.persist.directories = [ ".config/Mousepad" - ".config/plank" ".config/Thunar" - ".config/ulauncher" ".config/xfce4" ".cache/xfce4" - ".local/share/ulauncher" ]; # Color Scheme @@ -147,15 +161,6 @@ in { # Touchpad Gestures ".config/touchegg/touchegg.conf".text = gestures; - # Plank Dock - ".config/autostart/Dock.desktop".text = plank.autostart; - ".local/share/plank/themes/default/dock.theme".text = plank.theme; - ".config/plank/dock1/launchers" = { - source = plank.launchers; - recursive = true; - force = true; - }; - # Desktop Settings ".config/xfce4/terminal/terminalrc".text = xfce.terminal; } @@ -199,53 +204,11 @@ in { }; } ## 3rd Party Apps Configuration - // (with ulauncher; { - ## Launcher Settings - # Themes - ".config/ulauncher/user-themes" = { - source = themes; - recursive = true; - }; - - # Extensions - ".config/ulauncher/ext_preferences" = { - source = extensions; - recursive = true; - force = true; - }; - - # Scripts - ".config/ulauncher/scripts.json".text = scripts; - - # Settings - ".config/ulauncher/extensions.json".text = extension; - ".config/ulauncher/settings.json".text = - replaceStrings ["@terminal" "@theme"] ["xfce4-terminal" theme.name] settings; - }); - - # Autostart - systemd.user.services.ulauncher = { - Unit.Description = "Start ULauncher"; - Install.WantedBy = ["graphical-session.target"]; - Service = { - Type = "Simple"; - Restart = "Always"; - RestartSec = 1; - ExecStart = pkgs.writeShellScript "ulauncher-env-wrapper.sh" '' - export PATH="''${XDG_BIN_HOME}:$HOME/.nix-profile/bin:/etc/profiles/per-user/$USER/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin" - export GDK_BACKEND=x11 - exec ${pkgs.ulauncher}/bin/ulauncher --hide-window - ''; + // { + # Discord Arc Theme + ".config/BetterDiscord/data/stable/custom.css" = + mkIf (exists "discord") {text = ''@import url(https://rawcdn.githack.com/orblazer/discord-nordic/f3f6833c70d0b27b1cde986233b7009d61917812/nordic.theme.css);'';}; }; - }; - - # Dock Settings - dconf.settings."net/launchpad/plank/docks/dock1" = { - current-workspace-only = true; - icon-size = 60; - pressure-reveal = true; - theme = "default"; - }; # Code Editor programs.vscode = mkIf (exists "vscode") { diff --git a/modules/gui/gtk.nix b/modules/gui/gtk.nix @@ -5,7 +5,7 @@ files, ... }: let - inherit (lib) mkEnableOption mkForce mkIf; + inherit (lib) mkDefault mkEnableOption mkIf; in { options.gui.gtk.enable = mkEnableOption "Enable GTK Configuration"; @@ -19,7 +19,7 @@ in { # Platform Integration programs.gnupg.agent.pinentryFlavor = "gtk2"; environment = { - variables."QT_STYLE_OVERRIDE" = mkForce "kvantum"; + variables."QT_STYLE_OVERRIDE" = mkDefault "kvantum"; systemPackages = [pkgs.libsForQt5.qtstyleplugin-kvantum]; etc."xdg/Kvantum/kvantum.kvconfig".text = "[General]"; }; @@ -43,6 +43,9 @@ in { name = "Papirus-Dark"; package = pkgs.papirus-icon-theme; }; + + gtk3.extraConfig.gtk-application-prefer-dark-theme = 1; + gtk4.extraConfig.gtk-application-prefer-dark-theme = 1; }; }; }; diff --git a/modules/gui/launcher.nix b/modules/gui/launcher.nix @@ -0,0 +1,78 @@ +{ + config, + lib, + files, + pkgs, + ... +}: let + inherit (lib) mkEnableOption mkIf mkOption replaceStrings types; + cfg = config.gui.launcher; +in { + options.gui.launcher = { + enable = mkEnableOption "Enable Application Launcher"; + + terminal = mkOption { + description = "Terminal to be used by Launcher"; + type = types.str; + default = "xterm"; + }; + + theme = mkOption { + description = "Theme to be used by Launcher"; + type = types.str; + default = "adwaita"; + }; + }; + + ## ULauncher Configuration ## + config = mkIf cfg.enable { + # Launcher Package + environment.systemPackages = [pkgs.ulauncher]; + + user = { + persist.directories = [".config/ulauncher" ".local/share/ulauncher"]; + + # Customisation + homeConfig = { + home.file = with files.ulauncher; { + # Themes + ".config/ulauncher/user-themes" = { + source = themes; + recursive = true; + }; + + # Extensions + ".config/ulauncher/ext_preferences" = { + source = extensions; + recursive = true; + force = true; + }; + + # Scripts + ".config/ulauncher/scripts.json".text = scripts; + + # Settings + ".config/ulauncher/extensions.json".text = extension; + ".config/ulauncher/settings.json".text = + replaceStrings ["@terminal" "@theme"] [cfg.terminal cfg.theme] settings; + }; + + # Autostart + systemd.user.services.ulauncher = { + Unit.Description = "Start ULauncher"; + Install.WantedBy = ["graphical-session.target"]; + Service = { + Type = "Simple"; + Restart = "Always"; + RestartSec = 1; + ExecStart = pkgs.writeShellScript "ulauncher-env-wrapper.sh" '' + export PATH="''${XDG_BIN_HOME}:$HOME/.nix-profile/bin:/etc/profiles/per-user/$USER/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin" + export GDK_BACKEND=x11 + exec ${pkgs.ulauncher}/bin/ulauncher --hide-window + ''; + }; + }; + }; + }; + }; +} diff --git a/modules/gui/theme.nix b/modules/gui/theme.nix @@ -6,8 +6,10 @@ files, ... }: let - inherit (lib) attrNames hasSuffix mkOption types; + inherit (lib) attrNames hasSuffix mkIf mkOption optional types; cfg = config.gui; + enable = !(cfg.desktop == "" || hasSuffix "-minimal" cfg.desktop); + exists = app: builtins.elem app config.apps.list; in { imports = [inputs.stylix.nixosModules.stylix]; @@ -20,7 +22,7 @@ in { ## Base16 Color Theming ## config = rec { - environment.systemPackages = [stylix.cursor.package]; + environment.systemPackages = [stylix.cursor.package] ++ optional enable pkgs.papirus-icon-theme; stylix = { autoEnable = false; @@ -32,7 +34,7 @@ in { }; } // ( - if (cfg.desktop == "" || hasSuffix "-minimal" cfg.desktop) + if (!enable) then { homeManagerIntegration.autoImport = false; } @@ -49,7 +51,7 @@ in { user.homeConfig.stylix.targets = { bat.enable = true; - vscode.enable = false; + vscode.enable = mkIf (exists "vscode") false; }; }; } diff --git a/modules/nix/default.nix b/modules/nix/default.nix @@ -7,6 +7,7 @@ }: let inherit (lib) mkEnableOption optionals; inherit (config.nix) tools; + flake = (import ../../flake.nix).nixConfig; in { imports = [./index.nix inputs.utils.nixosModules.autoGenFromInputs]; @@ -32,11 +33,14 @@ in { generateNixPathFromInputs = true; generateRegistryFromInputs = true; - # User Permissions settings = { + # User Permissions allowed-users = ["root" "@wheel"]; trusted-users = ["root" "@wheel"]; + # Binary Cache + inherit (flake) trusted-substituters trusted-public-keys; + # Additional Features sandbox = true; system-features = ["kvm" "recursive-nix"]; diff --git a/modules/shell/zsh.nix b/modules/shell/zsh.nix @@ -48,7 +48,6 @@ in { bindkey '^[[C' forward-char bindkey '^[[D' backward-char bindkey '^[[F' end-of-line - bindkey '^H' backward-kill-word bindkey '^[[H' beginning-of-line bindkey '^J' backward-kill-line ''; diff --git a/packages/firefox-elementary-theme/default.nix b/packages/firefox-elementary-theme/default.nix @@ -0,0 +1,28 @@ +{ + lib, + pkgs, + ... +}: +with pkgs; let + metadata = import ./metadata.nix; +in + stdenv.mkDerivation rec { + pname = "firefox-elementary-theme"; + version = metadata.rev; + + src = fetchFromGitHub { + owner = "Zonnev"; + repo = "elementaryos-firefox-theme"; + inherit (metadata) rev sha256; + }; + + dontBuild = true; + installPhase = "mkdir -p $out/ && cp -r . $out/"; + + meta = with lib; { + description = "An Elementary OS Theme for Firefox"; + homepage = metadata.repo; + license = licenses.mpl20; + maintainers = ["maydayv7"]; + }; + } diff --git a/packages/firefox-elementary-theme/metadata.nix b/packages/firefox-elementary-theme/metadata.nix @@ -0,0 +1,6 @@ +{ + repo = "https://github.com/Zonnev/elementaryos-firefox-theme"; + branch = "elementaryos-firefox-theme"; + rev = "8105628f2c526d7fdb4a3680dcb70d7245dd4f4c"; + sha256 = "sha256-Rwc5CDZ/HilSoz+G2xBbONCsgJbUXxF0DMmnx08vAnA="; +} diff --git a/packages/overlays/_discord.nix b/packages/overlays/_discord.nix @@ -1,10 +0,0 @@ -final: prev: { - # Update Discord to latest version - discord = prev.discord.overrideAttrs (_: rec { - version = "0.0.34"; - src = prev.fetchzip { - url = "https://dl.discordapp.net/apps/linux/${version}/discord-${version}.tar.gz"; - sha256 = "sha256-cLkc3ezMABO7y62HFyuxB0nTs0M0sg0S0oxiTsO2IYE="; - }; - }); -} diff --git a/packages/overlays/nixFlakes.nix b/packages/overlays/nixFlakes.nix @@ -1,13 +1,4 @@ final: prev: { # Update Nix to latest version - nixFlakes = prev.nixFlakes.overrideAttrs (old: rec { - version = "2.19.1"; - src = prev.fetchFromGitHub { - owner = "NixOS"; - repo = "nix"; - rev = version; - hash = "sha256-OzAeQwlAF4l0h2uBWGIPvGBYNL6MpBfrdRKwHTRQXl4="; - }; - patches = old.patches or []; - }); + nixFlakes = prev.nixVersions.nix_2_19; } diff --git a/scripts/nixos.nix b/scripts/nixos.nix @@ -44,7 +44,7 @@ with files; let apply = '' # Usage # - --activate - Activates Current Configuration + --activate [ home ] - Activates Current [ Home ] Configuration --boot - Applies Configuration on boot --delta - Shows Package Delta for Build --rollback [ 'generation' ] - Reverts to Last [ or Specified ] Build Generation @@ -69,9 +69,9 @@ with files; let update = '' # Usage # - --pkgs - Automatically updates manually packaged apps - --commit - Updates 'inputs' and commits changes - 'repo' ['source'] - Updates 'repo' input [ To specified 'source' ] + --pkgs - Automatically updates manually packaged apps + --commit - Updates 'inputs' and commits changes + 'repo' [ 'source' ] - Updates 'repo' input [ To specified 'source' ] ''; }; in @@ -119,8 +119,17 @@ in sudo nixos-rebuild switch --flake ${path.system}# ;; "--activate") - echo "Activating Configuration..." - sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch + case $3 in + "") + echo "Activating Configuration..." + sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch + ;; + "home") + echo "Applying Home Configuration..." + sudo systemctl restart home-manager-"$USER" + ;; + *) error "Unknown Option '$3'";; + esac ;; "--boot") echo "Applying Configuration..." diff --git a/secrets/default.nix b/secrets/default.nix @@ -1,6 +1,5 @@ { config, - lib, util, inputs, pkgs, @@ -17,6 +16,9 @@ }; sops = { + # GPG Key Import + gnupg.home = files.gpg; + # Encrypted Secrets secrets = let directory = ./. + "/${config.networking.hostName}"; @@ -27,12 +29,6 @@ then util.map.secrets {inherit directory;} else {} ); - - # GPG Key Import - gnupg = { - home = files.gpg; - sshKeyPaths = lib.mkForce []; - }; }; }; }