starting commit uwo
This commit is contained in:
		
							
								
								
									
										383
									
								
								hosts/kiara/configuration.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										383
									
								
								hosts/kiara/configuration.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,383 @@ | ||||
| # Edit this configuration file to define what should be installed on | ||||
| # your system.  Help is available in the configuration.nix(5) man page | ||||
| # and in the NixOS manual (accessible by running ‘nixos-help’). | ||||
|  | ||||
| { config, pkgs, inputs, ... }: | ||||
|  | ||||
| { | ||||
|   imports = | ||||
|     [ # Include the results of the hardware scan. | ||||
|       ./hardware-configuration.nix | ||||
|       inputs.home-manager.nixosModules.default | ||||
|       ../../mods/vm.nix | ||||
|       inputs.spicetify-nix.nixosModules.default | ||||
|     ]; | ||||
|    | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|   vm.enable = true; | ||||
|  | ||||
|   # Bootloader. | ||||
|   boot.loader.grub.enable = true; | ||||
|   boot.loader.grub.device = "/dev/sdb"; | ||||
|   boot.loader.grub.useOSProber = true; | ||||
|  | ||||
|   # IOMMU | ||||
|   boot.kernelParams = [ "intel_iommu=on" ]; | ||||
|   boot.kernelModules = [ "vfio_virqfd" "vfio_pci" "vfio_iommu_type1" "vfio" "v4l2loopback" ]; | ||||
|   boot.blacklistedKernelModules = [ "nvidia" "nouveau" ]; | ||||
|   boot.extraModprobeConfig = '' | ||||
|     options vfio-pci ids=10de:22bc,10de:2786 | ||||
|     options v4l2loopback exclusive_caps=1 | ||||
|   ''; | ||||
|   boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ]; | ||||
|  | ||||
|  | ||||
|   networking.hostName = "kiara"; # Define your hostname. | ||||
|   # networking.wireless.enable = true;  # Enables wireless support via wpa_supplicant. | ||||
|  | ||||
|   # Configure network proxy if necessary | ||||
|   # networking.proxy.default = "http://user:password@proxy:port/"; | ||||
|   # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; | ||||
|  | ||||
|   # Enable networking | ||||
|   networking.networkmanager.enable = true; | ||||
|   #networking.nameservers = [   "1.1.1.1" "1.0.0.1" ]; | ||||
|   # networking.networkmanager.insertNameservers = [ "1.1.1.1" ]; | ||||
|  | ||||
|  #{ config, pkgs, lib, ... }:{ | ||||
|  #  networking.firewall.checkReversePath = false;  | ||||
|  #} | ||||
|  | ||||
| # NFS client | ||||
|  | ||||
|  | ||||
|   fileSystems."/mnt/apricot" = { | ||||
|     device = "192.168.4.191:/mnt/apricot" ; | ||||
|     fsType = "nfs" ; | ||||
|     options = [ "x-systemd.automount" "noauto" ]; | ||||
|   }; | ||||
|  | ||||
|   fileSystems."/home" = { | ||||
|     device = "/dev/disk/by-uuid/6eb8bb12-0016-4a01-9c63-8d493487df51"; | ||||
|     fsType = "ext4"; | ||||
|   }; | ||||
|  | ||||
|   # Set your time zone. | ||||
|   time.timeZone = "America/New_York"; | ||||
|  | ||||
|   # Select internationalisation properties. | ||||
|   i18n.defaultLocale = "en_US.UTF-8"; | ||||
|  | ||||
|   i18n.extraLocaleSettings = { | ||||
|     LC_ADDRESS = "en_US.UTF-8"; | ||||
|     LC_IDENTIFICATION = "en_US.UTF-8"; | ||||
|     LC_MEASUREMENT = "en_US.UTF-8"; | ||||
|     LC_MONETARY = "en_US.UTF-8"; | ||||
|     LC_NAME = "en_US.UTF-8"; | ||||
|     LC_NUMERIC = "en_US.UTF-8"; | ||||
|     LC_PAPER = "en_US.UTF-8"; | ||||
|     LC_TELEPHONE = "en_US.UTF-8"; | ||||
|     LC_TIME = "en_US.UTF-8"; | ||||
|   }; | ||||
|  | ||||
|   # Enable the X11 windowing system. | ||||
|   services.xserver.enable = true; | ||||
|  | ||||
|   # Enable the GNOME Desktop Environment. | ||||
|   services.xserver.displayManager.gdm.enable = true; | ||||
|  # services.xserver.desktopManager.gnome.enable = true; | ||||
|  | ||||
|   # Configure keymap in X11 | ||||
|   #services.xserver = { | ||||
|   #  layout = "us"; | ||||
|   #  xkbVariant = ""; | ||||
|   #}; | ||||
|  | ||||
|   # Enable CUPS to print documents. | ||||
|   services.printing.enable = true; | ||||
|  | ||||
|   # Enable sound with pipewire. | ||||
|   hardware.pulseaudio.enable = false; | ||||
|   security.rtkit.enable = true; | ||||
|   services.pipewire = { | ||||
|     enable = true; | ||||
|     alsa.enable = true; | ||||
|     alsa.support32Bit = true; | ||||
|     pulse.enable = true; | ||||
|     wireplumber.enable = true; | ||||
|     # If you want to use JACK applications, uncomment this | ||||
|     #jack.enable = true; | ||||
|   }; | ||||
|    | ||||
|   # enable opencl on gpu | ||||
|   environment.variables = { | ||||
|     ROC_ENABLE_PRE_VEGA = "1"; | ||||
|   }; | ||||
|  | ||||
|  hardware.opengl.extraPackages = with pkgs; [ | ||||
|   rocmPackages.clr.icd | ||||
|  ]; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|   # Enable touchpad support (enabled default in most desktopManager). | ||||
|   # services.xserver.libinput.enable = true; | ||||
|  | ||||
|   # Define a user account. Don't forget to set a password with ‘passwd’. | ||||
|   users.users.takanashi = { | ||||
|     isNormalUser = true; | ||||
|     description = "takanashi"; | ||||
|     extraGroups = [ "networkmanager" "wheel" "docker" ]; | ||||
|     packages = with pkgs; [ | ||||
|     #  thunderbird | ||||
|     ]; | ||||
|   }; | ||||
|  | ||||
|   # Install firefox. | ||||
|   #programs.firefox.enable = true; | ||||
|  | ||||
|   # Allow unfree packages | ||||
|   nixpkgs.config.allowUnfree = true; | ||||
|  | ||||
|   # Nix Flakes | ||||
|    | ||||
|   nix.settings.experimental-features = [ "nix-command" "flakes"];  | ||||
|  | ||||
|   # Home Manager | ||||
|  | ||||
|  # home-manager = { | ||||
|  # # also pass inputs to home-manager modules | ||||
|  # extraSpecialArgs = {inherit inputs;}; | ||||
|  # users = { | ||||
|  #   "takanashi" = import ./home.nix; | ||||
|  # }; | ||||
| # }; | ||||
|  | ||||
|   | ||||
|  | ||||
|  # spicetify-nix | ||||
|  | ||||
|   programs.spicetify = | ||||
|   let | ||||
|     spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; | ||||
|   in | ||||
|   { | ||||
|     enable = true; | ||||
|    | ||||
|     #enabledExtensions = with spicePkgs.extensions; [ | ||||
|     #  adblock | ||||
|     #  hidePodcasts | ||||
|     #  shuffle # shuffle+ (special characters are sanitized out of extension names) | ||||
|     #]; | ||||
|     #enabledCustomApps = with spicePkgs.apps; [ | ||||
|     #  newReleases | ||||
|     #  ncsVisualizer | ||||
|     #]; | ||||
|     #enabledSnippets = with spicePkgs.snippets; [ | ||||
|     #  rotatingCoverart | ||||
|     #  pointer | ||||
|     #]; | ||||
|  | ||||
|     theme = spicePkgs.themes.comfy; | ||||
|     colorScheme = "hikari"; | ||||
|   }; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|   hardware.bluetooth.enable = true; # enables support for Bluetooth | ||||
|   hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot | ||||
|    | ||||
|   services.blueman.enable = true; | ||||
|  | ||||
|   hardware.enableAllFirmware = true; | ||||
|  | ||||
|  | ||||
|  | ||||
|   # List packages installed in system profile. To search, run: | ||||
|   # $ nix search wget | ||||
|   environment.systemPackages = with pkgs; [ | ||||
|     vim | ||||
|     firefox | ||||
|     neovim | ||||
|     wget | ||||
|     hyprland | ||||
|     xdg-desktop-portal-hyprland | ||||
|     alacritty | ||||
|     firefox | ||||
|     waybar | ||||
|     dunst | ||||
|     wofi | ||||
|     cinnamon.nemo | ||||
|     btop | ||||
|     hashcat | ||||
|     git  | ||||
|     networkmanager | ||||
|     tauon | ||||
|     super-productivity | ||||
|     brave | ||||
|     calc | ||||
|     vesktop | ||||
|     hyprshot | ||||
|     wl-clipboard | ||||
|     yt-dlp | ||||
|     syncthing | ||||
|     brave | ||||
|     fastfetch | ||||
|     obsidian | ||||
|     krita | ||||
|     pavucontrol | ||||
|     ranger | ||||
|     lxqt.lxqt-policykit | ||||
|    # linux-wallpaperengine # bug with freeimage-unstable with like 7 CVEs wait for patch | ||||
|     libreoffice | ||||
|     pasystray | ||||
|     syncthing-tray | ||||
|     udiskie | ||||
|     nm-tray | ||||
|  #   hyprpicker | ||||
|     wl-color-picker | ||||
|     dig | ||||
|     wireguard-go | ||||
|     wg-netmanager | ||||
|     wireguard-tools | ||||
|     motrix  | ||||
|     zip | ||||
|     unzip | ||||
|     android-file-transfer | ||||
|     appimage-run | ||||
|     python3 | ||||
|     python311Packages.pip | ||||
|     pipes-rs | ||||
|     spicetify-cli | ||||
|     spotify | ||||
|     obs-studio | ||||
|     lsof | ||||
|     alsa-utils | ||||
|     bluez | ||||
|     bluez-tools | ||||
|     wireplumber | ||||
|     xivlauncher | ||||
|     kdePackages.gwenview | ||||
|     #hyprlock | ||||
|     mpv | ||||
|     p7zip | ||||
|     file | ||||
|     file-roller | ||||
|     lunar-client | ||||
|     teams-for-linux | ||||
|     kdenlive | ||||
|     ffmpeg | ||||
|     pciutils | ||||
|     kdePackages.partitionmanager | ||||
|     testdisk | ||||
|     kdePackages.filelight | ||||
|     spice | ||||
|     spice-gtk | ||||
|     spice-vdagent | ||||
|     exif | ||||
|     kdePackages.kleopatra | ||||
|     piper | ||||
|     libratbag | ||||
|     cmake | ||||
|     mesa | ||||
|     gnome-disk-utility | ||||
|     python312Packages.numpy | ||||
|     virtualenv | ||||
|     poetry | ||||
|     cheese | ||||
|     usbutils | ||||
|     v4l-utils | ||||
|     #vencord | ||||
|     kdePackages.okular | ||||
|     blueman | ||||
|     game-devices-udev-rules | ||||
|     looking-glass-client | ||||
|     inputs.zen-browser.packages."${system}".default | ||||
|     tree | ||||
|   ]; | ||||
|  | ||||
|   # Some programs need SUID wrappers, can be configured further or are | ||||
|   # started in user sessions. | ||||
|   # programs.mtr.enable = true; | ||||
|   # programs.gnupg.agent = { | ||||
|   #   enable = true; | ||||
|   #   enableSSHSupport = true; | ||||
|   # }; | ||||
|  | ||||
|   # List services that you want to enable: | ||||
|   services.flatpak.enable = true; | ||||
|   programs.hyprland.systemd.setPath.enable = true; | ||||
|   programs.hyprland.xwayland.enable = true; | ||||
|   programs.hyprland.enable = true; | ||||
|   hardware.opentabletdriver.enable = true; | ||||
|   hardware.opentabletdriver.daemon.enable = true; | ||||
|   services.spice-vdagentd.enable = true; | ||||
|   security.polkit.enable = true; | ||||
|   hardware.uinput.enable = true; | ||||
|   | ||||
|   ########################################### | ||||
|   # The Good ol we will fix it later corner # | ||||
|   ########################################### | ||||
|      | ||||
|    | ||||
|   #services.xserver.enable = true; | ||||
|   #services.xserver.displayManager.gdm.enable = true; | ||||
|   #services.xserver.desktopManager = { | ||||
|   #  gnome.enable = true; | ||||
|   #}; | ||||
|  | ||||
|   | ||||
|   # Docker stuff | ||||
|   virtualisation.docker.enable = true; | ||||
|  # users.users.takanashi.extraGroups = [ "docker" ]; | ||||
|  | ||||
|   virtualisation.docker.rootless = { | ||||
|   enable = true; | ||||
|   setSocketVariable = true; | ||||
|   }; | ||||
|   | ||||
|   virtualisation.docker.daemon.settings = { | ||||
|   data-root = "/home/takanashi/docker"; | ||||
|   }; | ||||
|        | ||||
|   | ||||
|   ########################################### | ||||
|   # Enable the OpenSSH daemon. | ||||
|   # services.openssh.enable = true; | ||||
|  | ||||
|   # Open ports in the firewall. | ||||
|   # networking.firewall.allowedTCPPorts = [ ... ]; | ||||
|   # networking.firewall.allowedUDPPorts = [ ... ]; | ||||
|   # Or disable the firewall altogether. | ||||
|   # networking.firewall.enable = false; | ||||
|  | ||||
|  | ||||
|  | ||||
|  # Looking glass shms | ||||
|  systemd.tmpfiles.rules = [ | ||||
|  #  "f /dev/shm/scream 0660 alex qemu-libvirtd -" | ||||
|    "f /dev/shm/looking-glass 0660 takanashi kvm -" | ||||
|  ]; | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|  | ||||
|   # This value determines the NixOS release from which the default | ||||
|   # settings for stateful data, like file locations and database versions | ||||
|   # on your system were taken. It‘s perfectly fine and recommended to leave | ||||
|   # this value at the release version of the first install of this system. | ||||
|   # Before changing this value read the documentation for this option | ||||
|   # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). | ||||
|   system.stateVersion = "24.05"; # Did you read the comment? | ||||
|  | ||||
| } | ||||
							
								
								
									
										33
									
								
								hosts/kiara/hardware-configuration.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										33
									
								
								hosts/kiara/hardware-configuration.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,33 @@ | ||||
