diff --git a/systems/modules/home-manager-work.nix b/systems/modules/home-manager-work.nix deleted file mode 100644 index 1d04601..0000000 --- a/systems/modules/home-manager-work.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ pkgs, ... }: - -{ - home-manager = { - useGlobalPkgs = true; - useUserPackages = true; - - users.avravels = import home/home-work.nix; - }; -} diff --git a/systems/modules/home/programs/git-work.nix b/systems/modules/home/programs/git-work.nix deleted file mode 100644 index 8d3aef7..0000000 --- a/systems/modules/home/programs/git-work.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ pkgs, ... } : - -{ - programs.git = { - enable = true; - settings.user = { - name = "Armel van Ravels"; - email = "armel@webavance.nl"; - }; - }; -} diff --git a/systems/modules/home/programs/git.nix b/systems/modules/home/programs/git.nix index 6970a3d..6c0e130 100644 --- a/systems/modules/home/programs/git.nix +++ b/systems/modules/home/programs/git.nix @@ -1,11 +1,27 @@ -{ pkgs, ... } : +{ lib, pkgs, config, ... }: { - programs.git = { - enable = true; - settings.user = { - name = "Armel van Ravels"; - email = "armel@armel.nl"; + options.home.git = { + userName = lib.mkOption { + type = lib.types.str; + default = "Armel van Ravels"; + description = "Default git user.name for this user"; + }; + + userEmail = lib.mkOption { + type = lib.types.str; + default = "armel@armel.nl"; + description = "Default git user.email for this user"; + }; + }; + + config = { + programs.git = { + enable = true; + settings.user = { + name = config.home.git.userName; + email = config.home.git.userEmail; + }; }; }; } diff --git a/systems/modules/home/programs/vscode.nix b/systems/modules/home/programs/vscode.nix index 760c69e..484ad45 100644 --- a/systems/modules/home/programs/vscode.nix +++ b/systems/modules/home/programs/vscode.nix @@ -10,9 +10,13 @@ ms-dotnettools.csdevkit ms-dotnettools.vscode-dotnet-runtime mkhl.direnv # Direnv integration for VSCode + catppuccin.catppuccin-vsc + vscodevim.vim ]; profiles.default.userSettings = { + "editor.lineNumbers" = "relative"; + "workbench.colorTheme" = "Catppuccin Mocha"; "direnv.restart.automatic" = true; "terminal.integrated.defaultProfile.linux" = "zsh"; "terminal.integrated.profiles.linux" = { diff --git a/systems/work/default.nix b/systems/work/default.nix index be91167..cb3ea21 100644 --- a/systems/work/default.nix +++ b/systems/work/default.nix @@ -4,7 +4,7 @@ imports = [ ./hardware-configuration.nix - ../modules/home-manager-work.nix + ../modules/home-manager.nix ../modules/common.nix ../modules/users.nix ../modules/locales.nix @@ -31,6 +31,10 @@ networking.hostName = "laptop-armel"; + # Per-machine Home Manager overrides (use the `home.git` options exposed by + # `systems/modules/home/programs/git.nix`). This sets the work identity. + home-manager.users.avravels.home.git.userName = "Armel van Ravels"; + home-manager.users.avravels.home.git.userEmail = "armel@webavance.nl"; networking.networkmanager.enable = true; networking.nameservers = [ "192.168.68.56" "1.1.1.1" "8.8.8.8" ]; networking.firewall.enable = false;