Loading nixos/modules/services/desktop-managers/lomiri.nix +224 −166 Original line number Diff line number Diff line { config, pkgs, lib, ... }: { config, pkgs, lib, ... }: let cfg = config.services.desktopManager.lomiri; in { in { options.services.desktopManager.lomiri = { enable = lib.mkEnableOption '' the Lomiri graphical shell (formerly known as Unity8) ''; basics = lib.mkOption { internal = true; description = '' Enable basic things for getting Lomiri working. ''; type = lib.types.bool; default = config.services.xserver.displayManager.lightdm.greeters.lomiri.enable || cfg.enable; }; }; config = lib.mkMerge [ # Basics for getting Lomiri to work (lib.mkIf cfg.basics { environment = { # To override the default keyboard layout in Lomiri etc.${pkgs.lomiri.lomiri.passthru.etcLayoutsFile}.text = lib.strings.replaceStrings [ "," ] [ "\n" ] config.services.xserver.xkb.layout; pathsToLink = [ # Data "/share/locale" # TODO LUITK hardcoded default locale path, fix individual apps to not rely on it "/share/wallpapers" ]; systemPackages = with pkgs.lomiri; [ lomiri-wallpapers # default + additional wallpaper suru-icon-theme # basic indicator icons ]; }; fonts.packages = with pkgs; [ ubuntu-classic # Ubuntu is default font ]; # Xwayland is partly hardcoded in Mir so it can't really be fully turned off, and it must be on PATH for X11 apps *and Lomiri's web browser* to work. # Until Mir/Lomiri can be properly used without it, force it on so everything behaves as expected. programs.xwayland.enable = lib.mkForce true; services.ayatana-indicators = { enable = true; packages = ( with pkgs; [ ayatana-indicator-datetime # Clock ayatana-indicator-session # Controls for shutting down etc ] ); }; }) # Full Lomiri DE (lib.mkIf cfg.enable { # We need the basic setup as well services.desktopManager.lomiri.basics = true; config = lib.mkIf cfg.enable { environment = { systemPackages = (with pkgs; [ systemPackages = (with pkgs; [ glib # XDG MIME-related tools identify it as GNOME, add gio for MIME identification to work libayatana-common ubports-click ]) ++ (with pkgs.lomiri; [ ]) ++ (with pkgs.lomiri; [ hfd-service history-service libusermetrics Loading @@ -36,17 +98,12 @@ in { lomiri-terminal-app lomiri-thumbnailer lomiri-url-dispatcher lomiri-wallpapers mediascanner2 # TODO possibly needs to be kicked off by graphical-session.target morph-browser qtmir # not having its desktop file for Xwayland available causes any X11 application to crash the session suru-icon-theme telephony-service teleports ]); # To override the default keyboard layout in Lomiri etc.${pkgs.lomiri.lomiri.passthru.etcLayoutsFile}.text = lib.strings.replaceStrings [","] ["\n"] config.services.xserver.xkb.layout; }; hardware = { Loading @@ -66,39 +123,33 @@ in { lomiri-download-manager ]; fonts.packages = with pkgs; [ # Applications tend to default to Ubuntu font ubuntu-classic ]; # Copy-pasted basic stuff hardware.graphics.enable = lib.mkDefault true; fonts.enableDefaultPackages = lib.mkDefault true; programs.dconf.enable = lib.mkDefault true; # Xwayland is partly hardcoded in Mir so it can't really be fully turned off, and it must be on PATH for X11 apps *and Lomiri's web browser* to work. # Until Mir/Lomiri can be properly used without it, force it on so everything behaves as expected. programs.xwayland.enable = lib.mkForce true; services.accounts-daemon.enable = true; services.ayatana-indicators = { enable = true; packages = (with pkgs; [ ayatana-indicator-datetime packages = ( with pkgs; [ ayatana-indicator-display ayatana-indicator-messages ayatana-indicator-power ayatana-indicator-session ] ++ lib.optionals config.hardware.bluetooth.enable [ ayatana-indicator-bluetooth ] ++ lib.optionals (config.hardware.pulseaudio.enable || config.services.pipewire.pulse.enable) [ ] ++ lib.optionals config.hardware.bluetooth.enable [ ayatana-indicator-bluetooth ] ++ lib.optionals (config.hardware.pulseaudio.enable || config.services.pipewire.pulse.enable) [ ayatana-indicator-sound ]) ++ (with pkgs.lomiri; [ telephony-service ] ++ lib.optionals config.networking.networkmanager.enable [ lomiri-indicator-network ]); ] ) ++ ( with pkgs.lomiri; [ telephony-service ] ++ lib.optionals config.networking.networkmanager.enable [ lomiri-indicator-network ] ); }; services.udisks2.enable = true; Loading Loading @@ -139,9 +190,7 @@ in { # At least the network indicator is still under the unity name, due to leftover Unity-isms "/share/unity" # Data "/share/locale" # TODO LUITK hardcoded default locale path, fix individual apps to not rely on it "/share/sounds" "/share/wallpapers" ]; systemd.user.services = { Loading @@ -159,7 +208,13 @@ in { "lomiri-polkit-agent" = rec { description = "Lomiri Polkit agent"; wantedBy = [ "lomiri.service" "lomiri-full-greeter.service" "lomiri-full-shell.service" "lomiri-greeter.service" "lomiri-shell.service" ]; wantedBy = [ "lomiri.service" "lomiri-full-greeter.service" "lomiri-full-shell.service" "lomiri-greeter.service" "lomiri-shell.service" ]; after = [ "graphical-session.target" ]; partOf = wantedBy; serviceConfig = { Loading @@ -172,14 +227,16 @@ in { systemd.services = { "dbus-com.lomiri.UserMetrics" = { serviceConfig = { serviceConfig = { Type = "dbus"; BusName = "com.lomiri.UserMetrics"; User = "usermetrics"; StandardOutput = "syslog"; SyslogIdentifier = "com.lomiri.UserMetrics"; ExecStart = "${pkgs.lomiri.libusermetrics}/libexec/libusermetrics/usermetricsservice"; } // lib.optionalAttrs (!config.security.apparmor.enable) { } // lib.optionalAttrs (!config.security.apparmor.enable) { # Due to https://gitlab.com/ubports/development/core/libusermetrics/-/issues/8, auth must be disabled when not using AppArmor, lest the next database usage breaks Environment = "USERMETRICS_NO_AUTH=1"; }; Loading @@ -194,7 +251,8 @@ in { }; users.groups.usermetrics = { }; }; }) ]; meta.maintainers = lib.teams.lomiri.members; } nixos/modules/services/logging/vector.nix +2 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ in config = lib.mkIf cfg.enable { # for cli usage environment.systemPackages = [ pkgs.vector ]; environment.systemPackages = [ cfg.package ]; systemd.services.vector = { description = "Vector event and log aggregator"; Loading @@ -40,7 +40,7 @@ in conf = format.generate "vector.toml" cfg.settings; validateConfig = file: pkgs.runCommand "validate-vector-conf" { nativeBuildInputs = [ pkgs.vector ]; nativeBuildInputs = [ cfg.package ]; } '' vector validate --no-environment "${file}" ln -s "${file}" "$out" Loading nixos/modules/services/x11/display-managers/lightdm-greeters/lomiri.nix +9 −1 Original line number Diff line number Diff line { config, lib, pkgs, ... }: { config, lib, pkgs, ... }: let Loading @@ -17,6 +22,9 @@ in }; config = lib.mkIf (ldmcfg.enable && cfg.enable) { # Lomiri greeter == Lomiri shell in special mode, need some basics setup at least services.desktopManager.lomiri.basics = true; services.xserver.displayManager.lightdm.greeters.gtk.enable = false; services.xserver.displayManager.lightdm.greeter = lib.mkDefault { Loading nixos/tests/lomiri.nix +9 −12 Original line number Diff line number Diff line Loading @@ -72,11 +72,13 @@ in inherit description password; }; services.desktopManager.lomiri.enable = lib.mkForce true; services.displayManager.defaultSession = lib.mkForce "lomiri"; # Help with OCR fonts.packages = [ pkgs.inconsolata ]; services.xserver.enable = true; services.xserver.windowManager.icewm.enable = true; services.xserver.displayManager.lightdm = { enable = true; greeters.lomiri.enable = true; }; services.displayManager.defaultSession = lib.mkForce "none+icewm"; }; enableOCR = true; Loading Loading @@ -110,13 +112,8 @@ in # Login machine.send_chars("${password}\n") machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'") # Output rendering from Lomiri has started when it starts printing performance diagnostics machine.wait_for_console_text("Last frame took") # Look for datetime's clock, one of the last elements to load wait_for_text(r"(AM|PM)") machine.screenshot("lomiri_launched") machine.wait_for_x() machine.screenshot("session_launched") ''; } ); Loading pkgs/by-name/ad/ad/package.nix 0 → 100644 +61 −0 Original line number Diff line number Diff line { lib, rustPlatform, fetchFromGitHub, installShellFiles, versionCheckHook, }: rustPlatform.buildRustPackage rec { pname = "ad"; version = "0.1.3"; src = fetchFromGitHub { owner = "sminez"; repo = "ad"; rev = "refs/tags/${version}"; hash = "sha256-l1SyrJW3lZIvoFZG57Bj134sUcoq60xfeXjzVaZPfzs="; }; cargoHash = "sha256-wpR9wZA5SGyLI1ScfZwSENuUMI/iX3YS0P/o9drIwoo="; nativeBuildInputs = [ installShellFiles ]; checkFlags = [ # both assume `/usr/bin/sh` exists "--skip=buffer::tests::try_expand_known_works::file_that_exists_abs_path" "--skip=buffer::tests::try_expand_known_works::file_that_exists_abs_path_with_addr" ]; postInstall = '' installManPage doc/man/ad.1 ''; nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; meta = { description = "Adaptable text editor"; longDescription = '' ad (pronounced A.D.) is an attempt at combining a modal editing interface of likes of vi and kakoune with the approach to extensibility of Plan9's Acme. Inside of ad text is something you can execute as well as edit. It is primarily intended as playground for experimenting with implementing various text editor features and currently is not at all optimised or feature complete enough for use as your main text editor. ''; homepage = "https://github.com/sminez/ad"; license = lib.licenses.mit; mainProgram = "ad"; maintainers = with lib.maintainers; [ aleksana ]; # rely on unix domain socket # https://github.com/sminez/ad/issues/28 platforms = lib.platforms.unix; }; } Loading
nixos/modules/services/desktop-managers/lomiri.nix +224 −166 Original line number Diff line number Diff line { config, pkgs, lib, ... }: { config, pkgs, lib, ... }: let cfg = config.services.desktopManager.lomiri; in { in { options.services.desktopManager.lomiri = { enable = lib.mkEnableOption '' the Lomiri graphical shell (formerly known as Unity8) ''; basics = lib.mkOption { internal = true; description = '' Enable basic things for getting Lomiri working. ''; type = lib.types.bool; default = config.services.xserver.displayManager.lightdm.greeters.lomiri.enable || cfg.enable; }; }; config = lib.mkMerge [ # Basics for getting Lomiri to work (lib.mkIf cfg.basics { environment = { # To override the default keyboard layout in Lomiri etc.${pkgs.lomiri.lomiri.passthru.etcLayoutsFile}.text = lib.strings.replaceStrings [ "," ] [ "\n" ] config.services.xserver.xkb.layout; pathsToLink = [ # Data "/share/locale" # TODO LUITK hardcoded default locale path, fix individual apps to not rely on it "/share/wallpapers" ]; systemPackages = with pkgs.lomiri; [ lomiri-wallpapers # default + additional wallpaper suru-icon-theme # basic indicator icons ]; }; fonts.packages = with pkgs; [ ubuntu-classic # Ubuntu is default font ]; # Xwayland is partly hardcoded in Mir so it can't really be fully turned off, and it must be on PATH for X11 apps *and Lomiri's web browser* to work. # Until Mir/Lomiri can be properly used without it, force it on so everything behaves as expected. programs.xwayland.enable = lib.mkForce true; services.ayatana-indicators = { enable = true; packages = ( with pkgs; [ ayatana-indicator-datetime # Clock ayatana-indicator-session # Controls for shutting down etc ] ); }; }) # Full Lomiri DE (lib.mkIf cfg.enable { # We need the basic setup as well services.desktopManager.lomiri.basics = true; config = lib.mkIf cfg.enable { environment = { systemPackages = (with pkgs; [ systemPackages = (with pkgs; [ glib # XDG MIME-related tools identify it as GNOME, add gio for MIME identification to work libayatana-common ubports-click ]) ++ (with pkgs.lomiri; [ ]) ++ (with pkgs.lomiri; [ hfd-service history-service libusermetrics Loading @@ -36,17 +98,12 @@ in { lomiri-terminal-app lomiri-thumbnailer lomiri-url-dispatcher lomiri-wallpapers mediascanner2 # TODO possibly needs to be kicked off by graphical-session.target morph-browser qtmir # not having its desktop file for Xwayland available causes any X11 application to crash the session suru-icon-theme telephony-service teleports ]); # To override the default keyboard layout in Lomiri etc.${pkgs.lomiri.lomiri.passthru.etcLayoutsFile}.text = lib.strings.replaceStrings [","] ["\n"] config.services.xserver.xkb.layout; }; hardware = { Loading @@ -66,39 +123,33 @@ in { lomiri-download-manager ]; fonts.packages = with pkgs; [ # Applications tend to default to Ubuntu font ubuntu-classic ]; # Copy-pasted basic stuff hardware.graphics.enable = lib.mkDefault true; fonts.enableDefaultPackages = lib.mkDefault true; programs.dconf.enable = lib.mkDefault true; # Xwayland is partly hardcoded in Mir so it can't really be fully turned off, and it must be on PATH for X11 apps *and Lomiri's web browser* to work. # Until Mir/Lomiri can be properly used without it, force it on so everything behaves as expected. programs.xwayland.enable = lib.mkForce true; services.accounts-daemon.enable = true; services.ayatana-indicators = { enable = true; packages = (with pkgs; [ ayatana-indicator-datetime packages = ( with pkgs; [ ayatana-indicator-display ayatana-indicator-messages ayatana-indicator-power ayatana-indicator-session ] ++ lib.optionals config.hardware.bluetooth.enable [ ayatana-indicator-bluetooth ] ++ lib.optionals (config.hardware.pulseaudio.enable || config.services.pipewire.pulse.enable) [ ] ++ lib.optionals config.hardware.bluetooth.enable [ ayatana-indicator-bluetooth ] ++ lib.optionals (config.hardware.pulseaudio.enable || config.services.pipewire.pulse.enable) [ ayatana-indicator-sound ]) ++ (with pkgs.lomiri; [ telephony-service ] ++ lib.optionals config.networking.networkmanager.enable [ lomiri-indicator-network ]); ] ) ++ ( with pkgs.lomiri; [ telephony-service ] ++ lib.optionals config.networking.networkmanager.enable [ lomiri-indicator-network ] ); }; services.udisks2.enable = true; Loading Loading @@ -139,9 +190,7 @@ in { # At least the network indicator is still under the unity name, due to leftover Unity-isms "/share/unity" # Data "/share/locale" # TODO LUITK hardcoded default locale path, fix individual apps to not rely on it "/share/sounds" "/share/wallpapers" ]; systemd.user.services = { Loading @@ -159,7 +208,13 @@ in { "lomiri-polkit-agent" = rec { description = "Lomiri Polkit agent"; wantedBy = [ "lomiri.service" "lomiri-full-greeter.service" "lomiri-full-shell.service" "lomiri-greeter.service" "lomiri-shell.service" ]; wantedBy = [ "lomiri.service" "lomiri-full-greeter.service" "lomiri-full-shell.service" "lomiri-greeter.service" "lomiri-shell.service" ]; after = [ "graphical-session.target" ]; partOf = wantedBy; serviceConfig = { Loading @@ -172,14 +227,16 @@ in { systemd.services = { "dbus-com.lomiri.UserMetrics" = { serviceConfig = { serviceConfig = { Type = "dbus"; BusName = "com.lomiri.UserMetrics"; User = "usermetrics"; StandardOutput = "syslog"; SyslogIdentifier = "com.lomiri.UserMetrics"; ExecStart = "${pkgs.lomiri.libusermetrics}/libexec/libusermetrics/usermetricsservice"; } // lib.optionalAttrs (!config.security.apparmor.enable) { } // lib.optionalAttrs (!config.security.apparmor.enable) { # Due to https://gitlab.com/ubports/development/core/libusermetrics/-/issues/8, auth must be disabled when not using AppArmor, lest the next database usage breaks Environment = "USERMETRICS_NO_AUTH=1"; }; Loading @@ -194,7 +251,8 @@ in { }; users.groups.usermetrics = { }; }; }) ]; meta.maintainers = lib.teams.lomiri.members; }
nixos/modules/services/logging/vector.nix +2 −2 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ in config = lib.mkIf cfg.enable { # for cli usage environment.systemPackages = [ pkgs.vector ]; environment.systemPackages = [ cfg.package ]; systemd.services.vector = { description = "Vector event and log aggregator"; Loading @@ -40,7 +40,7 @@ in conf = format.generate "vector.toml" cfg.settings; validateConfig = file: pkgs.runCommand "validate-vector-conf" { nativeBuildInputs = [ pkgs.vector ]; nativeBuildInputs = [ cfg.package ]; } '' vector validate --no-environment "${file}" ln -s "${file}" "$out" Loading
nixos/modules/services/x11/display-managers/lightdm-greeters/lomiri.nix +9 −1 Original line number Diff line number Diff line { config, lib, pkgs, ... }: { config, lib, pkgs, ... }: let Loading @@ -17,6 +22,9 @@ in }; config = lib.mkIf (ldmcfg.enable && cfg.enable) { # Lomiri greeter == Lomiri shell in special mode, need some basics setup at least services.desktopManager.lomiri.basics = true; services.xserver.displayManager.lightdm.greeters.gtk.enable = false; services.xserver.displayManager.lightdm.greeter = lib.mkDefault { Loading
nixos/tests/lomiri.nix +9 −12 Original line number Diff line number Diff line Loading @@ -72,11 +72,13 @@ in inherit description password; }; services.desktopManager.lomiri.enable = lib.mkForce true; services.displayManager.defaultSession = lib.mkForce "lomiri"; # Help with OCR fonts.packages = [ pkgs.inconsolata ]; services.xserver.enable = true; services.xserver.windowManager.icewm.enable = true; services.xserver.displayManager.lightdm = { enable = true; greeters.lomiri.enable = true; }; services.displayManager.defaultSession = lib.mkForce "none+icewm"; }; enableOCR = true; Loading Loading @@ -110,13 +112,8 @@ in # Login machine.send_chars("${password}\n") machine.wait_until_succeeds("pgrep -u ${user} -f 'lomiri --mode=full-shell'") # Output rendering from Lomiri has started when it starts printing performance diagnostics machine.wait_for_console_text("Last frame took") # Look for datetime's clock, one of the last elements to load wait_for_text(r"(AM|PM)") machine.screenshot("lomiri_launched") machine.wait_for_x() machine.screenshot("session_launched") ''; } ); Loading
pkgs/by-name/ad/ad/package.nix 0 → 100644 +61 −0 Original line number Diff line number Diff line { lib, rustPlatform, fetchFromGitHub, installShellFiles, versionCheckHook, }: rustPlatform.buildRustPackage rec { pname = "ad"; version = "0.1.3"; src = fetchFromGitHub { owner = "sminez"; repo = "ad"; rev = "refs/tags/${version}"; hash = "sha256-l1SyrJW3lZIvoFZG57Bj134sUcoq60xfeXjzVaZPfzs="; }; cargoHash = "sha256-wpR9wZA5SGyLI1ScfZwSENuUMI/iX3YS0P/o9drIwoo="; nativeBuildInputs = [ installShellFiles ]; checkFlags = [ # both assume `/usr/bin/sh` exists "--skip=buffer::tests::try_expand_known_works::file_that_exists_abs_path" "--skip=buffer::tests::try_expand_known_works::file_that_exists_abs_path_with_addr" ]; postInstall = '' installManPage doc/man/ad.1 ''; nativeInstallCheckInputs = [ versionCheckHook ]; doInstallCheck = true; meta = { description = "Adaptable text editor"; longDescription = '' ad (pronounced A.D.) is an attempt at combining a modal editing interface of likes of vi and kakoune with the approach to extensibility of Plan9's Acme. Inside of ad text is something you can execute as well as edit. It is primarily intended as playground for experimenting with implementing various text editor features and currently is not at all optimised or feature complete enough for use as your main text editor. ''; homepage = "https://github.com/sminez/ad"; license = lib.licenses.mit; mainProgram = "ad"; maintainers = with lib.maintainers; [ aleksana ]; # rely on unix domain socket # https://github.com/sminez/ad/issues/28 platforms = lib.platforms.unix; }; }