diff --git a/configuration.nix b/configuration.nix index f32736a..fac5f6f 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,6 +4,10 @@ { config, lib, pkgs, ... }: +let + username = "fred"; +in + { imports = [ # Include the results of the hardware scan. @@ -45,6 +49,19 @@ boot.loader = { ############## users.users.fred = { isNormalUser = true; initialPassword = "123"; extraGroups = [ "wheel" "networkmanager" ];}; +system.activationScripts.fix-nixos-perms = '' + chown -R ${username}:users /etc/nixos/.git + chmod -R g+rw /etc/nixos/.git + ''; + +############# +# git setup # +############# +environment.etc."gitconfig".text = '' + [safe] + directory = /etc/nixos +''; + ######################## # User personalisation # ########################