nixos-configuration/squirrelflight/default.nix

64 lines
2.2 KiB
Nix
Raw Normal View History

2024-02-19 17:02:55 +00:00
# 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).
2024-03-23 15:29:24 +00:00
{ pkgs, ... }:
2024-02-19 17:02:55 +00:00
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
2024-07-06 19:01:48 +00:00
./wireguard.nix
2024-02-19 17:02:55 +00:00
];
2024-03-23 15:29:24 +00:00
hardware.keyboard.qmk.enable = true;
2024-02-19 17:02:55 +00:00
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.luks.devices."luks-f2fdbf84-2c4b-47d5-b663-dec3abb173c9".device = "/dev/disk/by-uuid/f2fdbf84-2c4b-47d5-b663-dec3abb173c9";
boot.kernelParams = [ "mem_sleep_default=s2idle" ];
systemd.sleep.extraConfig = ''
HibernateDelaySec=30m
SuspendState=mem
'';
# Don't sleep if charging or docked
services.logind.lidSwitchDocked = "ignore";
services.logind.lidSwitchExternalPower = "ignore";
# suspend-then-hibernate if lid closed on battery or power button pressed
services.logind.lidSwitch = "suspend-then-hibernate";
services.logind.extraConfig = ''
HandleSuspendKey=suspend-then-hibernate
'';
2024-03-01 17:43:45 +00:00
services.xserver.videoDrivers = ["amdgpu"];
2024-02-19 17:02:55 +00:00
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
networking.hostName = "squirrelflight"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}