From c002dba2c25c5e6da72e0c9c926c6ea2ceb450a1 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Fri, 5 Jul 2024 03:15:10 +0200 Subject: [PATCH 1/7] Disable application cache for walker --- home/programs/graphical/launchers/walker/config.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/home/programs/graphical/launchers/walker/config.json b/home/programs/graphical/launchers/walker/config.json index e2f5ad1..6871011 100644 --- a/home/programs/graphical/launchers/walker/config.json +++ b/home/programs/graphical/launchers/walker/config.json @@ -10,6 +10,9 @@ "hyprland": { "context_aware_history": false }, + "applications": { + "disable_cache": true + }, "activation_mode": { "disabled": false, "use_f_keys": false, From 0dc17258afb1089bc0faafde6488474c5eca2511 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 7 Jul 2024 18:52:09 +0200 Subject: [PATCH 2/7] flake: update --- flake.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/flake.lock b/flake.lock index c91e857..778abae 100644 --- a/flake.lock +++ b/flake.lock @@ -116,11 +116,11 @@ ] }, "locked": { - "lastModified": 1717285511, - "narHash": "sha256-iKzJcpdXih14qYVcZ9QC9XuZYnPc6T8YImb6dX166kw=", + "lastModified": 1719994518, + "narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "2a55567fcf15b1b1c7ed712a2c6fadaec7412ea8", + "rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7", "type": "github" }, "original": { @@ -306,11 +306,11 @@ ] }, "locked": { - "lastModified": 1719827439, - "narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=", + "lastModified": 1720188602, + "narHash": "sha256-lC3byBmhVZFzWl/dCic8+cKUEEAXAswWOYjq4paFmbo=", "owner": "nix-community", "repo": "home-manager", - "rev": "59ce796b2563e19821361abbe2067c3bb4143a7d", + "rev": "e3582e5151498bc4d757e8361431ace8529e7bb7", "type": "github" }, "original": { @@ -391,11 +391,11 @@ ] }, "locked": { - "lastModified": 1719454904, - "narHash": "sha256-/p5EdN8b8XxOihdqw6bTh5zsVR8iecdDB7qXo/jRy+4=", + "lastModified": 1720059538, + "narHash": "sha256-6CTyQ37ywENn59pVEVuYh2HFpX11RcMil8OaGKuoo90=", "owner": "nixpak", "repo": "nixpak", - "rev": "02483947c304279c6861fcd15df9aee8859a5a7b", + "rev": "196d621ef861d285a1e5407ef7ee723e60e2b28c", "type": "github" }, "original": { @@ -432,11 +432,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1719690277, - "narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=", + "lastModified": 1720031269, + "narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "2741b4b489b55df32afac57bc4bfd220e8bf617e", + "rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", "type": "github" }, "original": { @@ -671,11 +671,11 @@ ] }, "locked": { - "lastModified": 1719775374, - "narHash": "sha256-sKs30zEMd2zFGnfbV4WuRZsYveI/fuD14cyOnb0qyi0=", + "lastModified": 1720255585, + "narHash": "sha256-rWNhpuX8hdFUS1cdvbkEkxmYLZ7aXLxXx+b/NCxJZyM=", "owner": "abenz1267", "repo": "walker", - "rev": "cd97cbc2ca87b484fb4ce0d426e21770342e9f68", + "rev": "51142bab4dd4c937ccd22da16268c34c7bb7606b", "type": "github" }, "original": { From b371662ad03d020198a0c56dd7e32a5375284406 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 7 Jul 2024 18:58:04 +0200 Subject: [PATCH 3/7] flake: update --- flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flake.lock b/flake.lock index 778abae..24f5c80 100644 --- a/flake.lock +++ b/flake.lock @@ -306,11 +306,11 @@ ] }, "locked": { - "lastModified": 1720188602, - "narHash": "sha256-lC3byBmhVZFzWl/dCic8+cKUEEAXAswWOYjq4paFmbo=", + "lastModified": 1720327769, + "narHash": "sha256-kAsg3Lg4YKKpGw+f1W2s5hzjP8B0y/juowvjK8utIag=", "owner": "nix-community", "repo": "home-manager", - "rev": "e3582e5151498bc4d757e8361431ace8529e7bb7", + "rev": "6b7ce96f34b324e4e104abc30d06955d216bac71", "type": "github" }, "original": { @@ -671,11 +671,11 @@ ] }, "locked": { - "lastModified": 1720255585, - "narHash": "sha256-rWNhpuX8hdFUS1cdvbkEkxmYLZ7aXLxXx+b/NCxJZyM=", + "lastModified": 1720339391, + "narHash": "sha256-IHlZ1sUQzTJATSt8zw8CFXdQoZOBTvfSG9d9erOjS04=", "owner": "abenz1267", "repo": "walker", - "rev": "51142bab4dd4c937ccd22da16268c34c7bb7606b", + "rev": "bf9bc52b328ce201c536ecff5d8542ba2232f603", "type": "github" }, "original": { From 0f76593d329dc26db0e0cf76a6cc76152d338dd9 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 7 Jul 2024 19:26:10 +0200 Subject: [PATCH 4/7] amdgpu: Enable OpenCL & HIP --- system/shared/hardware/gpu/amd.nix | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/system/shared/hardware/gpu/amd.nix b/system/shared/hardware/gpu/amd.nix index 146330a..0f3402e 100644 --- a/system/shared/hardware/gpu/amd.nix +++ b/system/shared/hardware/gpu/amd.nix @@ -22,13 +22,24 @@ in vulkan-extension-layer ]; - # Enable OpenGL - hardware.graphics = { - enable = true; + hardware = { + graphics = { + enable = true; - # Enable OpenCL and AMDVLK - extraPackages = with pkgs; [ amdvlk ]; - extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; + # Enable AMDVLK (AMD's open-source Vulkan driver) + extraPackages = with pkgs; [ amdvlk ]; + extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; + }; + + # OpenCL (Universal GPU computing API - not AMD specific) + # To check if this works, run: `nix run nixpkgs#clinfo` (after rebooting) + opengl.extraPackages = with pkgs; [rocmPackages.clr.icd]; }; + + # HIP (SDK that allows running CUDA code on AMD GPUs) + # Most software has the paths hard-coded + systemd.tmpfiles.rules = [ + "L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}" + ]; }; } From 38945825aa85eb888cc5331ec97f6b20a041d843 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sun, 7 Jul 2024 19:26:27 +0200 Subject: [PATCH 5/7] walker: Rewrite config in nix --- .../graphical/launchers/walker/config.json | 100 ------------- .../graphical/launchers/walker/default.nix | 137 +++++++++++++++++- 2 files changed, 135 insertions(+), 102 deletions(-) delete mode 100644 home/programs/graphical/launchers/walker/config.json diff --git a/home/programs/graphical/launchers/walker/config.json b/home/programs/graphical/launchers/walker/config.json deleted file mode 100644 index 6871011..0000000 --- a/home/programs/graphical/launchers/walker/config.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "placeholder": "Search...", - "keep_open": false, - "ignore_mouse": false, - "ssh_host_file": "", - "enable_typeahead": false, - "show_initial_entries": true, - "fullscreen": false, - "scrollbar_policy": "automatic", - "hyprland": { - "context_aware_history": false - }, - "applications": { - "disable_cache": true - }, - "activation_mode": { - "disabled": false, - "use_f_keys": false, - "use_alt": false - }, - "search": { - "delay": 0, - "hide_icons": false, - "margin_spinner": 10, - "hide_spinner": false - }, - "runner": { - "excludes": [ - "rm" - ] - }, - "clipboard": { - "max_entries": 10, - "image_height": 300 - }, - "align": { - "ignore_exlusive": true, - "width": 400, - "horizontal": "center", - "vertical": "start", - "anchors": { - "top": false, - "left": false, - "bottom": false, - "right": false - }, - "margins": { - "top": 20, - "bottom": 0, - "end": 0, - "start": 0 - } - }, - "list": { - "height": 300, - "margin_top": 10, - "always_show": true, - "hide_sub": false - }, - "orientation": "vertical", - "icons": { - "theme": "", - "hide": false, - "size": 28, - "image_height": 200 - }, - "modules": [ - { - "name": "runner", - "prefix": "" - }, - { - "name": "applications", - "prefix": "" - }, - { - "name": "ssh", - "prefix": "", - "switcher_exclusive": true - }, - { - "name": "finder", - "prefix": "", - "switcher_exclusive": true - }, - { - "name": "commands", - "prefix": "", - "switcher_exclusive": true - }, - { - "name": "websearch", - "prefix": "?" - }, - { - "name": "switcher", - "prefix": "/" - } - ] -} diff --git a/home/programs/graphical/launchers/walker/default.nix b/home/programs/graphical/launchers/walker/default.nix index fa10293..091daad 100644 --- a/home/programs/graphical/launchers/walker/default.nix +++ b/home/programs/graphical/launchers/walker/default.nix @@ -1,7 +1,7 @@ { inputs, + config, osConfig, - pkgs, lib, ... }: let @@ -14,7 +14,140 @@ in { enable = true; runAsService = true; # makes walker a lot faster when starting - config = builtins.fromJSON (builtins.readFile ./config.json); + config = { + placeholder = "Search..."; + ignore_mouse = false; + terminal = "kitty"; + shell_config = "${config.xdg.configHome}/zsh/.zshrc"; + ssh_host_file = "${config.home.homeDirectory}/.ssh/known_hosts"; + enable_typeahead = false; + show_initial_entries = true; + fullscreen = false; + scrollbar_policy = "automatic"; + websearch = { + engines = ["google" "duckduckgo"]; + }; + hyprland = { + context_aware_history = false; + }; + applications = { + enable_cache = false; # disabling doesn't cause slowdowns, and allows picking up new apps automatically + }; + + # Mode for picking the entry with keyboard using labels + # defaults to ctrl+ + activation_mode = { + disabled = false; + use_f_keys = false; # F-keys instead of letters for labels + use_alt = false; # use alt instead of ctrl to enter activation mode + }; + search = { + delay = 0; # debounce delay (until src/cmd is ran) in ms + hide_icons = false; + margin_spinner = 10; # margin of the spinner in px + hide_spinner = false; + }; + runner = { + excludes = ["rm"]; # commands to be excluded from the runner + }; + clipboard = { + max_entries = 10; + image_height = 300; + }; + align = { + ignore_exclusive = true; + width = 400; + horizontal = "center"; + vertical = "start"; + anchors = { + top = false; + left = false; + bottom = false; + right = false; + }; + margins = { + top = 20; + bottom = 0; + end = 0; + start = 0; + }; + }; + list = { + height = 300; + width = 100; + margin_top = 10; + always_show = true; + hide_sub = false; + fixed_height = false; + }; + orientation = "vertical"; + icons = { + theme = ""; # GTK Icon theme (default) + hide = false; + size = 28; + image_height = 200; + }; + # Built-in modules + modules = [ + # Module switcher + { + name = "switcher"; + prefix = "/"; + } + + # Default modules (always listed) + { + name = "runner"; + prefix = ""; + } + { + name = "applications"; + prefix = ""; + } + + # Prefix modules + { + name = "hyprland"; + prefix = "#"; + } + { + name = "clipboard"; + prefix = ">"; + } + + # Switcher exclusive modules (must be chosen) + { + name = "commands"; # walker commands + prefix = ""; + switcher_exclusive = true; + } + { + name = "ssh"; + prefix = ""; + switcher_exclusive = true; + } + { + name = "websearch"; # uses google + prefix = ""; + switcher_exclusive = true; + } + ]; + # Custom modules + external = [ + { + name = "Home directory explorer"; + prefix = "~"; + src = "fd --base-directory ~ %TERM%"; + cmd = "xdg-open file://%RESULT%"; + } + { + name = "DDG search"; + prefix = "?"; + src = "jq -sRr '@uri'"; + cmd = "xdg-open https://duckduckgo.com/?t=h_&q=%RESULT%&ia=web"; + } + ]; + }; style = builtins.readFile ./style.css; }; }; From cd412906a83c9a3e98a2e9ba61418045a3aed9d6 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 8 Jul 2024 14:54:54 +0200 Subject: [PATCH 6/7] Add virtualbox --- home/programs/graphical/apps/default.nix | 1 + home/programs/graphical/apps/virtualbox.nix | 16 ++++++++++++++++ hosts/voyager/default.nix | 3 +++ options/home/programs/default.nix | 1 + 4 files changed, 21 insertions(+) create mode 100644 home/programs/graphical/apps/virtualbox.nix diff --git a/home/programs/graphical/apps/default.nix b/home/programs/graphical/apps/default.nix index bbb1780..d6b33cb 100644 --- a/home/programs/graphical/apps/default.nix +++ b/home/programs/graphical/apps/default.nix @@ -10,5 +10,6 @@ _: { ./stremio.nix ./qbittorrent.nix ./qalculate-gtk.nix + ./virtualbox.nix ]; } diff --git a/home/programs/graphical/apps/virtualbox.nix b/home/programs/graphical/apps/virtualbox.nix new file mode 100644 index 0000000..757f9ae --- /dev/null +++ b/home/programs/graphical/apps/virtualbox.nix @@ -0,0 +1,16 @@ +{ + lib, + pkgs, + osConfig, + ... +}: let + inherit (lib) mkIf; + + cfg = osConfig.myOptions.home-manager.programs.applications.virtualbox; +in { + config = mkIf cfg.enable { + home.packages = with pkgs; [ + virtualbox + ]; + }; +} diff --git a/hosts/voyager/default.nix b/hosts/voyager/default.nix index 25f9581..1702653 100644 --- a/hosts/voyager/default.nix +++ b/hosts/voyager/default.nix @@ -65,6 +65,8 @@ ".local/share/Smart Code ltd/Stremio" ".config/obs-studio" ".local/share/PrismLauncher" + ".config/VirtualBox" + ".local/share/VirtulBox VMs" # Tools ".ssh" @@ -210,6 +212,7 @@ }; }; qalculate-gtk.enable = true; + virtualbox.enable = true; }; file-managers = { pcmanfm-qt.enable = true; diff --git a/options/home/programs/default.nix b/options/home/programs/default.nix index 4135ce3..1f637ce 100644 --- a/options/home/programs/default.nix +++ b/options/home/programs/default.nix @@ -47,6 +47,7 @@ in obs.enable = mkEnableOption "OBS (Free and oepn source software for video recording and live streaming)"; mpv.enable = mkEnableOption "MPV (General-purpose media player)"; qalculate-gtk.enable = mkEnableOption "qalculate-gtk (The ultimate desktop calculator)"; + virtualbox.enable = mkEnableOption "VirtualBox"; }; file-managers = { From 82a07127b7110e778131c598c57428aa1b2e1422 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Mon, 8 Jul 2024 14:58:39 +0200 Subject: [PATCH 7/7] Use hardware.graphics instead of hardware.opengl --- system/shared/hardware/gpu/amd.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/system/shared/hardware/gpu/amd.nix b/system/shared/hardware/gpu/amd.nix index 0f3402e..173d886 100644 --- a/system/shared/hardware/gpu/amd.nix +++ b/system/shared/hardware/gpu/amd.nix @@ -26,14 +26,17 @@ in graphics = { enable = true; - # Enable AMDVLK (AMD's open-source Vulkan driver) - extraPackages = with pkgs; [ amdvlk ]; + extraPackages = with pkgs; [ + # Enable AMDVLK (AMD's open-source Vulkan driver) + amdvlk + + # OpenCL (Universal GPU computing API - not AMD specific) + # To check if this works, run: `nix run nixpkgs#clinfo` (after rebooting) + rocmPackages.clr.icd + ]; + # AMDVLK for 32-bit applications extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; }; - - # OpenCL (Universal GPU computing API - not AMD specific) - # To check if this works, run: `nix run nixpkgs#clinfo` (after rebooting) - opengl.extraPackages = with pkgs; [rocmPackages.clr.icd]; }; # HIP (SDK that allows running CUDA code on AMD GPUs)