New config for new laptop

This commit is contained in:
Thomas Avé 2024-10-28 20:00:55 +01:00
parent f4920c269a
commit bd0ba374e7
6 changed files with 37 additions and 33 deletions

View File

@ -31,7 +31,8 @@
# wayland.windowManager.hyprland.settings.env = ["WLR_DRM_DEVICES,/dev/dri/by-path/pci-0000:00:02.0-card"]; # Intel # wayland.windowManager.hyprland.settings.env = ["WLR_DRM_DEVICES,/dev/dri/by-path/pci-0000:00:02.0-card"]; # Intel
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
exec-once = [ exec-once = [
"${pkgs.swaylock-fancy}/bin/swaylock-fancy" # "${pkgs.swaylock-fancy}/bin/swaylock-fancy"
"${pkgs.alsa-utils}/bin/alsactl init"
]; ];
monitor = [ monitor = [
"eDP-1,1920x1080@144,0x0,1" "eDP-1,1920x1080@144,0x0,1"

View File

@ -4,7 +4,6 @@ let
in { in {
imports = [ imports = [
(import ../Common/default.nix { inherit inputs pkgs config; }) (import ../Common/default.nix { inherit inputs pkgs config; })
(import ../Common/nvidia.nix { inherit inputs pkgs config; })
(import ../Common/desktop.nix { inherit inputs pkgs config; }) (import ../Common/desktop.nix { inherit inputs pkgs config; })
(import ../Common/nfs.nix { inherit pkgs serverIP; }) (import ../Common/nfs.nix { inherit pkgs serverIP; })
]; ];
@ -21,8 +20,7 @@ in {
boot.initrd.supportedFilesystems = [ "zfs" ]; boot.initrd.supportedFilesystems = [ "zfs" ];
boot.supportedFilesystems = [ "zfs" ]; boot.supportedFilesystems = [ "zfs" ];
services.zfs.autoScrub.enable = true; services.zfs.autoScrub.enable = true;
networking.hostname = "Aloria"; networking.hostId = "4e859062";
networking.hostid = "4e859062";
networking.interfaces.wlan0.useDHCP = lib.mkDefault false; networking.interfaces.wlan0.useDHCP = lib.mkDefault false;
networking.wireless.iwd.enable = true; networking.wireless.iwd.enable = true;
networking.wireless.iwd.settings = { networking.wireless.iwd.settings = {

View File

@ -4,38 +4,40 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports =
[ [ (modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/installer/scan/not-detected.nix") ];
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ { device = "rpool/root";
device = "/dev/disk/by-uuid/e34f26e4-2f68-4f9c-ab7d-836b4f4b9f74"; fsType = "zfs";
fsType = "ext4"; };
};
fileSystems."/boot" = fileSystems."/home" =
{ { device = "rpool/home";
device = "/dev/disk/by-uuid/90D9-F457"; fsType = "zfs";
fsType = "vfat"; };
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ]; fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/0A4D-063E";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking swapDevices = [ ];
# (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.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; # (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.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View File

@ -12,7 +12,6 @@
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
systemd.extraConfig = "DefaultTimeoutStopSec=10s"; systemd.extraConfig = "DefaultTimeoutStopSec=10s";
systemd.services.systemd-user-sessions.enable = false; systemd.services.systemd-user-sessions.enable = false;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.tmp.cleanOnBoot = true; boot.tmp.cleanOnBoot = true;
powerManagement.enable = true; powerManagement.enable = true;

View File

@ -8,6 +8,9 @@ in {
(import ../Common/nfs.nix { inherit pkgs serverIP; }) (import ../Common/nfs.nix { inherit pkgs serverIP; })
]; ];
# Kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
# AMD CPU # AMD CPU
boot.blacklistedKernelModules = [ "k10temp" ]; boot.blacklistedKernelModules = [ "k10temp" ];
boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ]; boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ];

View File

@ -8,6 +8,7 @@ in {
(import ../Common/nfs.nix { inherit pkgs serverIP; }) (import ../Common/nfs.nix { inherit pkgs serverIP; })
]; ];
boot.kernelPackages = pkgs.linuxPackages_latest;
services.ollama = { services.ollama = {
enable = true; enable = true;
}; };