Change external to ISO, the most likely way I'll use it
This commit is contained in:
parent
e221d22463
commit
d2769c314a
11 changed files with 37 additions and 147 deletions
|
@ -60,7 +60,7 @@
|
|||
envy = mkNix [ ./hosts/envy ]; # HP Convertable
|
||||
lacros = mkNix [ ./hosts/lacros ]; # HP ChromeBook
|
||||
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
|
||||
midas = mkNix [ ./hosts/midas ]; # Dell Optiplex 5040
|
||||
|
|
12
hosts/extern/boot/default.nix
vendored
12
hosts/extern/boot/default.nix
vendored
|
@ -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;
|
||||
};
|
||||
}
|
20
hosts/extern/default.nix
vendored
20
hosts/extern/default.nix
vendored
|
@ -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";
|
||||
}
|
97
hosts/extern/disko/default.nix
vendored
97
hosts/extern/disko/default.nix
vendored
|
@ -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;
|
||||
};
|
||||
}
|
7
hosts/extern/modules/default.nix
vendored
7
hosts/extern/modules/default.nix
vendored
|
@ -1,7 +0,0 @@
|
|||
{ modulesPath, ... }:
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/all-hardware.nix")
|
||||
#(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
}
|
6
hosts/extern/users/main/default.nix
vendored
6
hosts/extern/users/main/default.nix
vendored
|
@ -1,6 +0,0 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
home-manager.users.${config.sysusers.main} = {
|
||||
home.stateVersion = "24.11";
|
||||
};
|
||||
}
|
21
hosts/iso/default.nix
Normal file
21
hosts/iso/default.nix
Normal 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";
|
||||
};
|
||||
}
|
|
@ -1,8 +1,9 @@
|
|||
# nixos-generate-config --root ./ --no-filesystems
|
||||
{ config, lib, ... }:
|
||||
{ config, lib, modulesPath, ... }:
|
||||
{
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
imports = [
|
||||
(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")
|
||||
(modulesPath + "/installer/cd-dvd/channel.nix")
|
||||
];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
10
hosts/iso/users/main/default.nix
Normal file
10
hosts/iso/users/main/default.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Reference in a new issue