diff --git a/.github/workflows/backport.yml b/.github/workflows/backport.yml index f6287a69..514ba1f3 100644 --- a/.github/workflows/backport.yml +++ b/.github/workflows/backport.yml @@ -37,7 +37,7 @@ jobs: ref: ${{ github.event.pull_request.head.sha }} - name: Create backport PRs id: backport - uses: korthout/backport-action@v3 + uses: korthout/backport-action@v4 with: # See https://github.com/korthout/backport-action#inputs github_token: ${{ steps.app-token.outputs.token || secrets.GITHUB_TOKEN }} diff --git a/docs/release-notes/rl-2305.md b/docs/release-notes/rl-2305.md index 1358cf71..bdd99100 100644 --- a/docs/release-notes/rl-2305.md +++ b/docs/release-notes/rl-2305.md @@ -57,3 +57,9 @@ changes are only active if the `home.stateVersion` option is set to now default to `true` which is consistent with the default values for those options used by `i3` and `sway`. + +- The [](#opt-programs.swaylock.enable) option now defaults to `false` + and must be explicitly enabled. Previously, it would be implicitly + enabled when `programs.swaylock.settings` was non-empty. Users with + `home.stateVersion` set to earlier versions will continue to get the + old implicit behavior. diff --git a/docs/release-notes/rl-2505.md b/docs/release-notes/rl-2505.md index 977e853c..2ec0f1ad 100644 --- a/docs/release-notes/rl-2505.md +++ b/docs/release-notes/rl-2505.md @@ -27,4 +27,8 @@ The state version in this release includes the changes below. These changes are only active if the `home.stateVersion` option is set to \"25.05\" or later. -- No changes. +- The [](#opt-programs.git.signing.format) option no longer defaults to + `"openpgp"`. Users who use Git signing with GPG should explicitly set + this option to `"openpgp"` to maintain the previous behavior. Users + with `home.stateVersion` set to earlier versions will continue to get + the `"openpgp"` default for backwards compatibility. diff --git a/docs/release-notes/rl-2511.md b/docs/release-notes/rl-2511.md index 8f0c666f..83f4b396 100644 --- a/docs/release-notes/rl-2511.md +++ b/docs/release-notes/rl-2511.md @@ -80,3 +80,10 @@ changes are only active if the `home.stateVersion` option is set to `{ PASSWORD_STORE_DIR = $XDG_DATA_HOME/password-store; }` anymore by its default value. This will revert to the default behaviour of the program, namely `$HOME/.password-store` to be used as the store path. + +- On macOS, [](#opt-targets.darwin.copyApps.enable) is now enabled by + default instead of [](#opt-targets.darwin.linkApps.enable). This means + applications from `home.packages` will be copied to + `~/Applications/Home Manager Apps` rather than symlinked, making them + work properly with Spotlight. Users with `home.stateVersion` set to + earlier versions will continue to use `linkApps` by default. diff --git a/flake.lock b/flake.lock index c2ef7652..ba194e12 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1764406085, - "narHash": "sha256-CYbMp8hwuOf4umokSNp+t1s4Hjd4vxXq4S5CD+xvgNs=", + "lastModified": 1766473571, + "narHash": "sha256-5G1NDO2PulBx1RoaA6U1YoUDX0qZslpPxv+n5GX6Qto=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9561691c9f450fad7c3526916e1c4f44be0d1192", + "rev": "76701a179d3a98b07653e2b0409847499b2a07d3", "type": "github" }, "original": { diff --git a/modules/accounts/contacts.nix b/modules/accounts/contacts.nix index 780f6bb5..506b66a1 100644 --- a/modules/accounts/contacts.nix +++ b/modules/accounts/contacts.nix @@ -102,8 +102,8 @@ let }; local = mkOption { - type = types.nullOr (localModule name); - default = null; + type = localModule name; + default = { }; description = '' Local configuration for the contacts. ''; diff --git a/modules/misc/qt.nix b/modules/misc/qt.nix index 0fe00d77..6bee4217 100644 --- a/modules/misc/qt.nix +++ b/modules/misc/qt.nix @@ -8,6 +8,10 @@ let cfg = config.qt; + qtctFormat = pkgs.formats.ini { + listToValue = values: lib.concatStringsSep ", " values; + }; + # Map platform names to their packages. platformPackages = with pkgs; { gnome = [ @@ -286,7 +290,34 @@ in ''; }; }; - }; + } + // (lib.genAttrs' [ "qt5ct" "qt6ct" ] ( + name: + lib.nameValuePair "${name}Settings" ( + lib.mkOption { + type = lib.types.nullOr qtctFormat.type; + default = null; + example = lib.literalExpression '' + { + Appearance = { + style = "kvantum"; + icon_theme = "Papirus-Dark"; + standar_dialogs = "xdgdesktopportal"; + }; + Fonts = { + fixed = "\"DejaVuSansM Nerd Font Mono,12\""; + general = "\"DejaVu Sans,12\""; + }; + } + ''; + description = '' + Qtct configuration. Writes settings to `${name}/${name}.conf` + file. Lists will be translated to comma-separated strings. + Fonts must be quoted (see example). + ''; + } + ) + )); }; config = @@ -397,5 +428,18 @@ in ] ++ lib.optionals (platformTheme.name != null) [ "QT_QPA_PLATFORMTHEME" ] ++ lib.optionals (cfg.style.name != null) [ "QT_STYLE_OVERRIDE" ]; + + xdg.configFile = + lib.pipe + [ "qt5ct" "qt6ct" ] + [ + (lib.filter (qtct: cfg."${qtct}Settings" != null)) + (lib.flip lib.genAttrs' ( + qtct: + lib.nameValuePair "${qtct}/${qtct}.conf" { + source = qtctFormat.generate "${qtct}-config" cfg."${qtct}Settings"; + } + )) + ]; }; } diff --git a/modules/programs/pimsync/default.nix b/modules/programs/pimsync/default.nix index b8edb7df..bf772c8f 100644 --- a/modules/programs/pimsync/default.nix +++ b/modules/programs/pimsync/default.nix @@ -51,7 +51,7 @@ localStorage = calendar: name: acc: { name = "storage"; - params = [ "${name}-local" ]; + params = [ "${if calendar then "calendar" else "contacts"}-${name}-local" ]; children = (attrsToDirectives { inherit (acc.local) path; @@ -63,7 +63,7 @@ remoteStorage = calendar: name: acc: { name = "storage"; - params = [ "${name}-remote" ]; + params = [ "${if calendar then "calendar" else "contacts"}-${name}-remote" ]; children = (attrsToDirectives { inherit (acc.remote) url; @@ -91,8 +91,8 @@ params = lib.singleton "${if calendar then "calendar" else "contacts"}-${name}"; children = (attrsToDirectives { - storage_a = "${name}-local"; - storage_b = "${name}-remote"; + storage_a = "${if calendar then "calendar" else "contacts"}-${name}-local"; + storage_b = "${if calendar then "calendar" else "contacts"}-${name}-remote"; }) ++ acc.pimsync.extraPairDirectives; }; diff --git a/modules/programs/thunderbird.nix b/modules/programs/thunderbird.nix index 1fa1e8dc..83b0b2eb 100644 --- a/modules/programs/thunderbird.nix +++ b/modules/programs/thunderbird.nix @@ -9,6 +9,7 @@ let attrValues concatStringsSep filter + flatten length literalExpression mapAttrsToList @@ -918,7 +919,14 @@ in calendarAccounts = getAccountsForProfile name enabledCalendarAccountsWithId; contactAccounts = getAccountsForProfile name enabledContactAccountsWithId; - smtp = filter (a: a.smtp != null) emailAccounts; + accountsSmtp = filter (a: a.smtp != null) emailAccounts; + aliasesSmtp = + let + getAliasesWithSmtp = a: filter (al: builtins.isAttrs al && al.smtp != null) a.aliases; + getAliasesWithId = a: map (al: al // { id = getId a al; }) (getAliasesWithSmtp a); + in + flatten (map getAliasesWithId emailAccounts); + smtp = accountsSmtp ++ aliasesSmtp; feedAccounts = addId (attrValues profile.feedAccounts); diff --git a/nixos/common.nix b/nixos/common.nix index 5468df94..b5bcfa57 100644 --- a/nixos/common.nix +++ b/nixos/common.nix @@ -85,7 +85,7 @@ in backupCommand = mkOption { type = types.nullOr (types.either types.str types.path); default = null; - example = lib.literalExpression "''${pkgs.trash-cli}/bin/trash"; + example = lib.literalExpression "\${pkgs.trash-cli}/bin/trash"; description = '' On activation run this command on each existing file rather than exiting with an error. diff --git a/tests/modules/misc/qt/default.nix b/tests/modules/misc/qt/default.nix index 88ba03f4..bfdfea91 100644 --- a/tests/modules/misc/qt/default.nix +++ b/tests/modules/misc/qt/default.nix @@ -4,4 +4,7 @@ qt-platform-theme-gtk3 = ./qt-platform-theme-gtk3.nix; qt-platform-theme-gnome = ./qt-platform-theme-gnome.nix; qt-platform-theme-kde6-migration = ./qt-platform-theme-kde6-migration.nix; + qt-qt5ct-settings = ./qt-qt5ct-settings.nix; + qt-qt6ct-settings = ./qt-qt6ct-settings.nix; + qt-qtct-settings = ./qt-qtct-settings.nix; } diff --git a/tests/modules/misc/qt/qt-qt5ct-settings.nix b/tests/modules/misc/qt/qt-qt5ct-settings.nix new file mode 100644 index 00000000..152cdbf6 --- /dev/null +++ b/tests/modules/misc/qt/qt-qt5ct-settings.nix @@ -0,0 +1,13 @@ +{ + qt = { + enable = true; + qt5ctSettings = { + test_section.test_option = "test"; + }; + }; + + nmt.script = '' + assertFileExists "home-files/.config/qt5ct/qt5ct.conf" + assertPathNotExists "home-files/.config/qt6ct/qt6ct.conf" + ''; +} diff --git a/tests/modules/misc/qt/qt-qt6ct-settings.nix b/tests/modules/misc/qt/qt-qt6ct-settings.nix new file mode 100644 index 00000000..d363d881 --- /dev/null +++ b/tests/modules/misc/qt/qt-qt6ct-settings.nix @@ -0,0 +1,13 @@ +{ + qt = { + enable = true; + qt6ctSettings = { + test_section.test_option = "test"; + }; + }; + + nmt.script = '' + assertFileExists "home-files/.config/qt6ct/qt6ct.conf" + assertPathNotExists "home-files/.config/qt5ct/qt5ct.conf" + ''; +} diff --git a/tests/modules/misc/qt/qt-qtct-settings.nix b/tests/modules/misc/qt/qt-qtct-settings.nix new file mode 100644 index 00000000..e5805009 --- /dev/null +++ b/tests/modules/misc/qt/qt-qtct-settings.nix @@ -0,0 +1,16 @@ +{ + qt = { + enable = true; + qt5ctSettings = { + test_section.test_option = "test"; + }; + qt6ctSettings = { + test_section.test_option = "test"; + }; + }; + + nmt.script = '' + assertFileExists "home-files/.config/qt5ct/qt5ct.conf" + assertFileExists "home-files/.config/qt6ct/qt6ct.conf" + ''; +} diff --git a/tests/modules/programs/pimsync/basic.nix b/tests/modules/programs/pimsync/basic.nix index 2b9b7434..f029ea1f 100644 --- a/tests/modules/programs/pimsync/basic.nix +++ b/tests/modules/programs/pimsync/basic.nix @@ -1,6 +1,6 @@ { accounts.calendar = { - accounts.caldav = { + accounts.mine = { pimsync.enable = true; remote = { passwordCommand = [ @@ -22,6 +22,22 @@ basePath = ".local/state/calendar"; }; + accounts.contact = { + accounts.mine = { + pimsync.enable = true; + remote = { + passwordCommand = [ + "pass" + "carddav" + ]; + type = "carddav"; + url = "https://carddav.example.com"; + userName = "bob"; + }; + }; + basePath = ".local/state/contact"; + }; + programs.pimsync = { enable = true; settings = [ diff --git a/tests/modules/programs/pimsync/basic.scfg b/tests/modules/programs/pimsync/basic.scfg index e0f6bb22..6d09cbb3 100644 --- a/tests/modules/programs/pimsync/basic.scfg +++ b/tests/modules/programs/pimsync/basic.scfg @@ -1,14 +1,18 @@ -storage caldav-local { - fileext .ics - path /home/hm-user/.local/state/calendar/caldav - type vdir/icalendar -} -storage http-local { +storage calendar-http-local { fileext .ics path /home/hm-user/.local/state/calendar/http type vdir/icalendar } -storage caldav-remote { +storage calendar-mine-local { + fileext .ics + path /home/hm-user/.local/state/calendar/mine + type vdir/icalendar +} +storage calendar-http-remote { + type webcal + url https://example.com/calendar +} +storage calendar-mine-remote { type caldav url https://caldav.example.com username alice @@ -16,16 +20,29 @@ storage caldav-remote { cmd pass caldav } } -storage http-remote { - type webcal - url https://example.com/calendar -} -pair calendar-caldav { - storage_a caldav-local - storage_b caldav-remote -} pair calendar-http { - storage_a http-local - storage_b http-remote + storage_a calendar-http-local + storage_b calendar-http-remote +} +pair calendar-mine { + storage_a calendar-mine-local + storage_b calendar-mine-remote +} +storage contacts-mine-local { + fileext .vcf + path /home/hm-user/.local/state/contact/mine + type vdir/vcard +} +storage contacts-mine-remote { + type carddav + url https://carddav.example.com + username bob + password { + cmd pass carddav + } +} +pair contacts-mine { + storage_a contacts-mine-local + storage_b contacts-mine-remote } status_path /test/dir diff --git a/tests/modules/programs/thunderbird/thunderbird-expected-first-darwin.js b/tests/modules/programs/thunderbird/thunderbird-expected-first-darwin.js index 852a91b2..bd016760 100644 --- a/tests/modules/programs/thunderbird/thunderbird-expected-first-darwin.js +++ b/tests/modules/programs/thunderbird/thunderbird-expected-first-darwin.js @@ -120,7 +120,7 @@ user_pref("mail.smtpserver.smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfa user_pref("mail.smtpserver.smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.port", 456); user_pref("mail.smtpserver.smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.try_ssl", 3); user_pref("mail.smtpserver.smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.username", "home.manager"); -user_pref("mail.smtpservers", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc,smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f"); +user_pref("mail.smtpservers", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc,smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f,smtp_b24ca86ede61ed219e6c87cfec261aae2c72785f812489ea943d114d1f39f55b"); user_pref("privacy.donottrackheader.enabled", true); user_pref("mail.html_compose", false); diff --git a/tests/modules/programs/thunderbird/thunderbird-expected-first-linux.js b/tests/modules/programs/thunderbird/thunderbird-expected-first-linux.js index 8cbf7be3..bf32de26 100644 --- a/tests/modules/programs/thunderbird/thunderbird-expected-first-linux.js +++ b/tests/modules/programs/thunderbird/thunderbird-expected-first-linux.js @@ -120,7 +120,7 @@ user_pref("mail.smtpserver.smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfa user_pref("mail.smtpserver.smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.port", 456); user_pref("mail.smtpserver.smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.try_ssl", 3); user_pref("mail.smtpserver.smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f.username", "home.manager"); -user_pref("mail.smtpservers", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc,smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f"); +user_pref("mail.smtpservers", "smtp_bcd3ace52bed41febb6cdc2fb1303aebaa573e0d993872da503950901bb6c6fc,smtp_cda3f13b64c1db7d4b58ce07a31304a362d7dcaf14476bfabcca913ae41ada9f,smtp_b24ca86ede61ed219e6c87cfec261aae2c72785f812489ea943d114d1f39f55b"); user_pref("privacy.donottrackheader.enabled", true); user_pref("mail.html_compose", false);