mirror of
https://github.com/traxys/Nixfiles.git
synced 2026-03-13 08:01:10 +01:00
wm: Parametrize nixos for sway too
This commit is contained in:
parent
0d6217dace
commit
3a565c4ed5
2 changed files with 54 additions and 39 deletions
|
|
@ -97,6 +97,7 @@ in
|
|||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 9080 4713 ];
|
||||
traxys.wm = "sway";
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
||||
|
|
|
|||
92
wm/nixos.nix
92
wm/nixos.nix
|
|
@ -1,47 +1,61 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config = {
|
||||
sway = {
|
||||
default = "gtk";
|
||||
"org.freedesktop.impl.portal.Screenshot" = "wlr";
|
||||
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
|
||||
};
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options = {
|
||||
traxys.wm = lib.mkOption {
|
||||
type = lib.types.enum [ "sway" ];
|
||||
};
|
||||
|
||||
extraPortals = with pkgs; [
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
cage = pkgs.writeShellScriptBin "cage" ''
|
||||
export XKB_DEFAULT_LAYOUT=fr
|
||||
export XKB_DEFAULT_VARIANT=ergol
|
||||
exec ${self.lib.getExe super.cage} "$@"
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
services.displayManager.sessionPackages = with pkgs; [
|
||||
sway
|
||||
];
|
||||
|
||||
programs.regreet = {
|
||||
enable = true;
|
||||
|
||||
theme.package = pkgs.canta-theme;
|
||||
|
||||
settings = {
|
||||
background.path = pkgs.fetchurl {
|
||||
url = "https://lesmondaines.com/wp-content/uploads/2018/07/lac-crozet-rando-2.jpg";
|
||||
hash = "sha256-s35RoLnAyGhDNJh5+qbDEqCM7gF3U2Tyzx4X7jzhT70=";
|
||||
config = {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
config = lib.mkIf (config.traxys.wm == "sway") {
|
||||
sway = {
|
||||
default = "gtk";
|
||||
"org.freedesktop.impl.portal.Screenshot" = "wlr";
|
||||
"org.freedesktop.impl.portal.ScreenCast" = "wlr";
|
||||
};
|
||||
};
|
||||
GTK = {
|
||||
application_prefer_dark_theme = true;
|
||||
|
||||
extraPortals = lib.mkIf (config.traxys.wm == "sway") (
|
||||
with pkgs;
|
||||
[
|
||||
xdg-desktop-portal-wlr
|
||||
xdg-desktop-portal-gtk
|
||||
]
|
||||
);
|
||||
};
|
||||
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
cage = pkgs.writeShellScriptBin "cage" ''
|
||||
export XKB_DEFAULT_LAYOUT=fr
|
||||
export XKB_DEFAULT_VARIANT=ergol
|
||||
exec ${self.lib.getExe super.cage} "$@"
|
||||
'';
|
||||
})
|
||||
];
|
||||
|
||||
services.displayManager.sessionPackages = lib.optional (config.traxys.wm == "sway") pkgs.sway;
|
||||
|
||||
programs.regreet = {
|
||||
enable = true;
|
||||
|
||||
theme.package = pkgs.canta-theme;
|
||||
|
||||
settings = {
|
||||
background.path = pkgs.fetchurl {
|
||||
url = "https://lesmondaines.com/wp-content/uploads/2018/07/lac-crozet-rando-2.jpg";
|
||||
hash = "sha256-s35RoLnAyGhDNJh5+qbDEqCM7gF3U2Tyzx4X7jzhT70=";
|
||||
};
|
||||
GTK = {
|
||||
application_prefer_dark_theme = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue