Compare commits

..
3 Commits
Author SHA1 Message Date
wymiller b427889b06 add: desktop xdg integration 2026-09-23 18:43:38 -04:00
wymiller 9b60cdac2c Merge remote-tracking branch 'origin' into desktops 2026-09-22 15:27:38 -04:00
wymiller a387a4cd07 wip: added assortment of desktops
ai generated, needs some work/cleanup
2026-08-29 10:38:22 -04:00
8 changed files with 271 additions and 83 deletions
Generated
+45 -45
View File
@@ -32,11 +32,11 @@
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1789888081,
"narHash": "sha256-GHz8B3/syibtGpMv344Qe61CRo2lZ7iN2V2hoT7MNRA=",
"lastModified": 1789283312,
"narHash": "sha256-Sv/2AyUTydH5d4eNk/ej1lHD1rpDvNjiB5Y3hmg/EGk=",
"ref": "refs/heads/master",
"rev": "d5a38bbc14a79967e3535c3e0951f53d9bf01800",
"revCount": 25,
"rev": "31673a5c64497a0f40487d51820d3738dec13d60",
"revCount": 24,
"type": "git",
"url": "https://scm.wyattjmiller.com/wymiller/caitsith.git"
},
@@ -267,11 +267,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1790312761,
"narHash": "sha256-Ie5wLHV8N17r8EALzfAsY1Bec6M7gIl+v+FbBmazpkQ=",
"lastModified": 1789623807,
"narHash": "sha256-pqmP+T+fR2+MDen+ro2iF7mdH7S83AUuvNZwVDl3jUk=",
"owner": "purpleclay",
"repo": "go-overlay",
"rev": "602e108a3c17113c7a19983ff8c9b88a4ab935b6",
"rev": "b19679b19d64dc29b96caf07e3282c250611ac57",
"type": "github"
},
"original": {
@@ -290,11 +290,11 @@
]
},
"locked": {
"lastModified": 1790312761,
"narHash": "sha256-Ie5wLHV8N17r8EALzfAsY1Bec6M7gIl+v+FbBmazpkQ=",
"lastModified": 1789623807,
"narHash": "sha256-pqmP+T+fR2+MDen+ro2iF7mdH7S83AUuvNZwVDl3jUk=",
"owner": "purpleclay",
"repo": "go-overlay",
"rev": "602e108a3c17113c7a19983ff8c9b88a4ab935b6",
"rev": "b19679b19d64dc29b96caf07e3282c250611ac57",
"type": "github"
},
"original": {
@@ -333,11 +333,11 @@
]
},
"locked": {
"lastModified": 1790215976,
"narHash": "sha256-VkR1rMGyjU9jtw8ISFx5uqR9e+LEaOlhHwrseFkiIVk=",
"lastModified": 1789267039,
"narHash": "sha256-LWiBv9yAYFi2LPbUhDGHPGKYskJQjj2fw12OlyO1uQo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a6631107a83ceab5872f298a2ea710859c80c4cb",
"rev": "ec172013fa62135f58fb58dd17ae9651e8f39727",
"type": "github"
},
"original": {
@@ -355,11 +355,11 @@
]
},
"locked": {
"lastModified": 1790365885,
"narHash": "sha256-iQ0ebhiVo64NktTnwft9hNxlFu4j5cvljVxyJaEVIP4=",
"lastModified": 1789867870,
"narHash": "sha256-sOag/7DTqw4tXLI7UxjrZxPGV+dlTe6zFtJn0VSkgFM=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "7b4c5ec4bedaf1e062bbc1bcaeddbc6bd242aa1b",
"rev": "d2a22a3659a6ae99847ea9176114f6957b8ac62e",
"type": "github"
},
"original": {
@@ -370,11 +370,11 @@
},
"mnw": {
"locked": {
"lastModified": 1784154424,
"narHash": "sha256-HRn4O1X2ShYtbq5Egji72/aemyc2cIQicjRZD9hBqM8=",
"lastModified": 1780772958,
"narHash": "sha256-VKKe8r4pwCGWZ3Yr9CPN129R4S3CKLSrlYqdYz3vKpM=",
"owner": "Gerg-L",
"repo": "mnw",
"rev": "0151d9fa87992cbeb67c86616fb9170dcec830b6",
"rev": "0871dbf63a53610c95db04439ed8ea4d6ec9c160",
"type": "github"
},
"original": {
@@ -417,11 +417,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1790450978,
"narHash": "sha256-/eLCD/X9kaWJqPR47+fDozEC87Hjmm3i8gJbYmDAD7g=",
"lastModified": 1789749394,
"narHash": "sha256-cFTsMQz8Hzn8MT49oaeLSHg62tE86NykugCWkeM2ypk=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5e2305d577ca00acbba631b05cb1094d172b29f3",
"rev": "cf9d2fb3e50fa1cd5114c47505ea9177f7ff5f49",
"type": "github"
},
"original": {
@@ -433,11 +433,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1790450978,
"narHash": "sha256-/eLCD/X9kaWJqPR47+fDozEC87Hjmm3i8gJbYmDAD7g=",
"lastModified": 1789749394,
"narHash": "sha256-cFTsMQz8Hzn8MT49oaeLSHg62tE86NykugCWkeM2ypk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5e2305d577ca00acbba631b05cb1094d172b29f3",
"rev": "cf9d2fb3e50fa1cd5114c47505ea9177f7ff5f49",
"type": "github"
},
"original": {
@@ -449,11 +449,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1790046670,
"narHash": "sha256-OJe62m8gZx4xEAQnMcqH1u31/uu4Xf0q2ykAEHZfgrg=",
"rev": "6774f7bc253789b113a4f39285dc0fa100abeacc",
"lastModified": 1787498568,
"narHash": "sha256-FoOSoBG7tEvOlGRTpWnVdY506Ner4y7r7UYO3OGgmE8=",
"rev": "56c02bc00adcf003215cc4bd996d6efaf4cff188",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1077996.6774f7bc2537/nixexprs.tar.xz"
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1060451.56c02bc00adc/nixexprs.tar.xz"
},
"original": {
"type": "tarball",
@@ -487,11 +487,11 @@
"rust-overlay": "rust-overlay_4"
},
"locked": {
"lastModified": 1790492743,
"narHash": "sha256-z9zSi95pcqk2zmjq5XKw2kSAAiCLcAM3hxH8EukGKTw=",
"lastModified": 1789887979,
"narHash": "sha256-ln0cOIfvEFNd4IdVbiYfdtxS01E5npnstm0YCTOxpJY=",
"ref": "refs/heads/master",
"rev": "b1f009b0b557c4178600bc18fd495f0a8d54c35e",
"revCount": 103,
"rev": "39c33599b191ae2d595b3cc38e8ad4bf2766cd89",
"revCount": 99,
"type": "git",
"url": "https://scm.wyattjmiller.com/wymiller/nur.git"
},
@@ -507,11 +507,11 @@
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1790221470,
"narHash": "sha256-TzyWd4i7YCpqoF9xB8mfgDJ2sviAZysKH9R8YbQGjqA=",
"lastModified": 1789854559,
"narHash": "sha256-6GDssza3F+ukpUujSuTL50vW5AHaoG+4vjsDgWqRyeQ=",
"owner": "notashelf",
"repo": "nvf",
"rev": "95afe7a794216f53e217c5148c6fbe0b668192cf",
"rev": "85bf39cd0409ad8a7fa5b3ad0d29e89e9da97a0e",
"type": "github"
},
"original": {
@@ -563,11 +563,11 @@
]
},
"locked": {
"lastModified": 1789802016,
"narHash": "sha256-QVFfArbYaQMGK4dFV+5RUL72Ci+hNHVhaF/R9qJfDhs=",
"lastModified": 1789196581,
"narHash": "sha256-yJr1Bt4fKkKIpPYbsKGqJ0VFdoDnURgRwuffmBQ2WzY=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "26a71e661c47bd21a05d06fec749f3f7c75e9d12",
"rev": "228ecefb6329d5a531b77b46b581a2f0c26ee056",
"type": "github"
},
"original": {
@@ -606,11 +606,11 @@
]
},
"locked": {
"lastModified": 1790407471,
"narHash": "sha256-M8elY2UShg4ZuLTiRLEHO+ae5xQFp3/ReQdxp/R+1UU=",
"lastModified": 1789802016,
"narHash": "sha256-QVFfArbYaQMGK4dFV+5RUL72Ci+hNHVhaF/R9qJfDhs=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "4e9bb05a9ab6c37dc74c22974ebed6e36dc73eb2",
"rev": "26a71e661c47bd21a05d06fec749f3f7c75e9d12",
"type": "github"
},
"original": {
@@ -624,11 +624,11 @@
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1790407471,
"narHash": "sha256-M8elY2UShg4ZuLTiRLEHO+ae5xQFp3/ReQdxp/R+1UU=",
"lastModified": 1789802016,
"narHash": "sha256-QVFfArbYaQMGK4dFV+5RUL72Ci+hNHVhaF/R9qJfDhs=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "4e9bb05a9ab6c37dc74c22974ebed6e36dc73eb2",
"rev": "26a71e661c47bd21a05d06fec749f3f7c75e9d12",
"type": "github"
},
"original": {
-14
View File
@@ -1,7 +1,6 @@
{ lib
, pkgs
, userName
, isNixOS ? true
, ...
}: let
# Have a file sturcture that holds all the configuration files that can't be configured by Nix
@@ -31,19 +30,6 @@ in
stateVersion = "24.11";
}
(lib.mkIf isNixOS {
sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";
XDG_SESSION_DESKTOP = "sway";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_CACHE_HOME = "$HOME/.cache";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
NIXOS_OZONE_WL = "1";
};
})
(lib.mkIf pkgs.stdenv.isLinux {
pointerCursor = {
gtk.enable = true;
-1
View File
@@ -27,7 +27,6 @@
enable = true;
lsp.servers = [ "typescript-language-server" "deno" ];
};
csharp.enable = true;
};
utility.surround.enable = true;
+1 -1
View File
@@ -153,6 +153,6 @@ in {
programs.waybar = {
enable = pkgs.stdenv.isLinux;
systemd.enable = true;
systemd.enable = false;
};
}
View File
+178
View File
@@ -0,0 +1,178 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.desktop;
defaultWaylandPackages = with pkgs; [
brightnessctl
cliphist
foot
grim
libnotify
mako
networkmanagerapplet
playerctl
polkit_gnome
pavucontrol
rofi
slurp
waybar
wl-clipboard
xdg-utils
];
defaultSwayPackages =
defaultWaylandPackages
++ (with pkgs; [
pulseaudio
swayidle
swaylock
wmenu
]);
resolvedDisplayManager =
if cfg.displayManager != "auto"
then cfg.displayManager
else if cfg.gnome.enable
then "gdm"
else if cfg.xfce.enable
then "lightdm"
else "none";
in {
imports = [./xdg.nix];
options.desktop = {
displayManager = lib.mkOption {
type = lib.types.enum ["auto" "none" "gdm" "lightdm" "ly"];
default = "auto";
description = ''
Display manager to enable. In auto mode, GDM is used when GNOME is
enabled, LightDM is used when XFCE is enabled, and no display manager
is enabled for compositor-only configurations.
'';
};
gnome.enable = lib.mkEnableOption "the vanilla GNOME desktop environment";
xfce.enable = lib.mkEnableOption "the vanilla XFCE desktop environment";
sway = {
enable = lib.mkEnableOption "the Sway Wayland compositor";
extraPackages = lib.mkOption {
type = with lib.types; listOf package;
default = defaultSwayPackages;
defaultText = lib.literalExpression ''
with pkgs; [
brightnessctl
cliphist
foot
grim
libnotify
mako
networkmanagerapplet
playerctl
polkit_gnome
pulseaudio
pavucontrol
rofi
slurp
swayidle
swaylock
waybar
wl-clipboard
wmenu
xdg-utils
]
'';
description = "Packages installed alongside Sway.";
};
};
hyprland = {
enable = lib.mkEnableOption "the Hyprland Wayland compositor";
extraPackages = lib.mkOption {
type = with lib.types; listOf package;
default = defaultWaylandPackages;
defaultText = lib.literalExpression ''
with pkgs; [
brightnessctl
cliphist
foot
grim
libnotify
mako
networkmanagerapplet
playerctl
polkit_gnome
pavucontrol
rofi
slurp
waybar
wl-clipboard
xdg-utils
]
'';
description = ''
Packages installed alongside Hyprland. Hyprlock and Hypridle are
enabled separately so their NixOS integration, including PAM, is
configured as well.
'';
};
};
};
config = lib.mkMerge [
(lib.mkIf cfg.gnome.enable {
services.desktopManager.gnome.enable = true;
})
(lib.mkIf cfg.xfce.enable {
services.xserver = {
enable = true;
desktopManager.xfce.enable = true;
};
})
(lib.mkIf cfg.sway.enable {
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
extraPackages = cfg.sway.extraPackages;
extraSessionCommands = ''
export XDG_SESSION_TYPE=wayland
export XDG_SESSION_DESKTOP=sway
export NIXOS_OZONE_WL=1
'';
};
})
(lib.mkIf cfg.hyprland.enable {
programs = {
hyprland.enable = true;
hyprlock.enable = lib.mkDefault true;
};
environment.systemPackages = cfg.hyprland.extraPackages;
})
(lib.mkIf (resolvedDisplayManager == "gdm") {
services.displayManager.gdm.enable = true;
})
(lib.mkIf (resolvedDisplayManager == "lightdm") {
services.xserver = {
enable = true;
displayManager.lightdm.enable = true;
};
})
(lib.mkIf (resolvedDisplayManager == "ly") {
services.displayManager.ly.enable = true;
})
];
}
+42
View File
@@ -0,0 +1,42 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.desktop;
needsGtkPortal = cfg.xfce.enable || cfg.hyprland.enable;
usesPortal = cfg.gnome.enable || cfg.xfce.enable || cfg.sway.enable || cfg.hyprland.enable;
in {
config = lib.mkMerge [
# GNOME and Sway configure their own portals in NixOS. XFCE needs a
# portal; Hyprland benefits from GTK as a fallback to its native one.
(lib.mkIf needsGtkPortal {
xdg.portal = {
enable = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk];
};
})
(lib.mkIf (cfg.sway.enable || needsGtkPortal) {
xdg.portal.config.common.default = ["gtk"];
})
(lib.mkIf (usesPortal && config.services.gnome.gnome-keyring.enable) {
xdg.portal.config.common."org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
})
(lib.mkIf (cfg.sway.enable && config.services.gnome.gnome-keyring.enable) {
xdg.portal.config.sway."org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
})
# A per-desktop config takes precedence over Hyprland's packaged config,
# so include its native portal whenever adding a Secret preference.
(lib.mkIf (cfg.hyprland.enable && config.services.gnome.gnome-keyring.enable) {
xdg.portal.config.hyprland = {
default = ["hyprland" "gtk"];
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
};
})
];
}
+5 -22
View File
@@ -22,6 +22,7 @@ in {
})
../../apps/gaming.nix
../../apps/appimage.nix
../../desktop
../../graphics
../../pwrMgmt
../../networking/core.nix
@@ -74,7 +75,6 @@ in {
brightnessctl
wttrbar
cliphist
xdg-desktop-portal-gtk
xdg-utils
flatpak-xdg-utils
desktop-file-utils
@@ -89,6 +89,10 @@ in {
# Enable Polkit
security.polkit.enable = true;
# Enable desktop support (sway)
desktop.sway.enable = true;
desktop.displayManager = "ly";
# Graphics module (../../graphics/default.nix)
graphics = {
enable = true;
@@ -189,27 +193,6 @@ in {
# AppImage support
appimage.enable = true;
# XDG stuff
xdg = {
portal = {
enable = true;
config = {
sway = {
default = ["wlr" "gtk"];
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
};
common = {
default = ["gtk"];
"org.freedesktop.impl.portal.Secret" = ["gnome-keyring"];
};
};
extraPortals = with pkgs; [
xdg-desktop-portal-wlr
xdg-desktop-portal-gtk
];
};
};
# sched_ext userspace CPU scheduling stuff - idk
services.scx = {
enable = true;