v1
This commit is contained in:
parent
62df62c3aa
commit
db11846811
27 changed files with 887 additions and 64 deletions
35
modules/desktop/audio.nix
Normal file
35
modules/desktop/audio.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.xyno.desktop.audio;
|
||||
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" ];
|
||||
};
|
||||
};
|
||||
# "10-raop-discover" = {
|
||||
# "context.modules" = [
|
||||
# {
|
||||
# name = "libpipewire-module-raop-discover";
|
||||
# args = { };
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
53
modules/desktop/common-programs.nix
Normal file
53
modules/desktop/common-programs.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.xyno.desktop.common-programs;
|
||||
in
|
||||
{
|
||||
options.xyno.desktop.common-programs.enable =
|
||||
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.helix.enable = true;
|
||||
});
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||
# dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||
};
|
||||
programs.evolution.enable = true;
|
||||
services.gnome.evolution-data-server.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
programs.fuse.userAllowOther = true;
|
||||
programs.sway.enable = true;
|
||||
programs.nix-ld.enable = true;
|
||||
programs.gamescope.enable = true;
|
||||
programs.wireshark.enable = true;
|
||||
programs.kdeconnect.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
element-desktop # this is not a place of honor
|
||||
discord # shitcord
|
||||
unstable.signal-desktop
|
||||
obsidian
|
||||
diebahn
|
||||
vlc
|
||||
lutris
|
||||
libreoffice-qt6-fresh
|
||||
inkscape
|
||||
easyeffects
|
||||
dune3d
|
||||
appimage-run
|
||||
unstable.keepassxc
|
||||
inputs.zen-browser.packages."${pkgs.system}".default
|
||||
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
|
|
@ -26,9 +26,13 @@ in
|
|||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.user.services.mako = {
|
||||
unitConfig.PartOf = "graphical-session.target";
|
||||
unitConfig.After = "graphical-session.target";
|
||||
unitConfig.Requisite = "graphical-session.target";
|
||||
serviceConfig.Restart = "on-failure";
|
||||
wantedBy = [ cfg.wantedBy ];
|
||||
script = "${cfg.package}/bin/mako -c ${makoConf}";
|
||||
restartTrigers = makoConf;
|
||||
restartTriggers = [makoConf];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ let
|
|||
"KeePassXC"
|
||||
"org.gnome.NautilusPreviewer"
|
||||
];
|
||||
matchFloat = lib.concatStringSep "\n" (
|
||||
matchFloat = lib.concatStringsSep "\n" (
|
||||
map (x: ''
|
||||
window-rule {
|
||||
match app-id="${x}"
|
||||
|
|
@ -29,12 +29,55 @@ in
|
|||
waybar.enable = lib.mkDefault true;
|
||||
mako.enable = lib.mkDefault true;
|
||||
};
|
||||
home-manager.users.${config.xyno.system.user.name} = lib.mkIf config.xyno.presets.home-manager.enable ({...}: {
|
||||
xyno.dark-theme.enable = true;
|
||||
});
|
||||
|
||||
# xdg.portal = {
|
||||
# enable = true;
|
||||
# wlr.enable = true;
|
||||
# };
|
||||
programs.niri.enable = true;
|
||||
environment.etc."niri/config.kdl".text = ''
|
||||
// xwayland
|
||||
spawn-at-startup "${pkgs.xwayland-sattelite}/bin/xwayland-sattelite"
|
||||
|
||||
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
|
||||
|
||||
screenshot-path "~/Pictures/screenshots/screenshot-%Y-%m-%d %H-%M-%S.png"
|
||||
// Indicate screencasted windows with red colors.
|
||||
window-rule {
|
||||
match is-window-cast-target=true
|
||||
|
||||
focus-ring {
|
||||
active-color "#f38ba8"
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
|
||||
border {
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
|
||||
shadow {
|
||||
color "#7d0d2d70"
|
||||
}
|
||||
|
||||
tab-indicator {
|
||||
active-color "#f38ba8"
|
||||
inactive-color "#7d0d2d"
|
||||
}
|
||||
}
|
||||
// Block out password managers from screencasts.
|
||||
window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
||||
|
||||
block-out-from "screencast"
|
||||
}
|
||||
// Block out mako notifications from screencasts.
|
||||
layer-rule {
|
||||
match namespace="^notifications$"
|
||||
|
||||
block-out-from "screencast"
|
||||
}
|
||||
input {
|
||||
workspace-auto-back-and-forth
|
||||
focus-follows-mouse max-scroll-amount="10%"
|
||||
|
|
|
|||
48
modules/desktop/swayidle.nix
Normal file
48
modules/desktop/swayidle.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.xyno.desktop.swayidle;
|
||||
makoConf = pkgs.writeText "mako.conf" ''
|
||||
font=Source Sans Pro Nerd Font 11
|
||||
background-color=#1d2021ff
|
||||
border-color=#3c3836FF
|
||||
text-color=#ebdbb2ff
|
||||
progress-color=over #928374FF
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.xyno.desktop.swayidle.enable = lib.mkEnableOption "enable swayidle and swaylock and stuff";
|
||||
options.xyno.desktop.swayidle.wantedBy = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "niri.service";
|
||||
};
|
||||
options.xyno.desktop.swayidle.package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.swayidle;
|
||||
};
|
||||
options.xyno.desktop.swayidle.swaylockPackage = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.swaylock-effects;
|
||||
};
|
||||
options.xyno.desktop.swayidle.swaylockArgs = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "--fade-in 2 --clock --timestr %T%z --datestr %F";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with cfg; [ package swaylockPackage ];
|
||||
systemd.user.services.mako = {
|
||||
unitConfig.PartOf = "graphical-session.target";
|
||||
unitConfig.After = "graphical-session.target";
|
||||
unitConfig.Requisite = "graphical-session.target";
|
||||
serviceConfig.Restart = "on-failure";
|
||||
wantedBy = [ cfg.wantedBy ];
|
||||
script = "${cfg.package}/bin/mako -c ${makoConf}";
|
||||
restartTrigers = makoConf;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -15,7 +15,7 @@ in
|
|||
};
|
||||
options.xyno.desktop.waybar.package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.waybar;
|
||||
default = pkgs.unstable.waybar;
|
||||
};
|
||||
options.xyno.desktop.waybar.mode = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
|
|
@ -23,24 +23,27 @@ in
|
|||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.waybar.enable = true;
|
||||
programs.light.enable = true;
|
||||
|
||||
systemd.user.services.waybar.wantedBy = lib.mkForce [ cfg.wantedBy ];
|
||||
environment.etc."xdg/waybar/config".text = builtins.toJSON {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 15;
|
||||
modules-left =
|
||||
(lib.mkIf (cfg.mode == "river") [
|
||||
(lib.optional (cfg.mode == "river") [
|
||||
"river/tags"
|
||||
"river/layout"
|
||||
"river/window"
|
||||
])
|
||||
++ (lib.mkIf (cfg.mode == "niri") [
|
||||
++ (lib.optional (cfg.mode == "niri") [
|
||||
"niri/workspaces"
|
||||
"niri/window"
|
||||
]);
|
||||
modules-right = [
|
||||
"tray"
|
||||
"power_profiles_daemon"
|
||||
"power-profiles-daemon"
|
||||
"idle_inhibitor"
|
||||
"wireplumber"
|
||||
"battery"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue