diff --git a/nix/homes/rafiq/git.nix b/nix/homes/rafiq/git.nix new file mode 100644 index 0000000..8745879 --- /dev/null +++ b/nix/homes/rafiq/git.nix @@ -0,0 +1,23 @@ +{ + flake.homes.rafiq = { + # Testing the import in home-manager.nix + home.shellAliases = { + gs = "git status"; + gc = "git commit"; + gcam = "git commit -am"; + gu = "git push"; + gy = "git pull"; + gdh = "git diff HEAD"; + }; + programs.git = { + signing.signByDefault = true; + extraConfig = { + init.defaultBranch = "prime"; + push.autoSetupRemote = true; + pull.rebase = false; + core.editor = "$EDITOR"; + gpg.format = "ssh"; + }; + }; + }; +} diff --git a/nix/modules/home-manager.nix b/nix/modules/home-manager.nix index 2d6bf83..8726798 100644 --- a/nix/modules/home-manager.nix +++ b/nix/modules/home-manager.nix @@ -1,6 +1,6 @@ { inputs, config, ... }: let - inherit (cfg.lib) flattenAttrs; + inherit (cfg.lib) forAllUsers' flattenAttrs; cfg = config.flake; hm = inputs.home-manager; globalCfg = { @@ -9,6 +9,7 @@ let sharedModules = [ (flattenAttrs (cfg.modules.homeManager or { })) ]; + users = forAllUsers' (name: _: cfg.homes.${name}); }; in {