Add initial config for tower
This commit is contained in:
		@@ -86,6 +86,7 @@ in
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      time.timeZone = mkDefault "Europe/Dublin";
 | 
			
		||||
      i18n.defaultLocale = "en_IE.UTF-8";
 | 
			
		||||
 | 
			
		||||
      boot = {
 | 
			
		||||
        # Use latest LTS release by default
 | 
			
		||||
 
 | 
			
		||||
@@ -337,6 +337,9 @@ in
 | 
			
		||||
          "/var/lib/cni"
 | 
			
		||||
        ];
 | 
			
		||||
      })
 | 
			
		||||
      (mkIf config.networking.networkmanager.enable {
 | 
			
		||||
        my.tmproot.persistence.config.directories = [ "/var/lib/NetworkManager" ];
 | 
			
		||||
      })
 | 
			
		||||
      (mkIf config.my.build.isDevVM {
 | 
			
		||||
        fileSystems = mkVMOverride {
 | 
			
		||||
          # Hijack the "root" device for persistence in the VM
 | 
			
		||||
 
 | 
			
		||||
@@ -11,6 +11,7 @@ in
 | 
			
		||||
  options.my.user = with lib.types; {
 | 
			
		||||
    enable = mkBoolOpt' true "Whether to create a primary user.";
 | 
			
		||||
    passwordSecret = mkOpt' (nullOr str) "user-passwd.txt" "Name of user password secret.";
 | 
			
		||||
    tmphome = mkBoolOpt' true "Whether to persist home directory files under tmproot";
 | 
			
		||||
    config = mkOption {
 | 
			
		||||
      type = options.users.users.type.nestedTypes.elemType;
 | 
			
		||||
      default = { };
 | 
			
		||||
@@ -46,7 +47,7 @@ in
 | 
			
		||||
            _module.args.name = lib.mkForce user'.name;
 | 
			
		||||
          };
 | 
			
		||||
        };
 | 
			
		||||
        tmproot = {
 | 
			
		||||
        tmproot = mkIf cfg.tmphome {
 | 
			
		||||
          unsaved.ignore = [
 | 
			
		||||
            # Auto-generated (on activation?)
 | 
			
		||||
            "/home/${user'.name}/.nix-profile"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user