1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-05-30 08:37:01 +02:00

Compare commits

..

No commits in common. "60215eb57c0ffde044d775018c95b971ad00b45b" and "6d6c3975f54076349a4e9d20e2b02a050c55b73f" have entirely different histories.

5 changed files with 33 additions and 77 deletions

View file

@ -44,7 +44,7 @@
"scanner" "scanner"
"docker" "docker"
]; ];
shell = pkgs.nushell; shell = pkgs.zsh;
home = "/home/thegeneralist"; home = "/home/thegeneralist";
homeMode = "0750"; homeMode = "0750";
hashedPasswordFile = config.age.secrets.password.path; hashedPasswordFile = config.age.secrets.password.path;
@ -98,7 +98,6 @@
group = "users"; group = "users";
tokenFile = config.age.secrets.readlaterBotToken.path; tokenFile = config.age.secrets.readlaterBotToken.path;
settings = { settings = {
media_dir = "/home/thegeneralist/obsidian/09 Misc/Assets/images_misc";
resources_path = "/home/thegeneralist/obsidian/02 Knowledge/03 Resources"; resources_path = "/home/thegeneralist/obsidian/02 Knowledge/03 Resources";
read_later_path = "/home/thegeneralist/obsidian/10 Read Later.md"; read_later_path = "/home/thegeneralist/obsidian/10 Read Later.md";
finished_path = "/home/thegeneralist/obsidian/20 Finished Reading.md"; finished_path = "/home/thegeneralist/obsidian/20 Finished Reading.md";

View file

@ -39,8 +39,6 @@ in {
vivid vivid
ripgrep ripgrep
yazi yazi
lazygit
yaziPlugins.lazygit
jq jq
yq-go yq-go
eza eza
@ -49,12 +47,8 @@ in {
fastfetch fastfetch
carapace carapace
bat bat
mosh
]) ])
++ optionals (pkgs ? bat-extras && pkgs.bat-extras ? core) [ ++ optionals (pkgs ? bat-extras && pkgs.bat-extras ? core) [
pkgs.bat-extras.core pkgs.bat-extras.core
]; ];
environment.shellAliases.mosh = "mosh --no-init";
} }

View file

@ -2,8 +2,6 @@
environment.shellAliases = { environment.shellAliases = {
todo = /* sh */ ''rg "todo|fixme" --colors match:fg:yellow --colors match:style:bold''; todo = /* sh */ ''rg "todo|fixme" --colors match:fg:yellow --colors match:style:bold'';
todos = /* sh */ "nvim ~/todo.md"; todos = /* sh */ "nvim ~/todo.md";
bgr = /* sh */ "batgrep";
brg = /* sh */ "batgrep";
}; };
home-manager.sharedModules = [{ home-manager.sharedModules = [{

View file

@ -1,70 +1,35 @@
{ { config, lib, pkgs, ... }: let
config, inherit (lib) attrNames attrValues const filterAttrs flatten listToAttrs mapAttrs mapAttrsToList readFile replaceStrings;
lib,
pkgs,
...
}:
let
inherit (lib)
attrNames
attrValues
const
filterAttrs
flatten
listToAttrs
mapAttrs
mapAttrsToList
readFile
replaceStrings
;
package = pkgs.nushell; package = pkgs.nushell;
in in {
{ home-manager.sharedModules = [(homeArgs: let
home-manager.sharedModules = [ config' = homeArgs.config;
(
homeArgs:
let
config' = homeArgs.config;
environmentVariables = environmentVariables = let
let variablesMap = config'.variablesMap
variablesMap = |> mapAttrsToList (name: value: [
config'.variablesMap { name = "\$${name}"; inherit value; }
|> mapAttrsToList ( { name = "\${${name}}"; inherit value; }
name: value: [ ])
{ |> flatten
name = "\$${name}"; |> listToAttrs;
inherit value; in config.environment.variables
} |> mapAttrs (const <| replaceStrings (attrNames variablesMap) (attrValues variablesMap))
{ |> filterAttrs (name: const <| name != "TERM");
name = "\${${name}}"; in {
inherit value; shells."0" = package;
}
]
)
|> flatten
|> listToAttrs;
in
config.environment.variables
|> mapAttrs (const <| replaceStrings (attrNames variablesMap) (attrValues variablesMap))
|> filterAttrs (name: const <| name != "TERM");
in
{
shells."0" = package;
programs.nushell = { programs.nushell = {
enable = true; enable = true;
inherit package; inherit package;
inherit environmentVariables; inherit environmentVariables;
shellAliases = shellAliases = config.environment.shellAliases
config.environment.shellAliases // { ls = "ls"; }; |> filterAttrs (_: value: value != null);
configFile.text = readFile ./0_nushell.nu; configFile.text = readFile ./0_nushell.nu;
}; };
} })];
)
];
} }

View file

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }: let { config, lib, pkgs, ... }: let
inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList unique; inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList mkForce unique;
in { in {
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
@ -10,8 +10,8 @@ in {
|> unique |> unique
|> concatStringsSep ":"; |> concatStringsSep ":";
# environment.shellAliases = { environment.shellAliases = {
# ls = mkForce null; ls = mkForce null;
# l = mkForce null; l = mkForce null;
# }; };
} }