Remove Pear, use Jupiter as school device, generalize extra users

This commit is contained in:
Bun 2025-05-05 02:31:56 -04:00
parent 1a4e8b4b88
commit a554f0a233
38 changed files with 41 additions and 231 deletions

View file

@ -78,7 +78,6 @@
nixosConfigurations = {
tower = mkNix [ ./hosts/tower ] stable; # Main Desktop
pear = mkNix [ ./hosts/pear ] stable; # MacBook Pro 14,1
intuos = mkNix [ ./hosts/intuos ] stable; # Wacom Intuos Tablet
jupiter = mkNix [ ./hosts/jupiter ] unstable; # Steam Deck
redmond = mkNix [ ./hosts/redmond ] stable; # Lenovo Dual-Boot

View file

@ -6,7 +6,7 @@
./filesystems
./hardware
./network
./users
./user
../../modules/system
];

View file

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

View file

@ -6,7 +6,8 @@
./filesystems
./hardware
./jovian
./users
./services
./user
../../modules/system
];

View file

@ -0,0 +1,15 @@
{ config, lib, ... }:
{
config = lib.mkIf (!config.system.steamdeck.enable) {
services.globalprotect.enable = true;
virtualisation.vmware.host.enable = true;
nixpkgs.allowUnfreePackages = [ "vmware-workstation" ];
environment.persistence."/persist".users.${config.sysusers.main}.directories = [
"vmware"
".vmware"
];
};
}

View file

@ -3,7 +3,9 @@
home-manager.users."${config.sysusers.main}".home = {
desktop.enable = true;
gaming.enable = true;
production.enable = true;
remote-desktop.enable = true;
school.enable = true;
enableNixpkgsReleaseCheck = false;
stateVersion = lib.mkForce config.system.stateVersion;
};

View file

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

View file

@ -6,7 +6,7 @@
./filesystems
./hardware
./network
./users
./user
../../modules/system
];
@ -17,6 +17,7 @@
system = {
server.enable = true;
extraUsers.enable = true;
stateVersion = "24.11";
};

View file

@ -1,8 +0,0 @@
{ ... }:
{
imports = [
./corn
./luna
./main
];
}

View file

@ -7,7 +7,7 @@
./hardware
./network
./services
./users
./user
../../modules/system
];

View file

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

View file

@ -1,8 +0,0 @@
{ pkgs, ... }:
{
boot = {
kernelPackages = pkgs.linuxPackages_latest;
loader.systemd-boot.enable = true;
plymouth.enable = true;
};
}

View file

@ -1,18 +0,0 @@
{ config, lib, ... }:
{
imports = [
./boot
./disko
./hardware
./services
./users
../../modules/system
];
networking.hostName = "pear";
system = {
desktop.enable = true;
stateVersion = "24.11";
};
}

View file

@ -1,93 +0,0 @@
{ 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;
}

View file

@ -1,30 +0,0 @@
{ 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;
}

View file

@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKdjgz+N6uAhMwX/1f9AcgELphPS/dIUoPuLiqeOv5Or

View file

@ -1,16 +0,0 @@
{ 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"
];
}

View file

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

View file

@ -1,9 +0,0 @@
{ 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;
};
}

View file

@ -6,7 +6,7 @@
./filesystems
./hardware
./services
./users
./user
../../modules/system
(modulesPath + "/profiles/headless.nix")
];

View file

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

View file

@ -6,7 +6,7 @@
./filesystems
./hardware
./network
./users
./user
../../modules/system
];

View file

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

View file

@ -6,7 +6,7 @@
./filesystems
./hardware
./network
./users
./user
../../modules/system
];

View file

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

View file

@ -4,7 +4,6 @@
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
looking-glass-obs
obs-multi-rtmp
obs-pipewire-audio-capture
obs-tuna

View file

@ -1,4 +0,0 @@
{ ... }:
{
security.apparmor.enable = true;
}

View file

@ -1,7 +1,6 @@
{ ... }:
{
imports = [
./apparmor
./privilege
./rtkit
];

View file

@ -1,12 +1,16 @@
{ pkgs, ... }:
{ config, lib, pkgs, ... }:
{
users.users."freecorn" = {
users.users."freecorn" = lib.mkIf config.system.extraUsers.enable {
isNormalUser = true;
createHome = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBCADciME1/rtWOlR2BxaAkRSgIZt61SYOgjTi6hw+yS Chinook"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICtoHVAmq8Ps7EguBsV3VY4snagzkhH6aXqwbKzuGs2H Radiant"
];
extraGroups = [
"audio"
"video"
];
uid = 1001;
shell = pkgs.zsh;
};

View file

@ -1,4 +1,6 @@
{ ... }:
{ lib, ... }:
{
imports = [ ./main ];
options.system.extraUsers.enable = lib.mkEnableOption "Enable a shared system";
}

View file

@ -1,11 +1,15 @@
{ ... }:
{ config, lib, ... }:
{
users.users."luna" = {
users.users."luna" = lib.mkIf config.system.extraUsers.enable {
isNormalUser = true;
createHome = true;
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDJ3hzXkv5MVuGZy4HqfEZD0Ck7ZKiLeVmUTFzGSwZkumCpwX/zirD/tY4SNutPczhhYNn1jwkwnnyCwgkaQ7QWBs72G0opmjXDcSqxXJskSKYgjnUHoPV8uAcMwp5C5GNlwo3DFKXc1c7Sipy1s6y9ZnoKfVmjsr0AhamnC/bHEWg8vx0zuamCzvQ5vLWfpULRKwj286f0s2xaAvYaAJwGD0QMHC0ylFYZuq7Og4HVdlnUt+40BxCi+GAQqsFd4vM+RFjZKKD7ioP5DcIDfvfvxX4UpdKtCxVjeyyF+UJpFnQKytO9HvH4H+CRSAuJ+Vguiq/F3lGhvF0yIQ9M2MD3+tl3RZAj4D6n2ew30mn+QGh2fZgC7Utuzo02pMVUzkpm+mM4x8VyESpC1AuBdh0TAKBwS3ubMpegiCWCfIbNC0CQ/zgIq/5xwhXL8zhmfQrIiULBCd1xqThye0tt7knoPZlVCzOuVYoqxYnwYYGcXhzlArrmgRquyMYHdpFd+DTzJfcQIGdT4a+s0Mc2jRa0KT3A4ZrjziP0OPMQ+cpTd1tmQdEKXN6YhB87Hp9meCefFdzGvVembose82d3BOl45+rWM2ZcH93fNguWwYX0ez8+GiGW4P+gDQcfWfQCNa1daDjgoBwjmbG5rYoS6tfLxSSvYB1YOOK9U3AlPxEuTw== luna@ThinkPad-T480-Arch"
];
extraGroups = [
"audio"
"video"
];
uid = 1002;
};

View file

@ -14,7 +14,6 @@
openssh.authorizedKeys.keyFiles = [
../../../../hosts/tower/id_ed25519.pub
../../../../hosts/pear/id_ed25519.pub
../../../../hosts/intuos/id_ed25519.pub
../../../../hosts/jupiter/id_ed25519.pub
../../../../hosts/redmond/id_ed25519.pub