mirror of
https://github.com/ItsDrike/nixdots
synced 2025-05-12 11:38:37 +00:00
Compare commits
6 commits
39daf147ad
...
a0b525dc16
Author | SHA1 | Date | |
---|---|---|---|
a0b525dc16 | |||
12ae728903 | |||
df09ddc1b4 | |||
f2f7aecb97 | |||
d144a479bc | |||
5ebc43b05a |
18 changed files with 270 additions and 7 deletions
|
@ -6,5 +6,6 @@ _: {
|
||||||
./qbittorrent.nix
|
./qbittorrent.nix
|
||||||
./mpv.nix
|
./mpv.nix
|
||||||
./obs.nix
|
./obs.nix
|
||||||
|
./qimgv.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,6 +29,7 @@ in {
|
||||||
hideAllPanels=true
|
hideAllPanels=true
|
||||||
showMenuBar=false
|
showMenuBar=false
|
||||||
showRecentFiles=false
|
showRecentFiles=false
|
||||||
|
useLogFile=true
|
||||||
|
|
||||||
[Crop]
|
[Crop]
|
||||||
AspectRatioHorizontal=0
|
AspectRatioHorizontal=0
|
||||||
|
@ -62,7 +63,7 @@ in {
|
||||||
overwriteDialog-answer=16384
|
overwriteDialog-answer=16384
|
||||||
saveEditDialog=false
|
saveEditDialog=false
|
||||||
saveEditDialog-answer=16384
|
saveEditDialog-answer=16384
|
||||||
saveTabsDialog=true
|
saveTabsDialog=false
|
||||||
saveTabsDialog-answer=16384
|
saveTabsDialog-answer=16384
|
||||||
|
|
||||||
[DkExplorer]
|
[DkExplorer]
|
||||||
|
|
99
home/packages/gui/qimgv.nix
Normal file
99
home/packages/gui/qimgv.nix
Normal file
|
@ -0,0 +1,99 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfg = osConfig.myOptions.home-manager.programs.applications.qimgv;
|
||||||
|
in {
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
qimgv
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile = {
|
||||||
|
"qimgv/qimgv.conf".text = ''
|
||||||
|
[General]
|
||||||
|
JPEGSaveQuality=95
|
||||||
|
absoluteZoomStep=false
|
||||||
|
autoResizeLimit=90
|
||||||
|
autoResizeWindow=false
|
||||||
|
backgroundOpacity=1
|
||||||
|
blurBackground=false
|
||||||
|
confirmDelete=true
|
||||||
|
confirmTrash=false
|
||||||
|
cursorAutohiding=true
|
||||||
|
defaultCropAction=0
|
||||||
|
defaultFitMode=0
|
||||||
|
defaultViewMode=0
|
||||||
|
drawTransparencyGrid=false
|
||||||
|
enableSmoothScroll=true
|
||||||
|
expandImage=false
|
||||||
|
expandLimit=2
|
||||||
|
firstRun=false
|
||||||
|
focusPointIn1to1Mode=1
|
||||||
|
folderEndAction=0
|
||||||
|
imageScrolling=1
|
||||||
|
infoBarFullscreen=true
|
||||||
|
infoBarWindowed=false
|
||||||
|
jxlAnimation=false
|
||||||
|
keepFitMode=false
|
||||||
|
lastVerMajor=1
|
||||||
|
lastVerMicro=2
|
||||||
|
lastVerMinor=0
|
||||||
|
loopSlideshow=false
|
||||||
|
mpvBinary=/nix/store/sz3h6s8p2r22v76m0yr6fn3m663sms7r-mpv-with-scripts-0.37.0/bin/mpv
|
||||||
|
openInFullscreen=false
|
||||||
|
panelEnabled=true
|
||||||
|
panelFullscreenOnly=true
|
||||||
|
panelPosition=top
|
||||||
|
panelPreviewsSize=140
|
||||||
|
playVideoSounds=false
|
||||||
|
scalingFilter=1
|
||||||
|
showSaveOverlay=true
|
||||||
|
slideshowInterval=3000
|
||||||
|
smoothAnimatedImages=true
|
||||||
|
smoothUpscaling=true
|
||||||
|
sortingMode=0
|
||||||
|
squareThumbnails=false
|
||||||
|
thumbPanelStyle=1
|
||||||
|
thumbnailCache=true
|
||||||
|
thumbnailerThreads=4
|
||||||
|
unloadThumbs=true
|
||||||
|
useOpenGL=false
|
||||||
|
usePreloader=true
|
||||||
|
useSystemColorScheme=false
|
||||||
|
videoPlayback=true
|
||||||
|
windowTitleExtendedInfo=true
|
||||||
|
zoomIndicatorMode=0
|
||||||
|
zoomStep=0.20000000298023224
|
||||||
|
|
||||||
|
[Controls]
|
||||||
|
shortcuts="zoomIn=+", "frameStepBack=,", "zoomOut=-", "frameStep=.", "fitWindow=1", "fitWidth=2", "fitNormal=3", "exit=Alt+X", "folderView=Backspace", "crop=C", "copyFileClipboard=Ctrl+C", "showInDirectory=Ctrl+D", "zoomOut=Ctrl+Down", "rotateLeft=Ctrl+L", "seekVideoBackward=Ctrl+Left", "open=Ctrl+O", "print=Ctrl+P", "exit=Ctrl+Q", "rotateRight=Ctrl+R", "seekVideoForward=Ctrl+Right", "save=Ctrl+S", "copyPathClipboard=Ctrl+Shift+C", "saveAs=Ctrl+Shift+S", "zoomIn=Ctrl+Up", "pasteFile=Ctrl+V", "zoomOutCursor=Ctrl+WheelDown", "zoomInCursor=Ctrl+WheelUp", "discardEdits=Ctrl+Z", "toggleShuffle=Ctrl+`", "s:trash with trash-cli=Del", "scrollDown=Down", "jumpToLast=End", "folderView=Enter", "closeFullScreenOrExit=Esc", "toggleFullscreen=F", "toggleFullscreen=F11", "renameFile=F2", "reloadImage=F5", "flipH=H", "jumpToFirst=Home", "toggleImageInfo=I", "toggleFullscreen=LMB_DoubleClick", "prevImage=Left", "moveFile=M", "contextMenu=Menu", "openSettings=P", "resize=R", "contextMenu=RMB", "nextImage=Right", "removeFile=Shift+Del", "toggleFullscreenInfoBar=Shift+F", "prevDirectory=Shift+Left", "nextDirectory=Shift+Right", "toggleFitMode=Space", "scrollUp=Up", "flipV=V", "nextImage=WheelDown", "prevImage=WheelUp", "prevImage=XButton1", "nextImage=XButton2", "toggleSlideshow=`"
|
||||||
|
|
||||||
|
[Scripts]
|
||||||
|
script\1\name=trash with trash-cli
|
||||||
|
script\1\value=@Variant(\0\0\0\x7f\0\0\0\aScript\0\0\0\0 \0t\0r\0\x61\0s\0h\0-\0p\0u\0t\0 \0%\0\x66\0i\0l\0\x65\0%\x1)
|
||||||
|
script\size=1
|
||||||
|
'';
|
||||||
|
|
||||||
|
"qimgv/theme.conf".text = ''
|
||||||
|
[Colors]
|
||||||
|
accent=#8c9b81
|
||||||
|
background=#1a1a1a
|
||||||
|
background_fullscreen=#1a1a1a
|
||||||
|
folderview=#242424
|
||||||
|
folderview_topbar=#383838
|
||||||
|
icons=#a4a4a4
|
||||||
|
overlay=#1a1a1a
|
||||||
|
overlay_text=#d2d2d2
|
||||||
|
scrollbar=#5a5a5a
|
||||||
|
text=#b6b6b6
|
||||||
|
widget=#252525
|
||||||
|
widget_border=#2c2c2c
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{pkgs, ...}: {
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
exec-once = [
|
exec-once = [
|
||||||
# TODO: Add this (probably only vesktop)
|
"${pkgs.systemd}/bin/systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||||
|
"${pkgs.systemd}/bin/dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,10 @@
|
||||||
|
|
||||||
hyprPkgs = (import ./packages {inherit pkgs;});
|
hyprPkgs = (import ./packages {inherit pkgs;});
|
||||||
|
|
||||||
|
# TODO: Switch to flake
|
||||||
|
hyprlandPkg = pkgs.hyprland;
|
||||||
|
xdgDesktopPortalHyprlandPkg = pkgs.xdg-desktop-portal-hyprland;
|
||||||
|
|
||||||
cfg = osConfig.myOptions.home-manager.wms.hyprland;
|
cfg = osConfig.myOptions.home-manager.wms.hyprland;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
|
@ -30,10 +34,19 @@ in {
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
|
package = hyprlandPkg;
|
||||||
systemd = {
|
systemd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
variables = ["--all"];
|
variables = ["--all"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
configPackages = [hyprlandPkg];
|
||||||
|
extraPortals = [
|
||||||
|
xdgDesktopPortalHyprlandPkg
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,9 @@ start_recording() {
|
||||||
|
|
||||||
# Wee need 'y' stdin to confirm that we want to override the file
|
# Wee need 'y' stdin to confirm that we want to override the file
|
||||||
# since mktemp creates a blank file there already
|
# since mktemp creates a blank file there already
|
||||||
echo "y" | wf-recorder -g "$geom" -f "$file"
|
# TODO: The -x 420p is a temporary fix to address the recordings appearing
|
||||||
|
# corrupted in firefox/discord/... See: <https://github.com/ammen99/wf-recorder/issues/218>
|
||||||
|
echo "y" | wf-recorder -g "$geom" -f "$file" -x yuv420p
|
||||||
|
|
||||||
# If wf-recorder process ends directly, rather than a trap being hit
|
# If wf-recorder process ends directly, rather than a trap being hit
|
||||||
# we also want to run the save_file func
|
# we also want to run the save_file func
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
# Manage $XDG_CONFIG_HOME/mimeapps.list
|
# Manage $XDG_CONFIG_HOME/mimeapps.list
|
||||||
{
|
{
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = osConfig.myOptions.home-manager.programs;
|
||||||
|
in {
|
||||||
xdg.mimeApps = let
|
xdg.mimeApps = let
|
||||||
browser = "firefox.desktop";
|
browser = "firefox.desktop";
|
||||||
textEditor = browser; # nvim doesn't work properly with xdg-open, just use the browser
|
textEditor = browser; # nvim doesn't work properly with xdg-open, just use the browser
|
||||||
|
@ -7,7 +12,12 @@
|
||||||
pdfViewer = browser; # TODO: consider zathura (org.pwmt.zathura.desktop.desktop)
|
pdfViewer = browser; # TODO: consider zathura (org.pwmt.zathura.desktop.desktop)
|
||||||
fileManager = "pcmanfm-qt.desktop"; # TODO: change
|
fileManager = "pcmanfm-qt.desktop"; # TODO: change
|
||||||
archiveManager = "org.kde.ark.desktop";
|
archiveManager = "org.kde.ark.desktop";
|
||||||
imageViewer = "org.nomacs.ImageLounge.desktop";
|
imageViewer =
|
||||||
|
if cfg.applications.qimgv.enable
|
||||||
|
then "qimgv.desktop"
|
||||||
|
else if cfg.applications.nomacs.enable
|
||||||
|
then "org.nomacs.ImageLounge.desktop"
|
||||||
|
else browser;
|
||||||
videoPlayer = "mpv.desktop";
|
videoPlayer = "mpv.desktop";
|
||||||
audioPlayer = "mpv.desktop";
|
audioPlayer = "mpv.desktop";
|
||||||
|
|
||||||
|
@ -60,5 +70,6 @@
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
BROWSER = "firefox";
|
BROWSER = "firefox";
|
||||||
DEFAULT_BROWSER = "firefox";
|
DEFAULT_BROWSER = "firefox";
|
||||||
|
TERMINAL = "kitty";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -174,7 +174,8 @@
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
};
|
};
|
||||||
mpv.enable = true;
|
mpv.enable = true;
|
||||||
nomacs.enable = true;
|
nomacs.enable = true; # TODO: probably disable
|
||||||
|
qimgv.enable = true;
|
||||||
qbittorrent.enable = true;
|
qbittorrent.enable = true;
|
||||||
obs.enable = true;
|
obs.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,6 +46,12 @@
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/.btrfs" =
|
||||||
|
{ device = "/dev/disk/by-label/NIXOS-FS";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "noatime" "compress=zstd:3" ];
|
||||||
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-label/SWAP"; }
|
[ { device = "/dev/disk/by-label/SWAP"; }
|
||||||
];
|
];
|
||||||
|
|
|
@ -34,6 +34,7 @@ in
|
||||||
autoStart = mkEnableOption "Auto-Start for Vesktop";
|
autoStart = mkEnableOption "Auto-Start for Vesktop";
|
||||||
};
|
};
|
||||||
nomacs.enable = mkEnableOption "Nomacs (Qt-based image viewer)";
|
nomacs.enable = mkEnableOption "Nomacs (Qt-based image viewer)";
|
||||||
|
qimgv.enable = mkEnableOption "QImgV (Qt-based image viewer with video support)";
|
||||||
qbittorrent.enable = mkEnableOption "Qbittorrent (Free software BitTorrent client)";
|
qbittorrent.enable = mkEnableOption "Qbittorrent (Free software BitTorrent client)";
|
||||||
obs.enable = mkEnableOption "OBS (Free and oepn source software for video recording and live streaming)";
|
obs.enable = mkEnableOption "OBS (Free and oepn source software for video recording and live streaming)";
|
||||||
mpv.enable = mkEnableOption "MPV (General-purpose media player)";
|
mpv.enable = mkEnableOption "MPV (General-purpose media player)";
|
||||||
|
|
|
@ -4,5 +4,6 @@
|
||||||
./programs
|
./programs
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
./runners.nix
|
./runners.nix
|
||||||
|
./display
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
5
system/roles/workstation/display/default.nix
Normal file
5
system/roles/workstation/display/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./wayland
|
||||||
|
];
|
||||||
|
}
|
8
system/roles/workstation/display/wayland/default.nix
Normal file
8
system/roles/workstation/display/wayland/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./wms
|
||||||
|
./xdg-portals.nix
|
||||||
|
./xwayland.nix
|
||||||
|
./services.nix
|
||||||
|
];
|
||||||
|
}
|
29
system/roles/workstation/display/wayland/services.nix
Normal file
29
system/roles/workstation/display/wayland/services.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf getExe;
|
||||||
|
|
||||||
|
cfgEnabled = config.myOptions.home-manager.wms.isWayland;
|
||||||
|
in {
|
||||||
|
config = mkIf cfgEnabled {
|
||||||
|
systemd.services = {
|
||||||
|
# Seat management daemon
|
||||||
|
# (Takes care of mediating access to shared devices (graphics, input), without requiring
|
||||||
|
# applications like Wayland compositors being granted root privileges)
|
||||||
|
seatd = {
|
||||||
|
enable = true;
|
||||||
|
description = "Seat management daemon";
|
||||||
|
script = "${getExe pkgs.seatd} -g wheel";
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = "1";
|
||||||
|
};
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
5
system/roles/workstation/display/wayland/wms/default.nix
Normal file
5
system/roles/workstation/display/wayland/wms/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hyprland
|
||||||
|
];
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfgEnabled = config.myOptions.home-manager.wms.hyprland.enable;
|
||||||
|
|
||||||
|
# TODO: Switch to flake
|
||||||
|
hyprlandPkg = pkgs.hyprland;
|
||||||
|
xdgDesktopPortalHyprlandPkg = pkgs.xdg-desktop-portal-hyprland;
|
||||||
|
in {
|
||||||
|
config = mkIf cfgEnabled {
|
||||||
|
services.displayManager.sessionPackages = [hyprlandPkg];
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
configPackages = [hyprlandPkg];
|
||||||
|
extraPortals = [xdgDesktopPortalHyprlandPkg];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
package = hyprlandPkg;
|
||||||
|
portalPackage = xdgDesktopPortalHyprlandPkg;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
37
system/roles/workstation/display/wayland/xdg-portals.nix
Normal file
37
system/roles/workstation/display/wayland/xdg-portals.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfgEnabled = config.myOptions.home-manager.wms.isWayland;
|
||||||
|
cfgHyprlandEnabled = config.myOptions.home-manager.wms.hyprland.enable;
|
||||||
|
in {
|
||||||
|
config = mkIf cfgEnabled {
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
extraPortals = with pkgs; [
|
||||||
|
xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
|
||||||
|
# Specify which portals should be used by the individual interfaces
|
||||||
|
# see: <https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in>
|
||||||
|
config.common = let
|
||||||
|
# Note: this assumes a wlroots based compositor if it's not hyprland
|
||||||
|
# which may not always actually be the case, however, I can't be bothered to handle
|
||||||
|
# everything here and I don't plan on moving WMs any time soon.
|
||||||
|
portal = if cfgHyprlandEnabled then "hyprland" else "wlr";
|
||||||
|
in {
|
||||||
|
# Use this portal for every interface, unless a specific override is present
|
||||||
|
default = ["gtk"];
|
||||||
|
|
||||||
|
# Fix flameshot on hyprland / wlroots compositors
|
||||||
|
"org.freedesktop.impl.portal.Screencast" = [portal];
|
||||||
|
"org.freedesktop.impl.portal.Screenshot" = [portal];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
13
system/roles/workstation/display/wayland/xwayland.nix
Normal file
13
system/roles/workstation/display/wayland/xwayland.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (lib) mkIf;
|
||||||
|
|
||||||
|
cfgEnabled = config.myOptions.home-manager.wms.isWayland;
|
||||||
|
in {
|
||||||
|
config = mkIf cfgEnabled {
|
||||||
|
programs.xwayland.enable = true;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue