Files
nixos/hosts/nb-01.cloonar.com/modules/sway/sway.nix
2023-09-27 10:55:04 +02:00

124 lines
2.6 KiB
Nix

{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.cloonar.sway;
dbus-sway-environment = pkgs.writeTextFile {
name = "dbus-sway-environment";
destination = "/bin/dbus-sway-environment";
executable = true;
text = ''
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
'';
};
sway-conf = builtins.readFile ./sway.conf + cfg.additionalConfig;
in {
imports = [
./social.nix
./signal-work.nix
./thunderbird.nix
./parsec.nix
];
options.cloonar.sway = {
additionalConfig = mkOption {
type = types.str;
default = "";
description = lib.mdDoc ''
Additional sway config
'';
};
};
config = {
hardware.sane.enable = true;
hardware.pulseaudio.enable = false;
services.gnome.gnome-keyring.enable = true;
environment.systemPackages = with pkgs; [
alsaUtils
bitwarden
chromium
cryptomator
dbeaver
dbus-sway-environment
dracula-theme
foot
gcc
git
glib
gimp
gnome.seahorse
gnome3.adwaita-icon-theme
grim
jmeter
libreoffice-still
mako
networkmanagerapplet
nextcloud-client
obs-studio
onlyoffice-bin
pavucontrol
pcmanfm
pinentry
rbw
rofi-rbw
rustdesk
slurp
sway
sway-launcher-desktop
swayidle
swaylock
# thunderbird
tor-browser-bundle-bin
unzip
vlc
waybar
wayland
wl-clipboard
wofi
wtype
apache-directory-studio
firefox
];
programs.light.enable = true;
fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
nerdfonts
];
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
environment.etc = {
"sway/config".text = builtins.readFile ./sway.conf;
"wofi/style.css".text = builtins.readFile ./wofi.css;
"xdg/waybar/config".text = builtins.readFile ./waybar.conf;
"xdg/waybar/style.css".text = builtins.readFile ./waybar.css;
"xdg/foot/foot.ini".text = builtins.readFile ./foot.ini;
};
};
}