I don't know what the heck im doing, but I reshuffled some stuff in my systems dir
This commit is contained in:
		
							parent
							
								
									5f178ffdb2
								
							
						
					
					
						commit
						b61e532095
					
				
					 12 changed files with 149 additions and 197 deletions
				
			
		
							
								
								
									
										26
									
								
								system/common/global/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								system/common/global/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,26 @@ | ||||||
|  | { inputs, outputs, ... }: { | ||||||
|  |   imports = [ | ||||||
|  |     inputs.home-manager.nixosModules.home-manager | ||||||
|  |     ./nix.nix | ||||||
|  |     ./fish.nix | ||||||
|  |     ./locale.nix | ||||||
|  |     ./security.nix | ||||||
|  |     ./systemdboot.nix | ||||||
|  |     ./pipewire.nix | ||||||
|  |     ] ++ (builtins.attrValues outputs.nixosModules); | ||||||
|  | 
 | ||||||
|  |   home-manager.extraSpecialArgs = { inherit inputs outputs; }; | ||||||
|  |    | ||||||
|  |   nixpkgs = { | ||||||
|  |     config = { | ||||||
|  |       allowUnfree = true; | ||||||
|  |       permittedInsecurePackages = [ | ||||||
|  |         "openssl-1.1.1u" | ||||||
|  |       ]; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  |      | ||||||
|  |   hardware.enableRedistibutableFirmware = true; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |   } | ||||||
							
								
								
									
										10
									
								
								system/common/global/fish.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								system/common/global/fish.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | ||||||
|  | { | ||||||
|  |   programs.fish = { | ||||||
|  |     enable = true; | ||||||
|  |     vendor = { | ||||||
|  |       completions.enable = true; | ||||||
|  |       config.enable = true; | ||||||
|  |       functions.enable = true; | ||||||
|  |     }; | ||||||
|  |   }; | ||||||
|  | } | ||||||
							
								
								
									
										10
									
								
								system/common/global/locale.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								system/common/global/locale.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,10 @@ | ||||||
|  | { lib, ... }: { | ||||||
|  |   i18n = { | ||||||
|  |     defaultLocale = lib.mkDefault "en_US.UTF-8"; | ||||||
|  |     }; | ||||||
|  |     supportedLocales = lib.mkDefault [ | ||||||
|  |       "en_US.UTF-8/UTF-8" | ||||||
|  |     ]; | ||||||
|  |   }; | ||||||
|  |   time.timeZone = lib.mkDefault "Pacific/Auckland"; | ||||||
|  | } | ||||||
							
								
								
									
										26
									
								
								system/common/global/nix.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								system/common/global/nix.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,26 @@ | ||||||
|  | { inputs, lib, ... }: | ||||||
|  | { | ||||||
|  |   nix = { | ||||||
|  |     settings = { | ||||||
|  |       trusted-users = [ "root" "@wheel" ]; | ||||||
|  |       auto-optimise-store = lib.mkDefault true; | ||||||
|  |       experimental-features = [ "nix-command" "flakes" "repl-flake" ]; | ||||||
|  |       warn-dirty = false; | ||||||
|  |       system-features = [ "kvm" "big-parallel" "nixos-test" ]; | ||||||
|  |       flake-registry = ""; | ||||||
|  |     }; | ||||||
|  |     gc = { | ||||||
|  |       automatic = true; | ||||||
|  |       dates = "weekly"; | ||||||
|  |       options = "--delete-older-than 2d"; | ||||||
|  |     }; | ||||||
|  | 
 | ||||||
|  |     # Add each flake input as a registry | ||||||
|  |     # To make nix3 commands consistent with the flake | ||||||
|  |     registry = lib.mapAttrs (_: value: { flake = value; }) inputs; | ||||||
|  | 
 | ||||||
|  |     # Add nixpkgs input to NIX_PATH | ||||||
|  |     # This lets nix2 commands still use <nixpkgs> | ||||||
|  |     nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ]; | ||||||
|  |   }; | ||||||
|  | } | ||||||
							
								
								
									
										11
									
								
								system/common/global/pipewire.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								system/common/global/pipewire.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,11 @@ | ||||||
