diff --git a/.configuration.nix.swp b/.configuration.nix.swp deleted file mode 100644 index 45f8dd5..0000000 Binary files a/.configuration.nix.swp and /dev/null differ diff --git a/.gitignore b/.gitignore index 577b0a0..24920df 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ hardware-configuration.nix +*.swp diff --git a/configuration.nix b/configuration.nix index 0ec906d..a2adfda 100644 --- a/configuration.nix +++ b/configuration.nix @@ -22,46 +22,7 @@ in excludePackages = with pkgs; [ xterm ]; }; - home-manager.users.pim = { pkgs, ... }: { - 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; - }; - }; - + home-manager.users.pim = import ./home.nix {inherit pkgs stateVersion; }; users.users.pim = { isNormalUser = true; extraGroups = [ "wheel" ]; @@ -79,6 +40,5 @@ in }; system.stateVersion = stateVersion; - } diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..772801d --- /dev/null +++ b/home.nix @@ -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; + }; +}