separate file for home manager config

This commit is contained in:
nixos 2023-08-30 19:56:01 +02:00
parent c893f689aa
commit 79372c4cd9
4 changed files with 50 additions and 41 deletions

Binary file not shown.

1
.gitignore vendored
View file

@ -1 +1,2 @@
hardware-configuration.nix hardware-configuration.nix
*.swp

View file

@ -22,46 +22,7 @@ in
excludePackages = with pkgs; [ xterm ]; excludePackages = with pkgs; [ xterm ];
}; };
home-manager.users.pim = { pkgs, ... }: { home-manager.users.pim = import ./home.nix {inherit pkgs stateVersion; };
home = {
username = "pim";
homeDirectory = "/home/pim";
stateVersion = stateVersion;
};
programs = {
home-manager.enable = true;
alacritty.enable = true;
firefox.enable = true;
bash = {
enable = true;
shellAliases = {
htop = "btop";
gp = "git push";
gco = "git checkout";
gd = "git diff";
gc = "git commit";
gpl = "git pull";
gb = "git branch";
ga = "git add";
gl = "git log";
};
};
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
};
# Let home-manager manage the X session
xsession = {
enable = true;
};
};
users.users.pim = { users.users.pim = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" ]; extraGroups = [ "wheel" ];
@ -79,6 +40,5 @@ in
}; };
system.stateVersion = stateVersion; system.stateVersion = stateVersion;
} }

48
home.nix Normal file
View file

@ -0,0 +1,48 @@
{ pkgs, stateVersion, ... }:
{
home = {
username = "pim";
homeDirectory = "/home/pim";
stateVersion = stateVersion;
};
programs = {
home-manager.enable = true;
alacritty.enable = true;
firefox.enable = true;
bash = {
enable = true;
shellAliases = {
htop = "btop";
gp = "git push";
gco = "git checkout";
gd = "git diff";
gc = "git commit";
gpl = "git pull";
gb = "git branch";
ga = "git add";
gl = "git log";
};
};
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
git = {
enable = true;
userName = "Pim Kunis";
userEmail = "pim@kunis.nl";
extraConfig.core.editor = "vim";
};
};
# Let home-manager manage the X session
xsession = {
enable = true;
};
}