Files
nixos/hosts/nb-new.cloonar.com/modules/sway/sway.nix
2024-07-05 01:03:17 +02:00

149 lines
3.1 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 + ''
exec swaybg --mode center -c #252525 -i ~/.wallpaper.png
'';
unstable = import (fetchTarball https://nixos.org/channels/nixos-unstable/nixexprs.tar.xz) {
config = { allowUnfree = true; };
};
in {
imports = [
./social.nix
./signal-work.nix
./parsec.nix
./thunderbird.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;
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "dominik" ];
services.gnome.gnome-keyring.enable = true;
environment.systemPackages = with pkgs; [
alsaUtils
apache-directory-studio
bitwarden
bitwarden-cli
rofi-rbw-wayland
cryptomator
brave
chromium
firefox
vivaldi
unstable.cura
freecad
openscad
dbus-sway-environment
ddev
dracula-theme
foot
gcc
git
glib
gimp
gnome.seahorse
gnome3.adwaita-icon-theme
go
grim
hunspell
hunspellDicts.de_DE
hunspellDicts.en_US
jmeter
libreoffice
mako
mqttui
networkmanagerapplet
nextcloud-client
onlyoffice-bin
pavucontrol
pcmanfm
pinentry
rbw
rofi-rbw
slurp
sway
swaybg
sway-launcher-desktop
swayidle
swaylock
thunderbird
unzip
vlc
waybar
wayland
wl-clipboard
wofi
wtype
yubikey-manager-qt
];
programs.light.enable = true;
fonts.packages = 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;
extraOptions = [
"--unsupported-gpu"
];
};
environment.etc = {
"sway/config".text = 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;
};
};
}