Change external to ISO, the most likely way I'll use it

This commit is contained in:
Jimbo 2025-02-24 21:02:14 -05:00
parent e221d22463
commit d2769c314a
11 changed files with 37 additions and 147 deletions

View file

@ -60,7 +60,7 @@
envy = mkNix [ ./hosts/envy ]; # HP Convertable envy = mkNix [ ./hosts/envy ]; # HP Convertable
lacros = mkNix [ ./hosts/lacros ]; # HP ChromeBook lacros = mkNix [ ./hosts/lacros ]; # HP ChromeBook
redmond = mkNix [ ./hosts/redmond ]; # Lenovo Dual-Boot redmond = mkNix [ ./hosts/redmond ]; # Lenovo Dual-Boot
extern = mkNix [ ./hosts/extern ]; # External Drive/USB iso = mkNix [ ./hosts/extern ]; # ISO File
kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010 kitty = mkNix [ ./hosts/kitty ]; # Dell Optiplex 7010
midas = mkNix [ ./hosts/midas ]; # Dell Optiplex 5040 midas = mkNix [ ./hosts/midas ]; # Dell Optiplex 5040

View file

@ -1,12 +0,0 @@
{ pkgs, lib, ... }:
{
boot = {
kernelPackages = pkgs.unstable.linuxPackages_latest;
blacklistedKernelModules = [ "pcspkr" ];
};
# Kernel that won't explode the MacBook Air
specialisation.oldkernel.configuration.config = {
boot.kernelPackages = lib.mkForce pkgs.linuxPackages_5_10;
};
}

View file

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

View file

@ -1,97 +0,0 @@
{ 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" = { };
"/${config.sysusers.main}" = {
mountpoint = "/persist/home/${config.sysusers.main}";
mountOptions = [ "compress=zstd" "noatime" "ssd" ];
};
"/${config.sysusers.main}/.snapshots" = { };
};
};
};
swap = {
size = "4G";
content = {
type = "swap";
discardPolicy = "both";
};
};
};
};
};
};
# Needed for impermanence
fileSystems = {
"/persist".neededForBoot = true;
"/persist/home/${config.sysusers.main}".neededForBoot = true;
};
}

View file

@ -1,7 +0,0 @@
{ modulesPath, ... }:
{
imports = [
(modulesPath + "/profiles/all-hardware.nix")
#(modulesPath + "/profiles/qemu-guest.nix")
];
}

View file

@ -1,6 +0,0 @@
{ config, ... }:
{
home-manager.users.${config.sysusers.main} = {
home.stateVersion = "24.11";
};
}

21
hosts/iso/default.nix Normal file
View file

@ -0,0 +1,21 @@
{ ... }:
{
imports = [
./filesystems
./hardware
./users
../../modules/system
];
networking = {
hostName = "extern";
wireguard.interfaces.wgc.ips = [ "10.100.0.21/24" ];
};
system = {
desktop.enable = true;
wireless.enable = true;
wireguard.client.enable = true;
stateVersion = "24.11";
};
}

View file

@ -1,8 +1,9 @@
# nixos-generate-config --root ./ --no-filesystems { config, lib, modulesPath, ... }:
{ config, lib, ... }:
{ {
boot.initrd.availableKernelModules = [ "xhci_pci" "sr_mod" ]; imports = [
boot.initrd.kernelModules = [ "dm-snapshot" ]; (modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
(modulesPath + "/installer/cd-dvd/channel.nix")
];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";

View file

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