2024-05-23 13:39:48 +03:00
|
|
|
#Config for graphical desktop
|
|
|
|
{ config, pkgs, ... }:
|
2024-06-02 16:18:19 +03:00
|
|
|
let
|
|
|
|
Xresources = "${pkgs.writeText "Xresources" ''
|
2024-07-10 16:36:04 +03:00
|
|
|
Xft.dpi: 96
|
|
|
|
Xft.antialias: true
|
|
|
|
Xft.hinting: true
|
|
|
|
Xft.rgba: rgb
|
|
|
|
Xft.autohint: false
|
|
|
|
Xft.hintstyle: hintslight
|
|
|
|
Xft.lcdfilter: lcddefault
|
|
|
|
|
|
|
|
Xcursor.theme: xcursor-breeze
|
|
|
|
Xcursor.size: 0
|
2024-06-02 16:18:19 +03:00
|
|
|
''}";
|
2024-05-23 13:39:48 +03:00
|
|
|
in
|
2024-06-02 16:18:19 +03:00
|
|
|
{
|
2024-06-06 22:16:29 +03:00
|
|
|
assertions = [
|
|
|
|
{
|
|
|
|
assertion = config.users.users ? "vili";
|
|
|
|
message = "User 'vili' needed for desktop!";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2024-06-02 16:18:19 +03:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
i3status
|
|
|
|
rofi
|
|
|
|
arandr
|
|
|
|
btop
|
|
|
|
firefox
|
|
|
|
telegram-desktop
|
|
|
|
signal-desktop
|
|
|
|
discord
|
|
|
|
tidal-hifi
|
|
|
|
vlc
|
|
|
|
pavucontrol
|
|
|
|
viewnior
|
|
|
|
xfce.mousepad
|
|
|
|
pcmanfm
|
|
|
|
libreoffice
|
|
|
|
evince
|
|
|
|
brightnessctl
|
|
|
|
networkmanagerapplet
|
|
|
|
zotero
|
|
|
|
flameshot
|
|
|
|
speedcrunch
|
|
|
|
];
|
|
|
|
|
|
|
|
services = {
|
|
|
|
displayManager = {
|
|
|
|
defaultSession = "none+i3";
|
|
|
|
autoLogin.enable = true;
|
|
|
|
autoLogin.user = "vili";
|
|
|
|
};
|
|
|
|
xserver = {
|
|
|
|
enable = true;
|
2024-06-02 05:53:39 +03:00
|
|
|
displayManager = {
|
2024-06-02 16:18:19 +03:00
|
|
|
lightdm.enable = true;
|
|
|
|
sessionCommands = ''${pkgs.xorg.xrdb}/bin/xrdb -merge < ${Xresources}'';
|
2024-06-02 05:53:39 +03:00
|
|
|
};
|
2024-06-02 16:18:19 +03:00
|
|
|
windowManager.i3 = {
|
2024-06-02 05:53:39 +03:00
|
|
|
enable = true;
|
2024-07-10 16:21:33 +03:00
|
|
|
configFile = ./program-config-files/i3.conf;
|
2024-06-02 05:53:39 +03:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-06-02 16:18:19 +03:00
|
|
|
printing.enable = true;
|
|
|
|
avahi = {
|
2024-06-02 05:53:39 +03:00
|
|
|
enable = true;
|
2024-06-02 16:18:19 +03:00
|
|
|
nssmdns4 = true;
|
|
|
|
openFirewall = true;
|
2024-06-02 05:53:39 +03:00
|
|
|
};
|
2024-06-02 16:18:19 +03:00
|
|
|
};
|
2024-06-02 05:53:39 +03:00
|
|
|
|
2024-06-02 16:18:19 +03:00
|
|
|
nixpkgs.config.pulseaudio = true;
|
|
|
|
hardware.pulseaudio.enable = true;
|
2024-06-02 05:53:39 +03:00
|
|
|
|
2024-06-02 16:18:19 +03:00
|
|
|
programs.firefox = {
|
|
|
|
preferences = {
|
|
|
|
"media.ffmpeg.vaapi.enabled" = true;
|
|
|
|
};
|
|
|
|
enable = true;
|
|
|
|
preferencesStatus = "locked";
|
|
|
|
policies = {
|
|
|
|
ExtensionSettings = {
|
|
|
|
"*".installation_mode = "blocked";
|
|
|
|
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
|
|
|
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
|
|
|
|
installation_mode = "force_installed";
|
|
|
|
};
|
2024-06-02 05:53:39 +03:00
|
|
|
};
|
|
|
|
};
|
2024-06-02 16:18:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
qt = {
|
|
|
|
enable = true;
|
|
|
|
style = "breeze";
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.i3statusSymlink = {
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
description = "Symlink for i3status";
|
|
|
|
serviceConfig = {
|
|
|
|
Type = "oneshot";
|
|
|
|
User = "vili";
|
|
|
|
ExecStartPre = ''${pkgs.coreutils-full}/bin/mkdir -p /home/vili/.config/i3status'';
|
2024-07-10 16:21:33 +03:00
|
|
|
ExecStart = ''${pkgs.coreutils-full}/bin/ln -sf ${./program-config-files/i3status.conf} /home/vili/.config/i3status/config'';
|
2024-06-02 05:53:39 +03:00
|
|
|
};
|
2024-06-02 16:18:19 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
xdg.mime.defaultApplications = {
|
|
|
|
"application/pdf" = "org.gnome.Evince.desktop";
|
|
|
|
"text/plain" = "org.xfce.mousepad.desktop";
|
|
|
|
"inode/directory" = "pcmanfm.description";
|
|
|
|
};
|
2024-06-02 05:53:39 +03:00
|
|
|
|
2024-06-02 16:18:19 +03:00
|
|
|
security.polkit.enable = true;
|
|
|
|
}
|