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.
60215eb57c
...
6d6c3975f5
5 changed files with 33 additions and 77 deletions
|
|
@ -44,7 +44,7 @@
|
|||
"scanner"
|
||||
"docker"
|
||||
];
|
||||
shell = pkgs.nushell;
|
||||
shell = pkgs.zsh;
|
||||
home = "/home/thegeneralist";
|
||||
homeMode = "0750";
|
||||
hashedPasswordFile = config.age.secrets.password.path;
|
||||
|
|
@ -98,7 +98,6 @@
|
|||
group = "users";
|
||||
tokenFile = config.age.secrets.readlaterBotToken.path;
|
||||
settings = {
|
||||
media_dir = "/home/thegeneralist/obsidian/09 Misc/Assets/images_misc";
|
||||
resources_path = "/home/thegeneralist/obsidian/02 Knowledge/03 Resources";
|
||||
read_later_path = "/home/thegeneralist/obsidian/10 Read Later.md";
|
||||
finished_path = "/home/thegeneralist/obsidian/20 Finished Reading.md";
|
||||
|
|
|
|||
|
|
@ -39,8 +39,6 @@ in {
|
|||
vivid
|
||||
ripgrep
|
||||
yazi
|
||||
lazygit
|
||||
yaziPlugins.lazygit
|
||||
jq
|
||||
yq-go
|
||||
eza
|
||||
|
|
@ -49,12 +47,8 @@ in {
|
|||
fastfetch
|
||||
carapace
|
||||
bat
|
||||
|
||||
mosh
|
||||
])
|
||||
++ optionals (pkgs ? bat-extras && pkgs.bat-extras ? core) [
|
||||
pkgs.bat-extras.core
|
||||
];
|
||||
|
||||
environment.shellAliases.mosh = "mosh --no-init";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
environment.shellAliases = {
|
||||
todo = /* sh */ ''rg "todo|fixme" --colors match:fg:yellow --colors match:style:bold'';
|
||||
todos = /* sh */ "nvim ~/todo.md";
|
||||
bgr = /* sh */ "batgrep";
|
||||
brg = /* sh */ "batgrep";
|
||||
};
|
||||
|
||||
home-manager.sharedModules = [{
|
||||
|
|
|
|||
|
|
@ -1,56 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib)
|
||||
attrNames
|
||||
attrValues
|
||||
const
|
||||
filterAttrs
|
||||
flatten
|
||||
listToAttrs
|
||||
mapAttrs
|
||||
mapAttrsToList
|
||||
readFile
|
||||
replaceStrings
|
||||
;
|
||||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib) attrNames attrValues const filterAttrs flatten listToAttrs mapAttrs mapAttrsToList readFile replaceStrings;
|
||||
|
||||
package = pkgs.nushell;
|
||||
in
|
||||
{
|
||||
home-manager.sharedModules = [
|
||||
(
|
||||
homeArgs:
|
||||
let
|
||||
in {
|
||||
home-manager.sharedModules = [(homeArgs: let
|
||||
config' = homeArgs.config;
|
||||
|
||||
environmentVariables =
|
||||
let
|
||||
variablesMap =
|
||||
config'.variablesMap
|
||||
|> mapAttrsToList (
|
||||
name: value: [
|
||||
{
|
||||
name = "\$${name}";
|
||||
inherit value;
|
||||
}
|
||||
{
|
||||
name = "\${${name}}";
|
||||
inherit value;
|
||||
}
|
||||
]
|
||||
)
|
||||
environmentVariables = let
|
||||
variablesMap = config'.variablesMap
|
||||
|> mapAttrsToList (name: value: [
|
||||
{ name = "\$${name}"; inherit value; }
|
||||
{ name = "\${${name}}"; inherit value; }
|
||||
])
|
||||
|> flatten
|
||||
|> listToAttrs;
|
||||
in
|
||||
config.environment.variables
|
||||
in config.environment.variables
|
||||
|> mapAttrs (const <| replaceStrings (attrNames variablesMap) (attrValues variablesMap))
|
||||
|> filterAttrs (name: const <| name != "TERM");
|
||||
in
|
||||
{
|
||||
in {
|
||||
shells."0" = package;
|
||||
|
||||
programs.nushell = {
|
||||
|
|
@ -59,12 +26,10 @@ in
|
|||
|
||||
inherit environmentVariables;
|
||||
|
||||
shellAliases =
|
||||
config.environment.shellAliases // { ls = "ls"; };
|
||||
shellAliases = config.environment.shellAliases
|
||||
|> filterAttrs (_: value: value != null);
|
||||
|
||||
configFile.text = readFile ./0_nushell.nu;
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
})];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{ config, lib, pkgs, ... }: let
|
||||
inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList unique;
|
||||
inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList mkForce unique;
|
||||
in {
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
|
|
@ -10,8 +10,8 @@ in {
|
|||
|> unique
|
||||
|> concatStringsSep ":";
|
||||
|
||||
# environment.shellAliases = {
|
||||
# ls = mkForce null;
|
||||
# l = mkForce null;
|
||||
# };
|
||||
environment.shellAliases = {
|
||||
ls = mkForce null;
|
||||
l = mkForce null;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue