add testpc

This commit is contained in:
Kopatz
2026-02-08 13:58:30 +01:00
parent f530f81712
commit 03562e8d88
14 changed files with 236 additions and 19 deletions

View File

@@ -174,6 +174,12 @@
./systems/pc/configuration.nix ./systems/pc/configuration.nix
]; ];
}; };
"test-pc" = mkHost {
modules = [
./users/kopatz
./systems/test-pc/configuration.nix
];
};
"framework" = mkHost { "framework" = mkHost {
modules = [ modules = [
### User specific ### ### User specific ###

View File

@@ -1,11 +1,19 @@
{ pkgs, config, ... }:
{ {
services.easyeffects = { pkgs,
enable = true; config,
preset = "mic"; osConfig,
extraPresets = { lib,
mic = builtins.fromJSON (builtins.readFile ./mic.json); ...
other_mic = builtins.fromJSON (builtins.readFile ./other_mic.json); }:
{
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);
};
}; };
}; };
} }

View File

@@ -337,7 +337,7 @@ in
colorTheme.enable = true; colorTheme.enable = true;
}; };
}; };
programs.firefox = { programs.firefox = lib.mkIf osConfig.custom.graphical.firefox-custom.enable {
enable = true; enable = true;
policies = { policies = {
DisableTelemetry = true; DisableTelemetry = true;

View File

@@ -42,7 +42,6 @@ in
logseq # notes logseq # notes
ani-cli ani-cli
brave brave
wayvnc
]; ];
}; };
} }

View File

@@ -36,4 +36,8 @@
./niri.nix ./niri.nix
./wayvnc.nix ./wayvnc.nix
]; ];
options.custom.graphical.firefox-custom = {
enable = lib.mkEnableOption "Enables custom firefox";
};
} }

View File

@@ -22,7 +22,7 @@ in
xkb.variant = config.mainUser.variant; xkb.variant = config.mainUser.variant;
enable = true; enable = true;
}; };
services.displayManager.sddm.enable = !config.services.xserver.displayManager.gdm.enable; #services.displayManager.sddm.enable = !config.services.xserver.displayManager.gdm.enable;
#nix.settings = { #nix.settings = {
# substituters = [ "https://hyprland.cachix.org" ]; # substituters = [ "https://hyprland.cachix.org" ];

View File

@@ -91,7 +91,8 @@ in
# accessible via `nvidia-settings`. # accessible via `nvidia-settings`.
nvidiaSettings = true; nvidiaSettings = true;
# Optionally, you may need to select the appropriate driver version for your specific GPU. # 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 { #package = config.boot.kernelPackages.nvidiaPackages.mkDriver {
# version = "570.124.04"; # version = "570.124.04";
# sha256_64bit = "sha256-G3hqS3Ei18QhbFiuQAdoik93jBlsFI2RkWOBXuENU8Q="; # sha256_64bit = "sha256-G3hqS3Ei18QhbFiuQAdoik93jBlsFI2RkWOBXuENU8Q=";
@@ -103,7 +104,7 @@ in
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vaapiVdpau libva-vdpau-driver
libvdpau-va-gl libvdpau-va-gl
libva libva
libva-utils libva-utils

View File

@@ -12,7 +12,7 @@
services.NetworkManager-wait-online.wantedBy = lib.mkForce [ ]; # Normally ["network-online.target"] services.NetworkManager-wait-online.wantedBy = lib.mkForce [ ]; # Normally ["network-online.target"]
}; };
# mash spacebar to still be able to select a different boot option # 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; virtualisation.docker.enableOnBoot = false;
} }

View File

@@ -54,6 +54,7 @@
#sddm.enable = true; #sddm.enable = true;
#nightlight.enable = true; #nightlight.enable = true;
#i3.enable = true; #i3.enable = true;
firefox-custom.enable = true;
xfce.enable = true; xfce.enable = true;
#plasma.enable = true; #plasma.enable = true;
#lxqt.enable = true; #lxqt.enable = true;

View File

@@ -95,6 +95,7 @@ in
enable = true; enable = true;
#android.enable = true; #android.enable = true;
}; };
firefox-custom.enable = true;
#emulators.enable = true; #emulators.enable = true;
hyprland.enable = true; hyprland.enable = true;
games.enable = true; games.enable = true;

View File

@@ -101,6 +101,7 @@
niri.enable = false; niri.enable = false;
#openrgb.enable = true; #openrgb.enable = true;
sddm.enable = true; sddm.enable = true;
firefox-custom.enable = true;
#plasma.enable = true; #plasma.enable = true;
#i3.enable = true; #i3.enable = true;
#sway.enable = true; #sway.enable = true;

View File

@@ -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. Its 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?
}

View File

@@ -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.<interface>.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;
}

View File

@@ -11,17 +11,13 @@
./vm-common.nix ./vm-common.nix
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
(modulesPath + "/virtualisation/qemu-vm.nix")
#(modulesPath + "/profiles/minimal.nix") #(modulesPath + "/profiles/minimal.nix")
]; ];
age.identityPaths = [ /home/kopatz/.ssh/id_rsa ]; age.identityPaths = [ /home/kopatz/.ssh/id_rsa ];
mainUser.layout = "de"; mainUser.layout = "de";
mainUser.variant = "us"; mainUser.variant = "us";
custom = { custom = {
user = {
name = "vm";
layout = "de";
variant = "us";
};
nix = { nix = {
settings.enable = true; settings.enable = true;
settings.optimise = false; settings.optimise = false;
@@ -31,7 +27,7 @@
#hyprland.enable = true; #hyprland.enable = true;
#lightdm.enable = true; #lightdm.enable = true;
#sddm.enable = true; #sddm.enable = true;
plasma.enable = true; #plasma.enable = true;
#cosmic.enable = true; #cosmic.enable = true;
}; };
}; };
@@ -44,6 +40,15 @@
# displayManager.defaultSession = "xfce"; # 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; programs.firefox.enable = true;
virtualisation.vmVariant = { virtualisation.vmVariant = {