From fb74703c0d4ff1284fdb16052f324d00f0751800 Mon Sep 17 00:00:00 2001 From: voidarc Date: Sun, 12 Jul 2026 17:22:49 +0100 Subject: [PATCH] formatting and removing useless parameters --- modules/features/kitty/default.nix | 5 +- modules/features/zsh/default.nix | 161 +++++++++--------- modules/hosts/HACKSTATION/default.nix | 4 +- .../HACKSTATION/hackstationConfiguration.nix | 7 +- modules/hosts/mobile02/default.nix | 14 ++ .../hosts/mobile02/mobile02Configuration.nix | 11 ++ 6 files changed, 112 insertions(+), 90 deletions(-) create mode 100644 modules/hosts/mobile02/default.nix create mode 100644 modules/hosts/mobile02/mobile02Configuration.nix diff --git a/modules/features/kitty/default.nix b/modules/features/kitty/default.nix index e39ba9e..49e82c9 100644 --- a/modules/features/kitty/default.nix +++ b/modules/features/kitty/default.nix @@ -4,10 +4,7 @@ ... }: { flake.nixosModules.kitty = moduleWithSystem ( - { - pkgs, - self', - }: { + {self'}: { environment.systemPackages = with self'.packages; [ kitty ]; diff --git a/modules/features/zsh/default.nix b/modules/features/zsh/default.nix index 50d434a..92d2be5 100644 --- a/modules/features/zsh/default.nix +++ b/modules/features/zsh/default.nix @@ -1,92 +1,91 @@ { - self, - inputs, - moduleWithSystem, - ... + inputs, + moduleWithSystem, + ... }: { - flake.nixosModules.zsh = moduleWithSystem ({ - pkgs, - self', - ... - }: { - nixpkgs.overlays = [ - (final: prev: { - zsh = self'.packages.zsh; - }) - ]; - programs.zsh = { - enable = true; - enableCompletion = true; - enableBashCompletion = true; - autosuggestions.enable = true; - syntaxHighlighting.enable = true; - histSize = 10000; - }; - users.defaultUserShell = pkgs.zsh; - }); - perSystem = { - pkgs, - lib, - self', - ... - }: { - packages = { - zsh = inputs.wrappers.wrappers.zsh.wrap { - inherit pkgs; - runtimePkgs = [pkgs.carapace pkgs.fzf]; - zshAliases = { - ls = "${lib.getExe pkgs.lsd} -l"; - v = lib.getExe self'.packages.nvim; - cat = lib.getExe pkgs.bat; - lg = lib.getExe pkgs.lazygit; - devenv = lib.getExe pkgs.devenv; - carapace = lib.getExe pkgs.carapace; - man = "man -P \"${lib.getExe pkgs.bat} -p\""; - nsh = "nix-shell -p"; - }; - zshrc.content = '' - if (( ''${+terminfo[smkx]} )) && (( ''${+terminfo[rmkx]} )); then - function zle-line-init() { echoti smkx } - function zle-line-finish() { echoti rmkx } - zle -N zle-line-init - zle -N zle-line-finish - fi - autoload -U compinit && compinit - export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional - zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m' - source <(${lib.getExe pkgs.carapace} _carapace) - zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + flake.nixosModules.zsh = moduleWithSystem ({ + pkgs, + self', + ... + }: { + nixpkgs.overlays = [ + (final: prev: { + zsh = self'.packages.zsh; + }) + ]; + programs.zsh = { + enable = true; + enableCompletion = true; + enableBashCompletion = true; + autosuggestions.enable = true; + syntaxHighlighting.enable = true; + histSize = 10000; + }; + users.defaultUserShell = pkgs.zsh; + }); + perSystem = { + pkgs, + lib, + self', + ... + }: { + packages = { + zsh = inputs.wrappers.wrappers.zsh.wrap { + inherit pkgs; + runtimePkgs = [pkgs.carapace pkgs.fzf]; + zshAliases = { + ls = "${lib.getExe pkgs.lsd} -l"; + v = lib.getExe self'.packages.nvim; + cat = lib.getExe pkgs.bat; + lg = lib.getExe pkgs.lazygit; + devenv = lib.getExe pkgs.devenv; + carapace = lib.getExe pkgs.carapace; + man = "man -P \"${lib.getExe pkgs.bat} -p\""; + nsh = "nix-shell -p"; + }; + zshrc.content = '' + if (( ''${+terminfo[smkx]} )) && (( ''${+terminfo[rmkx]} )); then + function zle-line-init() { echoti smkx } + function zle-line-finish() { echoti rmkx } + zle -N zle-line-init + zle -N zle-line-finish + fi + autoload -U compinit && compinit + export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional + zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m' + source <(${lib.getExe pkgs.carapace} _carapace) + zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' - autoload -U select-word-style - select-word-style bash + autoload -U select-word-style + select-word-style bash - autoload -U up-line-or-beginning-search down-line-or-beginning-search - zle -N up-line-or-beginning-search - zle -N down-line-or-beginning-search - bindkey "^[OA" up-line-or-beginning-search - bindkey "^[OB" down-line-or-beginning-search + autoload -U up-line-or-beginning-search down-line-or-beginning-search + zle -N up-line-or-beginning-search + zle -N down-line-or-beginning-search + bindkey "^[OA" up-line-or-beginning-search + bindkey "^[OB" down-line-or-beginning-search - bindkey "^[[1;5C" forward-word - bindkey "^[[1;5D" backward-word - bindkey "^[[3;5~" kill-word - bindkey "^H" backward-kill-word + bindkey "^[[1;5C" forward-word + bindkey "^[[1;5D" backward-word + bindkey "^[[3;5~" kill-word + bindkey "^H" backward-kill-word - source <(${lib.getExe pkgs.fzf} --zsh) + source <(${lib.getExe pkgs.fzf} --zsh) - setopt NO_CASE_GLOB + setopt NO_CASE_GLOB - export EDITOR=nvim + export EDITOR=nvim - eval "$(${lib.getExe pkgs.devenv} hook zsh)" - eval "$(${lib.getExe self'.packages.ohMyPosh} init zsh)" + eval "$(${lib.getExe pkgs.devenv} hook zsh)" + eval "$(${lib.getExe self'.packages.ohMyPosh} init zsh)" - ${lib.getExe pkgs.any-nix-shell} zsh --info-right | source /dev/stdin - ''; - }; - ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap { - inherit pkgs; - configFile = ./config.toml; - }; - }; - }; + ${lib.getExe pkgs.any-nix-shell} zsh --info-right | source /dev/stdin + ''; + }; + ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap { + inherit pkgs; + configFile = ./config.toml; + }; + }; + }; } diff --git a/modules/hosts/HACKSTATION/default.nix b/modules/hosts/HACKSTATION/default.nix index 534d1b9..b770e61 100644 --- a/modules/hosts/HACKSTATION/default.nix +++ b/modules/hosts/HACKSTATION/default.nix @@ -6,10 +6,10 @@ flake.nixosConfigurations.HACKSTATION = inputs.nixpkgs.lib.nixosSystem { modules = with self.nixosModules; [ desktop - amdDrivers + hackstationConfiguration + amdDrivers youtube development - hackstationConfiguration bottles gaming davinci diff --git a/modules/hosts/HACKSTATION/hackstationConfiguration.nix b/modules/hosts/HACKSTATION/hackstationConfiguration.nix index 2b8c977..d847d3f 100644 --- a/modules/hosts/HACKSTATION/hackstationConfiguration.nix +++ b/modules/hosts/HACKSTATION/hackstationConfiguration.nix @@ -3,9 +3,10 @@ inputs, ... }: { - flake.nixosModules.hackstationConfiguration = {pkgs, ...}: { + flake.nixosModules.hackstationConfiguration = {...}: { networking = { - interfaces.enp5s0.wakeOnLan.enable = true; - hostName = "HACKSTATION"; }; + interfaces.enp5s0.wakeOnLan.enable = true; + hostName = "HACKSTATION"; + }; }; } diff --git a/modules/hosts/mobile02/default.nix b/modules/hosts/mobile02/default.nix new file mode 100644 index 0000000..1875533 --- /dev/null +++ b/modules/hosts/mobile02/default.nix @@ -0,0 +1,14 @@ +{ + self, + inputs, + ... +}: { + flake.nixosConfigurations.mobile02 = inputs.nixpkgs.lib.nixosSystem { + modules = with self.nixosModules; [ + desktop + mobile02Configuration + intelDrivers + development + ]; + }; +} diff --git a/modules/hosts/mobile02/mobile02Configuration.nix b/modules/hosts/mobile02/mobile02Configuration.nix new file mode 100644 index 0000000..f67ec8f --- /dev/null +++ b/modules/hosts/mobile02/mobile02Configuration.nix @@ -0,0 +1,11 @@ +{ + self, + inputs, + ... +}: { + flake.nixosModules.mobile02Configuration = {...}: { + networking = { + hostName = "mobile02"; + }; + }; +}