Move Envy back to Pear
This commit is contained in:
parent
d2204a4916
commit
c04e4203ea
12 changed files with 34 additions and 43 deletions
8
hosts/pear/boot/default.nix
Normal file
8
hosts/pear/boot/default.nix
Normal 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
18
hosts/pear/default.nix
Normal 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";
|
||||
};
|
||||
}
|
93
hosts/pear/disko/default.nix
Normal file
93
hosts/pear/disko/default.nix
Normal 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;
|
||||
}
|
30
hosts/pear/hardware/default.nix
Normal file
30
hosts/pear/hardware/default.nix
Normal 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;
|
||||
}
|
1
hosts/pear/id_ed25519.pub
Normal file
1
hosts/pear/id_ed25519.pub
Normal file
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAb+aqIyTDcXDH8vMK697zQnYYUjgbUD2tJyknlztE3j
|
16
hosts/pear/services/default.nix
Normal file
16
hosts/pear/services/default.nix
Normal 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"
|
||||
];
|
||||
}
|
4
hosts/pear/users/default.nix
Normal file
4
hosts/pear/users/default.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [ ./main ];
|
||||
}
|
9
hosts/pear/users/main/default.nix
Normal file
9
hosts/pear/users/main/default.nix
Normal 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;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue