Fix Sif drivers + hyprland

This commit is contained in:
Filippo Berto 2024-11-21 20:04:49 +01:00
parent 98a12318de
commit 43a1ed665a
5 changed files with 43 additions and 19 deletions

View file

@ -282,6 +282,7 @@
modules = commonModules ++ [ modules = commonModules ++ [
./instances/sif/hardware-configuration.nix ./instances/sif/hardware-configuration.nix
inputs.nixos-hardware.nixosModules.common-cpu-intel inputs.nixos-hardware.nixosModules.common-cpu-intel
inputs.nixos-hardware.nixosModules.common-cpu-intel
inputs.nixos-hardware.nixosModules.common-pc-ssd inputs.nixos-hardware.nixosModules.common-pc-ssd
./instances/sif/configuration.nix ./instances/sif/configuration.nix

View file

@ -5,19 +5,22 @@
}: }:
{ {
age.secrets = { age.secrets = {
ntfy-sif = { # ntfy-sif = {
file = ../../secrets/ntfy-odin.age; # file = ../../secrets/ntfy-odin.age;
owner = "bertof"; # owner = "bertof";
}; # };
sif.file = ../../secrets/odin_wg_priv.age; # sif.file = ../../secrets/odin_wg_priv.age;
}; };
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot = { boot = {
# kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
# kernelPackages = pkgs.linuxPackages_6_7_hardened; # kernelPackages = pkgs.linuxPackages_6_7_hardened;
# kernelPackages = pkgs.linuxPackages_6_8; # kernelPackages = pkgs.linuxPackages_6_8;
kernelParams = [ "acpi_osi=Linux-Dell-Video" ]; kernelParams = [ ];
initrd.kernelModules = [ "i915" ];
initrd.checkJournalingFS = true; # Use same ACPI identifier as Dell Ubuntu initrd.checkJournalingFS = true; # Use same ACPI identifier as Dell Ubuntu
loader = { loader = {
systemd-boot = { systemd-boot = {
@ -36,9 +39,13 @@
}; };
hardware = { hardware = {
enableRedistributableFirmware = true;
graphics.enable = true; graphics = {
enable = true;
extraPackages = with pkgs; [ vpl-gpu-rt ];
};
enableRedistributableFirmware = true;
pulseaudio.enable = false; pulseaudio.enable = false;
@ -109,6 +116,7 @@
enable = true; enable = true;
# Enable the GNOME 3 Desktop Environment. # Enable the GNOME 3 Desktop Environment.
desktopManager.gnome.enable = true; desktopManager.gnome.enable = true;
videoDrivers = [ "intel" ];
# desktopManager.plasma5 = { # desktopManager.plasma5 = {
# enable = true; # enable = true;
# runUsingSystemd = true; # runUsingSystemd = true;
@ -116,7 +124,7 @@
# windowManager.bspwm.enable = true; # windowManager.bspwm.enable = true;
xkb = { xkb = {
layout = "it,us"; layout = "us,it";
options = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle"; options = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle";
}; };

View file

@ -1,7 +1,11 @@
# 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, ... }: { config
, lib
, modulesPath
, ...
}:
{ {
imports = [ imports = [
@ -9,7 +13,13 @@
]; ];
boot = { boot = {
initrd = { initrd = {
availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; availableKernelModules = [
"xhci_pci"
"thunderbolt"
"nvme"
"usb_storage"
"sd_mod"
];
kernelModules = [ ]; kernelModules = [ ];
}; };
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
@ -17,24 +27,27 @@
}; };
fileSystems = { fileSystems = {
"/" = { "/" = {
device = "/dev/disk/by-uuid/6a17608f-cf0e-4fb4-ae73-c38569fc0577"; device = "/dev/disk/by-uuid/80a5d8d9-c083-43cf-b7f9-8afdbc26628e";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@root" ]; options = [ "subvol=@root" ];
}; };
"/nix" = { "/nix" = {
device = "/dev/disk/by-uuid/6a17608f-cf0e-4fb4-ae73-c38569fc0577"; device = "/dev/disk/by-uuid/80a5d8d9-c083-43cf-b7f9-8afdbc26628e";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@nix" ]; options = [ "subvol=@nix" ];
}; };
"/home" = { "/home" = {
device = "/dev/disk/by-uuid/6a17608f-cf0e-4fb4-ae73-c38569fc0577"; device = "/dev/disk/by-uuid/80a5d8d9-c083-43cf-b7f9-8afdbc26628e";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@home" ]; options = [ "subvol=@home" ];
}; };
"/boot" = { "/boot" = {
device = "/dev/disk/by-uuid/5BD2-463F"; device = "/dev/disk/by-uuid/5BD2-463F";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [
"fmask=0022"
"dmask=0022"
];
}; };
}; };

View file

@ -54,7 +54,8 @@
# transmission_4 # transmission_4
# wireguard-tools # wireguard-tools
xournalpp xournalpp
proton-pass; proton-pass
;
}; };
}; };

View file

@ -52,7 +52,7 @@ in
enable = true; enable = true;
settings = { settings = {
input = { input = {
kb_layout = if nixosConfig.networking.hostName == "thor" then "us,it,us" else "it,us,us"; kb_layout = if (nixosConfig.networking.hostName == "thor") or (nixosConfig.networking.hostName == "sif") then "us,it,us" else "it,us,us";
kb_options = "grp:menu_toggle,compose:rctrl"; kb_options = "grp:menu_toggle,compose:rctrl";
kb_variant = ",,colemak"; kb_variant = ",,colemak";
kb_model = ""; kb_model = "";
@ -62,8 +62,9 @@ in
touchpad.natural_scroll = true; touchpad.natural_scroll = true;
}; };
exec = lib.lists.optionals (nixosConfig.networking.hostName == "thor") [ exec = (lib.lists.optionals (nixosConfig.networking.hostName == "thor") [
"xrandr --output DP-3 --primary" "xrandr --output DP-3 --primary"
]) ++ [
"noti -t 'Hyprland' -m 'New config loaded\!'" "noti -t 'Hyprland' -m 'New config loaded\!'"
]; ];
exec-once = [ exec-once = [