nixos-config/modules/desktop/default.nix

103 lines
2.5 KiB
Nix
Raw Normal View History

2021-08-25 04:27:20 +00:00
{ config, pkgs, lib, ... }:
with lib;
{
2023-03-27 15:21:48 +00:00
options.sconfig.desktop = {
enable = lib.mkEnableOption "Enable Desktop Environment";
};
2023-06-11 18:47:02 +00:00
imports = [
./chromium.nix
2023-07-27 17:35:44 +00:00
./firefox.nix
2023-09-16 22:14:27 +00:00
./kitty.nix
2023-06-11 18:47:02 +00:00
];
2023-03-27 15:21:48 +00:00
config = mkIf (config.sconfig.desktop.enable) {
2023-02-16 20:09:55 +00:00
programs.steam.enable = true;
2021-08-25 04:27:20 +00:00
services.pcscd.enable = true;
2022-11-21 06:08:30 +00:00
virtualisation.podman.enable = true;
2023-10-08 19:51:57 +00:00
networking.networkmanager.wifi.powersave = false;
2021-08-25 04:27:20 +00:00
2022-10-31 18:27:58 +00: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 18:47:46 +00:00
sconfig = {
security-tools = true;
};
2021-09-08 00:32:11 +00:00
2022-08-08 17:40:03 +00:00
services.udev.extraHwdb = ''
mouse:usb:*
MOUSE_DPI=600@1000
'';
2023-11-27 20:21:55 +00:00
fonts.packages = [
2022-11-10 19:52:58 +00:00
(pkgs.nerdfonts.override { fonts = [ "DejaVuSansMono" ]; })
];
2021-10-11 05:05:54 +00:00
2022-02-05 18:11:00 +00:00
environment.variables.MOZ_ENABLE_WAYLAND = "1";
2022-01-14 05:07:21 +00:00
environment.variables.MOZ_USE_XINPUT2 = "1";
2021-08-25 04:27:20 +00:00
environment.systemPackages = with pkgs; [
2021-11-02 18:46:18 +00:00
chromium
2021-08-25 04:27:20 +00:00
discord
2024-02-16 06:02:43 +00:00
easyeffects
2021-08-25 04:27:20 +00:00
element-desktop
ffmpeg
gimp
glxinfo
gnome3.dconf-editor
2023-02-22 22:42:18 +00:00
helvum
2024-04-30 04:16:54 +00:00
kdenlive
2023-02-16 20:09:55 +00:00
obs-studio
2021-08-25 04:27:20 +00:00
opensc
pavucontrol
2023-10-26 15:15:34 +00:00
qemu_kvm
2023-01-25 21:37:32 +00:00
quickemu
2021-08-25 04:27:20 +00:00
tdesktop
2023-05-04 02:43:32 +00:00
yt-dlp-light
2021-08-25 04:27:20 +00:00
2022-11-02 13:33:17 +00:00
(mpv.override { scripts = [ mpvScripts.mpris ]; })
2021-08-25 04:27:20 +00:00
(vscode-with-extensions.override {
vscodeExtensions = with pkgs.vscode-extensions; [
2023-07-24 07:13:14 +00:00
esbenp.prettier-vscode
2021-12-08 19:08:37 +00:00
jnoortheen.nix-ide
2021-11-09 16:02:28 +00:00
ms-azuretools.vscode-docker
2023-10-26 15:17:46 +00:00
# ms-python.python # currently broken (2023-10-26)
2022-10-26 04:18:30 +00:00
redhat.vscode-yaml
2021-12-03 17:06:28 +00:00
shardulm94.trailing-spaces
2021-08-25 04:27:20 +00:00
];
})
];
2022-12-06 06:43:00 +00:00
environment.etc."my-settings.sh".text = ''
2022-11-06 04:59:19 +00: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 15:36:44 +00:00
'';
2023-05-22 06:59:13 +00:00
environment.etc."vscode-keybindings.json".source = ./vscode-keybindings.json;
2022-11-01 16:34:41 +00: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 22:35:07 +00:00
"terminal.integrated.fontFamily" = "DejaVuSansM Nerd Font";
2022-11-01 16:34:41 +00:00
"update.mode" = "none";
}
);
2021-10-27 15:17:34 +00:00
boot.loader.timeout = 1;
2021-08-25 04:27:20 +00:00
};
}