git.iko.soy/typeable/nixpkgs
on master help sign in
lightdm-enso-os-greeter: init at 0.2.1
commit2d1ecc482d12fb55b9fbfbe60c8140695191496e authorEdmund Wu <fangkazuto@gmail.com> dateSat 11 Aug 2018, 22:13 (8 years ago) parentb26fcaa
4 files changed+236
nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nix+159 nixos/modules/services/x11/display-managers/lightdm.nix+1 pkgs/applications/display-managers/lightdm-enso-os-greeter/default.nix+71 pkgs/top-level/all-packages.nix+5
nixos/modules/services/x11/display-managers/lightdm-greeters/enso-os.nixnew file+159
@@ -0,0 +1,159 @@
1+{ config, lib, pkgs, ... }:
2+
3+with lib;
4+let
5+ dmcfg = config.services.xserver.displayManager;
6+ ldmcfg = dmcfg.lightdm;
7+ cfg = ldmcfg.greeters.enso;
8+
9+ theme = cfg.theme.package;
10+ icons = cfg.iconTheme.package;
11+ cursors = cfg.cursorTheme.package;
12+
13+ # We need a few things in the environment for the greeter to run with
14+ # fonts/icons.
15+ wrappedEnsoGreeter = pkgs.runCommand "lightdm-enso-os-greeter"
16+ { buildInputs = [ pkgs.makeWrapper ]; }
17+ ''
18+ # This wrapper ensures that we actually get themes
19+ makeWrapper ${pkgs.lightdm-enso-os-greeter}/bin/pantheon-greeter \
20+ $out/greeter \
21+ --prefix PATH : "${pkgs.glibc.bin}/bin" \
22+ --set GDK_PIXBUF_MODULE_FILE "${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache" \
23+ --set GTK_PATH "${theme}:${pkgs.gtk3.out}" \
24+ --set GTK_EXE_PREFIX "${theme}" \
25+ --set GTK_DATA_PREFIX "${theme}" \
26+ --set XDG_DATA_DIRS "${theme}/share:${icons}/share:${cursors}/share" \
27+ --set XDG_CONFIG_HOME "${theme}/share"
28+
29+ cat - > $out/lightdm-enso-os-greeter.desktop << EOF
30+ [Desktop Entry]
31+ Name=LightDM Greeter
32+ Comment=This runs the LightDM Greeter
33+ Exec=$out/greeter
34+ Type=Application
35+ EOF
36+ '';
37+
38+ ensoGreeterConf = pkgs.writeText "lightdm-enso-os-greeter.conf" ''
39+ [greeter]
40+ default-wallpaper=${ldmcfg.background}
41+ gtk-theme=${cfg.theme.name}
42+ icon-theme=${cfg.iconTheme.name}
43+ cursor-theme=${cfg.cursorTheme.name}
44+ blur=${toString cfg.blur}
45+ brightness=${toString cfg.brightness}
46+ ${cfg.extraConfig}
47+ '';
48+in {
49+ options = {
50+ services.xserver.displayManager.lightdm.greeters.enso = {
51+ enable = mkOption {
52+ type = types.bool;
53+ default = false;
54+ description = ''
55+ Whether to enable enso-os-greeter as the lightdm greeter
56+ '';
57+ };
58+
59+ theme = {
60+ package = mkOption {
61+ type = types.package;
62+ default = pkgs.gnome3.gnome-themes-extra;
63+ defaultText = "pkgs.gnome3.gnome-themes-extra";
64+ description = ''
65+ The package path that contains the theme given in the name option.
66+ '';
67+ };
68+
69+ name = mkOption {
70+ type = types.str;
71+ default = "Adwaita";
72+ description = ''
73+ Name of the theme to use for the lightdm-enso-os-greeter
74+ '';
75+ };
76+ };
77+
78+ iconTheme = {
79+ package = mkOption {
80+ type = types.package;
81+ default = pkgs.papirus-icon-theme;
82+ defaultText = "pkgs.papirus-icon-theme";
83+ description = ''
84+ The package path that contains the icon theme given in the name option.
85+ '';
86+ };
87+
88+ name = mkOption {
89+ type = types.str;
90+ default = "ePapirus";
91+ description = ''
92+ Name of the icon theme to use for the lightdm-enso-os-greeter
93+ '';
94+ };
95+ };
96+
97+ cursorTheme = {
98+ package = mkOption {
99+ type = types.package;
100+ default = pkgs.capitaine-cursors;
101+ defaultText = "pkgs.capitaine-cursors";
102+ description = ''
103+ The package path that contains the cursor theme given in the name option.
104+ '';
105+ };
106+
107+ name = mkOption {
108+ type = types.str;
109+ default = "capitane-cursors";
110+ description = ''
111+ Name of the cursor theme to use for the lightdm-enso-os-greeter
112+ '';
113+ };
114+ };
115+
116+ blur = mkOption {
117+ type = types.bool;
118+ default = false;
119+ description = ''
120+ Whether or not to enable blur
121+ '';
122+ };
123+
124+ brightness = mkOption {
125+ type = types.int;
126+ default = 7;
127+ description = ''
128+ Brightness
129+ '';
130+ };
131+
132+ extraConfig = mkOption {
133+ type = types.lines;
134+ default = "";
135+ description = ''
136+ Extra configuration that should be put in the greeter.conf
137+ configuration file
138+ '';
139+ };
140+ };
141+ };
142+
143+ config = mkIf (ldmcfg.enable && cfg.enable) {
144+ environment.etc."lightdm/greeter.conf".source = ensoGreeterConf;
145+
146+ services.xserver.displayManager.lightdm = {
147+ greeter = mkDefault {
148+ package = wrappedEnsoGreeter;
149+ name = "lightdm-enso-os-greeter";
150+ };
151+
152+ greeters = {
153+ gtk = {
154+ enable = mkDefault false;
155+ };
156+ };
157+ };
158+ };
159+}
nixos/modules/services/x11/display-managers/lightdm.nix+1
@@ -73,6 +73,7 @@ in
7373 imports = [
7474 ./lightdm-greeters/gtk.nix
7575 ./lightdm-greeters/mini.nix
76+ ./lightdm-greeters/enso-os.nix
7677 ];
7778
7879 options = {
pkgs/applications/display-managers/lightdm-enso-os-greeter/default.nixnew file+71
@@ -0,0 +1,71 @@
1+{ stdenv, fetchgit, pkgconfig
2+, dbus, pcre, epoxy, libXdmcp, at-spi2-core, libxklavier, libxkbcommon, libpthreadstubs
3+, gtk3, vala, cmake, libgee, libX11, lightdm, gdk_pixbuf, clutter-gtk }:
4+
5+stdenv.mkDerivation rec {
6+ version = "0.2.1";
7+ name = "lightdm-enso-os-greeter-${version}";
8+
9+ src = fetchgit {
10+ url = https://github.com/nick92/Enso-OS;
11+ rev = "ed48330bfd986072bd82ac542ed8f8a7365c6427";
12+ sha256 = "11jm181jq1vbn83h235avpdxz7pqq6prqyzki5yryy53mkj4kgxz";
13+ };
14+
15+ buildInputs = [
16+ dbus
17+ gtk3
18+ pcre
19+ vala
20+ cmake
21+ epoxy
22+ libgee
23+ libX11
24+ lightdm
25+ libXdmcp
26+ gdk_pixbuf
27+ clutter-gtk
28+ libxklavier
29+ at-spi2-core
30+ libxkbcommon
31+ libpthreadstubs
32+ ];
33+
34+ nativeBuildInputs = [
35+ pkgconfig
36+ ];
37+
38+ postPatch = ''
39+ sed -i "s@\''${CMAKE_INSTALL_PREFIX}/@@" greeter/CMakeLists.txt
40+ '';
41+
42+ preConfigure = ''
43+ cd greeter
44+ '';
45+
46+ installFlags = [
47+ "DESTDIR=$(out)"
48+ ];
49+
50+ preFixup = ''
51+ mv $out/usr/* $out
52+ rm -r $out/usr
53+ '';
54+
55+ postFixup = ''
56+ rm -r $out/sbin
57+ '';
58+
59+ meta = with stdenv.lib; {
60+ description = ''
61+ A fork of pantheon greeter that positions elements in a central and
62+ vertigal manner and adds a blur effect to the background
63+ '';
64+ homepage = https://github.com/nick92/Enso-OS;
65+ platforms = platforms.linux;
66+ license = licenses.gpl3;
67+ maintainers = with maintainers; [
68+ eadwu
69+ ];
70+ };
71+}
pkgs/top-level/all-packages.nix+5
@@ -18326,6 +18326,11 @@ with pkgs;
1832618326
1832718327 lightdm_qt = lightdm.override { withQt5 = true; };
1832818328
18329+ lightdm-enso-os-greeter = callPackage ../applications/display-managers/lightdm-enso-os-greeter {
18330+ inherit (gnome3) libgee;
18331+ inherit (xorg) libX11 libXdmcp libpthreadstubs;
18332+ };
18333+
1832918334 lightdm_gtk_greeter = callPackage ../applications/display-managers/lightdm/gtk-greeter.nix {
1833018335 inherit (xfce) exo;
1833118336 };