This commit is contained in:
Lucy Hochkamp 2025-07-23 14:24:23 +02:00
parent 93a675c06a
commit 9ca7a8d8f6
No known key found for this signature in database
20 changed files with 631 additions and 194 deletions

View file

@ -10,26 +10,41 @@ in
{
options.xyno.desktop.audio.enable = lib.mkEnableOption "enable pipewire and stuff";
config = lib.mkIf cfg.enable {
services.pipewire = {
enable = true;
# raopOpenFirewall = true; # airplay
pulse.enable = true;
extraConfig.pipewire = {
"9-clock-allow-higher" = {
"context.properties" = {
"default.clock.allowed-rates" = [ "44100" "48000" "96000" "192000" ];
services.pipewire = {
enable = true;
# raopOpenFirewall = true; # airplay
pulse.enable = true;
extraConfig.pipewire = {
"9-clock-allow-higher" = {
"context.properties" = {
"default.clock.allowed-rates" = [
"44100"
"48000"
"96000"
"192000"
];
};
};
# "10-raop-discover" = {
# "context.modules" = [
# {
# name = "libpipewire-module-raop-discover";
# args = { };
# }
# ];
# };
};
extraConfig.pipewire-pulse = {
"10-zeroconf" = {
"pulse.cmd" = [
{
cmd = "load-module";
args = "module-zeroconf-discover";
}
];
};
};
# "10-raop-discover" = {
# "context.modules" = [
# {
# name = "libpipewire-module-raop-discover";
# args = { };
# }
# ];
# };
};
};
};
}

View file

@ -13,7 +13,7 @@ in
lib.mkEnableOption "install some commonly used programs";
config = lib.mkIf cfg.enable {
home-manager.users.${config.xyno.system.user.name} = lib.mkIf config.xyno.presets.home-manager.enable ({...}: {
xyno.alacritty.enable = true;
# xyno.alacritty.enable = true;
xyno.helix.enable = true;
});
programs.steam = {
@ -37,14 +37,17 @@ in
signal-desktop
obsidian
diebahn
vlc
mpv
lutris
libreoffice-qt6-fresh
inkscape
easyeffects
appimage-run
unstable.keepassxc
inputs.zen-browser.packages."${pkgs.system}".default
qalculate-qt
wl-clipboard-rs
wdisplays
];

View file

@ -13,14 +13,14 @@ in
type = lib.types.str;
default = "niri.service";
};
options.xyno.desktop.foot.package= lib.mkOption {
options.xyno.desktop.foot.package = lib.mkOption {
type = lib.types.package;
default = pkgs.foot;
};
config = lib.mkIf cfg.enable {
# should be socket activated tm
# systemd.user.services.foot.wantedBy = lib.mkForce [ cfg.wantedBy ];
# systemd.user.sockets.foot.wantedBy = lib.mkForce [ cfg.wantedBy ];
# systemd.user.services.foot-server.wantedBy = lib.mkForce [ cfg.wantedBy ];
systemd.user.sockets.foot-server.wantedBy = lib.mkForce [ cfg.wantedBy ];
systemd.packages = [ cfg.package ];
xyno.desktop.niri.term = lib.mkDefault "footclient";
programs.foot = {

View file

@ -1,32 +0,0 @@
{
pkgs,
config,
lib,
...
}:
let
cfg = config.xyno.desktop.mate-polkit;
in
{
options.xyno.desktop.mate-polkit.enable = lib.mkEnableOption "enable mate-polkit as the gui polkit thing";
options.xyno.desktop.mate-polkit.wantedBy = lib.mkOption {
type = lib.types.str;
default = "niri.service";
};
options.xyno.desktop.mate-polkit.package = lib.mkOption {
type = lib.types.package;
default = pkgs.mate.mate-polkit; # we're using mate polkit as it seems to be the only maintained gtk polkit thing (and we're using all the other gtk shit anyways)
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
systemd.user.services.mate-polkit = {
unitConfig.PartOf = "graphical-session.target";
unitConfig.After = "graphical-session.target";
unitConfig.Requisite = "graphical-session.target";
serviceConfig.Restart = "on-failure";
wantedBy = [ cfg.wantedBy ];
script = "exec ${cfg.package}/libexec/polkit-mate-authentication-agent-1";
};
};
}

View file

@ -1,4 +1,5 @@
{
inputs,
pkgs,
config,
lib,
@ -11,6 +12,7 @@ let
"org.pulseaudio.pavucontrol"
"KeePassXC"
"org.gnome.NautilusPreviewer"
"io.github.Qalculate.qalculate-qt"
];
matchFloat = lib.concatStringsSep "\n" (
map (x: ''
@ -42,32 +44,72 @@ in
{ ... }:
{
xyno.dark-theme.enable = true;
home.file.".config/xdg-desktop-portal-termfilechooser/config".text = ''
[filechooser]
cmd=${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh
default_dir=$HOME
env=TERMCMD=footclient --app-id floating-alacritty
open_mode = suggested
save_mode = suggested
'';
}
);
xdg.portal = {
extraPortals = [
pkgs.xdg-desktop-portal-termfilechooser
];
config.niri.default = [
"gnome"
"gtk"
];
# config.niri."org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" ];
config.niri."org.freedesktop.impl.portal.Access" = [ "gtk" ];
config.niri."org.freedesktop.impl.portal.Notification" = [ "gtk" ];
config.niri."org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
};
# xdg.portal = {
# enable = true;
# wlr.enable = true;
# };
environment.systemPackages = with pkgs;[
playerctl
xwayland-satellite
];
programs.niri.enable = true;
programs.niri.package = inputs.niri.packages.${pkgs.system}.default.overrideAttrs (prev: {
patches = prev.patches ++ [
(pkgs.fetchurl {
url = "https://patch-diff.githubusercontent.com/raw/YaLTeR/niri/pull/1907.patch";
hash = "sha256-XhG8Ga1/QMPXrF0FjQuBk8KZISbof4Md4kM73cG1SYQ=";
})
];
});
environment.etc."niri/config.kdl".mode = "444"; # copy file so niri detects changes
environment.etc."niri/config.kdl".text = ''
// xwayland
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
environment {
DISPLAY ":0"
animations {
off
}
// keybinds
binds {
Mod+D { spawn "${cfg.launcher}"; }
Mod+Alt+L { spawn "lock"; }
Mod+T { spawn "${cfg.term}"; }
Mod+Y { spawn "${cfg.term} yazi"; }
Mod+Y { spawn "${cfg.term}" "--app-id" "floating-alacritty" "yazi"; }
Mod+P { spawn "keepassxc"; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
Mod+S { spawn "qalculate-qt"; }
Mod+Shift+N { spawn "makoctl" "dismiss" "-a"; }
Mod+N { spawn "makoctl" "dismiss"; }
Mod+E { spawn "makoctl" "menu" "fuzzel -d"; }
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.03+"; }
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.03-"; }
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
XF86AudioNext allow-when-locked=true { spawn "playerctl" "next"; }
XF86AudioPrev allow-when-locked=true { spawn "playerctl" "previous"; }
XF86AudioPlay allow-when-locked=true { spawn "playerctl" "play-pause"; }
XF86AudioPause allow-when-locked=true { spawn "playerctl" "pause"; }
Mod+Q { close-window; }
@ -284,10 +326,19 @@ in
Super+Backslash { focus-workspace "scratchpad"; }
}
layout {
gaps 12
// center-focused-column "always"
gaps 8
shadow {
on
}
background-color "transparent"
struts {
right 16
left 16
}
default-column-width { proportion 0.33333; }
tab-indicator {
hide-when-single-tab
position "top"
@ -300,6 +351,11 @@ in
// scratchpad
// workspace "scratchpad"
// Put swaybg inside the overview backdrop.
layer-rule {
match namespace="^wpaperd.*$"
place-within-backdrop true
}
screenshot-path "~/Pictures/screenshots/screenshot-%Y-%m-%d %H-%M-%S.png"
// Indicate screencasted windows with red colors.
@ -353,11 +409,13 @@ in
}
input {
workspace-auto-back-and-forth
focus-follows-mouse
// workspace-auto-back-and-forth
focus-follows-mouse max-scroll-amount="10%"
keyboard {
xkb {
layout "eu"
// options "compose:lalt"
}
}
touchpad {

View file

@ -424,7 +424,7 @@ in
};
options.xyno.desktop.waybar.package = lib.mkOption {
type = lib.types.package;
default = pkgs.unstable.waybar.override { hyprlandSupport = false; }; # we don't use it and hyprland seems to not build on current master
default = pkgs.unstable.waybar;
};
options.xyno.desktop.waybar.mode = lib.mkOption {
type = lib.types.str;