nixos-config/modules/desktop/default.nix

103 lines
2.6 KiB
Nix
Raw Normal View History

2021-08-25 00:27:20 -04:00
{ config, pkgs, lib, ... }:
with lib;
{
2023-03-27 11:21:48 -04:00
options.sconfig.desktop = {
enable = lib.mkEnableOption "Enable Desktop Environment";
};
2023-06-11 14:47:02 -04:00
imports = [
./chromium.nix
2023-07-27 13:35:44 -04:00
./firefox.nix
2023-09-16 18:14:27 -04:00
./kitty.nix
2023-06-11 14:47:02 -04:00
];
2023-03-27 11:21:48 -04:00
config = mkIf (config.sconfig.desktop.enable) {
2023-02-16 15:09:55 -05:00
programs.steam.enable = true;
2021-08-25 00:27:20 -04:00
services.pcscd.enable = true;
2022-11-21 01:08:30 -05:00
virtualisation.podman.enable = true;
2023-10-08 15:51:57 -04:00
networking.networkmanager.wifi.powersave = false;
2021-08-25 00:27:20 -04:00
2022-10-31 14:27:58 -04:00
# Pipewire
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
pulse.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
};
2021-11-02 14:47:46 -04:00
sconfig = {
security-tools = true;
};
2021-09-07 20:32:11 -04:00
2022-08-08 13:40:03 -04:00
services.udev.extraHwdb = ''
mouse:usb:*
MOUSE_DPI=600@1000
'';
2023-11-27 15:21:55 -05:00
fonts.packages = [
2022-11-10 14:52:58 -05:00
(pkgs.nerdfonts.override { fonts = [ "DejaVuSansMono" ]; })
];
2021-10-11 01:05:54 -04:00
2022-02-05 13:11:00 -05:00
environment.variables.MOZ_ENABLE_WAYLAND = "1";
2022-01-14 00:07:21 -05:00
environment.variables.MOZ_USE_XINPUT2 = "1";
2021-08-25 00:27:20 -04:00
environment.systemPackages = with pkgs; [
2021-11-02 14:46:18 -04:00
chromium
2021-08-25 00:27:20 -04:00
discord
element-desktop
ffmpeg
gimp
glxinfo
gnome3.dconf-editor
2023-02-22 17:42:18 -05:00
helvum
2023-02-16 15:09:55 -05:00
obs-studio
2021-08-25 00:27:20 -04:00
opensc
pavucontrol
2023-10-26 11:15:34 -04:00
qemu_kvm
2023-01-25 16:37:32 -05:00
quickemu
2021-08-25 00:27:20 -04:00
tdesktop
2023-05-03 22:43:32 -04:00
yt-dlp-light
2021-08-25 00:27:20 -04:00
2024-01-16 16:51:14 -05:00
pcscliteWithPolkit.out # workaround: https://github.com/NixOS/nixpkgs/issues/280826
2022-11-02 09:33:17 -04:00
(mpv.override { scripts = [ mpvScripts.mpris ]; })
2021-08-25 00:27:20 -04:00
(vscode-with-extensions.override {
vscodeExtensions = with pkgs.vscode-extensions; [
2023-07-24 03:13:14 -04:00
esbenp.prettier-vscode
2021-12-08 14:08:37 -05:00
jnoortheen.nix-ide
2021-11-09 11:02:28 -05:00
ms-azuretools.vscode-docker
2023-10-26 11:17:46 -04:00
# ms-python.python # currently broken (2023-10-26)
2022-10-26 00:18:30 -04:00
redhat.vscode-yaml
2021-12-03 12:06:28 -05:00
shardulm94.trailing-spaces
2021-08-25 00:27:20 -04:00
];
})
];
2022-12-06 01:43:00 -05:00
environment.etc."my-settings.sh".text = ''
2022-11-06 00:59:19 -04:00
mkdir -p ~/.config/Code/User
ln -sf /etc/vscode-settings.json ~/.config/Code/User/settings.json
ln -sf /etc/vscode-keybindings.json ~/.config/Code/User/keybindings.json
2021-10-27 11:36:44 -04:00
'';
2023-05-22 02:59:13 -04:00
environment.etc."vscode-keybindings.json".source = ./vscode-keybindings.json;
2022-11-01 12:34:41 -04:00
environment.etc."vscode-settings.json".text = builtins.toJSON (
(
builtins.fromJSON (builtins.readFile ./vscode-settings.json)
) // {
# NixOS-specific vscode settings:
"extensions.autoCheckUpdates" = false;
"extensions.autoUpdate" = false;
"terminal.external.linuxExec" = "x-terminal-emulator";
2023-05-06 18:35:07 -04:00
"terminal.integrated.fontFamily" = "DejaVuSansM Nerd Font";
2022-11-01 12:34:41 -04:00
"update.mode" = "none";
}
);
2021-10-27 11:17:34 -04:00
boot.loader.timeout = 1;
2021-08-25 00:27:20 -04:00
};
}