Restructure flake.nix for a simpler config for building different images off the same NixOS config.
This commit is contained in:
@@ -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 = [
|
||||
|
||||
@@ -18,8 +18,9 @@ in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
me.swayIncludes = lib.mkAfter [
|
||||
start_sway_session
|
||||
];
|
||||
|
||||
config = lib.mkIf (config.me.graphical && config.me.sway.enable) {
|
||||
me.swayIncludes = lib.mkAfter [
|
||||
start_sway_session
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ in
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
config = lib.mkIf (config.me.buildingIso && config.me.graphical && config.me.sway.enable) {
|
||||
config = lib.mkIf (config.me.buildingPortable && config.me.graphical && config.me.sway.enable) {
|
||||
# Launch a terminal at boot in the live ISO for when hotkeys don't work.
|
||||
me.swayIncludes = [
|
||||
launch_terminal
|
||||
|
||||
@@ -22,7 +22,7 @@ in
|
||||
rofimoji_sway_config
|
||||
];
|
||||
|
||||
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
|
||||
environment.persistence."/state" = lib.mkIf (config.me.mountPersistence) {
|
||||
hideMounts = true;
|
||||
users.talexander = {
|
||||
directories = [
|
||||
|
||||
Reference in New Issue
Block a user