mirror of
				https://github.com/materusPL/nixos-config
				synced 2025-10-31 20:40:28 +01:00 
			
		
		
		
	code: nixpkgs-fmt to format code
This commit is contained in:
		
							parent
							
								
									8ecb892244
								
							
						
					
					
						commit
						04ad6ac1cd
					
				| @ -30,7 +30,8 @@ let | |||||||
|     (builtins.listToAttrs (_for 0)) // { |     (builtins.listToAttrs (_for 0)) // { | ||||||
|       #Make generic x86_64-linux user profile "username" |       #Make generic x86_64-linux user profile "username" | ||||||
|       ${username} = |       ${username} = | ||||||
|         let materusCfg = { |         let | ||||||
|  |           materusCfg = { | ||||||
|             stable = false; |             stable = false; | ||||||
|             inherit materusFlake; |             inherit materusFlake; | ||||||
|             host = "Generic"; |             host = "Generic"; | ||||||
| @ -40,7 +41,8 @@ let | |||||||
|             path = materusFlake.selfPath; |             path = materusFlake.selfPath; | ||||||
|             homePath = materusFlake.selfPath + "/configurations/home/${username}"; |             homePath = materusFlake.selfPath + "/configurations/home/${username}"; | ||||||
|             isHm = true; |             isHm = true; | ||||||
|         }; in |           }; | ||||||
|  |         in | ||||||
|         inputs.configInputs.home-manager.lib.homeManagerConfiguration { |         inputs.configInputs.home-manager.lib.homeManagerConfiguration { | ||||||
|           pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = { allowUnfree = true; }; }; |           pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = { allowUnfree = true; }; }; | ||||||
|           extraSpecialArgs = { inherit materusCfg; }; |           extraSpecialArgs = { inherit materusCfg; }; | ||||||
|  | |||||||
| @ -5,7 +5,8 @@ | |||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   imports = |   imports = | ||||||
|     [ (modulesPath + "/installer/scan/not-detected.nix") |     [ | ||||||
|  |       (modulesPath + "/installer/scan/not-detected.nix") | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|   boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; |   boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; | ||||||
| @ -20,42 +21,49 @@ | |||||||
|     } |     } | ||||||
|   ]; |   ]; | ||||||
|   fileSystems."/" = |   fileSystems."/" = | ||||||
|     { device = "/dev/disk/by-label/NixOS_Root"; |     { | ||||||
|  |       device = "/dev/disk/by-label/NixOS_Root"; | ||||||
|       fsType = "btrfs"; |       fsType = "btrfs"; | ||||||
|       options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" ]; |       options = [ "subvol=@" "noatime" "ssd" "space_cache=v2" ]; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|   fileSystems."/nix" = |   fileSystems."/nix" = | ||||||
|     { device = "/dev/disk/by-label/NixOS_Root"; |     { | ||||||
|  |       device = "/dev/disk/by-label/NixOS_Root"; | ||||||
|       fsType = "btrfs"; |       fsType = "btrfs"; | ||||||
|       options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ]; |       options = [ "subvol=@nix" "noatime" "compress=zstd" "ssd" "space_cache=v2" ]; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|   fileSystems."/materus" = |   fileSystems."/materus" = | ||||||
|     { device = "/dev/disk/by-label/NixOS_Root"; |     { | ||||||
|  |       device = "/dev/disk/by-label/NixOS_Root"; | ||||||
|       fsType = "btrfs"; |       fsType = "btrfs"; | ||||||
|       options = [ "subvol=@materus" "noatime" "compress=zstd" "ssd" "space_cache=v2" ]; |       options = [ "subvol=@materus" "noatime" "compress=zstd" "ssd" "space_cache=v2" ]; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|   fileSystems."/etc/nixos" = |   fileSystems."/etc/nixos" = | ||||||
|     { device = "/materus/config/nixos-config"; |     { | ||||||
|  |       device = "/materus/config/nixos-config"; | ||||||
|       fsType = "none"; |       fsType = "none"; | ||||||
|       options = [ "bind" ]; |       options = [ "bind" ]; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|   fileSystems."/home" = |   fileSystems."/home" = | ||||||
|     { device = "/dev/disk/by-label/NixOS_Home"; |     { | ||||||
|  |       device = "/dev/disk/by-label/NixOS_Home"; | ||||||
|       fsType = "btrfs"; |       fsType = "btrfs"; | ||||||
|       options = [ "subvol=@home" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ]; |       options = [ "subvol=@home" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ]; | ||||||
|     }; |     }; | ||||||
|   fileSystems."/materus/data" = |   fileSystems."/materus/data" = | ||||||
|     { device = "/dev/disk/by-label/NixOS_Home"; |     { | ||||||
|  |       device = "/dev/disk/by-label/NixOS_Home"; | ||||||
|       fsType = "btrfs"; |       fsType = "btrfs"; | ||||||
|       options = [ "subvol=@data" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ]; |       options = [ "subvol=@data" "nossd" "noatime" "compress=zstd" "space_cache=v2" "autodefrag" ]; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|   fileSystems."/boot" = |   fileSystems."/boot" = | ||||||
|     { device = "/dev/disk/by-label/NixOS_Root"; |     { | ||||||
|  |       device = "/dev/disk/by-label/NixOS_Root"; | ||||||
|       fsType = "btrfs"; |       fsType = "btrfs"; | ||||||
|       options = [ "subvol=@boot" "ssd" ]; |       options = [ "subvol=@boot" "ssd" ]; | ||||||
|     }; |     }; | ||||||
| @ -63,7 +71,8 @@ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|   fileSystems."/boot/efi" = |   fileSystems."/boot/efi" = | ||||||
|     { device = "/dev/disk/by-label/NixOS_EFI"; |     { | ||||||
|  |       device = "/dev/disk/by-label/NixOS_EFI"; | ||||||
|       fsType = "vfat"; |       fsType = "vfat"; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -14,7 +14,8 @@ | |||||||
|   }; |   }; | ||||||
|   hardware.pulseaudio.enable = false; |   hardware.pulseaudio.enable = false; | ||||||
| 
 | 
 | ||||||
|   environment.sessionVariables = let  |   environment.sessionVariables = | ||||||
|  |     let | ||||||
|       makePluginPath = format: |       makePluginPath = format: | ||||||
|         (lib.makeSearchPath format [ |         (lib.makeSearchPath format [ | ||||||
|           "$HOME/.nix-profile/lib" |           "$HOME/.nix-profile/lib" | ||||||
|  | |||||||
| @ -1,4 +1,3 @@ | |||||||
| 
 |  | ||||||
| { config, pkgs, lib, ... }: | { config, pkgs, lib, ... }: | ||||||
| { | { | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -5,17 +5,20 @@ | |||||||
|   ]; |   ]; | ||||||
| 
 | 
 | ||||||
|   systemd.mounts = [ |   systemd.mounts = [ | ||||||
|         { where = "/dev/hugepages"; |     { | ||||||
|  |       where = "/dev/hugepages"; | ||||||
|       enable = false; |       enable = false; | ||||||
|     } |     } | ||||||
|         { where = "/dev/hugepages/hugepages-2048kB"; |     { | ||||||
|  |       where = "/dev/hugepages/hugepages-2048kB"; | ||||||
|       enable = true; |       enable = true; | ||||||
|       what = "hugetlbfs"; |       what = "hugetlbfs"; | ||||||
|       type = "hugetlbfs"; |       type = "hugetlbfs"; | ||||||
|       options = "pagesize=2M"; |       options = "pagesize=2M"; | ||||||
|       requiredBy = [ "basic.target" ]; |       requiredBy = [ "basic.target" ]; | ||||||
|     } |     } | ||||||
|         { where = "/dev/hugepages/hugepages-1048576kB"; |     { | ||||||
|  |       where = "/dev/hugepages/hugepages-1048576kB"; | ||||||
|       enable = true; |       enable = true; | ||||||
|       what = "hugetlbfs"; |       what = "hugetlbfs"; | ||||||
|       type = "hugetlbfs"; |       type = "hugetlbfs"; | ||||||
|  | |||||||
| @ -6,13 +6,15 @@ | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|   config = let  |   config = | ||||||
|  |     let | ||||||
|       cfg = config.valkyrieService.pihole; |       cfg = config.valkyrieService.pihole; | ||||||
|       dnsmasqConf = pkgs.writeText "02-dnsmasq-custom.conf" '' |       dnsmasqConf = pkgs.writeText "02-dnsmasq-custom.conf" '' | ||||||
|         no-hosts |         no-hosts | ||||||
|       ''; |       ''; | ||||||
| 
 | 
 | ||||||
|   in lib.mkIf config.valkyrieService.pihole.enable { |     in | ||||||
|  |     lib.mkIf config.valkyrieService.pihole.enable { | ||||||
|       systemd.tmpfiles.rules = [ |       systemd.tmpfiles.rules = [ | ||||||
|         "d    /var/lib/dnsmasq.d   0776    root    root     -" |         "d    /var/lib/dnsmasq.d   0776    root    root     -" | ||||||
|         "d    /var/lib/pihole   0776    root    root     -" |         "d    /var/lib/pihole   0776    root    root     -" | ||||||
|  | |||||||
| @ -6,7 +6,8 @@ | |||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   imports = |   imports = | ||||||
|     [ # Include the results of the hardware scan. |     [ | ||||||
|  |       # Include the results of the hardware scan. | ||||||
|       ./hardware-configuration.nix |       ./hardware-configuration.nix | ||||||
|     ]; |     ]; | ||||||
|   environment.systemPackages = with pkgs; [ |   environment.systemPackages = with pkgs; [ | ||||||
|  | |||||||
| @ -5,7 +5,8 @@ | |||||||
| 
 | 
 | ||||||
| { | { | ||||||
|   imports = |   imports = | ||||||
|     [ (modulesPath + "/installer/scan/not-detected.nix") |     [ | ||||||
|  |       (modulesPath + "/installer/scan/not-detected.nix") | ||||||
|     ]; |     ]; | ||||||
|   boot.kernelPackages = pkgs.linuxPackages_rpi4; |   boot.kernelPackages = pkgs.linuxPackages_rpi4; | ||||||
|   boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" ]; |   boot.initrd.availableKernelModules = [ "xhci_pci" "usb_storage" ]; | ||||||
| @ -16,7 +17,8 @@ | |||||||
|     "vm.swappiness" = 10; |     "vm.swappiness" = 10; | ||||||
|   }; |   }; | ||||||
|   fileSystems."/" = |   fileSystems."/" = | ||||||
|     { device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; |     { | ||||||
|  |       device = "/dev/disk/by-uuid/44444444-4444-4444-8888-888888888888"; | ||||||
|       fsType = "ext4"; |       fsType = "ext4"; | ||||||
|     }; |     }; | ||||||
|   fileSystems."/etc/nixos" = |   fileSystems."/etc/nixos" = | ||||||
|  | |||||||
| @ -2,7 +2,8 @@ | |||||||
| let | let | ||||||
| 
 | 
 | ||||||
|   relToDotDir = file: (lib.optionalString (config.programs.zsh.dotDir != null) (config.programs.zsh.dotDir + "/")) + file; |   relToDotDir = file: (lib.optionalString (config.programs.zsh.dotDir != null) (config.programs.zsh.dotDir + "/")) + file; | ||||||
|   pluginsDir = if config.programs.zsh.dotDir != null then |   pluginsDir = | ||||||
|  |     if config.programs.zsh.dotDir != null then | ||||||
|       relToDotDir "plugins" else ".zsh/plugins"; |       relToDotDir "plugins" else ".zsh/plugins"; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user