forked from jan-leila/nix-config
		
	moved user configuration to common
This commit is contained in:
		
							parent
							
								
									94ac2d581d
								
							
						
					
					
						commit
						54ecd6d24b
					
				
					 5 changed files with 131 additions and 130 deletions
				
			
		|  | @ -31,7 +31,82 @@ | ||||||
|     LC_TIME = "en_US.UTF-8"; |     LC_TIME = "en_US.UTF-8"; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   users.groups.users = {}; |   users = { | ||||||
|  |     users = { | ||||||
|  |       leyla = { | ||||||
|  |         uid = 1000; | ||||||
|  |         description = "Leyla"; | ||||||
|  |         group = "leyla"; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       ester = { | ||||||
|  |         uid = 1001; | ||||||
|  |         description = "Ester"; | ||||||
|  |         group = "ester"; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       eve = { | ||||||
|  |         uid = 1002; | ||||||
|  |         description = "Eve"; | ||||||
|  |         group = "eve"; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       jellyfin = { | ||||||
|  |         uid = 2000; | ||||||
|  |         group = "jellyfin"; | ||||||
|  |         isSystemUser = true; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       forgejo = { | ||||||
|  |         uid = 2002; | ||||||
|  |         group = "forgejo"; | ||||||
|  |         isSystemUser = true; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       # pihole = { | ||||||
|  |       #   uid = 2003; | ||||||
|  |       #   group = "forgejo"; | ||||||
|  |       #   isSystemUser = true; | ||||||
|  |       # }; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     groups = { | ||||||
|  |       leyla = { | ||||||
|  |         gid = 1000; | ||||||
|  |         members = ["lelya"]; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       ester = { | ||||||
|  |         gid = 1001; | ||||||
|  |         members = ["ester"]; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       eve = { | ||||||
|  |         gid = 1002; | ||||||
|  |         members = ["eve"]; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       jellyfin = { | ||||||
|  |         gid = 2000; | ||||||
|  |         members = ["jellyfin" "leyla"]; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       jellyfin_media = { | ||||||
|  |         gid = 2001; | ||||||
|  |         members = ["jellyfin" "leyla" "ester" "eve"]; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       forgejo = { | ||||||
|  |         gid = 2002; | ||||||
|  |         members = ["forgejo" "leyla"]; | ||||||
|  |       }; | ||||||
|  | 
 | ||||||
|  |       # pihole = { | ||||||
|  |       #   gid = 2003; | ||||||
|  |       #   members = ["pihole" "leyla"]; | ||||||
|  |       # }; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
| 
 | 
 | ||||||
|   services = { |   services = { | ||||||
|     openssh = { |     openssh = { | ||||||
|  |  | ||||||
|  | @ -48,50 +48,6 @@ | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   config = { |   config = { | ||||||
|     users = { |  | ||||||
|       groups = { |  | ||||||
|         jellyfin = { |  | ||||||
|           gid = 2000; |  | ||||||
|           members = ["jellyfin" "leyla"]; |  | ||||||
|         }; |  | ||||||
| 
 |  | ||||||
|         jellyfin_media = { |  | ||||||
|           gid = 2001; |  | ||||||
|           members = ["jellyfin" "leyla" "ester" "eve"]; |  | ||||||
|         }; |  | ||||||
| 
 |  | ||||||
|         forgejo = { |  | ||||||
|           gid = 2002; |  | ||||||
|           members = ["forgejo" "leyla"]; |  | ||||||
|         }; |  | ||||||
| 
 |  | ||||||
|         # pihole = { |  | ||||||
|         #   gid = 2003; |  | ||||||
|         #   members = ["pihole" "leyla"]; |  | ||||||
|         # }; |  | ||||||
|       }; |  | ||||||
| 
 |  | ||||||
|       users = { |  | ||||||
|         jellyfin = { |  | ||||||
|           uid = 2000; |  | ||||||
|           group = "jellyfin"; |  | ||||||
|           isSystemUser = true; |  | ||||||
|         }; |  | ||||||
| 
 |  | ||||||
|         forgejo = { |  | ||||||
|           uid = 2002; |  | ||||||
|           group = "forgejo"; |  | ||||||
|           isSystemUser = true; |  | ||||||
|         }; |  | ||||||
| 
 |  | ||||||
|         # pihole = { |  | ||||||
|         #   uid = 2003; |  | ||||||
|         #   group = "forgejo"; |  | ||||||
|         #   isSystemUser = true; |  | ||||||
|         # }; |  | ||||||
|       }; |  | ||||||
|     }; |  | ||||||
| 
 |  | ||||||
|     # virtualisation.oci-containers.containers.pihole = { |     # virtualisation.oci-containers.containers.pihole = { | ||||||
|     #   image = "pihole/pihole:latest"; |     #   image = "pihole/pihole:latest"; | ||||||
|     #   environment = { |     #   environment = { | ||||||
|  |  | ||||||
|  | @ -18,16 +18,7 @@ in { | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     users.groups.ester = {}; |     users.users.ester = ( | ||||||
| 
 |  | ||||||
|     users.users.ester = lib.mkMerge [ |  | ||||||
|       { |  | ||||||
|         uid = 1001; |  | ||||||
|         description = "Ester"; |  | ||||||
|         group = "ester"; |  | ||||||
|       } |  | ||||||
| 
 |  | ||||||
|       ( |  | ||||||
|       if cfg.isFullUser |       if cfg.isFullUser | ||||||
|       then { |       then { | ||||||
|         isNormalUser = true; |         isNormalUser = true; | ||||||
|  | @ -44,7 +35,6 @@ in { | ||||||
|       else { |       else { | ||||||
|         isSystemUser = true; |         isSystemUser = true; | ||||||
|       } |       } | ||||||
|       ) |     ); | ||||||
|     ]; |  | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -18,16 +18,7 @@ in { | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     users.groups.eve = {}; |     users.users.eve = ( | ||||||
| 
 |  | ||||||
|     users.users.eve = lib.mkMerge [ |  | ||||||
|       { |  | ||||||
|         uid = 1002; |  | ||||||
|         description = "Eve"; |  | ||||||
|         group = "eve"; |  | ||||||
|       } |  | ||||||
| 
 |  | ||||||
|       ( |  | ||||||
|       if cfg.isFullUser |       if cfg.isFullUser | ||||||
|       then { |       then { | ||||||
|         isNormalUser = true; |         isNormalUser = true; | ||||||
|  | @ -46,7 +37,6 @@ in { | ||||||
|       else { |       else { | ||||||
|         isSystemUser = true; |         isSystemUser = true; | ||||||
|       } |       } | ||||||
|       ) |     ); | ||||||
|     ]; |  | ||||||
|   }; |   }; | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -24,16 +24,7 @@ in { | ||||||
|       }; |       }; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|     users.groups.leyla = {}; |     users.users.leyla = ( | ||||||
| 
 |  | ||||||
|     users.users.leyla = lib.mkMerge [ |  | ||||||
|       { |  | ||||||
|         uid = 1000; |  | ||||||
|         description = "Leyla"; |  | ||||||
|         group = "leyla"; |  | ||||||
|       } |  | ||||||
| 
 |  | ||||||
|       ( |  | ||||||
|       if (cfg.isFullUser || cfg.isThinUser) |       if (cfg.isFullUser || cfg.isThinUser) | ||||||
|       then { |       then { | ||||||
|         isNormalUser = true; |         isNormalUser = true; | ||||||
|  | @ -56,8 +47,7 @@ in { | ||||||
|       else { |       else { | ||||||
|         isSystemUser = true; |         isSystemUser = true; | ||||||
|       } |       } | ||||||
|       ) |     ); | ||||||
|     ]; |  | ||||||
| 
 | 
 | ||||||
|     # TODO: this should reference the home directory from the user config |     # TODO: this should reference the home directory from the user config | ||||||
|     services.openssh.hostKeys = [ |     services.openssh.hostKeys = [ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue