nix/roles/desktop.nix
2021-06-09 12:03:03 +02:00

172 lines
3.6 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
let
unstable = import <nixos-unstable> { config.allowUnfree = true; };
in {
programs.sway = {
enable = true;
extraPackages = with pkgs; [
bemenu
brightnessctl
grim
i3status-rust
kanshi
mako
slurp
swayidle
swaylock
xwayland
wf-recorder
];
};
xdg.portal = {
enable = true;
gtkUsePortal = true;
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
];
};
boot.extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
environment = {
etc = {
"i3/config".source = ../dotfiles/i3/config;
"sway/config".source = ../dotfiles/sway/config;
"sway/status.toml".source = ../dotfiles/sway/status.toml;
"xdg/alacritty/alacritty.yml".source = ../dotfiles/alacritty.yml;
};
};
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
config.pipewire = {
"context.properties" = {
"default.clock.rate" = 48000;
};
};
};
fonts.enableDefaultFonts = true;
fonts.fontconfig.antialias = true;
fonts.fonts = with pkgs; [
cascadia-code
fira-code
fira-code-symbols
font-awesome
meslo-lg
noto-fonts
noto-fonts-emoji
];
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
# firefox also needs:
#
# gfx.webrenderer.enabled = true
# widget.wayland-dmabuf-vaapi.enabled = true
#
# check in `about:support` that
# * Composing -> Webrenderer
firefox-wayland
libva
libva-utils
mesa
librsvg
mypaint
mypaint-brushes
arc-theme
capitaine-cursors
elementary-xfce-icon-theme
gsettings-desktop-schemas
gtk-engine-murrine
gtk_engines
hicolor-icon-theme
lxappearance
numix-icon-theme
imv
inkscape
libqrencode
libreoffice
libsecret
lxappearance
mpv
mumble
neofetch
pavucontrol
pcmanfm
pulseeffects-pw
wl-clipboard
xdg_utils
xfce.thunar
xfce.thunar-volman
ydotool
unstable.alacritty
unstable.keepassxc
(
pkgs.writeTextFile {
name = "startsway";
destination = "/bin/startsway";
executable = true;
text = ''
#! ${pkgs.bash}/bin/bash
export GTK_ICON_THEME=Tango
export GTK_THEME=Blackbird
export _JAVA_AWT_WM_NOREPARENTING=1
export MOZ_ENABLE_WAYLAND=1
export MOZ_USE_XINPUT2=1
export QT_AUTO_SCREEN_SCALE_FACTOR=0
export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_FORCE_DPI=96
export SDL_VIDEODRIVER=wayland
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_TYPE=wayland
${pkgs.dbus}/bin/dbus-run-session ${pkgs.sway}/bin/sway
'';
}
)
];
services.gvfs.enable = true;
hardware.bluetooth.enable = true;
services.blueman.enable = true;
services.syncthing = {
enable = true;
dataDir = "/home/stefan";
openDefaultPorts = true;
user = "stefan";
group = "users";
};
services.printing.enable = true;
services.printing.drivers = [
pkgs.gutenprint
];
services.avahi.enable = true;
services.avahi.nssmdns = true;
hardware.opengl = {
enable = true;
};
}