Compare commits

...

10 commits

Author SHA1 Message Date
0xda157
cfe89cabaa ci: don't run checks on github actions
Some checks are pending
Label Merge Conflicts / conflicts (push) Waiting to run
(cherry picked from commit 69f1522ca6)
2025-12-24 20:15:40 +01:00
0xda157
21da33cdd4 flake: add remaining drvs to ci.buildbot
Closes: https://github.com/nix-community/stylix/issues/2056
(cherry picked from commit 7420f203ca)
2025-12-24 20:15:40 +01:00
NAHO
c97b7b37b2 nvf: add empty line to improve readability (#2086)
Link: https://github.com/nix-community/stylix/pull/2086

Reviewed-by: 0xda157 <da157@voidq.com>
(cherry picked from commit 1297baa750)
2025-12-23 19:41:15 +01:00
0xda157
15f6ffc5e5 flake: add nix-community cachix as substituters (#1796)
Link: https://github.com/nix-community/stylix/pull/1796

Reviewed-by: Matt Sturgeon <matt@sturgeon.me.uk>
Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit 844294a58e)
2025-12-22 23:09:16 -08:00
dependabot[bot]
c51431509b ci: bump korthout/backport-action from 3.4.1 to 4.0.1 (#2094)
Link: https://github.com/nix-community/stylix/pull/2094

Reviewed-by: NAHO <trueNAHO@users.noreply.github.com>
(cherry picked from commit e6829552d4)
2025-12-22 16:55:01 +01:00
Jon Erling Hustadnes
76c65d08c1 qt: improve highlight and text contrast (#2097)
Closes: https://github.com/nix-community/stylix/issues/2079
Link: https://github.com/nix-community/stylix/pull/2097

Reviewed-by: NAHO <trueNAHO@users.noreply.github.com>
(cherry picked from commit c53b4a548a)
2025-12-22 16:53:48 +01:00
ulli-lassance
87d4fd1127 qt: add standardDialogs option (#2090)
Link: https://github.com/nix-community/stylix/pull/2090

Co-authored-by: NAHO <trueNAHO@users.noreply.github.com>
Reviewed-by: NAHO <trueNAHO@users.noreply.github.com>
Reviewed-by: Mikilio <official.mikilio@gmail.com>
(cherry picked from commit 626dab1b56)
2025-12-22 16:45:41 +01:00
Viktor Titov
259af48fe5
qt: use qt.qt{5,6}ctSettings options (#2095)
Link: https://github.com/nix-community/stylix/pull/2095

Reviewed-by: NAHO <trueNAHO@users.noreply.github.com>
2025-12-16 16:48:22 +01:00
NAHO
b019ddbaf4 flake: lock base16-fish input to custom patchset (#2092)
Closes: https://github.com/nix-community/stylix/issues/526
Link: https://github.com/nix-community/stylix/pull/2092
Link: https://github.com/tomyun/base16-fish/pull/16

Tested-by: Rafael Alexander Muijsert <rafael@muijsert.org>
Approved-by: Rafael Alexander Muijsert <rafael@muijsert.org>
(cherry picked from commit 9ba353558a)
2025-12-16 16:41:42 +01:00
theunpleasantowl
4e63fa32d8 gnome: only exclude GNOME backgrounds when setting wallpaper (#2088)
Link: https://github.com/nix-community/stylix/pull/2088

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
(cherry picked from commit f6e9fbaeb3)
2025-12-15 13:44:00 +01:00
12 changed files with 114 additions and 146 deletions

View file

@ -45,7 +45,7 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ steps.app-token.outputs.token }}
- uses: korthout/backport-action@v3.4.1
- uses: korthout/backport-action@v4.0.1
id: backport
with:
github_token: ${{ steps.app-token.outputs.token }}

View file

@ -1,60 +0,0 @@
---
name: Check
on:
push:
branches:
- master
- release-**
pull_request:
permissions:
contents: read
defaults:
run:
shell: bash
jobs:
check:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runs-on }}
# https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job#choosing-github-hosted-runners
strategy:
matrix:
include:
- name: aarch64-linux
runs-on: ubuntu-24.04-arm
- name: aarch64-darwin
runs-on: macos-15
- name: x86_64-linux
runs-on: ubuntu-24.04
- name: x86_64-darwin
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
# TODO: Lock this Action to a release tag once commit [1] ("fix: relocate
# TMPDIR to /mnt to improve Nix installer compatibility") is part of a
# release, resolving [2] ("does not work with cachix install nix action").
#
# [1]: https://github.com/wimpysworld/nothing-but-nix/pull/25
# [2]: https://github.com/wimpysworld/nothing-but-nix/issues/24
- uses: wimpysworld/nothing-but-nix@10c936d9e46521bf923f75458e0cbd4fa309300d # yamllint disable-line rule:line-length
if: runner.os == 'Linux'
with:
hatchet-protocol: rampage
- uses: cachix/install-nix-action@v31
- uses: cachix/cachix-action@v16
with:
name: nix-community
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
continue-on-error: true
- run: nix develop --command stylix-check --no-nom

8
flake.lock generated
View file

@ -21,17 +21,17 @@
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1754405784,
"narHash": "sha256-l9xHIy+85FN+bEo6yquq2IjD1rSg9fjfjpyGP1W8YXo=",
"lastModified": 1765809053,
"narHash": "sha256-XCUQLoLfBJ8saWms2HCIj4NEN+xNsWBlU1NrEPcQG4s=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"rev": "23ae20a0093dca0d7b39d76ba2401af0ccf9c561",
"rev": "86cbea4dca62e08fb7fd83a70e96472f92574782",
"type": "github"
}
},

View file

@ -13,16 +13,13 @@
# keep-sorted start block=yes newline_separated=yes
base16-fish = {
# Lock the base16-fish input to a custom patch [2] ("Make autosuggestion
# and comment base03"), since it is currently impossible to apply patches
# Lock the base16-fish input to a custom patchset that cherry-picks
# pending patches [2], since it is currently impossible to apply patches
# to flake inputs [1] ("Support flake references to patches").
#
# Once this single-patch approach no longer scales, the repository should
# be properly forked, if [2] has still not been merged.
#
# [1]: https://github.com/NixOS/nix/issues/3920
# [2]: https://github.com/tomyun/base16-fish/pull/12
url = "github:tomyun/base16-fish/23ae20a0093dca0d7b39d76ba2401af0ccf9c561";
# [2]: https://github.com/tomyun/base16-fish/pull/16
url = "github:tomyun/base16-fish/86cbea4dca62e08fb7fd83a70e96472f92574782";
flake = false;
};
@ -99,6 +96,13 @@
# keep-sorted end
};
nixConfig = {
extra-substituters = [ "https://nix-community.cachix.org" ];
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
outputs =
{ flake-parts, systems, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {

View file

@ -39,6 +39,8 @@
'';
in
{
ci.buildbot = { inherit (config) devShells; };
devShells = {
default = pkgs.mkShell {
# Install git-hooks when activating the shell

6
flake/dev/flake.lock generated
View file

@ -97,11 +97,11 @@
]
},
"locked": {
"lastModified": 1764736872,
"narHash": "sha256-4mqLegNQeD54X7enm6EI9aNWl6CaIfyhl5PaYoGYwqk=",
"lastModified": 1765859973,
"narHash": "sha256-LN5O0h9GSgcDE/sz4+sLS3CbQALru1x4lh9hrxpeHwI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "3366918730bb6b699395a9d237397f1d710a94b3",
"rev": "7df150f0d3857cf68dae443813b27acfb201b2d8",
"type": "github"
},
"original": {

View file

@ -5,6 +5,8 @@
perSystem =
{ config, ... }:
{
ci.buildbot = { inherit (config.checks) pre-commit; };
pre-commit = {
check.enable = true;

View file

@ -1,41 +1,44 @@
{ inputs, ... }:
{
perSystem =
{ lib, pkgs, ... }:
{
checks = lib.mkMerge (
map
(
input:
let
name = "${input}-and-dev-${input}-version-consistency";
in
{
${name} =
let
dev = inputs."dev-${input}".narHash;
public = inputs.${input}.narHash;
in
pkgs.runCommand name { } ''
if [ "${public}" != "${dev}" ]; then
printf \
'inconsistent ${input} (%s) and dev-${input} (%s) versions\n' \
"${public}" \
"${dev}" \
>&2
lib,
pkgs,
system,
...
}:
let
checks = lib.genAttrs' [ "flake-parts" "nixpkgs" "systems" ] (
input:
let
name = "${input}-and-dev-${input}-version-consistency";
in
lib.nameValuePair name (
let
dev = inputs."dev-${input}".narHash;
public = inputs.${input}.narHash;
in
pkgs.runCommand name { } ''
if [ "${public}" != "${dev}" ]; then
printf \
'inconsistent ${input} (%s) and dev-${input} (%s) versions\n' \
"${public}" \
"${dev}" \
>&2
exit 1
fi
exit 1
fi
mkdir "$out"
'';
}
)
[
"flake-parts"
"nixpkgs"
"systems"
]
mkdir "$out"
''
)
);
in
{
inherit checks;
ci.buildbot = lib.mkIf (system == "x86_64-linux") {
public-and-dev-version-consistency = pkgs.linkFarm "public-and-dev-version-consistency" checks;
};
};
}

View file

@ -29,12 +29,14 @@ in
)
)
{
# As Stylix is controlling the wallpaper, there is no need for this
# If Stylix is controlling the wallpaper, there is no need for this
# pack of default wallpapers to be installed.
# If you want to use one, you can set stylix.image to something like
# "${pkgs.gnome-backgrounds}/path/to/your/preferred/background"
# which will then download the pack regardless of its exclusion below.
environment.gnome.excludePackages = [ pkgs.gnome-backgrounds ];
environment.gnome.excludePackages = lib.mkIf (config.stylix.image != null) [
pkgs.gnome-backgrounds
];
nixpkgs.overlays = [
(_: super: {

View file

@ -3,6 +3,7 @@ mkTarget:
mkTarget {
name = "nvf";
humanName = "nvf";
options = {
plugin = lib.mkOption {
type = lib.types.enum [

View file

@ -28,6 +28,28 @@
type = lib.types.str;
default = "qtct";
};
standardDialogs = lib.mkOption {
description = ''
Selects the standard dialogs theme to be used by Qt.
Using `xdgdesktopportal` integrates with the native desktop portal.
'';
# The enum variants are derived from the qt6ct platform theme integration
# [1].
#
# [1]: https://www.opencode.net/trialuser/qt6ct/-/blob/00823e41aa60e8fe266d5aee328e82ad1ad94348/src/qt6ct/appearancepage.cpp#L83-L92
type = lib.types.enum [
"default"
"gtk2"
"gtk3"
"kde"
"xdgdesktopportal"
];
default = "default";
};
};
config = lib.mkIf (config.stylix.enable && config.stylix.targets.qt.enable) (
@ -75,46 +97,38 @@
home.packages = lib.optional (config.qt.style.name == "kvantum") kvantumPackage;
qt = {
enable = true;
style.name = recommendedStyle;
platformTheme.name = config.stylix.targets.qt.platform;
};
xdg.configFile =
qt =
let
qtctConf = ''
[Appearance]
custom_palette=true
''
+ lib.optionalString (config.qt.style ? name) ''
style=${config.qt.style.name}
''
+ lib.optionalString (icons != null) ''
icon_theme=${icons}
''
+ ''
[Fonts]
fixed="${config.stylix.fonts.monospace.name},${toString config.stylix.fonts.sizes.applications}"
general="${config.stylix.fonts.sansSerif.name},${toString config.stylix.fonts.sizes.applications}"
'';
qtctSettings = {
Appearance = {
custom_palette = true;
standard_dialogs = config.stylix.targets.qt.standardDialogs;
style = lib.mkIf (config.qt.style ? name) config.qt.style.name;
icon_theme = lib.mkIf (icons != null) icons;
};
Fonts = {
fixed = ''"${config.stylix.fonts.monospace.name},${toString config.stylix.fonts.sizes.applications}"'';
general = ''"${config.stylix.fonts.sansSerif.name},${toString config.stylix.fonts.sizes.applications}"'';
};
};
in
lib.mkMerge [
(lib.mkIf (config.qt.style.name == "kvantum") {
"Kvantum/kvantum.kvconfig".source =
(pkgs.formats.ini { }).generate "kvantum.kvconfig"
{ General.theme = "Base16Kvantum"; };
{
enable = true;
style.name = recommendedStyle;
platformTheme.name = config.stylix.targets.qt.platform;
"Kvantum/Base16Kvantum".source =
"${kvantumPackage}/share/Kvantum/Base16Kvantum";
})
qt5ctSettings = lib.mkIf (config.qt.platformTheme.name == "qtct") qtctSettings;
qt6ctSettings = lib.mkIf (config.qt.platformTheme.name == "qtct") qtctSettings;
};
(lib.mkIf (config.qt.platformTheme.name == "qtct") {
"qt5ct/qt5ct.conf".text = qtctConf;
"qt6ct/qt6ct.conf".text = qtctConf;
})
];
xdg.configFile = lib.mkIf (config.qt.style.name == "kvantum") {
"Kvantum/kvantum.kvconfig".source =
(pkgs.formats.ini { }).generate "kvantum.kvconfig"
{ General.theme = "Base16Kvantum"; };
"Kvantum/Base16Kvantum".source =
"${kvantumPackage}/share/Kvantum/Base16Kvantum";
};
}
);
}

View file

@ -80,7 +80,7 @@ light.color=#{{base03-hex}}
mid.light.color=#{{base03-hex}}
dark.color=#{{base00-hex}}
mid.color=#{{base00-hex}}
highlight.color=#{{base03-hex}}
highlight.color=#{{base0E-hex}}
inactive.highlight.color=#{{base03-hex}}
tooltip.base.color=#{{base00-hex}}
text.color=#{{base05-hex}}
@ -88,7 +88,7 @@ window.text.color=#{{base05-hex}}
button.text.color=#{{base05-hex}}
disabled.text.color=#{{base04-hex}}
tooltip.text.color=#{{base05-hex}}
highlight.text.color=#{{base05-hex}}
highlight.text.color=#{{base00-hex}}
link.color=#{{base0D-hex}}
link.visited.color=#{{base0E-hex}}