gaming: new machine

also move a lot of dev stuff into dev module from base
This commit is contained in:
2026-04-05 18:26:54 +02:00
parent 1bba5e22ba
commit c91daf270f
5 changed files with 87 additions and 14 deletions

View File

@@ -20,7 +20,7 @@
nixosConfigurations = {
minipc = mkHost "minipc";
laptop = mkHost "laptop";
# gaming = mkHost "gaming";
gaming = mkHost "gaming";
};
};
}

35
hosts/gaming/default.nix Normal file
View File

@@ -0,0 +1,35 @@
{ config, pkgs, inputs, ... }:
{
imports = [
./hardware-configuration.nix
../../modules/base.nix
../../modules/japanese.nix
../../modules/gc.nix
];
networking.hostName = "gaming";
boot.kernelPackages = pkgs.linuxPackages_xanmod_latest;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
environment.systemPackages = with pkgs; [
git
];
}

View 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" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/99951f25-3e8a-4ee2-8f43-a6b543c6edce";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/1957-159C";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/c08e2f60-2839-482c-b6fd-19ed0ac02be9"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -15,7 +15,6 @@
isNormalUser = true;
description = "Fredrik Robertsen";
extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.nushell;
};
nixpkgs.config.allowUnfree = true;
@@ -23,20 +22,9 @@
environment = {
systemPackages = with pkgs; [ vim ripgrep xdg-utils ];
shells = with pkgs; [ nushell bash ];
shells = with pkgs; [ bash ];
};
programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
programs.bash.interactiveShellInit = ''
if [ "$TERM" = "dumb" ]; then exec ${pkgs.bash}; fi
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "nu" && -z ''${BASH_EXECUTION_STRING} ]]; then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.nushell}/bin/nu $LOGIN_OPTION
fi
'';
services.openssh.enable = true;
services.gnome.gnome-keyring.enable = true;
hardware.bluetooth.enable = true;
programs.nix-ld.enable = true;

View File

@@ -35,5 +35,22 @@
];
environment.sessionVariables.EDITOR = "hx";
environment.shells = with pkgs; [ nushell bash ];
users.users.fredrikr.shell = pkgs.nushell;
programs.bash.interactiveShellInit = ''
if [ "$TERM" = "dumb" ]; then exec ${pkgs.bash}; fi
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "nu" && -z ''${BASH_EXECUTION_STRING} ]]; then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.nushell}/bin/nu $LOGIN_OPTION
fi
'';
programs.gnupg.agent = { enable = true; enableSSHSupport = true; };
services.openssh.enable = true;
services.gnome.gnome-keyring.enable = true;
}