(laptop) Gen 13: Laptop config test and confirmed to build
This commit is contained in:
@@ -4,15 +4,42 @@
|
|||||||
imports = [
|
imports = [
|
||||||
./../../modules/sys
|
./../../modules/sys
|
||||||
./hardware.nix
|
./hardware.nix
|
||||||
(import ./nixswitch.nix { self = self; pkgs = pkgs; })
|
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
system.stateVersion = "24.05";
|
||||||
acpi
|
nixpkgs.config.allowUnfree = true;
|
||||||
brightnessctl
|
nix = {
|
||||||
cpupower-gui
|
settings = {
|
||||||
powertop
|
auto-optimise-store = true;
|
||||||
];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
substituters = [ "https://nix-gaming.cachix.org" ];
|
||||||
|
};
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
variables = {
|
||||||
|
XCURSOR_SIZE = "24";
|
||||||
|
PATH = "${pkgs.clang-tools}/bin:$PATH";
|
||||||
|
};
|
||||||
|
shells = with pkgs; [
|
||||||
|
zsh
|
||||||
|
bash
|
||||||
|
];
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
acpi
|
||||||
|
brightnessctl
|
||||||
|
cpupower-gui
|
||||||
|
powertop
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "America/New_York";
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
power-profiles-daemon.enable = true;
|
power-profiles-daemon.enable = true;
|
||||||
|
|||||||
@@ -1,55 +1,39 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, modulesPath, username, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports =
|
||||||
|
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "uas" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/a687e4e2-8665-43f1-9d62-3e3f21423579";
|
{ device = "/dev/disk/by-uuid/334f742b-460f-43f8-b819-33086adfa9fb";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/6EAD-2C48";
|
{ device = "/dev/disk/by-uuid/ECD9-F43B";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
swapDevices = [ ];
|
||||||
{ device = "/dev/nvme0n1p5";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/home/${username}/steamlib" =
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
{ device = "/dev/nvme0n1p1";
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
fsType = "ext4";
|
# 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.enp0s25.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
swapDevices = [ ];
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
# 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.enp14s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware = {
|
|
||||||
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
keyboard.uhk.enable = true;
|
|
||||||
amdgpu.amdvlk.enable = true;
|
|
||||||
bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
{ self, pkgs }:
|
|
||||||
|
|
||||||
|
|
||||||
pkgs.writeShellScriptBin "nixswitch" (''
|
|
||||||
#!/run/current-system/sw/bin/bash
|
|
||||||
|
|
||||||
scheck && runbg aplay ${self}/media/sound/nixswitch-start.wav
|
|
||||||
builtin cd "$HOME/sysflakes" || exit
|
|
||||||
|
|
||||||
nix flake update
|
|
||||||
sudo nixos-rebuild switch --flake "$HOME/sysflakes#glasshouse-desktop"
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
scheck && runbg aplay ${self}/media/sound/update.wav
|
|
||||||
else
|
|
||||||
scheck && runbg aplay ${self}/media/sound/error.wav
|
|
||||||
fi
|
|
||||||
builtin cd "$OLDPWD" || exit
|
|
||||||
'')
|
|
||||||
Reference in New Issue
Block a user