formatted everything, things are looking nice now.

This commit is contained in:
vali 2024-05-15 00:14:59 +02:00
commit ad562f5479
57 changed files with 2269 additions and 2311 deletions

View file

@ -1,7 +1 @@
_: {
imports = [
./neovim.nix
./fish.nix
./nh.nix
];
}
_: { imports = [ ./neovim.nix ./fish.nix ./nh.nix ]; }

View file

@ -1,65 +1,78 @@
{
config,
lib,
pkgs,
...
}: with lib; let
cfg = config.modules.programs.fish;
username = config.modules.other.system.username;
hostname = config.modules.other.system.hostname;
gitPath = config.modules.other.system.gitPath;
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.modules.programs.fish;
username = config.modules.other.system.username;
hostname = config.modules.other.system.hostname;
gitPath = config.modules.other.system.gitPath;
in {
options.modules.programs.fish = {
enable = mkEnableOption "fish";
extraAliases = mkOption {
type = types.attrs;
description = "extra shell aliases";
default = {};
};
options.modules.programs.fish = {
enable = mkEnableOption "fish";
extraAliases = mkOption {
type = types.attrs;
description = "extra shell aliases";
default = { };
};
};
config = mkIf cfg.enable {
programs.fish.enable = true;
users.users.${username}.shell = pkgs.fish;
environment = {
shells = [ pkgs.fish ];
pathsToLink = [ "/share/fish" ];
};
config = mkIf cfg.enable {
programs.fish.enable = true;
users.users.${username}.shell = pkgs.fish;
environment = {
shells = [ pkgs.fish ];
pathsToLink = [ "/share/fish" ];
};
home-manager.users.${username} = {
home.packages = with pkgs; [ nix-output-monitor ];
programs.zoxide.enable = true;
programs.zoxide.enableFishIntegration = true;
programs.fish = {
enable = true;
interactiveShellInit = "set fish_greeting";
plugins = [
{ name = "grc"; src = pkgs.fishPlugins.grc.src; }
{ name = "sponge"; src = pkgs.fishPlugins.sponge.src; }
{ name = "done"; src = pkgs.fishPlugins.done.src; }
{ name = "colored_man_pages"; src = pkgs.fishPlugins.colored-man-pages.src; }
{ name = "tide"; src = pkgs.fishPlugins.tide.src; }
];
shellAbbrs = {
c = "clear";
cc = "cd ~ && clear";
mv = "mv -iv";
rm = "trash -v";
ls = "eza";
l = "eza -a --icons";
la = "eza -lha --icons --git";
kys = "shutdown now";
lg = "lazygit";
cd = "z";
v = "nvim";
h = "hx";
e = "emacs";
update = "sudo nixos-rebuild switch --flake \"${gitPath}#${hostname}\"";
flake = "cd '${gitPath}'";
} // cfg.extraAliases;
};
};
home-manager.users.${username} = {
home.packages = with pkgs; [ nix-output-monitor ];
programs.zoxide.enable = true;
programs.zoxide.enableFishIntegration = true;
programs.fish = {
enable = true;
interactiveShellInit = "set fish_greeting";
plugins = [
{
name = "grc";
src = pkgs.fishPlugins.grc.src;
}
{
name = "sponge";
src = pkgs.fishPlugins.sponge.src;
}
{
name = "done";
src = pkgs.fishPlugins.done.src;
}
{
name = "colored_man_pages";
src = pkgs.fishPlugins.colored-man-pages.src;
}
{
name = "tide";
src = pkgs.fishPlugins.tide.src;
}
];
shellAbbrs = {
c = "clear";
cc = "cd ~ && clear";
mv = "mv -iv";
rm = "trash -v";
ls = "eza";
l = "eza -a --icons";
la = "eza -lha --icons --git";
kys = "shutdown now";
lg = "lazygit";
cd = "z";
v = "nvim";
h = "hx";
e = "emacs";
update =
''sudo nixos-rebuild switch --flake "${gitPath}#${hostname}"'';
flake = "cd '${gitPath}'";
} // cfg.extraAliases;
};
};
};
}

View file

@ -1,35 +1,33 @@
{ config, lib, pkgs, ... }:
let
lazyvim-config = pkgs.fetchFromGitHub {
owner = "Dragyx";
repo = "lazyvim-config";
rev = "d799724f48199d81ca6c8abb5951860fbf8fa0df";
hash = "sha256-NF92CweRFQ1qZS8NXoTUEljazRGXgXS2AuDt5IWmwBc=";
lazyvim-config = pkgs.fetchFromGitHub {
owner = "Dragyx";
repo = "lazyvim-config";
rev = "d799724f48199d81ca6c8abb5951860fbf8fa0df";
hash = "sha256-NF92CweRFQ1qZS8NXoTUEljazRGXgXS2AuDt5IWmwBc=";
};
cfg = config.modules.programs.neovim-old;
username = config.modules.other.system.username;
in {
options.modules.programs.neovim-old.enable = lib.mkEnableOption "neovim-old";
config = lib.mkIf cfg.enable {
home-manager.users.${username} = {
home.packages = with pkgs; [ lazygit ripgrep fd gcc xclip rust-analyzer ];
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
};
xdg.configFile."nvim" = {
enable = true;
source = lazyvim-config;
recursive = true;
};
};
cfg = config.modules.programs.neovim-old;
username = config.modules.other.system.username;
in
{
options.modules.programs.neovim-old.enable = lib.mkEnableOption "neovim-old";
config = lib.mkIf cfg.enable {
home-manager.users.${username} = {
home.packages = with pkgs; [ lazygit ripgrep fd gcc xclip rust-analyzer ];
programs.neovim = {
enable = true;
viAlias = true;
vimAlias = true;
defaultEditor = true;
};
xdg.configFile."nvim" = {
enable = true;
source = lazyvim-config;
recursive = true;
};
};
};
};
}

View file

@ -1,16 +1,17 @@
{ pkgs, lib, config, callPackage, ... }:
with lib; let
with lib;
let
username = config.modules.other.system.username;
cfg = config.modules.programs.nh;
in {
options.modules.programs.nh.enable = mkEnableOption "nh";
config = mkIf cfg.enable {
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/vali/repos/nichts";
};
programs.nh = {
enable = true;
clean.enable = true;
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/vali/repos/nichts";
};
};
}