diff --git a/hosts/home/home_common.nix b/hosts/home/home_common.nix new file mode 100644 index 0000000..bf31df3 --- /dev/null +++ b/hosts/home/home_common.nix @@ -0,0 +1,35 @@ +{ config, pkgs, inputs, ... }: + +{ + home = { + username = "k"; + homeDirectory = "/home/k"; + stateVersion = "23.11"; + enableNixpkgsReleaseCheck = false; + }; + programs = { + git = { + enable = true; + userName = "k"; + userEmail = "markers711@gmail.com"; + }; + starship.enable = true; + zsh = { + enable = true; + autosuggestion.enable = true; + enableCompletion = true; + syntaxHighlighting.enable = true; + autocd = true; + plugins = [{ + name = "zsh-nix-shell"; + file = "nix-shell.plugin.zsh"; + src = pkgs.fetchFromGitHub { + owner = "chisui"; + repo = "zsh-nix-shell"; + rev = "v0.8.0"; + sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; + }; + }]; + }; + }; +} diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 29ae08d..2c61262 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -1,14 +1,16 @@ { config, pkgs, inputs, ... }: { - nixpkgs.config.allowUnfree = true; + imports = [ + ../home/home_common.nix + ]; + stylix.enable = true; + + nixpkgs.config.allowUnfree = true; + home = { - username = "k"; - homeDirectory = "/home/k"; - stateVersion = "23.11"; - enableNixpkgsReleaseCheck = false; - packages = with pkgs;[ + packages = with pkgs; [ nerdfonts firefox keepassxc @@ -28,36 +30,11 @@ }; programs = { - git = { - enable = true; - userName = "k"; - userEmail = "markers711@gmail.com"; - }; - direnv = { enable = true; enableZshIntegration = true; nix-direnv.enable = true; }; - - starship.enable = true; - zsh = { - enable = true; - autosuggestion.enable = true; - enableCompletion = true; - syntaxHighlighting.enable = true; - autocd = true; - plugins = [{ - name = "zsh-nix-shell"; - file = "nix-shell.plugin.zsh"; - src = pkgs.fetchFromGitHub { - owner = "chisui"; - repo = "zsh-nix-shell"; - rev = "v0.8.0"; - sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7"; - }; - }]; - }; }; services = {