mirror of
https://github.com/elwrcl/heliux.git
synced 2026-10-31 06:38:02 +03:00
first commit
This commit is contained in:
15 files changed
+1017
No files matched your search
@@ -0,0 +1,21 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
# finding all home-manager users that have helium enabled
|
||||
enabledUsers = lib.filterAttrs (_: user: user.programs.helium.enable or false) (
|
||||
config.home-manager.users or { }
|
||||
);
|
||||
|
||||
# generate etc files per user to support multi-user systems
|
||||
policyFiles = lib.mapAttrs' (
|
||||
name: user:
|
||||
lib.nameValuePair "chromium/policies/managed/helium-${name}.json" {
|
||||
text = user.programs.helium.finalPolicyJson;
|
||||
mode = "0644";
|
||||
}
|
||||
) enabledUsers;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf (enabledUsers != { }) {
|
||||
environment.etc = policyFiles;
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user