formatting and removing useless parameters

This commit is contained in:
2026-07-12 17:22:49 +01:00
parent f5664dd863
commit fb74703c0d
6 changed files with 112 additions and 90 deletions

View File

@@ -4,10 +4,7 @@
... ...
}: { }: {
flake.nixosModules.kitty = moduleWithSystem ( flake.nixosModules.kitty = moduleWithSystem (
{ {self'}: {
pkgs,
self',
}: {
environment.systemPackages = with self'.packages; [ environment.systemPackages = with self'.packages; [
kitty kitty
]; ];

View File

@@ -1,92 +1,91 @@
{ {
self, inputs,
inputs, moduleWithSystem,
moduleWithSystem, ...
...
}: { }: {
flake.nixosModules.zsh = moduleWithSystem ({ flake.nixosModules.zsh = moduleWithSystem ({
pkgs, pkgs,
self', self',
... ...
}: { }: {
nixpkgs.overlays = [ nixpkgs.overlays = [
(final: prev: { (final: prev: {
zsh = self'.packages.zsh; zsh = self'.packages.zsh;
}) })
]; ];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
enableBashCompletion = true; enableBashCompletion = true;
autosuggestions.enable = true; autosuggestions.enable = true;
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
histSize = 10000; histSize = 10000;
}; };
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
}); });
perSystem = { perSystem = {
pkgs, pkgs,
lib, lib,
self', self',
... ...
}: { }: {
packages = { packages = {
zsh = inputs.wrappers.wrappers.zsh.wrap { zsh = inputs.wrappers.wrappers.zsh.wrap {
inherit pkgs; inherit pkgs;
runtimePkgs = [pkgs.carapace pkgs.fzf]; runtimePkgs = [pkgs.carapace pkgs.fzf];
zshAliases = { zshAliases = {
ls = "${lib.getExe pkgs.lsd} -l"; ls = "${lib.getExe pkgs.lsd} -l";
v = lib.getExe self'.packages.nvim; v = lib.getExe self'.packages.nvim;
cat = lib.getExe pkgs.bat; cat = lib.getExe pkgs.bat;
lg = lib.getExe pkgs.lazygit; lg = lib.getExe pkgs.lazygit;
devenv = lib.getExe pkgs.devenv; devenv = lib.getExe pkgs.devenv;
carapace = lib.getExe pkgs.carapace; carapace = lib.getExe pkgs.carapace;
man = "man -P \"${lib.getExe pkgs.bat} -p\""; man = "man -P \"${lib.getExe pkgs.bat} -p\"";
nsh = "nix-shell -p"; nsh = "nix-shell -p";
}; };
zshrc.content = '' zshrc.content = ''
if (( ''${+terminfo[smkx]} )) && (( ''${+terminfo[rmkx]} )); then if (( ''${+terminfo[smkx]} )) && (( ''${+terminfo[rmkx]} )); then
function zle-line-init() { echoti smkx } function zle-line-init() { echoti smkx }
function zle-line-finish() { echoti rmkx } function zle-line-finish() { echoti rmkx }
zle -N zle-line-init zle -N zle-line-init
zle -N zle-line-finish zle -N zle-line-finish
fi fi
autoload -U compinit && compinit autoload -U compinit && compinit
export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional export CARAPACE_BRIDGES='zsh,fish,bash,inshellisense' # optional
zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m' zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m'
source <(${lib.getExe pkgs.carapace} _carapace) source <(${lib.getExe pkgs.carapace} _carapace)
zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' zstyle ':completion:*' matcher-list 'm:{[:lower:]}={[:upper:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
autoload -U select-word-style autoload -U select-word-style
select-word-style bash select-word-style bash
autoload -U up-line-or-beginning-search 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 up-line-or-beginning-search
zle -N down-line-or-beginning-search zle -N down-line-or-beginning-search
bindkey "^[OA" up-line-or-beginning-search bindkey "^[OA" up-line-or-beginning-search
bindkey "^[OB" down-line-or-beginning-search bindkey "^[OB" down-line-or-beginning-search
bindkey "^[[1;5C" forward-word bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word bindkey "^[[1;5D" backward-word
bindkey "^[[3;5~" kill-word bindkey "^[[3;5~" kill-word
bindkey "^H" backward-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 pkgs.devenv} hook zsh)"
eval "$(${lib.getExe self'.packages.ohMyPosh} init zsh)" eval "$(${lib.getExe self'.packages.ohMyPosh} init zsh)"
${lib.getExe pkgs.any-nix-shell} zsh --info-right | source /dev/stdin ${lib.getExe pkgs.any-nix-shell} zsh --info-right | source /dev/stdin
''; '';
}; };
ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap { ohMyPosh = inputs.wrappers.wrappers.oh-my-posh.wrap {
inherit pkgs; inherit pkgs;
configFile = ./config.toml; configFile = ./config.toml;
}; };
}; };
}; };
} }

View File

@@ -6,10 +6,10 @@
flake.nixosConfigurations.HACKSTATION = inputs.nixpkgs.lib.nixosSystem { flake.nixosConfigurations.HACKSTATION = inputs.nixpkgs.lib.nixosSystem {
modules = with self.nixosModules; [ modules = with self.nixosModules; [
desktop desktop
amdDrivers hackstationConfiguration
amdDrivers
youtube youtube
development development
hackstationConfiguration
bottles bottles
gaming gaming
davinci davinci

View File

@@ -3,9 +3,10 @@
inputs, inputs,
... ...
}: { }: {
flake.nixosModules.hackstationConfiguration = {pkgs, ...}: { flake.nixosModules.hackstationConfiguration = {...}: {
networking = { networking = {
interfaces.enp5s0.wakeOnLan.enable = true; interfaces.enp5s0.wakeOnLan.enable = true;
hostName = "HACKSTATION"; }; hostName = "HACKSTATION";
};
}; };
} }

View File

@@ -0,0 +1,14 @@
{
self,
inputs,
...
}: {
flake.nixosConfigurations.mobile02 = inputs.nixpkgs.lib.nixosSystem {
modules = with self.nixosModules; [
desktop
mobile02Configuration
intelDrivers
development
];
};
}

View File

@@ -0,0 +1,11 @@
{
self,
inputs,
...
}: {
flake.nixosModules.mobile02Configuration = {...}: {
networking = {
hostName = "mobile02";
};
};
}