Move Envy back to Pear

This commit is contained in:
Bun 2025-04-30 19:34:43 -04:00
parent d2204a4916
commit c04e4203ea
12 changed files with 34 additions and 43 deletions

View file

@ -0,0 +1,8 @@
{ pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader.systemd-boot.enable = true;
plymouth.enable = true;
};
}

18
hosts/pear/default.nix Normal file
View file

@ -0,0 +1,18 @@
{ config, lib, ... }:
{
imports = [
./boot
./disko
./hardware
./services
./users
../../modules/system
];
networking.hostName = "pear";
system = {
desktop.enable = true;
stateVersion = "24.11";
};
}

View file

@ -0,0 +1,93 @@
{ config, disko, ... }:
{
imports = [ disko.nixosModules.disko ];
disko.devices = {
disk = {
"${config.networking.hostName}" = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02";
};
ESP = {
size = "2G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "${config.networking.hostName}-disk";
settings.allowDiscards = true;
passwordFile = "/tmp/secret.key";
content = {
type = "lvm_pv";
vg = "${config.networking.hostName}";
};
};
};
};
};
};
};
lvm_vg = {
"${config.networking.hostName}" = {
type = "lvm_vg";
lvs = {
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ];
subvolumes = {
"/root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
"/prev" = {
mountpoint = "/prev";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
"/nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
# Impermanence
"/persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
"/persist/.snapshots" = { };
"/persist/home" = { };
"/persist/home/.snapshots" = { };
};
};
};
swap = {
size = "4G";
content = {
type = "swap";
discardPolicy = "both";
};
};
};
};
};
};
# Needed for impermanence
fileSystems."/persist".neededForBoot = true;
}

View file

@ -0,0 +1,30 @@
{ config, lib, modulesPath, ... }:
{
imports = [
(modulesPath + "/hardware/network/broadcom-43xx.nix")
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd = {
availableKernelModules = [
"nvme"
"sd_mod"
"usb_storage"
"xhci_pci"
];
kernelModules = [
"applespi"
"atkbd"
"dm-snapshot"
"intel_lpss_pci"
"spi_pxa2xx_platform"
];
};
kernelModules = [ "kvm-intel" ];
};
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAb+aqIyTDcXDH8vMK697zQnYYUjgbUD2tJyknlztE3j

View file

@ -0,0 +1,16 @@
{ config, ... }:
{
services.globalprotect.enable = true;
virtualisation = {
libvirtd.enable = true;
vmware.host.enable = true;
};
nixpkgs.allowUnfreePackages = [ "vmware-workstation" ];
environment.persistence."/persist".users.${config.sysusers.main}.directories = [
"vmware"
".vmware"
];
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
imports = [ ./main ];
}

View file

@ -0,0 +1,9 @@
{ config, lib, ... }:
{
home-manager.users."${config.sysusers.main}".home = {
desktop.enable = true;
remote-desktop.enable = true;
school.enable = true;
stateVersion = lib.mkForce config.system.stateVersion;
};
}