More movearounds and stuff idk anymore

This commit is contained in:
Jimbo 2024-11-05 05:49:14 -05:00
parent 9a30fae72f
commit 84d5732a32
13 changed files with 56 additions and 48 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, lib, ... }:
{ config, pkgs, ... }:
let
commonKernelParams = [
# Nvidia settings
@ -31,13 +31,13 @@ in {
services.root-reset = {
description = "Reset root and snapshot last boot";
wantedBy = [ "initrd.target" ];
after = [ "dev-firefly-root.device" ];
after = [ "dev-${config.networking.hostName}-root.device" ];
before = [ "sysroot.mount" ];
unitConfig.DefaultDependencies = "no";
serviceConfig.Type = "oneshot";
script = ''
mkdir -p /mnt
mount /dev/firefly/root /mnt
mount /dev/${config.networking.hostName}/root /mnt
if [[ -e /mnt/prev ]]; then
btrfs subvolume delete /mnt/prev

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ ... }:
{
imports = [
./boot

View file

@ -1,10 +1,10 @@
{ disko, ... }:
{ disko, config, ... }:
{
imports = [ disko.nixosModules.disko ];
disko.devices = {
disk = {
firefly = {
"${config.networking.hostName}" = {
type = "disk";
device = "/dev/nvme0n1";
content = {
@ -29,7 +29,7 @@
passwordFile = "/tmp/secret.key";
content = {
type = "lvm_pv";
vg = "firefly";
vg = "${config.networking.hostName}";
};
};
};
@ -39,7 +39,7 @@
};
lvm_vg = {
firefly = {
"${config.networking.hostName}" = {
type = "lvm_vg";
lvs = {
root = {

View file

@ -21,22 +21,6 @@
};
fileSystems = {
# Useful system mounts
"/etc/libvirt" = {
device = "/dev/disk/by-uuid/f18a0302-9914-471d-828c-85ab1a67a8be";
options = [ "nosuid" "nodev" "nofail" ];
};
"/etc/libvirt/VMs/Bulk" = {
depends = [ "/etc/libvirt" ];
device = "/dev/disk/by-uuid/3eb36c3e-81ac-4281-89f0-c89242d88dd6";
options = [ "nosuid" "nodev" "nofail" ];
};
"/var/lib/libvirt" = {
depends = [ "/etc/libvirt" ];
device = "/etc/libvirt/varlibvirt";
options = [ "bind" "rw" ];
};
# Games and such
"/mnt/Linux1" = {
device = "/dev/disk/by-uuid/b2901f8c-ffda-4b88-bb63-a9ea0c96ccb4";
@ -46,6 +30,10 @@
device = "/dev/disk/by-uuid/f08e4f38-162c-402f-ba2a-5925151b78bf";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
};
"/mnt/Linux3" = {
device = "/dev/disk/by-uuid/e7bc75bd-c371-4b28-b212-7be9b1fad339";
options = [ "nosuid" "nodev" "nofail" "x-gvfs-show" ];
};
"/mnt/Windows1" = {
device = "/dev/disk/by-uuid/10BC97B2BC979138";
options = [ "nosuid" "nodev" "noauto" ];
@ -55,6 +43,16 @@
options = [ "nosuid" "nodev" "noauto" ];
};
# Bulk storage mounts
"/persist/var/lib/libvirt" = {
device = "/dev/disk/by-uuid/abf78669-de2a-4afa-8e62-604f4e4cb355";
options = [ "subvol=libvirt" "nosuid" "nodev" "nofail" ];
};
"/persist/home/jimbo/VMs" = {
device = "/dev/disk/by-uuid/abf78669-de2a-4afa-8e62-604f4e4cb355";
options = [ "subvol=images" "nosuid" "nodev" "nofail" ];
};
# Network mounts
"/home/jimbo/JimboNFS" = {
device = "${config.ips.server}:/export/JimboNFS";