furthre config on laptop
This commit is contained in:
Executable
+71
@@ -0,0 +1,71 @@
|
||||
{ config, pkgs, lib, home-manager, ... }:
|
||||
|
||||
let
|
||||
thermald-conf = ./thermald-conf.xml;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../../system/modules/sway.nix
|
||||
../../system/modules/dev.nix
|
||||
../../system/modules/docker.nix
|
||||
../../system/modules/bluetooth.nix
|
||||
../../system/modules/desktop_tools.nix
|
||||
../../system/modules/laptop.nix
|
||||
../../system/modules/keyd.nix
|
||||
../../system/modules/suspend_then_hibernate_on_battery.nix
|
||||
|
||||
../../system/pc/audio/pipewire.nix
|
||||
|
||||
./hardware-configuration.nix
|
||||
../../hardware/xps-9500/nvidia
|
||||
|
||||
# home manager integration
|
||||
home-manager.nixosModules.home-manager
|
||||
./user.nix
|
||||
];
|
||||
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
# bootloader
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
|
||||
# hibernation setup
|
||||
boot.resumeDevice = "/dev/disk/by-uuid/55f855b8-ffa8-4369-be7d-fcc13b40c074";
|
||||
#services.power-profiles-daemon.enable = true;
|
||||
# Suspend first then hibernate when closing the lid
|
||||
services.logind.lidSwitch = "suspend-then-hibernate";
|
||||
# Hibernate on power button pressed
|
||||
services.logind.powerKey = "hibernate";
|
||||
services.logind.powerKeyLongPress = "poweroff";
|
||||
|
||||
# Suspend first
|
||||
boot.kernelParams = [ "resume" "mem_sleep_default=s2idle" ];
|
||||
|
||||
# Define time delay for hibernation
|
||||
systemd.sleep.extraConfig = ''
|
||||
HibernateDelaySec=30m
|
||||
SuspendState=mem
|
||||
'';
|
||||
|
||||
# networking and connection
|
||||
networking.hostName = "alex-laptop";
|
||||
|
||||
hardware.bluetooth.powerOnBoot = false;
|
||||
|
||||
# time and localization
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# users
|
||||
programs.fish.enable = true;
|
||||
users.users.alex = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "video" "network" "audio" "networkmanager" ];
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "uas" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ "cryptd" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/cryptroot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/95e9780b-b902-4da8-bff1-451e0d5e3240";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/E88C-AD28";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/55f855b8-ffa8-4369-be7d-fcc13b40c074"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp57s0u2.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
Executable
+20
@@ -0,0 +1,20 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager.users.alex= {
|
||||
imports = [
|
||||
../../user/modules/common.nix
|
||||
../../user/modules/sway.nix
|
||||
../../user/modules/rofi.nix
|
||||
../../user/modules/waybar.nix
|
||||
../../user/modules/terminal.nix
|
||||
../../user/modules/ranger.nix
|
||||
../../user/modules/fish.nix
|
||||
../../user/modules/alacritty.nix
|
||||
../../user/modules/zellij.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
neovim
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user