nixos-config/modules/profiles/desktop.nix

123 lines
3.6 KiB
Nix
Raw Normal View History

2021-08-25 00:27:20 -04:00
{ config, pkgs, lib, ... }:
with lib;
{
config = mkIf (config.sconfig.profile == "desktop") {
services.pcscd.enable = true;
2022-11-21 01:08:30 -05:00
virtualisation.podman.enable = true;
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 = {
2022-02-03 22:19:24 -05:00
alacritty.enable = true;
2021-11-02 14:47:46 -04:00
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
'';
2022-11-10 14:52:58 -05:00
fonts.fonts = [
(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
opensc
pavucontrol
2021-09-28 14:47:24 -04:00
qemu_full
2021-08-25 00:27:20 -04:00
tdesktop
youtube-dl
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; [
2021-12-08 14:08:37 -05:00
jnoortheen.nix-ide
2021-11-09 11:02:28 -05:00
ms-azuretools.vscode-docker
2021-10-17 16:16:36 -04:00
ms-python.python
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
];
})
(wrapFirefox firefox-unwrapped {
extraPolicies = {
2021-11-08 21:40:42 -05:00
NewTabPage = false;
2021-08-25 00:27:20 -04:00
CaptivePortal = false;
DisableFirefoxStudies = true;
OfferToSaveLogins = false;
DisableFormHistory = true;
SearchSuggestEnabled = false;
2022-06-19 00:55:07 -04:00
Preferences = builtins.mapAttrs
(n: v: { Value = v; Status = "locked"; })
{
"browser.contentblocking.category" = "strict";
"browser.zoom.siteSpecific" = false;
2022-06-19 23:20:00 -04:00
"extensions.formautofill.addresses.enabled" = false;
"extensions.formautofill.creditCards.enabled" = false;
2022-06-19 00:55:07 -04:00
"network.IDN_show_punycode" = true;
"ui.key.menuAccessKeyFocuses" = false;
};
2021-08-25 00:27:20 -04:00
};
})
2022-08-29 00:08:49 -04:00
(pkgs.writeShellScriptBin "my-dash-to-panel" ''
dconf write /org/gnome/shell/extensions/dash-to-panel/group-apps false
dconf write /org/gnome/shell/extensions/dash-to-panel/isolate-workspaces true
dconf write /org/gnome/shell/extensions/dash-to-panel/panel-positions "'{\"0\":\"TOP\"}'"
dconf write /org/gnome/shell/extensions/dash-to-panel/panel-sizes "'{\"0\":40}'"
dconf write /org/gnome/shell/extensions/dash-to-panel/show-window-previews false
'')
2021-08-25 00:27:20 -04:00
];
2021-10-27 11:36:44 -04:00
sconfig.user-settings = ''
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
'';
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";
"terminal.integrated.fontFamily" = "DejaVuSansMono Nerd Font";
"update.mode" = "none";
}
);
2021-10-27 11:17:34 -04: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 00:27:20 -04:00
boot.loader.timeout = 1;
2021-08-25 00:27:20 -04:00
};
}