tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nixos/linyaps: init
rewine
5 months ago
c9929803
cb2ef2c9
+61
2 changed files
expand all
collapse all
unified
split
nixos
modules
module-list.nix
services
desktops
linyaps.nix
+1
nixos/modules/module-list.nix
···
569
569
./services/desktops/gnome/sushi.nix
570
570
./services/desktops/gnome/tinysparql.nix
571
571
./services/desktops/gvfs.nix
572
572
+
./services/desktops/linyaps.nix
572
573
./services/desktops/malcontent.nix
573
574
./services/desktops/neard.nix
574
575
./services/desktops/pipewire/pipewire.nix
+60
nixos/modules/services/desktops/linyaps.nix
···
1
1
+
{
2
2
+
config,
3
3
+
lib,
4
4
+
pkgs,
5
5
+
...
6
6
+
}:
7
7
+
8
8
+
let
9
9
+
cfg = config.services.linyaps;
10
10
+
in
11
11
+
12
12
+
{
13
13
+
meta = {
14
14
+
maintainers = pkgs.linyaps.meta.maintainers;
15
15
+
};
16
16
+
17
17
+
###### interface
18
18
+
options = {
19
19
+
services.linyaps = {
20
20
+
enable = lib.mkEnableOption "linyaps, a cross-distribution package manager with sandboxed apps and shared runtime";
21
21
+
22
22
+
package = lib.mkPackageOption pkgs "linyaps" { };
23
23
+
24
24
+
boxPackage = lib.mkPackageOption pkgs "linyaps-box" { };
25
25
+
};
26
26
+
};
27
27
+
28
28
+
###### implementation
29
29
+
config = lib.mkIf cfg.enable {
30
30
+
31
31
+
environment = {
32
32
+
profiles = [ "/var/lib/linglong/entries" ];
33
33
+
systemPackages = [
34
34
+
cfg.package
35
35
+
cfg.boxPackage
36
36
+
];
37
37
+
};
38
38
+
39
39
+
security.polkit.enable = true;
40
40
+
41
41
+
fonts.fontDir.enable = true;
42
42
+
43
43
+
services.dbus.packages = [ cfg.package ];
44
44
+
45
45
+
systemd = {
46
46
+
packages = [ cfg.package ];
47
47
+
tmpfiles.packages = [ cfg.package ];
48
48
+
};
49
49
+
50
50
+
# Create system user and group for linyaps/linglong
51
51
+
users = {
52
52
+
groups.deepin-linglong = { };
53
53
+
users.deepin-linglong = {
54
54
+
group = "deepin-linglong";
55
55
+
isSystemUser = true;
56
56
+
description = "Linyaps/Linglong system helper";
57
57
+
};
58
58
+
};
59
59
+
};
60
60
+
}