Add Zoxide, change to Shotman, simplify xdg folders, enable libvirt on Jupiter, fix networking and such

This commit is contained in:
Bun 2025-05-05 16:58:24 -04:00
parent d9e30cd69e
commit 26350d1de4
14 changed files with 28 additions and 56 deletions

View file

@ -5,7 +5,10 @@
services.globalprotect.enable = true; services.globalprotect.enable = true;
virtualisation.vmware.host.enable = true; virtualisation = {
libvirtd.enable = true;
vmware.host.enable = true;
};
nixpkgs.allowUnfreePackages = [ "vmware-workstation" ]; nixpkgs.allowUnfreePackages = [ "vmware-workstation" ];

View file

@ -15,6 +15,7 @@
./ranger ./ranger
./tmux ./tmux
./yt-dlp ./yt-dlp
./zoxide
./zsh ./zsh
]; ];
} }

View file

@ -1,5 +1,6 @@
{ config, ... }: { config, ... }:
{ {
programs.nix-index.enable = true; programs.nix-index.enable = true;
home.persistence."/persist${config.home.homeDirectory}".directories = [ ".cache/nix-index" ]; home.persistence."/persist${config.home.homeDirectory}".directories = [ ".cache/nix-index" ];
} }

View file

@ -97,15 +97,17 @@
file = { file = {
".local/share/ranger/bookmarks".text = '' ".local/share/ranger/bookmarks".text = ''
# Local files # Local files
h:${config.home.homeDirectory}/ h:${config.home.homeDirectory}
k:${config.home.homeDirectory}/Keepers k:${config.home.homeDirectory}/Keepers
j:${config.home.homeDirectory}/Downloads j:${config.home.homeDirectory}/Downloads
j:${config.home.homeDirectory}/Documents
p:${config.home.homeDirectory}/Photos
v:${config.home.homeDirectory}/Videos v:${config.home.homeDirectory}/Videos
n:${config.home.homeDirectory}/Projects/nixos-config n:${config.home.homeDirectory}/Projects/nixos-config
c:${config.home.homeDirectory}/.config c:${config.home.homeDirectory}/.config
l:${config.home.homeDirectory}/.local l:${config.home.homeDirectory}/.local
d:/mnt q:/persist
p:/persist w:/mnt
# Remote files # Remote files
N:${config.home.homeDirectory}/Network N:${config.home.homeDirectory}/Network

View file

@ -0,0 +1,6 @@
{ config, ... }:
{
programs.zoxide.enable = true;
home.persistence."/persist${config.home.homeDirectory}".directories = [ ".local/share/zoxide" ];
}

View file

@ -1,4 +1,7 @@
{ config, ... }: { config, lib, ... }:
{ {
services.gnome-keyring.enable = config.home.desktop.enable; config = lib.mkIf config.home.desktop.enable {
services.gnome-keyring.enable = true;
home.persistence."/persist${config.home.homeDirectory}".directories = [ ".local/share/keyrings" ];
};
} }

View file

@ -11,13 +11,11 @@
".gnupg" ".gnupg"
] ++ (if config.home.desktop.enable then [ ] ++ (if config.home.desktop.enable then [
"Documents" "Documents"
"Pictures" "Photos"
"Videos" "Videos"
"Games" "Games"
"VMs" "VMs"
".config/sunshine"
".local/share/keyrings"
".local/state/wireplumber" ".local/state/wireplumber"
] else []); ] else []);
allowOther = false; allowOther = false;

View file

@ -4,8 +4,10 @@
enable = config.home.desktop.enable; enable = config.home.desktop.enable;
createDirectories = true; createDirectories = true;
desktop = null; desktop = null;
pictures = "${config.home.homeDirectory}/Photos";
music = null; music = null;
publicShare = null; publicShare = null;
templates = null; templates = null;
extraConfig.XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
}; };
} }

View file

@ -8,7 +8,6 @@
LIBVIRT_DEFAULT_URI = "qemu:///system"; LIBVIRT_DEFAULT_URI = "qemu:///system";
MANPAGER = "nvim +Man!"; MANPAGER = "nvim +Man!";
NIXPKGS_ALLOW_UNFREE = 1; NIXPKGS_ALLOW_UNFREE = 1;
XDG_SCREENSHOTS_DIR = "$XDG_PICTURES_DIR/Screenshots";
ZSH_DISABLE_COMPFIX = "true"; ZSH_DISABLE_COMPFIX = "true";
}; };
}; };

View file

@ -1,7 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = [ imports = [
./grimsnap
./kanshi ./kanshi
./mako ./mako
./swaylock ./swaylock

View file

@ -1,33 +0,0 @@
{ config, lib, pkgs, ... }:
{
home.packages = with pkgs; lib.mkIf config.home.desktop.enable [
(pkgs.writeScriptBin "grimsnap" ''
# Freeze the screen using hyprpicker
hyprpicker -r -z &
HYPRPICKER_PID=$!
sleep 0.1
# Select area
GEOM=$(slurp -w 3 -c ${config.look.colors.prime} -B 00000066 -b 00000099)
# Check selection is canceled
if [ -z "$GEOM" ]; then
kill $HYPRPICKER_PID 2>/dev/null
notify-send -t 3000 -a grim "Error" "No area selected."
exit 1
fi
# Define screenshot destination
FILE="''${XDG_PICTURES_DIR:-$HOME/Pictures}/Screenshots/$(date -Ins).png"
# Save and edit screenshot
grim -g "$GEOM" "$FILE"
# Notify user that the screenshot is saved
notify-send -a grim "Screenshot" "Area saved to $FILE" -i "$FILE"
# Kill picker after selection
kill %1 2>/dev/null
'')
];
}

View file

@ -60,8 +60,9 @@
"${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a''; "${primeMod}+Ctrl+n" = ''exec makoctl dismiss -a'';
# Screenshots # Screenshots
"${secMod}+f" = ''exec grimsnap''; "${secMod}+f" = ''exec ${pkgs.shotman}/bin/shotman --copy --capture region'';
"${secMod}+Shift+f" = ''exec shot-sway --screen''; "${secMod}+Shift+f" = ''exec ${pkgs.shotman}/bin/shotman --copy --capture window'';
"${secMod}+Ctrl+f" = ''exec ${pkgs.shotman}/bin/shotman --copy --capture output'';
# Display brightness # Display brightness
"${primeMod}+equal" = ''exec brightnessctl s 5%+''; "${primeMod}+equal" = ''exec brightnessctl s 5%+'';

View file

@ -8,7 +8,6 @@
./portals ./portals
./snowflake ./snowflake
./ssh ./ssh
./sunshine
./tlp ./tlp
./userborn ./userborn
]; ];

View file

@ -1,9 +0,0 @@
{ config, ... }:
{
services.sunshine = {
enable = config.system.desktop.enable;
autoStart = false;
capSysAdmin = true;
openFirewall = true;
};
}