2022-05-09 17:12:37 +02:00
|
|
|
# zamalek is my Huawei MateBook X (unknown year)
|
|
|
|
{ depot, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
config:
|
|
|
|
let
|
2022-05-26 14:50:41 +02:00
|
|
|
mod = name: depot.path.origSrc + ("/ops/modules/" + name);
|
|
|
|
usermod = name: depot.path.origSrc + ("/users/tazjin/nixos/modules/" + name);
|
2022-05-09 17:12:37 +02:00
|
|
|
|
|
|
|
zdevice = device: {
|
|
|
|
inherit device;
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
(usermod "desktop.nix")
|
|
|
|
(usermod "fonts.nix")
|
2022-05-10 00:17:26 +02:00
|
|
|
(usermod "hidpi.nix")
|
2022-05-09 17:12:37 +02:00
|
|
|
(usermod "home-config.nix")
|
|
|
|
(usermod "laptop.nix")
|
|
|
|
(usermod "persistence.nix")
|
|
|
|
(usermod "physical.nix")
|
|
|
|
|
|
|
|
(pkgs.home-manager.src + "/nixos")
|
2022-05-12 09:30:05 +02:00
|
|
|
] ++ lib.optional (builtins.pathExists ./local-config.nix) ./local-config.nix;
|
2022-05-09 17:12:37 +02:00
|
|
|
|
|
|
|
tvl.cache.enable = true;
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
initrd.availableKernelModules = [ "nvme" "xhci_pci" ];
|
|
|
|
loader.systemd-boot.enable = true;
|
|
|
|
loader.efi.canTouchEfiVariables = true;
|
|
|
|
supportedFilesystems = [ "zfs" ];
|
|
|
|
zfs.devNodes = "/dev/";
|
2022-05-10 16:17:39 +02:00
|
|
|
|
|
|
|
extraModprobeConfig = ''
|
|
|
|
options snd_hda_intel power_save=1
|
|
|
|
options iwlwifi power_save=1
|
|
|
|
options iwldvm force_cam=0
|
|
|
|
options i915 enable_guc=3 enable_fbc=1
|
|
|
|
'';
|
2022-05-09 17:12:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = zdevice "zpool/ephemeral/root";
|
|
|
|
"/home" = zdevice "zpool/ephemeral/home";
|
|
|
|
"/persist" = zdevice "zpool/persistent/data" // { neededForBoot = true; };
|
|
|
|
"/nix" = zdevice "zpool/persistent/nix";
|
|
|
|
"/depot" = zdevice "zpool/persistent/depot";
|
|
|
|
|
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-uuid/2487-3908";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
hostName = "zamalek";
|
|
|
|
domain = "tvl.su";
|
|
|
|
hostId = "ee399356";
|
|
|
|
networkmanager.enable = true;
|
|
|
|
|
2022-10-30 22:06:04 +01:00
|
|
|
extraHosts = ''
|
|
|
|
10.101.240.1 wifi.silja.fi
|
|
|
|
'';
|
|
|
|
|
2022-05-09 17:12:37 +02:00
|
|
|
nameservers = [
|
|
|
|
"8.8.8.8"
|
|
|
|
"8.8.4.4"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware = {
|
|
|
|
cpu.intel.updateMicrocode = true;
|
|
|
|
bluetooth.enable = true;
|
|
|
|
enableRedistributableFirmware = true;
|
|
|
|
opengl.enable = true;
|
|
|
|
};
|
|
|
|
|
2022-05-10 16:48:14 +02:00
|
|
|
services.xserver.libinput.touchpad.clickMethod = "clickfinger";
|
2022-11-27 13:25:08 +01:00
|
|
|
services.xserver.libinput.touchpad.tapping = false;
|
2022-07-14 15:34:52 +02:00
|
|
|
services.avahi.enable = true;
|
2022-07-14 17:23:22 +02:00
|
|
|
powerManagement.powertop.enable = true;
|
2022-05-10 16:48:14 +02:00
|
|
|
|
2022-05-09 17:12:37 +02:00
|
|
|
system.stateVersion = "21.11";
|
|
|
|
}
|