| # 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, ... }: | ||||
|  | ||||
| { | ||||
|   imports = | ||||
|     [ (modulesPath + "/installer/scan/not-detected.nix") | ||||
|     ]; | ||||
|  | ||||
|   boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "uas" "sd_mod" "sr_mod" ]; | ||||
|   boot.initrd.kernelModules = [ ]; | ||||
|   boot.kernelModules = [ "kvm-intel" ]; | ||||
|   boot.extraModulePackages = [ ]; | ||||
|  | ||||
|   fileSystems."/" = | ||||
|     { device = "/dev/disk/by-uuid/0a16ae46-fd59-45c5-89c6-abe77494bcab"; | ||||
|       fsType = "ext4"; | ||||
|     }; | ||||
|  | ||||
|   swapDevices = [ ]; | ||||
|  | ||||
|   # 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 | ||||
|   # still possible to use this option, but it's recommended to use it in conjunction | ||||
|   # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. | ||||
|   networking.useDHCP = lib.mkDefault true; | ||||
|   # networking.interfaces.eno1.useDHCP = lib.mkDefault true; | ||||
|   # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; | ||||
|  | ||||
|   nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||||
|   hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||||
| } | ||||
							
								
								
									
										36
									
								
								hosts/kiara/vm.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								hosts/kiara/vm.nix
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,36 @@ | ||||
| { config, lib, pkgs, ... }: | ||||
|  | ||||
| { | ||||
|  #config = lib.mkIf config.vm.enable {  | ||||
|  #  # Enable dconf (System Management Tool) | ||||
|  #  programs.dconf.enable = true; | ||||
|   | ||||
|    # Add user to libvirtd group | ||||
|    users.users.takanashi.extraGroups = [ "libvirtd" ]; | ||||
|  | ||||
| # Install necessary packages | ||||
|   environment.systemPackages = with pkgs; [ | ||||
|     virt-manager | ||||
|     virt-viewer | ||||
|     spice spice-gtk | ||||
|     spice-protocol | ||||
|     win-virtio | ||||
|     win-spice | ||||
|     gnome.adwaita-icon-theme | ||||
|   ]; | ||||
|  | ||||
|   # Manage the virtualisation services | ||||
|   virtualisation = { | ||||
|     libvirtd = { | ||||
|       enable = true; | ||||
|       qemu = { | ||||
|         swtpm.enable = true; | ||||
|         ovmf.enable = true; | ||||
|         ovmf.packages = [ pkgs.OVMFFull.fd ]; | ||||
|       }; | ||||
|     }; | ||||
|     spiceUSBRedirection.enable = true; | ||||
|   }; | ||||
|   services.spice-vdagentd.enable = true; | ||||
| # }; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user