diff --git a/flake.lock b/flake.lock index 64f354e..e3ef237 100644 --- a/flake.lock +++ b/flake.lock @@ -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": { diff --git a/hosts/thegeneralist-mbp/configuration.nix b/hosts/thegeneralist-mbp/configuration.nix index 7b1aad1..b456407 100644 --- a/hosts/thegeneralist-mbp/configuration.nix +++ b/hosts/thegeneralist-mbp/configuration.nix @@ -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; } - diff --git a/hosts/thegeneralist/configuration.nix b/hosts/thegeneralist/configuration.nix index d3451a9..f55110a 100644 --- a/hosts/thegeneralist/configuration.nix +++ b/hosts/thegeneralist/configuration.nix @@ -19,6 +19,7 @@ }; home-manager = { + backupFileExtension = "home.bak"; extraSpecialArgs = { inherit inputs; }; users = { thegeneralist = import (self + /modules/home); diff --git a/modules/common/ghostty.nix b/modules/common/ghostty.nix index 30a6db0..358936a 100644 --- a/modules/common/ghostty.nix +++ b/modules/common/ghostty.nix @@ -1,4 +1,5 @@ { pkgs, ... }: { +# TODO: this # environment.variables = { # TERMINAL = "ghostty"; # }; diff --git a/modules/common/git.nix b/modules/common/git.nix index e8d9686..3cfc417 100644 --- a/modules/common/git.nix +++ b/modules/common/git.nix @@ -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; - }; }]; } diff --git a/modules/common/neovim.nix b/modules/common/neovim.nix index ef97d93..8867cdc 100644 --- a/modules/common/neovim.nix +++ b/modules/common/neovim.nix @@ -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; diff --git a/modules/common/nushell/default.nix b/modules/common/nushell/default.nix index 7e1bc21..e83b489 100644 --- a/modules/common/nushell/default.nix +++ b/modules/common/nushell/default.nix @@ -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; + }; + }) + ]; }