Restructure flake.nix for a simpler config for building different images off the same NixOS config.

This commit is contained in:
Tom Alexander
2025-10-11 00:08:02 -04:00
parent 69b5cf9217
commit 3bf84445a3
121 changed files with 2937 additions and 3074 deletions

View File

@@ -313,7 +313,7 @@ in
# Probably would be cleaner to use environment.sessionVariables but programs.sway.extraSessionCommands is sway-specific.
programs.sway.extraSessionCommands =
if config.me.buildingIso then
if config.me.buildingPortable then
''
export WLR_RENDERER_ALLOW_SOFTWARE=1
export NIXOS_OZONE_WL=1 # Wayland support for chromium and electron
@@ -330,7 +330,7 @@ in
enable = true;
wrapperFeatures.gtk = true;
extraOptions =
if config.me.buildingIso then
if config.me.buildingPortable then
[
"--config"
"${sway-config}"
@@ -343,7 +343,7 @@ in
];
};
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
environment.persistence."/state" = lib.mkIf (config.me.mountPersistence) {
hideMounts = true;
users.talexander = {
files = [