#https://nix-community.github.io/home-manager/options.html #https://teddit.adminforge.de/r/NixOS/comments/r1f3nt/how_to_configure_multiple_users_with_home_manager/ #https://ryantm.github.io/nixpkgs/using/configuration/#chap-packageconfig { config, lib, pkgs, ... }: let home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-22.05.tar.gz"; gvariant = import "${home-manager}/modules/lib/gvariant.nix" { lib = lib; }; curoUiIcon = pkgs.fetchurl { url = "https://kb.curo.sk/curo-ui.ico"; sha256 = "ce13aa38920265e344899240a7e2ad4a252c248651352f4a9b2426957147b85c"; }; hostname = "localhost:3000"; in { imports = [ (import "${home-manager}/nixos") ]; home-manager.useGlobalPkgs = true; i18n.defaultLocale = "sk_SK.UTF-8"; services.xserver = { enable = true; desktopManager.pantheon.enable = true; desktopManager.pantheon.extraGSettingsOverrides = '' [org.gnome.desktop.input-sources] sources=[('xkb', 'sk+qwerty'), ('xkb', 'us')] [io.elementary.desktop/wingpanel/datetime] clock-format='24h' clock-show-seconds=false clock-show-weekday=true show-weeks=true ''; }; home-manager.users.admin = { home.packages = with pkgs; [ appimage-run ]; programs.chromium.enable = true; programs.home-manager.enable = true; xdg.desktopEntries = { curoui = { # ~/.nix-profile/share/applications/curoui.desktop name = "CuroUI"; genericName = "CuroUI"; comment = "Ambulantný informačný systém Curo"; exec = ''chromium --start-maximized --allow-insecure-localhost --lang=sk --app=http://${hostname}/ui --user-data-dir=/home/admin/.config/curoui''; terminal = false; categories = [ "Application" "Office" ]; mimeType = [ "text/html" "text/xml" ]; icon = ''${curoUiIcon}''; startupNotify = true; settings = { # nix-shell --command "wmctrl -lx" -p wmctrl StartupWMClass = "localhost__ui"; # localhost__ui.Chromium-browser }; }; curouiapp = { # ~/.nix-profile/share/applications/curouiapp.desktop name = "CuroUI App"; genericName = "CuroUIApp"; comment = "Ambulantný informačný systém Curo - AppImage"; # https://discourse.nixos.org/t/nvidia-fatal-gpu-data-manager-impl-private-cc-445-gpu-process-isnt-usable-goodbye/18651/3 exec = ''appimage-run /home/admin/Stiahnuté/curo-ui-x86_64.AppImage --disable-gpu-sandbox''; terminal = false; categories = [ "Application" "Office" ]; # mimeType = [ "text/html" "text/xml" ]; icon = ''${curoUiIcon}''; startupNotify = true; settings = { # nix-shell --command "wmctrl -lx" -p wmctrl StartupWMClass = "curo.Curo"; }; }; }; # use: nix-shell --command "dconf dump / | dconf2nix" -p dconf2nix dconf.settings = { "org/gnome/desktop/input-sources" = { sources = [ (gvariant.mkTuple [ "xkb" "sk+qwerty" ]) (gvariant.mkTuple [ "xkb" "us" ]) ]; xkb-options = [ "grp:alt_shift_toggle" ]; }; "io/elementary/desktop/wingpanel/datetime" = { clock-format = "24h"; clock-show-seconds = false; clock-show-weekday = true; show-weeks = true; }; }; }; }