Add envy laptop

This commit is contained in:
Jimbo 2024-12-16 12:11:12 -05:00
parent 2d3d4bcc2b
commit 8d600e8bef
11 changed files with 157 additions and 2 deletions

View file

@ -75,9 +75,10 @@
nixosConfigurations = { nixosConfigurations = {
tower = mkNix [ ./hosts/tower ]; # Main Desktop tower = mkNix [ ./hosts/tower ]; # Main Desktop
envy = mkNix [ ./hosts/envy ]; # HP Convertable
axolotl = mkNix [ ./hosts/axolotl ]; # PineBook Pro axolotl = mkNix [ ./hosts/axolotl ]; # PineBook Pro
lacros = mkNix [ ./hosts/lacros ]; # Dell Chromebook lacros = mkNix [ ./hosts/lacros ]; # Dell Chromebook
redmond = mkNix [ ./hosts/redmond ]; # Lenovo Dual-Boot Laptop redmond = mkNix [ ./hosts/redmond ]; # Lenovo Dual-Boot
extern = mkNix [ ./hosts/extern ]; # External Drive/USB extern = mkNix [ ./hosts/extern ]; # External Drive/USB
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010 kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010

View file

@ -0,0 +1,7 @@
{ pkgs, lib, ... }:
{
boot = {
kernelPackages = pkgs.unstable.linuxPackages_latest;
blacklistedKernelModules = [ "pcspkr" ];
};
}

17
hosts/envy/default.nix Normal file
View file

@ -0,0 +1,17 @@
{ ... }:
{
imports = [
./boot
./disko
./filesystems
./hardware
./users
../../modules/system
];
system.wireguard.client.enable = true;
networking.wireguard.interfaces.wgc.ips = [ "10.100.0.25/24" ];
system.stateVersion = "24.11";
networking.hostName = "envy";
}

View file

@ -0,0 +1,97 @@
{ disko, config, ... }:
{
imports = [ disko.nixosModules.disko ];
disko.devices = {
disk = {
"${config.networking.hostName}" = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
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" = { };
"/jimbo" = {
mountpoint = "/persist/home/jimbo";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
"/jimbo/.snapshots" = { };
};
};
};
swap = {
size = "4G";
content = {
type = "swap";
discardPolicy = "both";
};
};
};
};
};
};
# Needed for impermanence
fileSystems = {
"/persist".neededForBoot = true;
"/persist/home/jimbo".neededForBoot = true;
};
}

View file

@ -0,0 +1,11 @@
{ config, ... }:
{
fileSystems = {
# Network mounts
"/home/jimbo/JimboNFS" = {
device = "10.100.0.1:/export/JimboNFS";
fsType = "nfs4";
options = [ "x-systemd.automount" "_netdev" "nofail" "noauto" ];
};
};
}

View file

@ -0,0 +1,10 @@
# nixos-generate-config --root ./ --no-filesystems
{ config, lib, ... }:
{
boot.initrd.availableKernelModules = [ "xhci_pci" "sr_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC2lMkUd+BbXITE5LTg94hEzmA6UKsIIbaf5YOjGoLzl

View file

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

View file

@ -0,0 +1,6 @@
{ ... }:
{
home-manager.users.jimbo = {
home.stateVersion = "24.11";
};
}

View file

@ -6,7 +6,7 @@
}; };
# Kernel that won't explode the MacBook Air # Kernel that won't explode the MacBook Air
specialisation.nouveau.configuration.config = { specialisation.oldkernel.configuration.config = {
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_5_10; boot.kernelPackages = lib.mkForce pkgs.linuxPackages_5_10;
}; };
} }

View file

@ -70,6 +70,7 @@
output "${config.displays.d1}" { output "${config.displays.d1}" {
mode "1920x1080@143.980" mode "1920x1080@143.980"
position x=3840 y=405 position x=3840 y=405
variable-refresh-rate
} }
output "${config.displays.d2}" { output "${config.displays.d2}" {
mode "1920x1080@60" mode "1920x1080@60"