From feefcfc89b00d4955dbb3314c20be035f3db206f Mon Sep 17 00:00:00 2001 From: tzlil Date: Sat, 29 Jul 2023 20:53:14 +0300 Subject: disko for laptop, wip rewrite --- hosts/pc/cfg.nix | 87 ---------------------------------------------------- hosts/pc/default.nix | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+), 87 deletions(-) delete mode 100644 hosts/pc/cfg.nix create mode 100644 hosts/pc/default.nix (limited to 'hosts/pc') diff --git a/hosts/pc/cfg.nix b/hosts/pc/cfg.nix deleted file mode 100644 index ee3b716..0000000 --- a/hosts/pc/cfg.nix +++ /dev/null @@ -1,87 +0,0 @@ -{ - 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; - 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; - # greeter.initialSession = "sh -c hyprland"; - }; -} diff --git a/hosts/pc/default.nix b/hosts/pc/default.nix new file mode 100644 index 0000000..ee3b716 --- /dev/null +++ b/hosts/pc/default.nix @@ -0,0 +1,87 @@ +{ + 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; + 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; + # greeter.initialSession = "sh -c hyprland"; + }; +} -- cgit 1.4.1