Add swap file and minor cleanup

This commit is contained in:
coolneng 2020-05-08 20:55:53 +02:00
parent 41562a4c5d
commit 4f9079395d
Signed by: coolneng
GPG Key ID: 9893DA236405AF57
3 changed files with 9 additions and 12 deletions

View File

@ -4,6 +4,7 @@
# Kernel configuration # Kernel configuration
boot = { boot = {
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
# TODO Add resume_offset
kernelParams = [ "zfs.zfs_arc_max=536870912" ]; kernelParams = [ "zfs.zfs_arc_max=536870912" ];
kernelModules = [ "i915" "acpi_call" ]; kernelModules = [ "i915" "acpi_call" ];
extraModulePackages = with config.boot.kernelPackages; [ acpi_call ]; extraModulePackages = with config.boot.kernelPackages; [ acpi_call ];
@ -64,6 +65,10 @@
# Enable the TLP daemon # Enable the TLP daemon
services.tlp.enable = true; services.tlp.enable = true;
# Add a swap file and resume from it
swapDevices = [ { device = "/swap"; size = 8192; } ];
boot.resumeDevice = "/swap";
# Import other configuration modules # Import other configuration modules
imports = [ imports = [
./modules/software.nix ./modules/software.nix

View File

@ -9,18 +9,16 @@
# Set hostname and hostid # Set hostname and hostid
networking = { networking = {
hostName = "panacea"; hostName = "panacea";
hostId = ""; hostId = "a434d9ed230d";
wireless = {
enable = true;
}
}; };
# Enable zeroconf # Enable zeroconf
services.avahi = { services.avahi = {
enable = true; enable = true;
nssmdns = true; nssmdns = true;
publish = {
enable = true;
userServices = true;
};
reflector = true;
}; };
# Wireguard setup # Wireguard setup

View File

@ -2,14 +2,8 @@
{ {
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# Development
git direnv lorri
# Monitoring # Monitoring
htop htop
# Text editors
neovim emacs
# Terminals
kitty tmux tmuxp
# Password management # Password management
pass-wayland passff-host gitAndTools.pass-git-helper pass-wayland passff-host gitAndTools.pass-git-helper
# Browsers # Browsers