nixos-config/modules/profiles/desktop.nix

122 lines
4 KiB
Nix
Raw Normal View History

2021-08-25 04:27:20 +00:00
{ config, pkgs, lib, ... }:
with lib;
{
config = mkIf (config.sconfig.profile == "desktop") {
services.pcscd.enable = true;
2021-11-02 18:47:46 +00:00
sconfig = {
alacritty.enable = true;
security-tools = true;
};
2021-09-08 00:32:11 +00:00
2021-10-12 07:05:03 +00:00
fonts.fonts = [
2021-10-14 20:49:55 +00:00
# vscode: "DejaVuSansMono Nerd Font Mono" (size 16)
# gnome-terminal: "DejaVu Sans Mono, Inconsolata for Powerline Medium 12"
# gnome-terminal setting (dconf): /org/gnome/terminal/legacy/profiles/.../font
pkgs.powerline-fonts
2021-10-12 07:05:03 +00:00
(pkgs.nerdfonts.override { fonts = [ "DejaVuSansMono" ]; })
];
2021-10-11 05:05:54 +00:00
2021-08-25 04:27:20 +00:00
environment.systemPackages = with pkgs; [
brave
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
opensc
pavucontrol
2021-10-15 20:59:28 +00:00
pulseeffects-legacy
2021-09-28 18:47:24 +00:00
qemu_full
2021-08-25 04:27:20 +00:00
steam-run
tdesktop
youtube-dl
(mpv-with-scripts.override { scripts = [ mpvScripts.mpris ]; })
(vscode-with-extensions.override {
vscode = vscodium;
vscodeExtensions = with pkgs.vscode-extensions; [
2021-11-09 16:02:28 +00:00
bbenoist.nix
ms-azuretools.vscode-docker
2021-10-17 20:16:36 +00:00
ms-python.python
2021-08-25 04:27:20 +00:00
ms-vscode.cpptools
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;
DisablePocket = true;
DisableFirefoxStudies = true;
OfferToSaveLogins = false;
DisableFormHistory = true;
SearchSuggestEnabled = false;
Preferences = {
"browser.contentblocking.category" = { Status = "locked"; Value = "strict"; };
2021-11-10 18:06:36 +00:00
"browser.zoom.siteSpecific" = { Status = "locked"; Value = false; };
"extensions.formautofill.available" = { Status = "locked"; Value = "off"; };
2021-11-10 18:06:10 +00:00
"media.setsinkid.enabled" = { Status = "locked"; Value = true; }; #GoogleVoice
2021-08-25 04:27:20 +00:00
"network.IDN_show_punycode" = { Status = "locked"; Value = true; };
};
};
})
];
2021-10-27 15:36:44 +00:00
sconfig.user-settings = ''
ln -sf /etc/vscode-settings.json ~/.config/VSCodium/User/settings.json
ln -sf /etc/vscode-keybindings.json ~/.config/VSCodium/User/keybindings.json
'';
2021-10-27 15:17:34 +00:00
environment.etc."vscode-settings.json".text = builtins.toJSON {
"editor.renderFinalNewline" = false;
"editor.scrollBeyondLastLine" = false;
"extensions.autoCheckUpdates" = false;
"extensions.autoUpdate" = false;
"files.insertFinalNewline" = true;
"files.trimFinalNewlines" = true;
"files.watcherExclude"."**/result/**" = true;
2021-10-27 15:17:34 +00:00
"git.confirmSync" = false;
"python.formatting.autopep8Args" = [ "--max-line-length=999" ];
"python.showStartPage" = false;
"security.workspace.trust.banner" = "never";
"security.workspace.trust.startupPrompt" = "never";
"security.workspace.trust.untrustedFiles" = "newWindow";
"terminal.external.linuxExec" = "x-terminal-emulator";
"terminal.integrated.fontFamily" = "DejaVuSansMono Nerd Font Mono";
"terminal.integrated.fontSize" = 16;
"terminal.integrated.showExitAlert" = false;
2021-12-03 17:06:28 +00:00
"trailing-spaces.highlightCurrentLine" = false;
2021-10-27 15:17:34 +00:00
"update.mode" = "none";
"update.showReleaseNotes" = false;
"window.menuBarVisibility" = "hidden";
"workbench.startupEditor" = "none";
"terminal.integrated.profiles.linux"."bash" = {
"path" = "bash";
"args" = [ "-c" "unset SHLVL; bash" ];
2021-08-25 04:27:20 +00:00
};
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
programs.steam.enable = true;
virtualisation.docker = { enable = true; enableOnBoot = false; };
2021-10-08 04:54:54 +00:00
boot.kernelPackages = pkgs.linuxPackages_5_14;
2021-08-25 04:27:20 +00:00
boot.loader.timeout =
if config.boot.loader.systemd-boot.enable
then null else lib.mkOverride 9999 99;
};
}