mirror of
				https://github.com/nmasur/dotfiles
				synced 2025-10-30 04:33:16 +00:00 
			
		
		
		
	Compare commits
	
		
			6 Commits
		
	
	
		
			30fe7c2d18
			...
			595a02383e
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 595a02383e | ||
|  | 3689f8ef52 | ||
|  | ab6a339c34 | ||
|  | e6456d7f02 | ||
|  | fb74122458 | ||
|  | d56a48cf65 | 
| @@ -19,6 +19,7 @@ nixpkgs.lib.nixosSystem { | ||||
|     disko.nixosModules.disko | ||||
|     { | ||||
|       server = true; | ||||
|       zfs.enable = true; | ||||
|       gui.enable = false; | ||||
|       theme = { colors = (import ../../colorscheme/gruvbox).dark; }; | ||||
|       nixpkgs.overlays = overlays; | ||||
| @@ -36,9 +37,9 @@ nixpkgs.lib.nixosSystem { | ||||
|  | ||||
|       neovim.enable = true; | ||||
|  | ||||
|       boot.zfs.enabled = true; | ||||
|       boot.kernelPackages = | ||||
|         config.boot.zfs.package.latestCompatibleLinuxPackages; | ||||
|       # boot.zfs.enabled = true; | ||||
|       # boot.kernelPackages = | ||||
|       # config.boot.zfs.package.latestCompatibleLinuxPackages; | ||||
|       # boot.zfs.extraPools = [ "mypool" ]; | ||||
|       # services.zfs.autoScrub.enable = true; | ||||
|       # services.zfs.autoScrub.interval = "daily"; | ||||
|   | ||||
| @@ -12,6 +12,16 @@ | ||||
|   boot.kernelModules = [ "kvm-intel" ]; | ||||
|   boot.extraModulePackages = [ ]; | ||||
|  | ||||
|   fileSystems."/" = { | ||||
|     device = "/dev/disk/by-label/nixos"; | ||||
|     fsType = "ext4"; | ||||
|   }; | ||||
|  | ||||
|   fileSystems."/boot" = { | ||||
|     device = "/dev/disk/by-label/boot"; | ||||
|     fsType = "vfat"; | ||||
|   }; | ||||
|  | ||||
|   swapDevices = [ ]; | ||||
|  | ||||
|   # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||||
|   | ||||
| @@ -14,7 +14,13 @@ | ||||
|           [ "writeBoundary" ] '' | ||||
|             if [ ! -d "${config.dotfilesPath}" ]; then | ||||
|                 $DRY_RUN_CMD mkdir --parents $VERBOSE_ARG $(dirname "${config.dotfilesPath}") | ||||
|                 $DRY_RUN_CMD ${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}" | ||||
|  | ||||
|                 # Force HTTPS because anonymous SSH doesn't work | ||||
|                 GIT_CONFIG_COUNT=1 \ | ||||
|                     GIT_CONFIG_KEY_0="url.https://github.com/.insteadOf" \ | ||||
|                     GIT_CONFIG_VALUE_0="git@github.com:" \ | ||||
|                     $DRY_RUN_CMD \ | ||||
|                     ${pkgs.git}/bin/git clone ${config.dotfilesRepo} "${config.dotfilesPath}" | ||||
|             fi | ||||
|           ''; | ||||
|  | ||||
|   | ||||
| @@ -10,6 +10,7 @@ | ||||
|     ./server.nix | ||||
|     ./sleep.nix | ||||
|     ./wifi.nix | ||||
|     ./zfs.nix | ||||
|   ]; | ||||
|  | ||||
|   options = { | ||||
|   | ||||
							
								
								
									
										14
									
								
								modules/nixos/hardware/zfs.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								modules/nixos/hardware/zfs.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| { config, pkgs, lib, ... }: { | ||||
|  | ||||
|   options = { zfs.enable = lib.mkEnableOption "ZFS file system."; }; | ||||
|  | ||||
|   config = | ||||
|     lib.mkIf (pkgs.stdenv.isLinux && config.server && config.zfs.enable) { | ||||
|  | ||||
|       # Only use compatible Linux kernel, since ZFS can be behind | ||||
|       boot.kernelPackages = | ||||
|         config.boot.zfs.package.latestCompatibleLinuxPackages; | ||||
|  | ||||
|     }; | ||||
|  | ||||
| } | ||||
| @@ -17,11 +17,13 @@ | ||||
|       services.openssh = { | ||||
|         enable = true; | ||||
|         ports = [ 22 ]; | ||||
|         passwordAuthentication = false; | ||||
|         gatewayPorts = "no"; | ||||
|         forwardX11 = false; | ||||
|         allowSFTP = true; | ||||
|         permitRootLogin = config.permitRootLogin; | ||||
|         settings = { | ||||
|           GatewayPorts = "no"; | ||||
|           X11Forwarding = false; | ||||
|           PasswordAuthentication = false; | ||||
|           PermitRootLogin = config.permitRootLogin; | ||||
|         }; | ||||
|       }; | ||||
|  | ||||
|       users.users.${config.user}.openssh.authorizedKeys.keys = | ||||
|   | ||||
		Reference in New Issue
	
	Block a user