desktop-2024-08-30-13-22-30
This commit is contained in:
39
machine/desktop-hardware-configuration.nix
Normal file
39
machine/desktop-hardware-configuration.nix
Normal file
@ -0,0 +1,39 @@
|
||||
# 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 = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/d43faf8e-ec90-4735-a1a4-aff6897604b2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-ba8eb308-e85f-4cee-9993-88c5ba0966ea".device = "/dev/disk/by-uuid/ba8eb308-e85f-4cee-9993-88c5ba0966ea";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/1838-7DA8";
|
||||
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.enp8s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
@ -1,18 +1,41 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{ config, pkgs, inputs, outputs, ... }:
|
||||
let
|
||||
secrets = import ../configs/secrets.nix;
|
||||
be = import ../configs/borg-exclude.nix;
|
||||
wireguard = import ../configs/wireguard.nix;
|
||||
unstable = import <nixos-unstable> { config.allowUnfree = true; };
|
||||
in
|
||||
{
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
<nixos-hardware/common/cpu/amd/default.nix>
|
||||
<nixos-hardware/common/cpu/amd/pstate.nix>
|
||||
<nixos-hardware/common/cpu/amd/zenpower.nix>
|
||||
<nixos-hardware/common/pc/ssd>
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
./desktop-hardware-configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd-pstate
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd-zenpower
|
||||
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
||||
../configs/browser.nix
|
||||
../configs/common.nix
|
||||
../configs/docker.nix
|
||||
@ -23,16 +46,8 @@ in
|
||||
../configs/user.nix
|
||||
];
|
||||
|
||||
# nixpkgs.localSystem = {
|
||||
# gcc.arch = "znver2";
|
||||
# gcc.tune = "znver2";
|
||||
# system = "x86_64-linux";
|
||||
# };
|
||||
|
||||
nix.settings.system-features = [ "nixos-test" "benchmark" "big-parallel" "kvm" "gccarch-znver2" ];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
boot = {
|
||||
initrd.systemd.enable = true;
|
||||
loader = {
|
||||
@ -50,7 +65,7 @@ in
|
||||
description = "AMDGPU Control Daemon";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
after = [ "multi-user.target" ];
|
||||
serviceConfig = { ExecStart = "${unstable.pkgs.lact}/bin/lact daemon"; };
|
||||
serviceConfig = { ExecStart = "${pkgs.unstable.lact}/bin/lact daemon"; };
|
||||
};
|
||||
};
|
||||
|
||||
@ -79,7 +94,7 @@ in
|
||||
keyMap = "us";
|
||||
};
|
||||
|
||||
environment.systemPackages = with unstable.pkgs; [
|
||||
environment.systemPackages = with pkgs.unstable; [
|
||||
lact
|
||||
amdgpu_top
|
||||
|
||||
|
Reference in New Issue
Block a user