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";
|
|
|
|
};
|
|
|
|
|
|
|
|
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;
|
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 = {
|
2022-02-04 03:19:24 +00:00
|
|
|
alacritty.enable = true;
|
2021-11-02 18:47:46 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2022-11-10 19:52:58 +00:00
|
|
|
fonts.fonts = [
|
|
|
|
(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
|
|
|
|
element-desktop
|
|
|
|
ffmpeg
|
|
|
|
gimp
|
|
|
|
glxinfo
|
|
|
|
gnome3.dconf-editor
|
2023-02-22 22:42:18 +00:00
|
|
|
helvum
|
2023-02-16 20:09:55 +00:00
|
|
|
obs-studio
|
2021-08-25 04:27:20 +00:00
|
|
|
opensc
|
|
|
|
pavucontrol
|
2021-09-28 18:47:24 +00:00
|
|
|
qemu_full
|
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; [
|
2021-12-08 19:08:37 +00:00
|
|
|
jnoortheen.nix-ide
|
2021-11-09 16:02:28 +00:00
|
|
|
ms-azuretools.vscode-docker
|
2021-10-17 20:16:36 +00:00
|
|
|
ms-python.python
|
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
|
|
|
];
|
|
|
|
})
|
|
|
|
|
|
|
|
(wrapFirefox firefox-unwrapped {
|
|
|
|
extraPolicies = {
|
2021-11-09 02:40:42 +00:00
|
|
|
NewTabPage = false;
|
2021-08-25 04:27:20 +00:00
|
|
|
CaptivePortal = false;
|
2022-12-09 09:47:46 +00:00
|
|
|
DisablePocket = true;
|
2021-08-25 04:27:20 +00:00
|
|
|
DisableFirefoxStudies = true;
|
|
|
|
OfferToSaveLogins = false;
|
|
|
|
DisableFormHistory = true;
|
|
|
|
SearchSuggestEnabled = false;
|
2022-06-19 04:55:07 +00:00
|
|
|
|
|
|
|
Preferences = builtins.mapAttrs
|
|
|
|
(n: v: { Value = v; Status = "locked"; })
|
|
|
|
{
|
|
|
|
"browser.contentblocking.category" = "strict";
|
|
|
|
"browser.zoom.siteSpecific" = false;
|
2022-06-20 03:20:00 +00:00
|
|
|
"extensions.formautofill.addresses.enabled" = false;
|
|
|
|
"extensions.formautofill.creditCards.enabled" = false;
|
2022-06-19 04:55:07 +00:00
|
|
|
"network.IDN_show_punycode" = true;
|
|
|
|
"ui.key.menuAccessKeyFocuses" = false;
|
|
|
|
};
|
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
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";
|
|
|
|
"terminal.integrated.fontFamily" = "DejaVuSansMono Nerd Font";
|
|
|
|
"update.mode" = "none";
|
|
|
|
}
|
|
|
|
);
|
2021-10-27 15:17:34 +00:00
|
|
|
|
|
|
|
environment.etc."vscode-keybindings.json".text = builtins.toJSON [
|
|
|
|
{ key = "ctrl+w"; command = "-workbench.action.terminal.killEditor"; }
|
|
|
|
{ key = "ctrl+e"; command = "-workbench.action.quickOpen"; }
|
|
|
|
{ key = "ctrl+e"; command = "workbench.action.quickOpen"; when = "!terminalFocus"; }
|
|
|
|
];
|
2021-08-25 04:27:20 +00:00
|
|
|
|
2022-06-10 14:26:24 +00:00
|
|
|
boot.loader.timeout = 1;
|
2021-08-25 04:27:20 +00:00
|
|
|
};
|
|
|
|
}
|