summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-03-12 04:16:58 +0200
committertzlil <tzlils@protonmail.com>2023-03-12 04:16:58 +0200
commit7fb4f90f20d2f006d7fd07ad6262172def4cb59d (patch)
tree28ff867efc9f6c7b1f5b6b348e87efaa065dbdc9 /hosts
parent66df4133e0eea81c6fb28b1eb18b2803310c44d8 (diff)
add laptop config
Diffstat (limited to 'hosts')
-rw-r--r--hosts/laptop/cfg.nix83
1 files changed, 83 insertions, 0 deletions
diff --git a/hosts/laptop/cfg.nix b/hosts/laptop/cfg.nix
new file mode 100644
index 0000000..57fffb8
--- /dev/null
+++ b/hosts/laptop/cfg.nix
@@ -0,0 +1,83 @@
+{
+  config,
+  lib,
+  pkgs,
+  ...
+}: {
+  imports = [
+    ../../profiles/core.nix
+    ../../profiles/user.nix
+    ../../profiles/ssh.nix
+    ../../profiles/graphical.nix
+    ../../mixins/tailscale.nix
+    ../../mixins/cli.nix
+    ../../mixins/greet.nix
+    ../../mixins/sway.nix
+  ];
+
+  config = {
+    _module.args.nixinate = {
+      host = "192.168.1.32";
+      sshUser = "tzlil";
+      buildOn = "remote"; # valid args are "local" or "remote"
+      substituteOnTarget = true; # if buildOn is "local" then it will substitute on the target, "-s"
+      hermetic = false;
+    };
+    networking.hostName = "navi";
+
+    boot = {
+      initrd = {
+        supportedFilesystems = ["btrfs"];
+        availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod"];
+      };
+      kernelModules = ["kvm-intel"];
+      kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
+      kernelParams = [
+        "console=ttyS0"
+        "init_on_free=1"
+        "page_poison=1"
+        "page_alloc.shuffle=1"
+        "slab_nomerge"
+        "vsyscall=none"
+      ];
+      cleanTmpDir = true;
+      loader = {
+        systemd-boot = {
+          enable = true;
+        };
+        efi = {
+          canTouchEfiVariables = true;
+          efiSysMountPoint = "/boot";
+        };
+      };
+    };
+
+    time.timeZone = lib.mkDefault "Israel";
+
+    fileSystems."/" = {
+      device = "none";
+      fsType = "tmpfs";
+    };
+
+    fileSystems."/boot" = {
+      device = "/dev/disk/by-uuid/34CB-F158";
+      fsType = "vfat";
+    };
+
+    fileSystems."/nix" = {
+      device = "/dev/disk/by-uuid/8a8cc550-034e-4545-a958-564779f51061";
+      fsType = "btrfs";
+    };
+
+    zramSwap = {
+      enable = true;
+      algorithm = "zstd";
+    };
+
+    networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
+
+    nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+    powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
+    hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+  };
+}