summary refs log tree commit diff
path: root/hosts/pc
diff options
context:
space:
mode:
authortzlil <tzlils@protonmail.com>2023-02-09 14:03:19 +0200
committertzlil <tzlils@protonmail.com>2023-02-09 14:03:19 +0200
commit566dc1e8f6e619f590f017a810a8a55d9a90a25c (patch)
tree29ac3794c6b5e1ca07c8a7587c6fb14fb1ddcdb2 /hosts/pc
parentb3b78ca3c15bff46eb913e7f0cfebdac71557eea (diff)
add website (caddy) config, add mpd, add pc config, remove 9p mount from run.sh, improve greet mixin
Diffstat (limited to 'hosts/pc')
-rw-r--r--hosts/pc/cfg.nix93
1 files changed, 93 insertions, 0 deletions
diff --git a/hosts/pc/cfg.nix b/hosts/pc/cfg.nix
new file mode 100644
index 0000000..10267b5
--- /dev/null
+++ b/hosts/pc/cfg.nix
@@ -0,0 +1,93 @@
+{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/hyprland.nix
+    ../../mixins/sway.nix
+  ];
+
+  config = {
+    _module.args.nixinate = {
+      host = "pc";
+      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 = "pc";
+
+    
+    boot = {
+      initrd = {
+        supportedFilesystems = ["btrfs"];
+        availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" ];
+      };
+      kernelModules = [ "kvm-amd" ];
+      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 = "/dev/disk/by-uuid/3fe7d38b-bb95-41ca-afce-1b0b89cbcd8b";
+          fsType = "btrfs";
+          options = [ "subvol=root" ];
+        };
+
+      "/nix" =
+        { device = "/dev/disk/by-uuid/3fe7d38b-bb95-41ca-afce-1b0b89cbcd8b";
+          fsType = "btrfs";
+          options = [ "subvol=nix" ];
+        };
+
+      "/home" =
+        { device = "/dev/disk/by-uuid/3fe7d38b-bb95-41ca-afce-1b0b89cbcd8b";
+          fsType = "btrfs";
+          options = [ "subvol=home" ];
+        };
+
+      "/swap" =
+        { device = "/dev/disk/by-uuid/3fe7d38b-bb95-41ca-afce-1b0b89cbcd8b";
+          fsType = "btrfs";
+          options = [ "subvol=swap" ];
+        };
+      "/boot" =
+        { device = "/dev/disk/by-uuid/D999-2D99";
+          fsType = "vfat";
+        };
+    };
+
+    zramSwap = {
+      enable = true;
+      algorithm = "zstd";
+    };
+
+    hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+    hardware.video.hidpi.enable = lib.mkDefault true;
+    # greeter.initialSession = "sh -c hyprland";
+  };
+}
\ No newline at end of file