From b40c908ffe5d70820214eb2ba43c2a69a557552d Mon Sep 17 00:00:00 2001 From: specCon18 Date: Tue, 18 Apr 2023 02:09:20 -0400 Subject: [PATCH] moved zsh,vscode,and alacritty hm config to new module --- flake.nix | 8 +- modules/home-manager/alacritty.nix | 60 ++++++++++++ modules/home-manager/vscode.nix | 54 +++++++++++ modules/home-manager/zsh.nix | 29 ++++++ users/speccon18/home.nix | 141 +---------------------------- 5 files changed, 148 insertions(+), 144 deletions(-) create mode 100644 modules/home-manager/alacritty.nix create mode 100644 modules/home-manager/vscode.nix create mode 100644 modules/home-manager/zsh.nix diff --git a/flake.nix b/flake.nix index 6773231..098c144 100644 --- a/flake.nix +++ b/flake.nix @@ -88,13 +88,11 @@ ] #extra modules to load [ ./modules/home-manager/helix.nix + ./modules/home-manager/alacritty.nix + ./modules/home-manager/vscode.nix + ./modules/home-manager/zsh.nix ]; #extra modules to be loaded by home-manager }; - packages.${system} = { - dconfnixdump = pkgs.writeScriptBin "deconfnixdump"'' - dconf dump / | dconf2nix > dconf.nix - ''; - }; }; } \ No newline at end of file diff --git a/modules/home-manager/alacritty.nix b/modules/home-manager/alacritty.nix new file mode 100644 index 0000000..758ede6 --- /dev/null +++ b/modules/home-manager/alacritty.nix @@ -0,0 +1,60 @@ +{ pkgs, config, lib, ...}: +{ + programs.alacritty = { + enable = true; + settings = { + window = { + dimensions = { + columns = 120; + lines = 25; + }; + decorations = "none"; + opacity = 0.8; + title = "Alacritty"; + }; + font = { + normal = { + family = "SauceCodePro Nerd Font"; + }; + bold = { + family = "SauceCodePro Nerd Font"; + style = "bold"; + }; + size = 12; + }; + colors = { + primary = { + background = "#1d1f21"; + foreground = "#c5c8c6"; + }; + cursor = { + text = "CellBackground"; + cursor = "CellForeground"; + }; + # Normal colors + normal = { + black = "#363537"; + red = "#FC618D"; + green = "#7BD88F"; + yellow = "#FCE566"; + blue = "#FD9353"; + magenta = "#948AE3"; + cyan = "#5AD4E6"; + white = "#F7F1FF"; + }; + + # Bright colors + bright = { + black = "#69676C"; + red = "#FC618D"; + green = "#7BD88F"; + yellow = "#FCE566"; + blue = "#FD9353"; + magenta = "#948AE3"; + cyan = "#5AD4E6"; + white = "#F7F1FF"; + }; + }; + }; + }; +} \ No newline at end of file diff --git a/modules/home-manager/vscode.nix b/modules/home-manager/vscode.nix new file mode 100644 index 0000000..15f9882 --- /dev/null +++ b/modules/home-manager/vscode.nix @@ -0,0 +1,54 @@ +{ pkgs, config, lib, ...}: +{ + programs.vscode = { + enable = true; + package = pkgs.vscode.fhs; + enableExtensionUpdateCheck = true; + enableUpdateCheck = false; + extensions = with pkgs.vscode-extensions; [ + bbenoist.nix + redhat.vscode-yaml + bungcip.better-toml + firefox-devtools.vscode-firefox-debug + ms-vscode-remote.remote-ssh + ms-azuretools.vscode-docker + editorconfig.editorconfig + dbaeumer.vscode-eslint + donjayamanne.githistory + github.copilot + eamodio.gitlens + graphql.vscode-graphql + oderwat.indent-rainbow + skellock.just + jnoortheen.nix-ide + christian-kohler.path-intellisense + esbenp.prettier-vscode + svelte.svelte-vscode + bradlc.vscode-tailwindcss + thenuprojectcontributors.vscode-nushell-lang + matklad.rust-analyzer + ]; + userSettings = { + "workbench.colorTheme" = "Monokai Pro (Filter Octagon)"; + "workbench.startupEditor" = "none"; + "workbench.iconTheme" = "Monokai Pro Icons"; + "git.autofetch" = true; + "redhat.telemetry.enabled" = false; + "svelte.enable-ts-plugin" = true; + "window.menuBarVisibility" = "compact"; + "prettier.singleQuote" = true; + "prettier.useTabs" = true; + "prettier.bracketSpacing" = false; + "prettier.htmlWhitespaceSensitivity" = "strict"; + "typescript.updateImportsOnFileMove.enabled" = "always"; + "editor.fontFamily" = "OpenDyslexic, OpenDyslexic Mono NF"; + "rust-analyzer.inlayHints.chainingHints.enable" = false; + "rust-analyzer.inlayHints.closingBraceHints.enable" = false; + "rust-analyzer.inlayHints.renderColons" = false; + "rust-analyzer.inlayHints.parameterHints.enable" = false; + "editor.minimap.enabled" = false; + "editor.inlineSuggest.enabled" = true; + "window.zoomLevel" = 1; + }; + }; +} \ No newline at end of file diff --git a/modules/home-manager/zsh.nix b/modules/home-manager/zsh.nix new file mode 100644 index 0000000..2d15f08 --- /dev/null +++ b/modules/home-manager/zsh.nix @@ -0,0 +1,29 @@ +{ pkgs, config, lib, ...}: +{ + programs.zsh = { + enable = lib.mkDefault true; + dotDir = ".config/zsh"; + history = { + path = "$ZDOTDIR/.zsh_history"; + save = 10000000; + }; + enableAutosuggestions = lib.mkDefault true; + enableCompletion = lib.mkDefault true; + enableSyntaxHighlighting = lib.mkDefault true; + shellAliases = { + ls = "exa -l"; + lsa = "exa -al"; + cd = "z"; + osrb = "sudo nixos-rebuild $1 --flake ~/code/nix/nixos-config/#creatorforge-framework"; + zel = "zellij -s"; + ns = "nix-shell"; + top = "btm"; + hx = "hx"; + cat = "bat"; + extract = "~/.config/zsh/extract.sh"; + }; + localVariables = { + EDITOR="hx"; + }; + }; +} \ No newline at end of file diff --git a/users/speccon18/home.nix b/users/speccon18/home.nix index fee3297..f998961 100644 --- a/users/speccon18/home.nix +++ b/users/speccon18/home.nix @@ -10,12 +10,10 @@ prismlauncher calibre w3m - nushell bitwarden firefox discord nodejs-18_x - spotify nerdfonts fira-code libreoffice @@ -25,13 +23,9 @@ obsidian neofetch vlc - zellij - zoxide remmina signal-desktop - starship just - alacritty bacon bottom xplr @@ -49,63 +43,7 @@ enable = true; package = pkgs.ncspot; }; - alacritty = { - enable = true; - settings = { - window = { - dimensions = { - columns = 120; - lines = 25; - }; - decorations = "none"; - opacity = 0.8; - title = "Alacritty"; - }; - font = { - normal = { - family = "SauceCodePro Nerd Font"; - }; - bold = { - family = "SauceCodePro Nerd Font"; - style = "bold"; - }; - size = 12; - }; - colors = { - primary = { - background = "#1d1f21"; - foreground = "#c5c8c6"; - }; - cursor = { - text = "CellBackground"; - cursor = "CellForeground"; - }; - # Normal colors - normal = { - black = "#363537"; - red = "#FC618D"; - green = "#7BD88F"; - yellow = "#FCE566"; - blue = "#FD9353"; - magenta = "#948AE3"; - cyan = "#5AD4E6"; - white = "#F7F1FF"; - }; - # Bright colors - bright = { - black = "#69676C"; - red = "#FC618D"; - green = "#7BD88F"; - yellow = "#FCE566"; - blue = "#FD9353"; - magenta = "#948AE3"; - cyan = "#5AD4E6"; - white = "#F7F1FF"; - }; - }; - }; - }; zellij = { enable = true; package = pkgs.zellij; @@ -118,32 +56,7 @@ enableZshIntegration = true; enableNushellIntegration = false; }; - zsh = { - enable = lib.mkDefault true; - dotDir = ".config/zsh"; - history = { - path = "$ZDOTDIR/.zsh_history"; - save = 10000000; - }; - enableAutosuggestions = lib.mkDefault true; - enableCompletion = lib.mkDefault true; - enableSyntaxHighlighting = lib.mkDefault true; - shellAliases = { - ls = "exa -l"; - lsa = "exa -al"; - cd = "z"; - osrb = "sudo nixos-rebuild $1 --flake ~/code/nix/nixos-config/#creatorforge-framework"; - zel = "zellij -s"; - ns = "nix-shell"; - top = "btm"; - hx = "hx"; - cat = "bat"; - extract = "~/.config/zsh/extract.sh"; - }; - localVariables = { - EDITOR="hx"; - }; - }; + direnv = { enable = true; enableZshIntegration = lib.mkDefault true; @@ -151,57 +64,7 @@ home-manager = { enable = true; }; - vscode = { - enable = true; - package = pkgs.vscode.fhs; - enableExtensionUpdateCheck = true; - enableUpdateCheck = false; - extensions = with pkgs.vscode-extensions; [ - bbenoist.nix - redhat.vscode-yaml - bungcip.better-toml - firefox-devtools.vscode-firefox-debug - ms-vscode-remote.remote-ssh - ms-azuretools.vscode-docker - editorconfig.editorconfig - dbaeumer.vscode-eslint - donjayamanne.githistory - github.copilot - eamodio.gitlens - graphql.vscode-graphql - oderwat.indent-rainbow - skellock.just - jnoortheen.nix-ide - christian-kohler.path-intellisense - esbenp.prettier-vscode - svelte.svelte-vscode - bradlc.vscode-tailwindcss - thenuprojectcontributors.vscode-nushell-lang - matklad.rust-analyzer - ]; - userSettings = { - "workbench.colorTheme" = "Monokai Pro (Filter Octagon)"; - "workbench.startupEditor" = "none"; - "workbench.iconTheme" = "Monokai Pro Icons"; - "git.autofetch" = true; - "redhat.telemetry.enabled" = false; - "svelte.enable-ts-plugin" = true; - "window.menuBarVisibility" = "compact"; - "prettier.singleQuote" = true; - "prettier.useTabs" = true; - "prettier.bracketSpacing" = false; - "prettier.htmlWhitespaceSensitivity" = "strict"; - "typescript.updateImportsOnFileMove.enabled" = "always"; - "editor.fontFamily" = "OpenDyslexic, OpenDyslexic Mono NF"; - "rust-analyzer.inlayHints.chainingHints.enable" = false; - "rust-analyzer.inlayHints.closingBraceHints.enable" = false; - "rust-analyzer.inlayHints.renderColons" = false; - "rust-analyzer.inlayHints.parameterHints.enable" = false; - "editor.minimap.enabled" = false; - "editor.inlineSuggest.enabled" = true; - "window.zoomLevel" = 1; - }; - }; + git = { enable = true; userName = "specCon18";