Further configs for tower
This commit is contained in:
		@@ -14,5 +14,6 @@
 | 
			
		||||
    network = ./network.nix;
 | 
			
		||||
    pdns = ./pdns.nix;
 | 
			
		||||
    nginx-sso = ./nginx-sso.nix;
 | 
			
		||||
    gui = ./gui.nix;
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										27
									
								
								nixos/modules/gui.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								nixos/modules/gui.nix
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,27 @@
 | 
			
		||||
{ lib, pkgs, config, ... }:
 | 
			
		||||
let
 | 
			
		||||
  inherit (lib) optional mkIf mkDefault mkMerge;
 | 
			
		||||
  inherit (lib.my) mkBoolOpt';
 | 
			
		||||
 | 
			
		||||
  cfg = config.my.gui;
 | 
			
		||||
in
 | 
			
		||||
{
 | 
			
		||||
  options.my.gui = with lib.types; {
 | 
			
		||||
    enable = mkBoolOpt' true "Whether to enable GUI system options.";
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  config = mkIf cfg.enable {
 | 
			
		||||
    hardware = {
 | 
			
		||||
      opengl.enable = mkDefault true;
 | 
			
		||||
    };
 | 
			
		||||
 | 
			
		||||
    services = {
 | 
			
		||||
      pipewire = {
 | 
			
		||||
        enable = true;
 | 
			
		||||
        alsa.enable = true;
 | 
			
		||||
        pulse.enable = true;
 | 
			
		||||
        jack.enable = true;
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
@@ -338,7 +338,18 @@ in
 | 
			
		||||
        ];
 | 
			
		||||
      })
 | 
			
		||||
      (mkIf config.networking.networkmanager.enable {
 | 
			
		||||
        my.tmproot.persistence.config.directories = [ "/var/lib/NetworkManager" ];
 | 
			
		||||
        my.tmproot.persistence.config.directories = [
 | 
			
		||||
          "/var/lib/NetworkManager"
 | 
			
		||||
          "/etc/NetworkManager/system-connections"
 | 
			
		||||
        ];
 | 
			
		||||
      })
 | 
			
		||||
      (mkIf config.services.fprintd.enable {
 | 
			
		||||
        my.tmproot.persistence.config.directories = [
 | 
			
		||||
          {
 | 
			
		||||
            directory = "/var/lib/fprint";
 | 
			
		||||
            mode = "700";
 | 
			
		||||
          }
 | 
			
		||||
        ];
 | 
			
		||||
      })
 | 
			
		||||
      (mkIf config.my.build.isDevVM {
 | 
			
		||||
        fileSystems = mkVMOverride {
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
{ lib, options, config, ... }:
 | 
			
		||||
let
 | 
			
		||||
  inherit (lib) mkIf mkDefault mkOption mkMerge mkAliasDefinitions;
 | 
			
		||||
  inherit (lib) mkIf mkDefault mkOption mkMerge mkAliasDefinitions optional;
 | 
			
		||||
  inherit (lib.my) mkBoolOpt' mkOpt' mkDefault';
 | 
			
		||||
 | 
			
		||||
  cfg = config.my.user;
 | 
			
		||||
@@ -34,7 +34,9 @@ in
 | 
			
		||||
            name = mkDefault' "dev";
 | 
			
		||||
            isNormalUser = true;
 | 
			
		||||
            uid = mkDefault 1000;
 | 
			
		||||
            extraGroups = [ "wheel" "kvm" ];
 | 
			
		||||
            extraGroups =
 | 
			
		||||
              [ "wheel" "kvm" ] ++
 | 
			
		||||
              (optional config.networking.networkmanager.enable "networkmanager");
 | 
			
		||||
            password = mkIf (cfg.passwordSecret == null) (mkDefault "hunter2");
 | 
			
		||||
            shell =
 | 
			
		||||
              let shell = cfg.homeConfig.my.shell;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user