|  | { | ||||||
|  |   security.rtkit.enable = true; | ||||||
|  |   hardware.pulseaudio.enable = false; | ||||||
|  |   services.pipewire = { | ||||||
|  |     enable = true; | ||||||
|  |     alsa.enable = true; | ||||||
|  |     alsa.support32Bit = true; | ||||||
|  |     pulse.enable = true; | ||||||
|  |     jack.enable = true; | ||||||
|  |   }; | ||||||
|  | } | ||||||
|  | @ -12,9 +12,6 @@ | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   security = { |   security = { | ||||||
|     rtkit = { |  | ||||||
|       enable = true; |  | ||||||
|     }; |  | ||||||
|     polkit = { |     polkit = { | ||||||
|       enable = true; |       enable = true; | ||||||
|     }; |     }; | ||||||
							
								
								
									
										8
									
								
								system/common/global/systemdboot.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								system/common/global/systemdboot.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,8 @@ | ||||||
|  | { | ||||||
|  |   boot.loader = { | ||||||
|  |     systemd-boot = { | ||||||
|  |       enable = true; | ||||||
|  |     }; | ||||||
|  |     efi.canTouchEfiVariables = true; | ||||||
|  |   }; | ||||||
|  | } | ||||||
							
								
								
									
										24
									
								
								system/common/user/ooks/default.nix
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								system/common/user/ooks/default.nix
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,24 @@ | ||||||
|  | { pkgs, config, ... }: | ||||||
|  | let ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; | ||||||
|  | in | ||||||
|  | { | ||||||
|  |   users.users.ooks = { | ||||||
|  |     isNormalUser = true | ||||||
|  |     shell = pkgs.fish; | ||||||
|  |     extraGroups = [ | ||||||
|  |     "wheel" | ||||||
|  |     "video" | ||||||
|  |     "audio" | ||||||
|  |     ] ++ ifTheyExist [ | ||||||
|  |     "git" | ||||||
|  |     "network" | ||||||
|  |     "libvirtd" | ||||||
|  |     "deluge" | ||||||
|  |     ]; | ||||||
|  | 
 | ||||||
|  |   packages = [ pkgs.home-manager ]; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   home-manager.users.ooks = import ../../../../home/ooks/${config.networking.hostName} | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | @ -1,6 +1,3 @@ | ||||||
| # Do not modify this file!  It was generated by ‘nixos-generate-config’ |  | ||||||
| # and may be overwritten by future invocations.  Please make changes |  | ||||||
| # to /etc/nixos/configuration.nix instead. |  | ||||||
| { config, lib, pkgs, modulesPath, ... }: | { config, lib, pkgs, modulesPath, ... }: | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
|  | @ -44,7 +41,11 @@ | ||||||
|       fsType = "vfat"; |       fsType = "vfat"; | ||||||
|     }; |     }; | ||||||
| 
 | 
 | ||||||
|   swapDevices = [ ]; |   swapDevices = [ | ||||||
|  |     device = "/swap/swapfile"; | ||||||
|  |     size = 8196; | ||||||
|  |   ]; | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|   # Enables DHCP on each ethernet and wireless interface. In case of scripted networking |   # Enables DHCP on each ethernet and wireless interface. In case of scripted networking | ||||||
|   # (the default) this is the recommended approach. When using systemd-networkd it's |   # (the default) this is the recommended approach. When using systemd-networkd it's | ||||||
|  |  | ||||||
|  | @ -1,78 +0,0 @@ | ||||||
| 
 |  | ||||||
| { pkgs, ... } |  | ||||||
| { |  | ||||||
| # System Packages |  | ||||||
| # ------------------------------------------------------------------------------------------------- |  | ||||||
| 
 |  | ||||||
| 	environment = {  |  | ||||||
| 		binsh = with pkgs; [ fish ] |  | ||||||
| 		systemPackages = with pkgs; [ |  | ||||||
| 			# Editor |  | ||||||
| 			neovim |  | ||||||
| 			# Utility |  | ||||||
| 			wget |  | ||||||
| 			neofetch |  | ||||||
| 			glib |  | ||||||
| 			xdg-utils |  | ||||||
| 			killall |  | ||||||
| 			zip |  | ||||||
| 			rar |  | ||||||
| 			btop |  | ||||||
| 			p7zip |  | ||||||
| 			git |  | ||||||
| 			pciutils |  | ||||||
| 			gdb |  | ||||||
| 			dash |  | ||||||
| 			curl |  | ||||||
| 			# Programming |  | ||||||
| 			cargo |  | ||||||
| 			# Fonts |  | ||||||
| 			jetbrains-mono |  | ||||||
| 			# File browsers |  | ||||||
| 			ranger |  | ||||||
| 			joshuto |  | ||||||
| 			# Wayland |  | ||||||
| 			wayland |  | ||||||
| 			wayland-scanner |  | ||||||
| 			wayland-utils |  | ||||||
| 			egl-wayland |  | ||||||
| 			wayland-protocols  |  | ||||||
| 			wev # Wayland window debugger |  | ||||||
| 			wl-clipboard # Wayland clipboard |  | ||||||
| 			wlr-randr |  | ||||||
| 			# Firmware |  | ||||||
| 			linux-firmware |  | ||||||
| 			# Audio |  | ||||||
| 			alsa-lib |  | ||||||
| 		alsa-utils |  | ||||||
| 			flac |  | ||||||
| 			pulsemixer |  | ||||||
| 			# Appearance |  | ||||||
| 			lxappearance |  | ||||||
| 			# Screenshot |  | ||||||
| 			pkgs.sway-contrib.grimshot |  | ||||||
| 			flameshot |  | ||||||
| 			grim |  | ||||||
| 			# Notification |  | ||||||
| 			dunst |  | ||||||
| 			libnotify |  | ||||||
| 			]; |  | ||||||
| 	}; |  | ||||||
| 
 |  | ||||||
| # Programs |  | ||||||
| # ------------------------------------------------------------------------------------------------- |  | ||||||
| 
 |  | ||||||
| 	programs.mtr.enable = true |  | ||||||
| 	programs.gnupg.agent = { |  | ||||||
| 		enable = true; |  | ||||||
| 		enabeSSHSupport = true; |  | ||||||
| 		}; |  | ||||||
| 	programs.hyprland = { |  | ||||||
| 		enable = true; |  | ||||||
| 		xwayland.enable = true; |  | ||||||
| 		}; |  | ||||||
| 	programs.fish = { |  | ||||||
| 		enable = true |  | ||||||
| 		}; |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
|  | @ -8,9 +8,15 @@ | ||||||
| # ------------------------------------------------------------------------------------------------- | # ------------------------------------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
| { | { | ||||||
| 	imports = | 	imports = [ | ||||||
| 		[ # Include the results of the hardware scan |     inputs.hardware.nixosModules.common-pc-ssd | ||||||
|  | 
 | ||||||
| 		./hardware-configuration.nix | 		./hardware-configuration.nix | ||||||
|  |      | ||||||
|  |     ../common/user/ooks | ||||||
|  |     ../common/global/ | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 		]; | 		]; | ||||||
| 
 | 
 | ||||||
| # Bootloader | # Bootloader | ||||||
|  | @ -47,25 +53,15 @@ | ||||||
| 	nixpkgs.system = "x86_64-linux"; | 	nixpkgs.system = "x86_64-linux"; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # Networking | # Hostname and networking | ||||||
| # ------------------------------------------------------------------------------------------------- | # ------------------------------------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
| 	networking = { | 	networking = { | ||||||
| 		hostName = "ooksthink"; # Define your hostname. | 		hostName = "ooksthink"; 		 | ||||||
| 		networkmanager.enable = true;  # Easiest to use and most distros use this by default. |     networkmanager.enable = true; | ||||||
| 		}; | 		}; | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # Time Zone |  | ||||||
| # ------------------------------------------------------------------------------------------------- |  | ||||||
| 
 |  | ||||||
| 	time.timeZone = "Pacific/Auckland"; |  | ||||||
| 
 |  | ||||||
| # Localization |  | ||||||
| # ------------------------------------------------------------------------------------------------- |  | ||||||
| 
 |  | ||||||
| 	i18n.defaultLocale = "en_US.UTF-8"; |  | ||||||
| 
 |  | ||||||
| # X Server | # X Server | ||||||
| # ------------------------------------------------------------------------------------------------- | # ------------------------------------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
|  | @ -90,7 +86,7 @@ | ||||||
| # Printing | # Printing | ||||||
| # ------------------------------------------------------------------------------------------------- | # ------------------------------------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
| 	# services.printing.enable = true; |   services.printing.enable = true; | ||||||
| 
 | 
 | ||||||
| # Sound | # Sound | ||||||
| # ------------------------------------------------------------------------------------------------- | # ------------------------------------------------------------------------------------------------- | ||||||
|  | @ -103,76 +99,23 @@ | ||||||
| 
 | 
 | ||||||
| 	# services.xserver.libinput.enable = true; | 	# services.xserver.libinput.enable = true; | ||||||
| 
 | 
 | ||||||
| # User | # Laptop Programs | ||||||
| # ------------------------------------------------------------------------------------------------- | # ------------------------------------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
| 	users.users = { |   powerManagement.powertop.enable = true; | ||||||
| 		ooks = { |   programs = { | ||||||
| 			isNormalUser = true; |     light.enable = true; | ||||||
| 			extraGroups = [ "wheel" ]; |     dconf.enable = true; | ||||||
| 			shell = pkgs.fish; |     kdeconnect.enable = true; | ||||||
| 
 |  | ||||||
| # User Packages |  | ||||||
| # ------------------------------------------------------------------------------------------------- |  | ||||||
| 
 |  | ||||||
|   			packages = with pkgs; [ |  | ||||||
|   				firefox |  | ||||||
|   				tree |  | ||||||
|  				hyprland |  | ||||||
|  				kitty |  | ||||||
|     				]; |  | ||||||
|   			}; |  | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
| # System Environment | # XDG Portal | ||||||
| # ------------------------------------------------------------------------------------------------- | # ------------------------------------------------------------------------------------------------ | ||||||
| 
 | 
 | ||||||
| 	environment = { | xdg.portal = { | ||||||
| 		binsh = "${pkgs.dash}/bin/dash"; |   enable = true; | ||||||
| 		shells = with pkgs; [ fish ]; |   wlr.enable = true; | ||||||
| 		systemPackages = with pkgs; [ | }; | ||||||
| 		#	Editor |  | ||||||
| 		#	------ |  | ||||||
| 			neovim |  | ||||||
| 		#	Utility |  | ||||||
| 		#	------ |  | ||||||
| 			wget |  | ||||||
| 			dash |  | ||||||
| 			neofetch |  | ||||||
| 			glib |  | ||||||
| 			xdg-utils |  | ||||||
| 			pciutils |  | ||||||
| 			gdb |  | ||||||
| 			killall |  | ||||||
| 			jetbrains-mono |  | ||||||
| 			cargo |  | ||||||
| 			p7zip |  | ||||||
| 			joshuto |  | ||||||
| 			zip |  | ||||||
| 			rar |  | ||||||
| 			btop |  | ||||||
| 			git |  | ||||||
| 			libnotify |  | ||||||
| 			dunst |  | ||||||
| 			wl-clipboard |  | ||||||
| 			wlr-randr |  | ||||||
| 			wayland |  | ||||||
| 			wayland-scanner |  | ||||||
| 			wayland-utils |  | ||||||
| 			egl-wayland |  | ||||||
| 			wayland-protocols |  | ||||||
| 			wev |  | ||||||
| 			alsa-lib |  | ||||||
| 			alsa-utils |  | ||||||
| 			flac |  | ||||||
| 			pulsemixer |  | ||||||
| 			linux-firmware |  | ||||||
| 			lxappearance |  | ||||||
| 			pkgs.sway-contrib.grimshot |  | ||||||
| 			flameshot |  | ||||||
| 			grim |  | ||||||
|   			]; |  | ||||||
| 	}; |  | ||||||
| 
 | 
 | ||||||
| # Fonts | # Fonts | ||||||
| # ------------------------------------------------------------------------------------------------- | # ------------------------------------------------------------------------------------------------- | ||||||
|  | @ -189,30 +132,16 @@ fonts.fonts = with pkgs; [ | ||||||
| 		enable = true; | 		enable = true; | ||||||
| 		enableSSHSupport = true; | 		enableSSHSupport = true; | ||||||
|  		}; |  		}; | ||||||
|   	programs.hyprland = { |  | ||||||
| 		enable = true; |  | ||||||
| 		xwayland.enable = true; |  | ||||||
|  		};    |  | ||||||
| 	programs.fish = { |  | ||||||
| 		enable = true; |  | ||||||
| 		}; |  | ||||||
| 
 | 
 | ||||||
| # Services | # Services | ||||||
| # ------------------------------------------------------------------------------------------------- | # ------------------------------------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
| 	security.rtkit.enable = true; |  | ||||||
| 
 |  | ||||||
| 	services = { | 	services = { | ||||||
| 		pipewire = { |  | ||||||
| 			enable = true; |  | ||||||
| 			alsa.enable = true; |  | ||||||
| 			alsa.support32Bit = true; |  | ||||||
| 			pulse.enable = true; |  | ||||||
| 			jack.enable = true; |  | ||||||
| 			wireplumber.enable = true; |  | ||||||
| 		}; | 		}; | ||||||
| 		dbus.packages = [ pkgs.gcr ]; | 		dbus = { | ||||||
| 		getty.autologinUser = "ooks"; |       enable = true; | ||||||
|  |       packages = [ pkgs.gcr ]; | ||||||
|  |     }; | ||||||
| 		auto-cpufreq = { | 		auto-cpufreq = { | ||||||
| 			enable = true; | 			enable = true; | ||||||
| 			settings = { | 			settings = { | ||||||
|  | @ -245,18 +174,6 @@ fonts.fonts = with pkgs; [ | ||||||
| 			}; | 			}; | ||||||
| 		}; | 		}; | ||||||
| 
 | 
 | ||||||
| # Security |  | ||||||
| # ------------------------------------------------------------------------------------------------- |  | ||||||
| 
 |  | ||||||
| 	security.polkit.enable = true; |  | ||||||
| 	security.sudo = { |  | ||||||
| 		enable = true; |  | ||||||
| 		extraConfig = '' |  | ||||||
| 			ooks ALL=(ALL) NOPASSWD:ALL |  | ||||||
| 			''; |  | ||||||
| 			}; |  | ||||||
| 			 |  | ||||||
| 
 |  | ||||||
| # D-Bus | # D-Bus | ||||||
| # ------------------------------------------------------------------------------------------------- | # ------------------------------------------------------------------------------------------------- | ||||||
| 
 | 
 | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue