feat: add a lot of stuff
This commit is contained in:
parent
8eb88574fb
commit
6067f0ff0b
47 changed files with 578 additions and 136 deletions
23
users/gandalf/modules/gui/programs/alacritty.nix
Normal file
23
users/gandalf/modules/gui/programs/alacritty.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
||||
in
|
||||
{
|
||||
# alacritty - a cross-platform, GPU-accelerated terminal emulator
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
# custom settings
|
||||
settings = {
|
||||
env.TERM = "xterm-256color";
|
||||
font = {
|
||||
size = 12;
|
||||
draw_bold_text_with_bright_colors = true;
|
||||
normal = {
|
||||
family = common.font;
|
||||
};
|
||||
};
|
||||
scrolling.multiplier = 5;
|
||||
selection.save_to_clipboard = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
86
users/gandalf/modules/gui/programs/chromium.nix
Normal file
86
users/gandalf/modules/gui/programs/chromium.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
|
||||
icons = {
|
||||
chromium = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/2/28/Chromium_Logo.svg/240px-Chromium_Logo.svg.png";
|
||||
sha256 = "ff6383a5c08745100e1f8720397c3d6e1b30bc6d4a329cf44bbac16ec03948e7";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
spotify = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/84/Spotify_icon.svg/232px-Spotify_icon.svg.png";
|
||||
sha256 = "0568b108bf4533e7382e0f3526e211308868d2d2aa35ab8f0cc7beb464e70d5f";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
teams = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Microsoft_Office_Teams_%282018%E2%80%93present%29.svg/258px-Microsoft_Office_Teams_%282018%E2%80%93present%29.svg.png";
|
||||
sha256 = "a7bf37b6132e45c3c3314e7ed3a465138caabe3d87535a8b82a84be6a5f70dac";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
outlook = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/d/df/Microsoft_Office_Outlook_%282018%E2%80%93present%29.svg/258px-Microsoft_Office_Outlook_%282018%E2%80%93present%29.svg.png";
|
||||
sha256 = "565fff2ed6a3c4c98daf7a2b56aad386c2d076f4f5b88199785593eb380eb3d4";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
whatsapp = pkgs.fetchurl {
|
||||
url = "https://upload.wikimedia.org/wikipedia/commons/thumb/6/6b/WhatsApp.svg/240px-WhatsApp.svg.png";
|
||||
sha256 = "65b4eeab9b5a02c46f75f26abeac3c72a479cf8fce829b7f9c46f59e9a7f9785";
|
||||
meta.licenses = lib.licenses.publicDomain;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
extensions = [
|
||||
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # ublock origin
|
||||
{ id = "dbepggeogbaibhgnhhndojpepiihcmeb"; } # vimium
|
||||
];
|
||||
};
|
||||
|
||||
xdg.dataFile = {
|
||||
"applications/chromium-development.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Chromium (Development Modus)
|
||||
Exec=${pkgs.chromium}/bin/chromium --allow-file-access-from-files --disable-site-isolation-trials --allow-running-insecure-content --no-referrers --unlimited-storage --user-data-dir=${config.xdg.dataHome}/chromium-development/data --disable-web-security
|
||||
Terminal=false
|
||||
Icon=${icons.chromium}
|
||||
'';
|
||||
"applications/spotify.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Spotify
|
||||
Exec=${pkgs.chromium}/bin/chromium --app=https://spotify.com
|
||||
Terminal=false
|
||||
Icon=${icons.spotify}
|
||||
'';
|
||||
"applications/teams.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Microsoft Teams
|
||||
Exec=${pkgs.chromium}/bin/chromium --app=https://teams.microsoft.com
|
||||
Terminal=false
|
||||
Icon=${icons.teams}
|
||||
'';
|
||||
"applications/outlook.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Microsoft Outlook
|
||||
Exec=${pkgs.chromium}/bin/chromium --app=https://outlook.office365.com/mail
|
||||
Terminal=false
|
||||
Icon=${icons.outlook}
|
||||
'';
|
||||
"applications/whatsapp.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=WhatsApp
|
||||
Exec=${pkgs.chromium}/bin/chromium --app=https://web.whatsapp.com
|
||||
Terminal=false
|
||||
Icon=${icons.whatsapp}
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
24
users/gandalf/modules/gui/programs/default.nix
Normal file
24
users/gandalf/modules/gui/programs/default.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./chromium.nix
|
||||
./discord.nix
|
||||
./keyring.nix
|
||||
./obs.nix
|
||||
./vscode.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
firefox
|
||||
speechd # https://support.mozilla.org/en-US/kb/speechd-setup
|
||||
gnome.nautilus
|
||||
gimp
|
||||
vlc
|
||||
qbittorrent
|
||||
gnome.simple-scan
|
||||
telegram-desktop
|
||||
signal-desktop
|
||||
];
|
||||
|
||||
}
|
||||
5
users/gandalf/modules/gui/programs/discord.nix
Normal file
5
users/gandalf/modules/gui/programs/discord.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
discord
|
||||
];
|
||||
}
|
||||
14
users/gandalf/modules/gui/programs/flameshot/build.nix
Normal file
14
users/gandalf/modules/gui/programs/flameshot/build.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs , cmake , qttools , qtsvg , kguiaddons , wrapQtAppsHook }:
|
||||
|
||||
# https://ryantm.github.io/nixpkgs/using/overrides/
|
||||
pkgs.flameshot.overrideAttrs (finalAttrs: previousAttrs: {
|
||||
|
||||
pname = previousAttrs.pname + "-wl";
|
||||
|
||||
nativeBuildInputs = [ cmake qttools qtsvg kguiaddons wrapQtAppsHook ];
|
||||
cmakeFlags = [
|
||||
"-DUSE_WAYLAND_CLIPBOARD=1"
|
||||
"-DUSE_WAYLAND_GRIM=1"
|
||||
];
|
||||
|
||||
})
|
||||
3
users/gandalf/modules/gui/programs/flameshot/default.nix
Normal file
3
users/gandalf/modules/gui/programs/flameshot/default.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
import ./flameshot.nix
|
||||
# include with:
|
||||
# flameshot = pkgs.libsForQt5.callPackage ./flameshot/build.nix { };
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
# https://nixos.wiki/wiki/Qt
|
||||
# https://nixos.org/manual/nixpkgs/stable/#sec-language-qt
|
||||
pkgs.libsForQt5.callPackage ./build.nix { }
|
||||
16
users/gandalf/modules/gui/programs/keyring.nix
Normal file
16
users/gandalf/modules/gui/programs/keyring.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = [
|
||||
"pkcs11"
|
||||
"secrets"
|
||||
"ssh"
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gnome.seahorse
|
||||
];
|
||||
|
||||
}
|
||||
8
users/gandalf/modules/gui/programs/obs.nix
Normal file
8
users/gandalf/modules/gui/programs/obs.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.obs-studio-plugins.wlrobs ];
|
||||
};
|
||||
|
||||
}
|
||||
161
users/gandalf/modules/gui/programs/vscode.nix
Normal file
161
users/gandalf/modules/gui/programs/vscode.nix
Normal file
|
|
@ -0,0 +1,161 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
common = (import ../common.nix) { pkgs = pkgs; lib = lib; };
|
||||
in
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
enableExtensionUpdateCheck = true;
|
||||
enableUpdateCheck = false;
|
||||
extensions = with pkgs.vscode-extensions; [
|
||||
vscodevim.vim
|
||||
editorconfig.editorconfig
|
||||
dbaeumer.vscode-eslint
|
||||
waderyan.gitblame
|
||||
bierner.markdown-mermaid
|
||||
pkief.material-icon-theme
|
||||
christian-kohler.path-intellisense
|
||||
johnpapa.vscode-peacock
|
||||
esbenp.prettier-vscode
|
||||
bradlc.vscode-tailwindcss
|
||||
jnoortheen.nix-ide
|
||||
];
|
||||
userSettings = {
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"explorer.confirmDelete" = false;
|
||||
|
||||
"editor.renderControlCharacters" = true;
|
||||
"editor.renderWhitespace" = "all";
|
||||
"editor.renderFinalNewline" = "on";
|
||||
"editor.tabSize" = 4;
|
||||
"editor.cursorStyle" = "line";
|
||||
"editor.insertSpaces" = false;
|
||||
"editor.lineNumbers" = "on";
|
||||
"editor.wordSeparators" = "/\\()\"':,.;<>~!@#$%^&*|+=[]{}`?-";
|
||||
"editor.wordWrap" = "on";
|
||||
"editor.suggestSelection" = "first";
|
||||
"editor.fontFamily" = common.font;
|
||||
"editor.fontSize" = 16;
|
||||
"editor.bracketPairColorization.enabled" = true;
|
||||
"editor.guides.bracketPairs" = "active";
|
||||
"editor.quickSuggestions" = {
|
||||
strings = "on";
|
||||
};
|
||||
"editor.codeActionsOnSave" = {
|
||||
".source.organizeImports" = true;
|
||||
};
|
||||
|
||||
"terminal.integrated.fontFamily" = common.font;
|
||||
|
||||
"files.exclude" = {
|
||||
"**/.classpath" = true;
|
||||
"**/.project" = true;
|
||||
"**/.settings" = true;
|
||||
"**/.factorypath" = true;
|
||||
"**/__pycache__" = true;
|
||||
};
|
||||
|
||||
"vim.normalModeKeyBindingsNonRecursive" = [
|
||||
{
|
||||
"before" = [ "<C-p>" ];
|
||||
"commands" = [ "workbench.action.quickOpen" ];
|
||||
}
|
||||
{
|
||||
"before" = [ "<C-b>" ];
|
||||
"commands" = [
|
||||
"workbench.view.explorer"
|
||||
"workbench.action.toggleSidebarVisibility"
|
||||
];
|
||||
}
|
||||
];
|
||||
|
||||
"[html]" = {
|
||||
"editor.tabSize" = 2;
|
||||
"editor.insertSpaces" = true;
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
};
|
||||
"[javascript]" = {
|
||||
"editor.tabSize" = 2;
|
||||
"editor.insertSpaces" = true;
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
};
|
||||
"[typescript]" = {
|
||||
"editor.tabSize" = 2;
|
||||
"editor.insertSpaces" = true;
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
};
|
||||
"[typescriptreact]" = {
|
||||
"editor.tabSize" = 2;
|
||||
"editor.insertSpaces" = true;
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
};
|
||||
"[python]" = {
|
||||
"editor.tabSize" = 4;
|
||||
"editor.insertSpaces" = true;
|
||||
"editor.formatOnType" = true;
|
||||
};
|
||||
"[yaml]" = {
|
||||
"editor.insertSpaces" = true;
|
||||
"editor.tabSize" = 2;
|
||||
"editor.autoIndent" = "advanced";
|
||||
};
|
||||
"[json]" = {
|
||||
"editor.defaultFormatter" = "vscode.json-language-features";
|
||||
};
|
||||
"[jsonc]" = {
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
};
|
||||
"[java]" = {
|
||||
"editor.defaultFormatter" = "redhat.java";
|
||||
};
|
||||
"[markdown]" = {
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
};
|
||||
"[css]" = {
|
||||
"editor.defaultFormatter" = "esbenp.prettier-vscode";
|
||||
};
|
||||
"[nix]" = {
|
||||
"editor.defaultFormatter" = "jnoortheen.nix-ide";
|
||||
};
|
||||
|
||||
|
||||
"git.autofetch" = true;
|
||||
"json.schemaDownload.enable" = true;
|
||||
"javascript.updateImportsOnFileMove.enabled" = "always";
|
||||
"typescript.updateImportsOnFileMove.enabled" = "always";
|
||||
|
||||
"nix.enableLanguageServer" = true;
|
||||
"nix.serverPath" = "${pkgs.nil}/bin/nil";
|
||||
"nix.formatterPath" = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
|
||||
};
|
||||
|
||||
keybindings = [
|
||||
{
|
||||
key = "ctrl+tab";
|
||||
command = "workbench.action.nextEditor";
|
||||
}
|
||||
{
|
||||
key = "ctrl+shift+tab";
|
||||
command = "workbench.action.previousEditor";
|
||||
}
|
||||
{
|
||||
key = "alt+left";
|
||||
command = "workbench.action.navigateBack";
|
||||
}
|
||||
{
|
||||
key = "alt+right";
|
||||
command = "workbench.action.navigateForward";
|
||||
}
|
||||
{
|
||||
key = "ctrl+f";
|
||||
command = "editor.action.formatDocument";
|
||||
when = "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue