Added username to allow usage of git and made the folder a safe folder for git
This commit is contained in:
parent
c3098ef8c9
commit
67c30c86e6
1 changed files with 17 additions and 0 deletions
|
|
@ -4,6 +4,10 @@
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
username = "fred";
|
||||||
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
|
|
@ -45,6 +49,19 @@ boot.loader = {
|
||||||
##############
|
##############
|
||||||
users.users.fred = { isNormalUser = true; initialPassword = "123"; extraGroups = [ "wheel" "networkmanager" ];};
|
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 #
|
# User personalisation #
|
||||||
########################
|
########################
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue