feat: Enable proper suspend support for Dell laptops
This commit is contained in:
15
boot.nix
15
boot.nix
@@ -2,7 +2,7 @@
|
|||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -15,13 +15,7 @@
|
|||||||
# Enable "Silent boot"
|
# Enable "Silent boot"
|
||||||
consoleLogLevel = 3;
|
consoleLogLevel = 3;
|
||||||
initrd.verbose = false;
|
initrd.verbose = false;
|
||||||
kernelParams = [
|
|
||||||
"quiet"
|
|
||||||
"splash"
|
|
||||||
"boot.shell_on_fail"
|
|
||||||
"udev.log_priority=3"
|
|
||||||
"rd.systemd.show_status=auto"
|
|
||||||
];
|
|
||||||
# Hide the OS choice for bootloaders.
|
# Hide the OS choice for bootloaders.
|
||||||
# It's still possible to open the bootloader list by pressing any key
|
# It's still possible to open the bootloader list by pressing any key
|
||||||
# It will just not appear on screen unless a key is pressed
|
# It will just not appear on screen unless a key is pressed
|
||||||
@@ -46,5 +40,10 @@
|
|||||||
LC_TIME = "en_US.UTF-8";
|
LC_TIME = "en_US.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systemd.sleep.extraConfig = ''
|
||||||
|
SuspendState=freeze
|
||||||
|
HibernateDelaySec=2h
|
||||||
|
'';
|
||||||
|
|
||||||
system.stateVersion = "25.11"; # Did you read the comment?
|
system.stateVersion = "25.11"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
# /etc/nixos/flake.nix
|
|
||||||
{
|
{
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
@@ -6,17 +5,13 @@
|
|||||||
url = "github:nix-community/home-manager/release-25.11";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
nixos-generators = {
|
|
||||||
url = "github:nix-community/nixos-generators";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
disko = {
|
disko = {
|
||||||
url = "github:nix-community/disko";
|
url = "github:nix-community/disko";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
lazyvim-nixvim.url = "github:azuwis/lazyvim-nixvim";
|
lazyvim-nixvim.url = "github:azuwis/lazyvim-nixvim";
|
||||||
};
|
};
|
||||||
outputs = inputs@{ self, nixpkgs, home-manager, disko, nixos-generators, lazyvim-nixvim, ... }: {
|
outputs = inputs@{ self, nixpkgs, home-manager, disko, lazyvim-nixvim, ... }: {
|
||||||
nixosConfigurations = import ./hosts { inherit inputs; };
|
nixosConfigurations = import ./hosts { inherit inputs; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
@@ -9,6 +9,16 @@
|
|||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
boot.kernelParams = [
|
||||||
|
"quiet"
|
||||||
|
"splash"
|
||||||
|
"boot.shell_on_fail"
|
||||||
|
"udev.log_priority=3"
|
||||||
|
"rd.systemd.show_status=auto"
|
||||||
|
"i915.enable_psr=0"
|
||||||
|
"i915.enable_dc=0"
|
||||||
|
"i915.enable_fbc=0"
|
||||||
|
];
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|||||||
6
net.nix
6
net.nix
@@ -1,8 +1,4 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
{ ... }:
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
# Enable networking
|
# Enable networking
|
||||||
|
|||||||
6
sw.nix
6
sw.nix
@@ -1,8 +1,4 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
{ pkgs, inputs, ... }:
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{ config, pkgs, inputs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
# Enable the KDE Plasma Desktop Environment.
|
# Enable the KDE Plasma Desktop Environment.
|
||||||
|
|||||||
@@ -1,8 +1,4 @@
|
|||||||
# Edit this configuration file to define what should be installed on
|
{ pkgs, ... }:
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
# Fetch upstream OMP theme once
|
# Fetch upstream OMP theme once
|
||||||
jyumppTheme = pkgs.fetchurl {
|
jyumppTheme = pkgs.fetchurl {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
# Fetch upstream OMP theme once
|
# Fetch upstream OMP theme once
|
||||||
jyumppTheme = pkgs.fetchurl {
|
jyumppTheme = pkgs.fetchurl {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Fetch upstream OMP theme once
|
# Fetch upstream OMP theme once
|
||||||
|
|||||||
Reference in New Issue
Block a user