Prechádzať zdrojové kódy

various laptop stuff, hibernation, battery, ..

Johan Rong 2 mesiacov pred
rodič
commit
99583ea526

+ 4 - 0
hosts/dellaptop/configuration.nix

@@ -18,6 +18,10 @@ in
     ../../nixos/features/system/gaming.nix
   ];
 
+  boot.kernelParams = [
+    "resume=UUID=b0e53493-71b7-4adc-bc9a-37c16ed9672b"
+  ];
+
   nixpkgs.config.allowUnfree = true;
   hardware.enableAllFirmware = true;
 

+ 12 - 3
nixos/flavors/desktop/hyprland/default.nix

@@ -38,14 +38,23 @@
     ELECTRON_OZONE_PLATFORM_HINT = "wayland";
   };
 
+  services.dbus.enable = true;
   xdg.portal = {
     enable = true;
-
-    wlr.enable = true;
-
     extraPortals = with pkgs; [
+      xdg-desktop-portal-gtk
       xdg-desktop-portal-wlr
     ];
+
+    wlr.enable = true;
+
+    config = {
+      common = {
+        # Use hyprland portal for screen sharing (screencast)
+        "org.freedesktop.impl.portal.Screencast" = "hyprland";
+        "org.freedesktop.impl.portal.Screenshot" = "hyprland";
+      };
+    };
   };
 
   environment.sessionVariables = {

+ 2 - 2
nixos/hardware/gpu/nvidia.nix

@@ -15,8 +15,8 @@
     open = false;
 
     powerManagement = {
-      enable = false;
-      finegrained = false;
+      enable = true;
+      finegrained = true;
     };
 
     modesetting = {

+ 5 - 0
nixos/hardware/networking/default.nix

@@ -2,4 +2,9 @@
 {
   networking.networkmanager.enable = true;
   networking.firewall.checkReversePath = false;
+
+  # chromecast
+  networking.firewall.allowedUDPPortRanges = [ 
+    { from = 32768; to = 60999; } 
+  ];
 }