nixos/linyaps: init

This commit is contained in:
rewine
2025-09-21 15:53:29 +08:00
parent cb2ef2c936
commit c9929803b3
2 changed files with 61 additions and 0 deletions
+1
View File
@@ -569,6 +569,7 @@
./services/desktops/gnome/sushi.nix
./services/desktops/gnome/tinysparql.nix
./services/desktops/gvfs.nix
./services/desktops/linyaps.nix
./services/desktops/malcontent.nix
./services/desktops/neard.nix
./services/desktops/pipewire/pipewire.nix
@@ -0,0 +1,60 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.linyaps;
in
{
meta = {
maintainers = pkgs.linyaps.meta.maintainers;
};
###### interface
options = {
services.linyaps = {
enable = lib.mkEnableOption "linyaps, a cross-distribution package manager with sandboxed apps and shared runtime";
package = lib.mkPackageOption pkgs "linyaps" { };
boxPackage = lib.mkPackageOption pkgs "linyaps-box" { };
};
};
###### implementation
config = lib.mkIf cfg.enable {
environment = {
profiles = [ "/var/lib/linglong/entries" ];
systemPackages = [
cfg.package
cfg.boxPackage
];
};
security.polkit.enable = true;
fonts.fontDir.enable = true;
services.dbus.packages = [ cfg.package ];
systemd = {
packages = [ cfg.package ];
tmpfiles.packages = [ cfg.package ];
};
# Create system user and group for linyaps/linglong
users = {
groups.deepin-linglong = { };
users.deepin-linglong = {
group = "deepin-linglong";
isSystemUser = true;
description = "Linyaps/Linglong system helper";
};
};
};
}