diff --git a/flake.nix b/flake.nix index 445daf1..cde57e9 100644 --- a/flake.nix +++ b/flake.nix @@ -174,6 +174,12 @@ ./systems/pc/configuration.nix ]; }; + "test-pc" = mkHost { + modules = [ + ./users/kopatz + ./systems/test-pc/configuration.nix + ]; + }; "framework" = mkHost { modules = [ ### User specific ### diff --git a/home-manager/easyeffects/default.nix b/home-manager/easyeffects/default.nix index b78a568..2cf829e 100644 --- a/home-manager/easyeffects/default.nix +++ b/home-manager/easyeffects/default.nix @@ -1,11 +1,19 @@ -{ pkgs, config, ... }: { - services.easyeffects = { - enable = true; - preset = "mic"; - extraPresets = { - mic = builtins.fromJSON (builtins.readFile ./mic.json); - other_mic = builtins.fromJSON (builtins.readFile ./other_mic.json); + pkgs, + config, + osConfig, + lib, + ... +}: +{ + config = lib.mkIf osConfig.custom.graphical.noise-supression.enable { + services.easyeffects = { + enable = true; + preset = "mic"; + extraPresets = { + mic = builtins.fromJSON (builtins.readFile ./mic.json); + other_mic = builtins.fromJSON (builtins.readFile ./other_mic.json); + }; }; }; } diff --git a/home-manager/firefox/default.nix b/home-manager/firefox/default.nix index 0fac538..2aaf7fd 100644 --- a/home-manager/firefox/default.nix +++ b/home-manager/firefox/default.nix @@ -337,7 +337,7 @@ in colorTheme.enable = true; }; }; - programs.firefox = { + programs.firefox = lib.mkIf osConfig.custom.graphical.firefox-custom.enable { enable = true; policies = { DisableTelemetry = true; diff --git a/modules/graphical/basics.nix b/modules/graphical/basics.nix index bcf07bd..f914936 100644 --- a/modules/graphical/basics.nix +++ b/modules/graphical/basics.nix @@ -42,7 +42,6 @@ in logseq # notes ani-cli brave - wayvnc ]; }; } diff --git a/modules/graphical/default.nix b/modules/graphical/default.nix index c8c06ba..10fe085 100644 --- a/modules/graphical/default.nix +++ b/modules/graphical/default.nix @@ -36,4 +36,8 @@ ./niri.nix ./wayvnc.nix ]; + + options.custom.graphical.firefox-custom = { + enable = lib.mkEnableOption "Enables custom firefox"; + }; } diff --git a/modules/graphical/hyprland.nix b/modules/graphical/hyprland.nix index 72e804a..203e885 100644 --- a/modules/graphical/hyprland.nix +++ b/modules/graphical/hyprland.nix @@ -22,7 +22,7 @@ in xkb.variant = config.mainUser.variant; enable = true; }; - services.displayManager.sddm.enable = !config.services.xserver.displayManager.gdm.enable; + #services.displayManager.sddm.enable = !config.services.xserver.displayManager.gdm.enable; #nix.settings = { # substituters = [ "https://hyprland.cachix.org" ]; diff --git a/modules/hardware/nvidia.nix b/modules/hardware/nvidia.nix index 4b848c6..a5acb8f 100644 --- a/modules/hardware/nvidia.nix +++ b/modules/hardware/nvidia.nix @@ -91,7 +91,8 @@ in # accessible via `nvidia-settings`. nvidiaSettings = true; # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.beta; + #package = config.boot.kernelPackages.nvidiaPackages.beta; + package = config.boot.kernelPackages.nvidiaPackages.stable; #package = config.boot.kernelPackages.nvidiaPackages.mkDriver { # version = "570.124.04"; # sha256_64bit = "sha256-G3hqS3Ei18QhbFiuQAdoik93jBlsFI2RkWOBXuENU8Q="; @@ -103,7 +104,7 @@ in }; environment.systemPackages = with pkgs; [ - vaapiVdpau + libva-vdpau-driver libvdpau-va-gl libva libva-utils diff --git a/modules/misc/faster-boot-time.nix b/modules/misc/faster-boot-time.nix index bd2aa81..7551ff6 100644 --- a/modules/misc/faster-boot-time.nix +++ b/modules/misc/faster-boot-time.nix @@ -12,7 +12,7 @@ services.NetworkManager-wait-online.wantedBy = lib.mkForce [ ]; # Normally ["network-online.target"] }; # mash spacebar to still be able to select a different boot option - boot.loader.timeout = 1; + boot.loader.timeout = lib.mkDefault 1; virtualisation.docker.enableOnBoot = false; } diff --git a/systems/amd-server/configuration.nix b/systems/amd-server/configuration.nix index 7a6ee50..4c70ec3 100644 --- a/systems/amd-server/configuration.nix +++ b/systems/amd-server/configuration.nix @@ -54,6 +54,7 @@ #sddm.enable = true; #nightlight.enable = true; #i3.enable = true; + firefox-custom.enable = true; xfce.enable = true; #plasma.enable = true; #lxqt.enable = true; diff --git a/systems/laptop/configuration.nix b/systems/laptop/configuration.nix index 4e4caf7..af19713 100644 --- a/systems/laptop/configuration.nix +++ b/systems/laptop/configuration.nix @@ -95,6 +95,7 @@ in enable = true; #android.enable = true; }; + firefox-custom.enable = true; #emulators.enable = true; hyprland.enable = true; games.enable = true; diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index d44febb..fa4ebd0 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -101,6 +101,7 @@ niri.enable = false; #openrgb.enable = true; sddm.enable = true; + firefox-custom.enable = true; #plasma.enable = true; #i3.enable = true; #sway.enable = true; diff --git a/systems/test-pc/configuration.nix b/systems/test-pc/configuration.nix new file mode 100644 index 0000000..53399db --- /dev/null +++ b/systems/test-pc/configuration.nix @@ -0,0 +1,127 @@ +{ + config, + pkgs, + lib, + inputs, + ... +}: +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ../../modules/misc/kernel.nix + ../../modules/misc/faster-boot-time.nix + ../../modules/misc/zram.nix + ../../modules/networkmanager.nix + ]; + + custom = { + tmpfs.enable = true; + nftables.enable = true; + cli-tools.enable = true; + nix = { + useLatest = true; + #index.enable = true; + #ld.enable = true; + settings.enable = true; + }; + static-ip = { + enable = false; + interface = "enp42s0"; + ip = "192.168.0.13"; + dns = "192.168.0.10"; + }; + hardware = { + nvidia = { + enable = true; + }; + ssd.enable = true; + }; + graphical = { + audio.enable = true; + games = { + enable = true; + }; + #sddm.enable = true; + hyprland.enable = true; + shared.enable = true; + stylix = { + enable = true; + base16Scheme = import ../../modules/themes/ina-matugen.nix; + image = ../../wallpaper/ina.jpg; + }; + wayvnc.enable = true; + }; + }; + + programs.firefox.enable = true; + services.xserver.displayManager.lightdm.enable = true; + + #services.logind.settings.Login = { + # HandlePowerKey = "suspend"; + #}; + nix.gc.automatic = lib.mkForce false; + + environment.systemPackages = with pkgs; [ + #inputs.quickshell.packages.x86_64-linux.default + #kdePackages.qtdeclarative + #libimobiledevice + #ifuse # optional, to mount using 'ifuse' + (wl-clicker.overrideAttrs (old: { + # wayland autoclicker + src = pkgs.fetchFromGitHub { + owner = "phonetic112"; + repo = "wl-clicker"; + rev = "f0241c374241d6cf74ba3abffb74a3fdcefa6f88"; + hash = "sha256-QwFT9e2FuczC+ew/lDrDnYYccrrfVJi3Rlrurhwk8ZU="; + }; + })) + ]; + + mainUser.layout = "de"; + mainUser.variant = "us"; + + # Bootloader. + boot.loader = { + efi = { + canTouchEfiVariables = true; + }; + systemd-boot.enable = true; + }; + + networking.hostName = "test-pc"; # Define your hostname. + + # Configure console keymap + console.keyMap = "de"; + + # Enable automatic login for the user. + #services.xserver.displayManager.autoLogin.enable = true; + #services.xserver.displayManager.autoLogin.user = "kopatz"; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + security.pki.certificates = [ + '' + -----BEGIN CERTIFICATE----- + MIIBjTCCATKgAwIBAgIRAMVH2+JHZ3wm2fLUlKjTYDswCgYIKoZIzj0EAwIwJDEM + MAoGA1UEChMDS29wMRQwEgYDVQQDEwtLb3AgUm9vdCBDQTAeFw0yMzEyMDgxNDUx + MTZaFw0zMzEyMDUxNDUxMTZaMCQxDDAKBgNVBAoTA0tvcDEUMBIGA1UEAxMLS29w + IFJvb3QgQ0EwWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAATdZBOkNynShXipzhuX + f6dUByD3chNupNWsagYC5AlPRJT9fAeHEIK/bxWkFwRtLBDopWvBu9lHahBgpHc7 + y7rTo0UwQzAOBgNVHQ8BAf8EBAMCAQYwEgYDVR0TAQH/BAgwBgEB/wIBATAdBgNV + HQ4EFgQU9AVtwipW5HDBLfZRH1KZCnIKCfowCgYIKoZIzj0EAwIDSQAwRgIhAMHj + AipNdhQKIYPvMt/h1uW4xP3NTkitnmshM09+rIasAiEAlSalGddXDkqJBHhPD+Fr + gpuVkfVkA8gQCXNs5F9TnxA= + -----END CERTIFICATE----- + '' + ]; + + # 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 = "25.11"; # Did you read the comment? +} diff --git a/systems/test-pc/hardware-configuration.nix b/systems/test-pc/hardware-configuration.nix new file mode 100644 index 0000000..a9c2474 --- /dev/null +++ b/systems/test-pc/hardware-configuration.nix @@ -0,0 +1,64 @@ +# 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" + "ehci_pci" + "nvme" + "usbhid" + "usb_storage" + "sd_mod" + "sd_mod" + "rtsx_pci_sdmmc" + "uas" + "usbcore" + "ehci_hcd" + "uhci_hcd" + "ohci_hcd" + "scsi_mod" + ]; + boot.initrd.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos-ssd"; + fsType = "ext4"; + options = [ + "defaults" + "noatime" + ]; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-label/nixssd-boot"; + fsType = "vfat"; + }; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + #hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/systems/vm/configuration.nix b/systems/vm/configuration.nix index bdd55a0..329a4b1 100644 --- a/systems/vm/configuration.nix +++ b/systems/vm/configuration.nix @@ -11,17 +11,13 @@ ./vm-common.nix (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/profiles/qemu-guest.nix") + (modulesPath + "/virtualisation/qemu-vm.nix") #(modulesPath + "/profiles/minimal.nix") ]; age.identityPaths = [ /home/kopatz/.ssh/id_rsa ]; mainUser.layout = "de"; mainUser.variant = "us"; custom = { - user = { - name = "vm"; - layout = "de"; - variant = "us"; - }; nix = { settings.enable = true; settings.optimise = false; @@ -31,7 +27,7 @@ #hyprland.enable = true; #lightdm.enable = true; #sddm.enable = true; - plasma.enable = true; + #plasma.enable = true; #cosmic.enable = true; }; }; @@ -44,6 +40,15 @@ # displayManager.defaultSession = "xfce"; #}; + services.xserver.enable = true; + + services.xserver.displayManager.gdm.enable = true; + programs.sway.enable = true; + + virtualisation.qemu.options = [ + "-device virtio-vga" + ]; + programs.firefox.enable = true; virtualisation.vmVariant = {