feat: big refactor
This commit is contained in:
parent
2c09c21833
commit
ebedec9768
159 changed files with 1927 additions and 2222 deletions
57
modules/home-manager/gui/programs/alacritty.nix
Normal file
57
modules/home-manager/gui/programs/alacritty.nix
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
common = (import ../common.nix) {
|
||||
pkgs = pkgs;
|
||||
lib = lib;
|
||||
};
|
||||
alabaster-theme-patch = builtins.toFile "alabaster.patch" ''
|
||||
diff --git a/alabaster.toml b/alabaster.toml
|
||||
index df312d3..f5e5499 100644
|
||||
--- a/alabaster.toml
|
||||
+++ b/alabaster.toml
|
||||
@@ -2,11 +2,11 @@
|
||||
# author tonsky
|
||||
|
||||
[colors.primary]
|
||||
-background = '#F7F7F7'
|
||||
+background = '#FFFFFF'
|
||||
foreground = '#434343'
|
||||
|
||||
[colors.cursor]
|
||||
-text = '#F7F7F7'
|
||||
+text = '#FFFFFF'
|
||||
cursor = '#434343'
|
||||
|
||||
[colors.normal]
|
||||
'';
|
||||
alacritty-theme-patched = pkgs.alacritty-theme.overrideAttrs (
|
||||
final: previous: { patches = [ alabaster-theme-patch ]; }
|
||||
);
|
||||
in
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
import = [
|
||||
# Available themes:
|
||||
# https://github.com/alacritty/alacritty-theme
|
||||
"${alacritty-theme-patched}/alabaster.toml"
|
||||
];
|
||||
env.TERM = "xterm-256color";
|
||||
font = {
|
||||
size = 12;
|
||||
normal = {
|
||||
family = common.font;
|
||||
};
|
||||
};
|
||||
scrolling.multiplier = 5;
|
||||
selection.save_to_clipboard = true;
|
||||
window = {
|
||||
padding = {
|
||||
x = 5;
|
||||
y = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
64
modules/home-manager/gui/programs/chromium/default.nix
Normal file
64
modules/home-manager/gui/programs/chromium/default.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
{ config, pkgs, ... }:
|
||||
let
|
||||
icons = {
|
||||
chromium = ./icons/chromium.png;
|
||||
spotify = ./icons/spotify.png;
|
||||
teams = ./icons/teams.png;
|
||||
outlook = ./icons/outlook.png;
|
||||
whatsapp = ./icons/whatsapp.png;
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = (pkgs.chromium.override { enableWideVine = 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}
|
||||
'';
|
||||
};
|
||||
}
|
||||
21
modules/home-manager/gui/programs/chromium/icons/LICENSE.md
Normal file
21
modules/home-manager/gui/programs/chromium/icons/LICENSE.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
### `chromium.png`
|
||||
- Source: [https://commons.wikimedia.org/wiki/File:Chromium_Logo.svg](https://commons.wikimedia.org/wiki/File:Chromium_Logo.svg)
|
||||
- Licensing
|
||||
> The Chromium project is published under Creative Commons attribution 2.5 and BSD. The logo is in the public domain, as it does not meet the threshold of originality.
|
||||
|
||||
### `outlook.png`
|
||||
- Source: [https://developer.microsoft.com/en-us/fluentui#/styles/web/m365-product-icons](https://developer.microsoft.com/en-us/fluentui#/styles/web/m365-product-icons)
|
||||
- Microsoft Fabric Assets License Agreement: [https://aka.ms/fluentui-assets-license](https://aka.ms/fluentui-assets-license)
|
||||
|
||||
### `spotify.png`
|
||||
- Source: [https://commons.wikimedia.org/wiki/File:Spotify_icon.svg](https://commons.wikimedia.org/wiki/File:Spotify_icon.svg)
|
||||
- Attribution: [https://developer.spotify.com/documentation/design#attribution](https://developer.spotify.com/documentation/design#attribution)
|
||||
|
||||
### `teams.png`
|
||||
- Source: [https://developer.microsoft.com/en-us/fluentui#/styles/web/m365-product-icons](https://developer.microsoft.com/en-us/fluentui#/styles/web/m365-product-icons)
|
||||
- Attribution: [https://developer.spotify.com/documentation/design#attribution](https://developer.spotify.com/documentation/design#attribution)
|
||||
|
||||
### `whatsapp.png`
|
||||
- Source: [https://commons.wikimedia.org/wiki/File:WhatsApp_logo.svg](https://commons.wikimedia.org/wiki/File:WhatsApp_logo.svg)
|
||||
- WhatsApp brand assets and guidelines: [https://about.meta.com/brand/resources/whatsapp/whatsapp-brand/](https://about.meta.com/brand/resources/whatsapp/whatsapp-brand/)
|
||||
|
||||
BIN
modules/home-manager/gui/programs/chromium/icons/chromium.png
Normal file
BIN
modules/home-manager/gui/programs/chromium/icons/chromium.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
BIN
modules/home-manager/gui/programs/chromium/icons/outlook.png
Normal file
BIN
modules/home-manager/gui/programs/chromium/icons/outlook.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
modules/home-manager/gui/programs/chromium/icons/spotify.png
Normal file
BIN
modules/home-manager/gui/programs/chromium/icons/spotify.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
modules/home-manager/gui/programs/chromium/icons/teams.png
Normal file
BIN
modules/home-manager/gui/programs/chromium/icons/teams.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.5 KiB |
BIN
modules/home-manager/gui/programs/chromium/icons/whatsapp.png
Normal file
BIN
modules/home-manager/gui/programs/chromium/icons/whatsapp.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
62
modules/home-manager/gui/programs/default.nix
Normal file
62
modules/home-manager/gui/programs/default.nix
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
nixosConfig,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./chromium
|
||||
./discord.nix
|
||||
./games.nix
|
||||
./keyring.nix
|
||||
./kitty.nix
|
||||
./obs.nix
|
||||
./vscode.nix
|
||||
./zathura.nix
|
||||
];
|
||||
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
|
||||
firefox # a web browser built from firefox source tree
|
||||
thunderbird # a full-featured e-mail client
|
||||
speechd # common interface to speech synthesis - https://support.mozilla.org/en-us/kb/speechd-setup
|
||||
tor-browser # privacy-focused browser routing traffic through the tor network
|
||||
qbittorrent # featureful free software bittorrent client
|
||||
element-desktop # a feature-rich client for matrix.org
|
||||
|
||||
telegram-desktop # telegram desktop messaging app
|
||||
signal-desktop # private, simple, and secure messenger
|
||||
zoom-us # zoom.us video conferencing application
|
||||
|
||||
gnome.simple-scan # simple scanning utility
|
||||
gnome.gnome-font-viewer # program that can preview fonts and create thumbnails for fonts
|
||||
pppdf
|
||||
feh # a light-weight image viewer
|
||||
mpv
|
||||
vlc # cross-platform media player and streaming server
|
||||
zathura # a highly customizable and functional pdf viewer
|
||||
neovide # a simple graphical user interface for neovim
|
||||
|
||||
gimp # the gnu image manipulation program
|
||||
(calibre.override { unrarSupport = true; })
|
||||
libreoffice # comprehensive, professional-quality productivity suite, a variant of openoffice.org
|
||||
xournalpp # a handwriting notetaking software with pdf annotation support
|
||||
libsForQt5.okular # kde document viewer
|
||||
carla # audio plugin host
|
||||
picard # musicbrainz picard audio file tagger
|
||||
anki # spaced repetition flashcard program
|
||||
|
||||
]
|
||||
++ lib.optionals nixosConfig.bchmnn.printing.enable [
|
||||
system-config-printer # graphical user interface for cups administration
|
||||
|
||||
]
|
||||
++ lib.optionals nixosConfig.services.ratbagd.enable [
|
||||
piper # gtk frontend for ratbagd mouse config daemon
|
||||
|
||||
];
|
||||
}
|
||||
6
modules/home-manager/gui/programs/discord.nix
Normal file
6
modules/home-manager/gui/programs/discord.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
vesktop # alternate client for discord with vencord built-in
|
||||
];
|
||||
}
|
||||
15
modules/home-manager/gui/programs/games.nix
Normal file
15
modules/home-manager/gui/programs/games.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
nixosConfig,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
lib.mkIf nixosConfig.bchmnn.collections.games.enable {
|
||||
home.packages = with pkgs; [
|
||||
openjdk17 # the open-source java development kit
|
||||
prismlauncher # a free, open source launcher for minecraft
|
||||
# retroarchFull # multi-platform emulator frontend for libretro cores
|
||||
celestia # real-time 3d simulation of space
|
||||
extremetuxracer # high speed arctic racing game based on tux racer
|
||||
];
|
||||
}
|
||||
13
modules/home-manager/gui/programs/keyring.nix
Normal file
13
modules/home-manager/gui/programs/keyring.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = [
|
||||
"pkcs11"
|
||||
"secrets"
|
||||
"ssh"
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ gnome.seahorse ];
|
||||
}
|
||||
65
modules/home-manager/gui/programs/kitty.nix
Normal file
65
modules/home-manager/gui/programs/kitty.nix
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
{ pkgs, lib, ... }:
|
||||
let
|
||||
common = (import ../common.nix) {
|
||||
pkgs = pkgs;
|
||||
lib = lib;
|
||||
};
|
||||
kitty-alabaster-theme-patch = builtins.toFile "kitty-theme-alabaster.patch" ''
|
||||
diff --git a/themes/Alabaster.conf b/themes/Alabaster.conf
|
||||
index 7989049..b0c180e 100644
|
||||
--- a/themes/Alabaster.conf
|
||||
+++ b/themes/Alabaster.conf
|
||||
@@ -6,17 +6,17 @@
|
||||
|
||||
#: The basic colors
|
||||
|
||||
-foreground #000000
|
||||
-background #f7f7f7
|
||||
+foreground #434343
|
||||
+background #ffffff
|
||||
|
||||
-selection_foreground #000000
|
||||
+selection_foreground #434343
|
||||
selection_background #bfdbfe
|
||||
|
||||
|
||||
#: Cursor colors
|
||||
|
||||
-cursor #007acc
|
||||
-cursor_text_color #bfdbfe
|
||||
+cursor #434343
|
||||
+cursor_text_color #ffffff
|
||||
|
||||
|
||||
#: URL underline color when hovering with mouse
|
||||
@@ -55,8 +55,8 @@ color6 #0083b2
|
||||
color14 #00aacb
|
||||
|
||||
#: white
|
||||
-color7 #f7f7f7
|
||||
-color15 #f7f7f7
|
||||
+color7 #bbbbbb
|
||||
+color15 #ffffff
|
||||
|
||||
|
||||
#: kitty window border colors and terminal bell colors
|
||||
'';
|
||||
kitty-theme-patched = pkgs.kitty-themes.overrideAttrs (
|
||||
final: previous: { patches = [ kitty-alabaster-theme-patch ]; }
|
||||
);
|
||||
in
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
font.name = common.font;
|
||||
font.size = 12;
|
||||
shellIntegration = {
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
extraConfig = ''
|
||||
include ${kitty-theme-patched}/share/kitty-themes/themes/Alabaster.conf
|
||||
text_composition_strategy legacy
|
||||
'';
|
||||
};
|
||||
}
|
||||
7
modules/home-manager/gui/programs/obs.nix
Normal file
7
modules/home-manager/gui/programs/obs.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = [ pkgs.obs-studio-plugins.wlrobs ];
|
||||
};
|
||||
}
|
||||
174
modules/home-manager/gui/programs/vscode.nix
Normal file
174
modules/home-manager/gui/programs/vscode.nix
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
{ 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
|
||||
ms-vscode.cpptools
|
||||
ms-vscode.cmake-tools
|
||||
james-yu.latex-workshop
|
||||
];
|
||||
userSettings = {
|
||||
"window.titleBarStyle" = "custom";
|
||||
"window.menuBarVisibility" = "toggle";
|
||||
|
||||
"workbench.colorTheme" = "Default Light Modern";
|
||||
"workbench.iconTheme" = "material-icon-theme";
|
||||
|
||||
"extensions.ignoreRecommendations" = true;
|
||||
|
||||
"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" = "explicit";
|
||||
};
|
||||
|
||||
"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+escape";
|
||||
command = "workbench.action.terminal.toggleTerminal";
|
||||
when = "terminal.active";
|
||||
}
|
||||
{
|
||||
key = "ctrl+f";
|
||||
command = "editor.action.formatDocument";
|
||||
when = "editorHasDocumentFormattingProvider && editorTextFocus && !editorReadonly && !inCompositeEditor";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
10
modules/home-manager/gui/programs/zathura.nix
Normal file
10
modules/home-manager/gui/programs/zathura.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
# a highly customizable and functional pdf viewer
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
selection-clipboard = "clipboard";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue