nixos-config/modules/sway.nix

61 lines
1.4 KiB
Nix
Raw Normal View History

2021-03-30 01:16:19 +00:00
{ config, pkgs, lib, ... }:
let
cfg = config.sconfig.sway;
in
2020-09-18 13:54:09 +00:00
{
2021-03-30 01:16:19 +00:00
options.sconfig.sway = lib.mkEnableOption "Enable Sway Window Manager";
2020-09-18 13:54:09 +00:00
2021-03-30 01:16:19 +00:00
config = lib.mkIf cfg {
2021-08-28 02:03:45 +00:00
programs.sway = {
enable = true;
extraSessionCommands = ''
export GTK_THEME="Yaru-dark";
export MOZ_ENABLE_WAYLAND="1";
'';
};
2020-09-18 13:54:09 +00:00
2021-03-30 01:16:19 +00:00
environment.etc."xdg/gtk-3.0/settings.ini".text = ''
[Settings]
gtk-theme-name=Yaru-dark
gtk-icon-theme-name=Numix
'';
2020-09-18 13:54:09 +00:00
2021-08-28 02:03:45 +00:00
environment.etc."sway/config".source = pkgs.runCommand "sway_config" { } ''
(
cat '${pkgs.sway}/etc/sway/config'
cat <<" EOF"
include /etc/sway/config.d/*
EOF
)|
sed 's/position top//' |
sed 's/status_command while.*/status_command i3status/' |
tee "$out"
'';
2021-03-30 01:16:19 +00:00
services.gvfs.enable = true;
programs.dconf.enable = true;
networking.networkmanager.enable = true;
2020-09-18 13:54:09 +00:00
2021-08-28 02:03:45 +00:00
services.xserver = {
enable = true;
libinput.enable = true;
displayManager.gdm.enable = true;
};
2021-03-30 01:16:19 +00:00
environment.systemPackages = with pkgs; [
numix-icon-theme
yaru-theme
gnome3.networkmanagerapplet
gnome3.file-roller
gnome3.adwaita-icon-theme
mate.mate-terminal
xfce.thunar
i3status
xfce.thunar-archive-plugin
caffeine-ng
wf-recorder
xdg_utils
];
};
2020-09-18 13:54:09 +00:00
}