refactor: Move sw into properly nested modules with unconditional import
This commit is contained in:
@@ -5,29 +5,68 @@
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
lib.mkMerge [
|
||||
(import ./programs.nix {
|
||||
inherit
|
||||
config
|
||||
lib
|
||||
pkgs
|
||||
inputs
|
||||
;
|
||||
})
|
||||
(import ./services.nix {
|
||||
inherit
|
||||
config
|
||||
lib
|
||||
pkgs
|
||||
inputs
|
||||
;
|
||||
})
|
||||
(import ./gsettings.nix {
|
||||
inherit
|
||||
config
|
||||
lib
|
||||
pkgs
|
||||
inputs
|
||||
;
|
||||
})
|
||||
]
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
cfg = config.athenix.sw.tablet-kiosk;
|
||||
in
|
||||
{
|
||||
options.athenix.sw.tablet-kiosk = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Enable tablet kiosk mode with touch-optimized interface.
|
||||
|
||||
Includes:
|
||||
- Phosh mobile desktop environment
|
||||
- Chromium in fullscreen kiosk mode
|
||||
- On-screen keyboard (Squeekboard)
|
||||
- Auto-login and auto-start browser
|
||||
- Touch gesture support
|
||||
- Optimized for Surface Pro tablets
|
||||
|
||||
Recommended for: Surface tablets, touchscreen kiosks, interactive displays
|
||||
'';
|
||||
example = true;
|
||||
};
|
||||
|
||||
kioskUrl = mkOption {
|
||||
type = types.str;
|
||||
default = "https://ha.factory.uga.edu";
|
||||
description = ''
|
||||
URL to display in the kiosk browser on startup.
|
||||
The browser will automatically navigate to this URL in fullscreen mode.
|
||||
'';
|
||||
example = "https://dashboard.example.com";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
(import ./programs.nix {
|
||||
inherit
|
||||
config
|
||||
lib
|
||||
pkgs
|
||||
inputs
|
||||
;
|
||||
})
|
||||
(import ./services.nix {
|
||||
inherit
|
||||
config
|
||||
lib
|
||||
pkgs
|
||||
inputs
|
||||
;
|
||||
})
|
||||
(import ./gsettings.nix {
|
||||
inherit
|
||||
config
|
||||
lib
|
||||
pkgs
|
||||
inputs
|
||||
;
|
||||
})
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
--noerrdialogs \
|
||||
--disable-session-crashed-bubble \
|
||||
--disable-infobars \
|
||||
${config.athenix.sw.kioskUrl}
|
||||
${config.athenix.sw.tablet-kiosk.kioskUrl}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user