deduplicated host configs, defined more things in common.nix files.
This commit is contained in:
		
							parent
							
								
									fada583de6
								
							
						
					
					
						commit
						04783f1580
					
				
					 6 changed files with 24 additions and 70 deletions
				
			
		| 
						 | 
					@ -36,9 +36,16 @@
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # packages that should be on every system.
 | 
					  # packages that should be on every system.
 | 
				
			||||||
  environment.systemPackages = with pkgs; [
 | 
					  environment.systemPackages = [pkgs.neovim];
 | 
				
			||||||
    neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
 | 
					
 | 
				
			||||||
  ];
 | 
					  programs.zsh.enable = lib.mkDefault true;
 | 
				
			||||||
 | 
					  environment.shells = lib.mkDefault [pkgs.zsh];
 | 
				
			||||||
 | 
					  users.users.${config.host.user} = {
 | 
				
			||||||
 | 
					    isNormalUser = true;
 | 
				
			||||||
 | 
					    description = config.host.fullName;
 | 
				
			||||||
 | 
					    shell = pkgs.zsh;
 | 
				
			||||||
 | 
					    extraGroups = ["wheel"];
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  imports = [
 | 
					  imports = [
 | 
				
			||||||
    ../../modules/hostopts.nix
 | 
					    ../../modules/hostopts.nix
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -27,25 +27,17 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
    }: {
 | 
					    }: {
 | 
				
			||||||
      host = {
 | 
					      host = {
 | 
				
			||||||
        user = "gabe";
 | 
					        user = "gabe";
 | 
				
			||||||
 | 
					        fullName = "Gabe Venberg";
 | 
				
			||||||
        gui.enable = true;
 | 
					        gui.enable = true;
 | 
				
			||||||
        isVm = true;
 | 
					        isVm = true;
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      networking.hostName = "archlaptop-vm"; # Define your hostname.
 | 
					      networking.hostName = "archlaptop-vm"; # Define your hostname.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      programs.zsh.enable = true;
 | 
					 | 
				
			||||||
      environment.shells = with pkgs; [zsh];
 | 
					 | 
				
			||||||
      users.mutableUsers = false;
 | 
					      users.mutableUsers = false;
 | 
				
			||||||
      # Define a user account. Don't forget to set a password with ‘passwd’.
 | 
					      # Define a user account. Don't forget to set a password with ‘passwd’.
 | 
				
			||||||
      users.users.${config.host.user} = {
 | 
					      users.users.${config.host.user} = {
 | 
				
			||||||
        hashedPasswordFile = config.sops.secrets.gv-password.path;
 | 
					        hashedPasswordFile = config.sops.secrets.gv-password.path;
 | 
				
			||||||
        isNormalUser = true;
 | 
					        packages = with pkgs; [firefox];
 | 
				
			||||||
        description = "Gabe Venberg";
 | 
					 | 
				
			||||||
        shell = pkgs.zsh;
 | 
					 | 
				
			||||||
        extraGroups = ["wheel"];
 | 
					 | 
				
			||||||
        packages = with pkgs; [
 | 
					 | 
				
			||||||
          firefox
 | 
					 | 
				
			||||||
          #  thunderbird
 | 
					 | 
				
			||||||
        ];
 | 
					 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      home-manager.sharedModules = [
 | 
					      home-manager.sharedModules = [
 | 
				
			||||||
| 
						 | 
					@ -60,7 +52,7 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
        user = {
 | 
					        user = {
 | 
				
			||||||
          git = {
 | 
					          git = {
 | 
				
			||||||
            profile = {
 | 
					            profile = {
 | 
				
			||||||
              name = "Gabe Venberg";
 | 
					              name = config.host.fullName;
 | 
				
			||||||
              email = "gabevenberg@gmail.com";
 | 
					              email = "gabevenberg@gmail.com";
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
            workProfile.enable = false;
 | 
					            workProfile.enable = false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,38 +33,17 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
    }: {
 | 
					    }: {
 | 
				
			||||||
      host = {
 | 
					      host = {
 | 
				
			||||||
        user = "gabe";
 | 
					        user = "gabe";
 | 
				
			||||||
 | 
					        fullName = "Gabe Venberg";
 | 
				
			||||||
        gui.enable = true;
 | 
					        gui.enable = true;
 | 
				
			||||||
        isVm = true;
 | 
					        isVm = true;
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      networking.hostName = "workstation-vm"; # Define your hostname.
 | 
					      networking.hostName = "workstation-vm"; # Define your hostname.
 | 
				
			||||||
      # Set your time zone.
 | 
					 | 
				
			||||||
      time.timeZone = "America/Chicago";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # Select internationalisation properties.
 | 
					 | 
				
			||||||
      i18n.defaultLocale = "en_US.UTF-8";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      # Configure keymap in X11
 | 
					 | 
				
			||||||
      services.xserver = {
 | 
					 | 
				
			||||||
        xkb.layout = "us";
 | 
					 | 
				
			||||||
        xkb.variant = "";
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      users.users.root.openssh.authorizedKeys.keys =
 | 
					 | 
				
			||||||
        configLib.dirToStrings "${inputs.nix-secrets}/public-keys";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
      programs.zsh.enable = true;
 | 
					 | 
				
			||||||
      environment.shells = with pkgs; [zsh];
 | 
					 | 
				
			||||||
      # Define a user account. Don't forget to set a password with ‘passwd’.
 | 
					 | 
				
			||||||
      users.mutableUsers = false;
 | 
					      users.mutableUsers = false;
 | 
				
			||||||
      users.users.${config.host.user} = {
 | 
					      users.users.${config.host.user} = {
 | 
				
			||||||
        hashedPasswordFile = config.sops.secrets.gv-password.path;
 | 
					        hashedPasswordFile = config.sops.secrets.gv-password.path;
 | 
				
			||||||
        isNormalUser = true;
 | 
					 | 
				
			||||||
        description = "Gabe Venberg";
 | 
					 | 
				
			||||||
        shell = pkgs.zsh;
 | 
					 | 
				
			||||||
        extraGroups = ["wheel"];
 | 
					 | 
				
			||||||
        packages = with pkgs; [
 | 
					        packages = with pkgs; [
 | 
				
			||||||
          firefox
 | 
					          firefox
 | 
				
			||||||
          #  thunderbird
 | 
					 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -89,8 +68,6 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
          inputs.nixvim.homeManagerModules.nixvim
 | 
					          inputs.nixvim.homeManagerModules.nixvim
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      # Enable the OpenSSH daemon.
 | 
					 | 
				
			||||||
      services.openssh.enable = true;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # Bootloader.
 | 
					      # Bootloader.
 | 
				
			||||||
      boot.loader.systemd-boot.enable = true;
 | 
					      boot.loader.systemd-boot.enable = true;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,20 +22,10 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
      networking.nameservers = ["1.1.1.1" "8.8.8.8"];
 | 
					      networking.nameservers = ["1.1.1.1" "8.8.8.8"];
 | 
				
			||||||
      host = {
 | 
					      host = {
 | 
				
			||||||
        user = "nixos";
 | 
					        user = "nixos";
 | 
				
			||||||
 | 
					        fullName = "Gabe Venberg";
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
      networking.hostName = "gv-wsl"; # Define your hostname.
 | 
					      networking.hostName = "gv-wsl"; # Define your hostname.
 | 
				
			||||||
      # Set your time zone.
 | 
					 | 
				
			||||||
      time.timeZone = "America/Chicago";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      programs.zsh.enable = true;
 | 
					 | 
				
			||||||
      environment.shells = with pkgs; [zsh];
 | 
					 | 
				
			||||||
      # Define a user account. Don't forget to set a password with ‘passwd’.
 | 
					 | 
				
			||||||
      users.users.${config.host.user} = {
 | 
					 | 
				
			||||||
        isNormalUser = true;
 | 
					 | 
				
			||||||
        description = "Gabe Venberg";
 | 
					 | 
				
			||||||
        shell = pkgs.zsh;
 | 
					 | 
				
			||||||
        extraGroups = ["wheel"];
 | 
					 | 
				
			||||||
      };
 | 
					 | 
				
			||||||
      home-manager.users.${config.host.user} = {
 | 
					      home-manager.users.${config.host.user} = {
 | 
				
			||||||
        inputs,
 | 
					        inputs,
 | 
				
			||||||
        osConfig,
 | 
					        osConfig,
 | 
				
			||||||
| 
						 | 
					@ -49,7 +39,7 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
          };
 | 
					          };
 | 
				
			||||||
          git = {
 | 
					          git = {
 | 
				
			||||||
            profile = {
 | 
					            profile = {
 | 
				
			||||||
              name = "Gabe Venberg";
 | 
					              name = config.host.fullName;
 | 
				
			||||||
              email = "gabevenberg@gmail.com";
 | 
					              email = "gabevenberg@gmail.com";
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
            workProfile.enable = false;
 | 
					            workProfile.enable = false;
 | 
				
			||||||
| 
						 | 
					@ -62,8 +52,6 @@ inputs.nixpkgs.lib.nixosSystem {
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      # Select internationalisation properties.
 | 
					 | 
				
			||||||
      i18n.defaultLocale = "en_US.UTF-8";
 | 
					 | 
				
			||||||
      # This value determines the NixOS release from which the default
 | 
					      # This value determines the NixOS release from which the default
 | 
				
			||||||
      # settings for stateful data, like file locations and database versions
 | 
					      # settings for stateful data, like file locations and database versions
 | 
				
			||||||
      # on your system were taken. It‘s perfectly fine and recommended to leave
 | 
					      # on your system were taken. It‘s perfectly fine and recommended to leave
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,16 +22,11 @@ inputs.nixos-generators.nixosGenerate {
 | 
				
			||||||
      imports = [(modulesPath + "/virtualisation/proxmox-lxc.nix")];
 | 
					      imports = [(modulesPath + "/virtualisation/proxmox-lxc.nix")];
 | 
				
			||||||
      proxmoxLXC.manageHostName = false;
 | 
					      proxmoxLXC.manageHostName = false;
 | 
				
			||||||
      host.user = "gabe";
 | 
					      host.user = "gabe";
 | 
				
			||||||
 | 
					      host.fullName = "Gabe Venberg";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      users.users.root.password="nixos";
 | 
					      users.users.root.password = "nixos";
 | 
				
			||||||
      programs.zsh.enable = true;
 | 
					 | 
				
			||||||
      environment.shells = with pkgs; [zsh];
 | 
					 | 
				
			||||||
      users.users.${config.host.user} = {
 | 
					      users.users.${config.host.user} = {
 | 
				
			||||||
        isNormalUser = true;
 | 
					        password = "nixos";
 | 
				
			||||||
        description = "Gabe Venberg";
 | 
					 | 
				
			||||||
        shell = pkgs.zsh;
 | 
					 | 
				
			||||||
        extraGroups = ["wheel"];
 | 
					 | 
				
			||||||
        password="nixos";
 | 
					 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      home-manager.users.${config.host.user} = {
 | 
					      home-manager.users.${config.host.user} = {
 | 
				
			||||||
| 
						 | 
					@ -43,7 +38,7 @@ inputs.nixos-generators.nixosGenerate {
 | 
				
			||||||
        user = {
 | 
					        user = {
 | 
				
			||||||
          git = {
 | 
					          git = {
 | 
				
			||||||
            profile = {
 | 
					            profile = {
 | 
				
			||||||
              name = "Gabe Venberg";
 | 
					              name = config.host.fullName;
 | 
				
			||||||
              email = "gabevenberg@gmail.com";
 | 
					              email = "gabevenberg@gmail.com";
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
            workProfile.enable = false;
 | 
					            workProfile.enable = false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -22,16 +22,11 @@ inputs.nixos-generators.nixosGenerate {
 | 
				
			||||||
    }: {
 | 
					    }: {
 | 
				
			||||||
      imports = [(modulesPath + "/profiles/qemu-guest.nix")];
 | 
					      imports = [(modulesPath + "/profiles/qemu-guest.nix")];
 | 
				
			||||||
      host.user = "gabe";
 | 
					      host.user = "gabe";
 | 
				
			||||||
 | 
					      host.fullName = "Gabe Venberg";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      users.users.root.password="nixos";
 | 
					      users.users.root.password = "nixos";
 | 
				
			||||||
      programs.zsh.enable = true;
 | 
					 | 
				
			||||||
      environment.shells = with pkgs; [zsh];
 | 
					 | 
				
			||||||
      users.users.${config.host.user} = {
 | 
					      users.users.${config.host.user} = {
 | 
				
			||||||
        isNormalUser = true;
 | 
					        password = "nixos";
 | 
				
			||||||
        description = "Gabe Venberg";
 | 
					 | 
				
			||||||
        shell = pkgs.zsh;
 | 
					 | 
				
			||||||
        extraGroups = ["wheel"];
 | 
					 | 
				
			||||||
        password="nixos";
 | 
					 | 
				
			||||||
      };
 | 
					      };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      home-manager.users.${config.host.user} = {
 | 
					      home-manager.users.${config.host.user} = {
 | 
				
			||||||
| 
						 | 
					@ -43,7 +38,7 @@ inputs.nixos-generators.nixosGenerate {
 | 
				
			||||||
        user = {
 | 
					        user = {
 | 
				
			||||||
          git = {
 | 
					          git = {
 | 
				
			||||||
            profile = {
 | 
					            profile = {
 | 
				
			||||||
              name = "Gabe Venberg";
 | 
					              name = config.host.fullName;
 | 
				
			||||||
              email = "gabevenberg@gmail.com";
 | 
					              email = "gabevenberg@gmail.com";
 | 
				
			||||||
            };
 | 
					            };
 | 
				
			||||||
            workProfile.enable = false;
 | 
					            workProfile.enable = false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue