1
Fork 0
mirror of https://github.com/thegeneralist01/config.git synced 2026-03-07 10:59:55 +01:00

fix: shell vars

This commit is contained in:
TheGeneralist 2025-05-29 19:53:10 +02:00
parent 523aaff701
commit a86424bb64
Signed by: thegeneralist01
SSH key fingerprint: SHA256:pp9qddbCNmVNoSjevdvQvM5z0DHN7LTa8qBMbcMq/R4
7 changed files with 76 additions and 55 deletions

6
flake.lock generated
View file

@ -159,11 +159,11 @@
]
},
"locked": {
"lastModified": 1748227609,
"narHash": "sha256-SaSdslyo6UGDpPUlmrPA4dWOEuxCy2ihRN9K6BnqYsA=",
"lastModified": 1748529677,
"narHash": "sha256-MJEX3Skt5EAIs/aGHD8/aXXZPcceMMHheyIGSjvxZN0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d23d20f55d49d8818ac1f1b2783671e8a6725022",
"rev": "da282034f4d30e787b8a10722431e8b650a907ef",
"type": "github"
},
"original": {

View file

@ -7,27 +7,27 @@
{
imports = [ ./hardware-configuration.nix ];
users.knownUsers = [
"thegeneralist"
];
users.users.thegeneralist = {
name = "thegeneralist";
home = "/Users/thegeneralist";
shell = pkgs.zsh;
uid = 501;
# openssh.authorizedKeys.keys = let
# inherit (import ../../keys.nix) thegeneralist;
# in [ thegeneralist ];
};
# home-manager = {
# extraSpecialArgs = { inherit inputs; };
# users = {
# thegeneralist = import (self + /modules/home);
# };
# };
# home-manager.users.thegeneralist.home = {
# stateVersion = "24.11";
# homeDirectory = "/Users/thegeneralist";
# };
home-manager = {
backupFileExtension = "home.bak";
users.thegeneralist.home = {
stateVersion = "25.11";
homeDirectory = "/Users/thegeneralist";
};
};
system.stateVersion = 6;
}

View file

@ -19,6 +19,7 @@
};
home-manager = {
backupFileExtension = "home.bak";
extraSpecialArgs = { inherit inputs; };
users = {
thegeneralist = import (self + /modules/home);

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
# TODO: this
# environment.variables = {
# TERMINAL = "ghostty";
# };

View file

@ -1,27 +1,33 @@
{
{ lib, pkgs, config, ... }: let
inherit (lib) optionalAttrs getExe;
in {
environment.systemPackages = with pkgs; [
gnupg
];
home-manager.sharedModules = [{
programs.git = {
enable = true;
userName = "TheGeneralist";
userEmail = "180094941+thegeneralist01@users.noreply.github.com";
lfs = {
programs = {
gpg.enable = true;
gh.enable = true;
gh-dash.enable = true;
git = {
enable = true;
};
extraConfig = {
commit.gpgSign = true;
tag.gpgSign = true;
gpg.format = "ssh";
user.signingKey = "~/.ssh/id_ed25519";
userName = "TheGeneralist";
userEmail = "180094941+thegeneralist01@users.noreply.github.com";
lfs = {
enable = true;
};
extraConfig = {
commit.gpgSign = true;
tag.gpgSign = true;
gpg.format = "ssh";
gpg.program = getExe pkgs.gnupg;
user.signingKey = "~/.ssh/id_ed25519";
};
};
};
programs.gh = {
enable = true;
};
programs.gh-dash = {
enable = true;
};
}];
}

View file

@ -1,4 +1,6 @@
{ pkgs, options, lib, ... }: {
{ pkgs, config, lib, ... }: let
inherit (lib) optionals;
in {
environment.variables.EDITOR = "nvim";
home-manager.sharedModules = [{
@ -23,11 +25,13 @@
nodejs
nodePackages."sass"
gcc_multi
#llvmPackages_20.clangWithLibcAndBasicRtAndLibcxx
] ++ optionals config.onLinux [
gcc_multi
];
home.file = lib.mkIf options.onLinux {
home.file = lib.mkIf config.onLinux {
".config/i3status" = {
source = ../home/dotfiles/i3status;
force = true;

View file

@ -3,24 +3,8 @@
in {
# TODO: starship + change the zoxide src
# TODO: Rust tooling
home-manager.sharedModules = [
(homeArgs: {
xdg = {
enable = true;
configHome = "~/.config";
};
programs.nushell = {
enable = true;
package = pkgs.nushell;
configFile.text = readFile ./config.nu;
envFile.text = readFile ./env.nu;
environmentVariables = config.environment.variables // homeArgs.config.home.sessionVariables;
};
})
];
environment = optionalAttrs config.onLinux {
sessionVariables.SHELLS = getExe pkgs.nushell;
environment = optionalAttrs config.onLinux {
sessionVariables.SHELLS = [ (getExe pkgs.nushell) (getExe pkgs.zsh) ];
} // {
shells = mkIf (!config.onLinux) [ pkgs.nushell pkgs.zsh ];
@ -58,4 +42,29 @@ in {
rb = "nh os switch . -v -- --show-trace --verbose";
};
};
home-manager.sharedModules = [
({
home.file.".zshrc" = let
configFile = ./config.nu;
envFile = ./env.nu;
in {
text = "exec nu --env-config ${envFile} --config ${configFile}";
force = true;
};
})
(homeArgs: {
programs.nushell = {
enable = true;
package = pkgs.nushell;
configFile.text = readFile ./config.nu;
envFile.text = readFile ./env.nu;
environmentVariables = config.environment.variables // homeArgs.config.home.sessionVariables;
};
programs.zsh = {
enable = true;
sessionVariables = config.environment.variables // homeArgs.config.home.sessionVariables;
};
})
];
}