From db799a8253db07d61be6329dbe6c814b5f3e50e2 Mon Sep 17 00:00:00 2001 From: Leyla Becker Date: Mon, 25 Nov 2024 15:14:50 -0600 Subject: [PATCH] moved spellcheck to separate file --- .gitignore | 4 +- .vscode/settings.json | 19 +++++ homes/leyla/i18n.nix | 2 +- homes/leyla/packages.nix | 8 +- homes/leyla/vscode/default.nix | 101 +++++++++++++++++++++++ homes/leyla/vscode/user-words.nix | 3 + hosts/defiant/hardware-configuration.nix | 4 +- hosts/defiant/services.nix | 16 ++-- 8 files changed, 141 insertions(+), 16 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 homes/leyla/vscode/default.nix create mode 100644 homes/leyla/vscode/user-words.nix diff --git a/.gitignore b/.gitignore index d1da3a8..ce2538f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ result -.direnv \ No newline at end of file +.direnv +.vscode/* +!.vscode/settings.json \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..b152cc4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,19 @@ +{ + "cSpell.words": [ + "bitwarden", + "forgejo", + "gids", + "headscale", + "jellyfin", + "macvlan", + "nextcloud", + "nixos", + "nixpkgs", + "pihole", + "pkgs", + "rpool", + "searx", + "ublock", + "uids" + ] +} \ No newline at end of file diff --git a/homes/leyla/i18n.nix b/homes/leyla/i18n.nix index a4f41dd..f12cd95 100644 --- a/homes/leyla/i18n.nix +++ b/homes/leyla/i18n.nix @@ -6,7 +6,7 @@ # LC_ADDRESS = "en_IE.UTF-8"; # lets just get used to this one now # LC_TELEPHONE = "en_IE.UTF-8"; # lets just get used to this one now LC_MONETARY = "en_US.UTF-8"; # to be changed once I move - LC_PAPER = "en_US.UTF-8"; # convient for american printers until I move + LC_PAPER = "en_US.UTF-8"; # convenient for american printers until I move }; }; } diff --git a/homes/leyla/packages.nix b/homes/leyla/packages.nix index 12bef3a..1845f65 100644 --- a/homes/leyla/packages.nix +++ b/homes/leyla/packages.nix @@ -4,7 +4,7 @@ pkgs, ... }: let - userConifg = osConfig.host.users.leyla; + userConfig = osConfig.host.users.leyla; hardware = osConfig.host.hardware; in { imports = [ @@ -14,16 +14,16 @@ in { home = { packages = - lib.lists.optionals userConifg.isTerminalUser ( + lib.lists.optionals userConfig.isTerminalUser ( with pkgs; [ - # comand line tools + # command line tools yt-dlp ffmpeg imagemagick ] ) ++ ( - lib.lists.optionals userConifg.isDesktopUser ( + lib.lists.optionals userConfig.isDesktopUser ( with pkgs; [ # helvetica font aileron diff --git a/homes/leyla/vscode/default.nix b/homes/leyla/vscode/default.nix new file mode 100644 index 0000000..641fff9 --- /dev/null +++ b/homes/leyla/vscode/default.nix @@ -0,0 +1,101 @@ +{ + lib, + pkgs, + inputs, + osConfig, + ... +}: let + nix-development-enabled = osConfig.host.nix-development.enable; +in { + nixpkgs = { + overlays = [ + inputs.nix-vscode-extensions.overlays.default + ]; + }; + + programs = { + bash.shellAliases = { + code = "codium"; + }; + + vscode = let + extensions = inputs.nix-vscode-extensions.extensions.${pkgs.system}; + open-vsx = extensions.open-vsx; + vscode-marketplace = extensions.vscode-marketplace; + in { + enable = true; + + package = pkgs.vscodium; + + mutableExtensionsDir = false; + enableUpdateCheck = false; + enableExtensionUpdateCheck = false; + + userSettings = lib.mkMerge [ + { + "workbench.colorTheme" = "Atom One Dark"; + "cSpell.language" = "en,de-DE,it"; + "cSpell.userWords" = import ./user-words.nix; + } + (lib.mkIf nix-development-enabled { + "nix.enableLanguageServer" = true; + "nix.serverPath" = "nil"; + "[nix]" = { + "editor.defaultFormatter" = "kamadorueda.alejandra"; + "editor.formatOnPaste" = true; + "editor.formatOnSave" = true; + "editor.formatOnType" = true; + }; + "alejandra.program" = "alejandra"; + "nixpkgs" = { + "expr" = "import {}"; + }; + }) + ]; + + extensions = ( + with open-vsx; + [ + # vs code feel extensions + ms-vscode.atom-keybindings + akamud.vscode-theme-onedark + streetsidesoftware.code-spell-checker + streetsidesoftware.code-spell-checker-german + streetsidesoftware.code-spell-checker-italian + jeanp413.open-remote-ssh + + # html extensions + formulahendry.auto-rename-tag + ms-vscode.live-server + + # js extensions + dsznajder.es7-react-js-snippets + dbaeumer.vscode-eslint + standard.vscode-standard + firsttris.vscode-jest-runner + stylelint.vscode-stylelint + tauri-apps.tauri-vscode + + # astro blog extensions + astro-build.astro-vscode + unifiedjs.vscode-mdx + + # misc extensions + bungcip.better-toml + ] + ++ (lib.lists.optionals nix-development-enabled [ + # nix extensions + pinage404.nix-extension-pack + jnoortheen.nix-ide + kamadorueda.alejandra + ]) + ++ ( + with vscode-marketplace; [ + # js extensions + karyfoundation.nearley + ] + ) + ); + }; + }; +} diff --git a/homes/leyla/vscode/user-words.nix b/homes/leyla/vscode/user-words.nix new file mode 100644 index 0000000..94a85a2 --- /dev/null +++ b/homes/leyla/vscode/user-words.nix @@ -0,0 +1,3 @@ +[ + "leyla" +] diff --git a/hosts/defiant/hardware-configuration.nix b/hosts/defiant/hardware-configuration.nix index ce994d9..b55bcfd 100644 --- a/hosts/defiant/hardware-configuration.nix +++ b/hosts/defiant/hardware-configuration.nix @@ -17,7 +17,7 @@ initrd = { availableKernelModules = ["xhci_pci" "aacraid" "ahci" "usbhid" "usb_storage" "sd_mod"]; kernelModules = []; - # TODO: figure out some kind of snapshotting before rolebacks + # TODO: figure out some kind of snapshotting before rollbacks # postDeviceCommands = lib.mkAfter '' # zfs rollback -r rpool/root@blank # zfs rollback -r rpool/home@blank @@ -127,7 +127,7 @@ # systemd.services = { # # https://github.com/openzfs/zfs/issues/10891 # systemd-udev-settle.enable = false; - # # Snapshots are not accessable on boot for some reason this should fix it + # # Snapshots are not accessible on boot for some reason this should fix it # # https://github.com/NixOS/nixpkgs/issues/257505 # zfs-mount = { # serviceConfig = { diff --git a/hosts/defiant/services.nix b/hosts/defiant/services.nix index 8614e36..ac1d02b 100644 --- a/hosts/defiant/services.nix +++ b/hosts/defiant/services.nix @@ -48,12 +48,12 @@ in { directory = { root = lib.mkOption { type = lib.types.str; - description = "directory that piholes will be hosted at"; + description = "directory that pihole will be hosted at"; default = "/var/lib/pihole"; }; data = lib.mkOption { type = lib.types.str; - description = "directory that piholes data will be hosted at"; + description = "directory that pihole data will be hosted at"; default = "${config.apps.pihole.directory.root}/data"; }; }; @@ -66,7 +66,7 @@ in { }; hostname = lib.mkOption { type = lib.types.str; - description = "hosname that headscale will be hosted at"; + description = "hostname that headscale will be hosted at"; default = "${config.apps.headscale.subdomain}.${config.apps.base_domain}"; }; }; @@ -78,7 +78,7 @@ in { }; hostname = lib.mkOption { type = lib.types.str; - description = "hosname that jellyfin will be hosted at"; + description = "hostname that jellyfin will be hosted at"; default = "${config.apps.jellyfin.subdomain}.${config.apps.base_domain}"; }; mediaDirectory = lib.mkOption { @@ -95,7 +95,7 @@ in { }; hostname = lib.mkOption { type = lib.types.str; - description = "hosname that forgejo will be hosted at"; + description = "hostname that forgejo will be hosted at"; default = "${config.apps.forgejo.subdomain}.${config.apps.base_domain}"; }; }; @@ -107,7 +107,7 @@ in { }; hostname = lib.mkOption { type = lib.types.str; - description = "hosname that home-assistant will be hosted at"; + description = "hostname that home-assistant will be hosted at"; default = "${config.apps.home-assistant.subdomain}.${config.apps.base_domain}"; }; }; @@ -119,7 +119,7 @@ in { }; hostname = lib.mkOption { type = lib.types.str; - description = "hosname that searx will be hosted at"; + description = "hostname that searx will be hosted at"; default = "${config.apps.searx.subdomain}.${config.apps.base_domain}"; }; }; @@ -131,7 +131,7 @@ in { }; hostname = lib.mkOption { type = lib.types.str; - description = "hosname that nextcloud will be hosted at"; + description = "hostname that nextcloud will be hosted at"; default = "${config.apps.nextcloud.subdomain}.${config.apps.base_domain}"; }; };