12 # GNOME initial setup's run is conditioned on whether
13 # the gnome-initial-setup-done file exists in XDG_CONFIG_HOME
14 # Because of this, every existing user will have initial setup
15 # running because they never ran it before.
17 # To prevent this we create the file if the users stateVersion
18 # is older than 20.03 (the release we added this module).
20 script = pkgs.writeScript "create-gis-stamp-files" ''
21 #!${pkgs.runtimeShell}
22 setup_done=$HOME/.config/gnome-initial-setup-done
24 echo "Creating g-i-s stamp file $setup_done ..."
25 cat - > $setup_done <<- EOF
30 createGisStampFilesAutostart = pkgs.writeTextFile rec {
31 name = "create-g-i-s-stamp-files";
32 destination = "/etc/xdg/autostart/${name}.desktop";
36 Name=Create GNOME Initial Setup stamp files
41 AutostartCondition=unless-exists gnome-initial-setup-done
42 X-GNOME-Autostart-Phase=EarlyInitialization
51 maintainers = lib.teams.gnome.members;
58 services.gnome.gnome-initial-setup = {
60 enable = lib.mkEnableOption "GNOME Initial Setup, a Simple, easy, and safe way to prepare a new system";
68 config = lib.mkIf config.services.gnome.gnome-initial-setup.enable {
70 environment.systemPackages =
72 pkgs.gnome-initial-setup
74 ++ lib.optional (lib.versionOlder config.system.stateVersion "20.03") createGisStampFilesAutostart;
77 pkgs.gnome-initial-setup
80 systemd.user.targets."gnome-session".wants = [
81 "gnome-initial-setup-copy-worker.service"
82 "gnome-initial-setup-first-login.service"
83 "gnome-welcome-tour.service"
86 systemd.user.targets."gnome-session@gnome-initial-setup".wants = [
87 "gnome-initial-setup.service"
90 programs.dconf.profiles.gnome-initial-setup.databases = [
91 "${pkgs.gnome-initial-setup}/share/gnome-initial-setup/initial-setup-dconf-defaults"