Merge branch 'dconf'

This commit is contained in:
Fern Garden 2025-08-10 23:39:20 +08:00
commit 65e321315b
4 changed files with 182 additions and 34 deletions

30
flake.lock generated
View file

@ -96,11 +96,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1754420989, "lastModified": 1754487366,
"narHash": "sha256-3e4wHzNwTMg7GaeLH9A091DMaO9AfFxUjpfqbddCUeo=", "narHash": "sha256-pHYj8gUBapuUzKV/kN/tR3Zvqc7o6gdFB9XKXIp1SQ8=",
"owner": "hercules-ci", "owner": "hercules-ci",
"repo": "flake-parts", "repo": "flake-parts",
"rev": "7f38f25a44023a21a504bd3fd9d4f41c4a39f55c", "rev": "af66ad14b28a127c5c0f3bbb298218fc63528a18",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -225,11 +225,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1754316476, "lastModified": 1754564048,
"narHash": "sha256-Ry1gd1BQrNVJJfT11cpVP0FY8XFMx4DJV2IDp01CH9w=", "narHash": "sha256-dz303vGuzWjzOPOaYkS9xSW+B93PSAJxvBd6CambXVA=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "9368056b73efb46eb14fd4667b99e0f81b805f28", "rev": "26ed7a0d4b8741fe1ef1ee6fa64453ca056ce113",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -272,11 +272,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1754214453, "lastModified": 1754725699,
"narHash": "sha256-Q/I2xJn/j1wpkGhWkQnm20nShYnG7TI99foDBpXm1SY=", "narHash": "sha256-iAcj9T/Y+3DBy2J0N+yF9XQQQ8IEb5swLFzs23CdP88=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5b09dc45f24cf32316283e62aec81ffee3c3e376", "rev": "85dbfc7aaf52ecb755f87e577ddbe6dbbdbc1054",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -288,11 +288,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1754292888, "lastModified": 1754689972,
"narHash": "sha256-1ziydHSiDuSnaiPzCQh1mRFBsM2d2yRX9I+5OPGEmIE=", "narHash": "sha256-eogqv6FqZXHgqrbZzHnq43GalnRbLTkbBbFtEfm1RSc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "ce01daebf8489ba97bd1609d185ea276efdeb121", "rev": "fc756aa6f5d3e2e5666efcf865d190701fef150a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -312,11 +312,11 @@
"systems": "systems_3" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1754506651, "lastModified": 1754682350,
"narHash": "sha256-LcpDSjGtTVU0S+aWJPE3/8RONQV0q8dDuanfCj7mAW0=", "narHash": "sha256-4Dgf0cA/ZJtj9eTzG0yNMRBcd5fll3hhWx2WdwltAP8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "085ef66994f94226dd3d62921e1d48bf731b663a", "rev": "832de87d40f9a40430372552ab0b583680187cf3",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -49,16 +49,7 @@ with lib; {
]; ];
displayManager.gdm.enable = true; displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
desktopManager.gnome = {
enable = true;
# Enable fractional scaling.
extraGSettingsOverridePackages = [pkgs.mutter];
extraGSettingsOverrides = ''
[org.gnome.mutter]
experimental-features=['scale-monitor-framebuffer']
'';
};
}; };
# Theme QT applications # Theme QT applications
@ -86,6 +77,150 @@ with lib; {
# Run electron apps under wayland. # Run electron apps under wayland.
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
# dconf settings.
programs.dconf.profiles.user.databases = [
{
settings = {
# virt-manager autoconnect.
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
# Gnome settings.
"org/gnome/desktop/interface" = {
accent-color = "green";
clock-show-seconds = true;
clock-show-weekday = true;
color-scheme = "prefer-dark";
enable-hot-corners = false;
show-battery-percentage = true;
};
"org/gnome/desktop/background" = let
wallpaper = pkgs.copyPathToStore ./wallpaper.jpg;
in {
picture-uri = wallpaper;
picture-uri-dark = wallpaper;
};
"org/gnome/shell" = {
favorite-apps = gvariant.mkEmptyArray (gvariant.type.string);
enabled-extensions = with pkgs; [
gnomeExtensions.adw-gtk3-colorizer.extensionUuid
gnomeExtensions.alphabetical-app-grid.extensionUuid
gnomeExtensions.auto-move-windows.extensionUuid
gnomeExtensions.caffeine.extensionUuid
gnomeExtensions.color-picker.extensionUuid
gnomeExtensions.rounded-window-corners-reborn.extensionUuid
gnomeExtensions.smile-complementary-extension.extensionUuid
];
};
"org/gnome/desktop/preferences" = {
num-workspaces = gvariant.mkInt32 4;
};
"org/gnome/mutter" = {
dynamic-workspaces = false;
experimental-features = [
"scale-monitor-framebuffer" # Enables fractional scaling (125% 150% 175%)
"xwayland-native-scaling" # Scales Xwayland applications to look crisp on HiDPI screens
];
};
"org/gnome/settings-daemon/plugins/color" = {
night-light-enabled = true;
night-light-schedule-automatic = false;
};
"org/gnome/desktop/peripherals/touchpad" = {
natural-scroll = false;
two-finger-scrolling-enabled = true;
};
"org/gnome/desktop/wm/keybindings" = {
close = ["<Super>q"];
move-to-workspace-1 = ["<Shift><Super>1"];
move-to-workspace-2 = ["<Shift><Super>2"];
move-to-workspace-3 = ["<Shift><Super>3"];
move-to-workspace-4 = ["<Shift><Super>4"];
switch-to-workspace-1 = ["<Super>1"];
switch-to-workspace-2 = ["<Super>2"];
switch-to-workspace-3 = ["<Super>3"];
switch-to-workspace-4 = ["<Super>4"];
toggle-maximized = ["<Super>m"];
};
"org/gnome/settings-daemon/plugins/media-keys" = {
custom-keybindings = [
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/"
];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
name = "Open Emoji Picker";
command = "smile";
binding = "<Super>period";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
name = "Open Terminal";
command = "ghostty";
binding = "<Super>Return";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
name = "Open Files";
command = "nautilus";
binding = "<Super>e";
};
# Applications.
"io/github/Foldex/AdwSteamGtk" = {
color-theme-options = "Adwaita";
hide-whats-new-switch = false;
library-sidebar-options = "Show";
login-qr-options = "Show";
no-rounded-corners-switch = false;
prefs-beta-support = false;
window-controls-layout-options = "Auto";
window-controls-options = "Adwaita";
};
# Extensions.
"org/gnome/shell/extensions/auto-move-windows" = {
application-list = ["Fluffychat.desktop:2" "signal.desktop:2" "proton-mail.desktop:2" "feishin.desktop:3" "org.prismlauncher.PrismLauncher.desktop:4" "steam.desktop:4" "discord.desktop:2"];
};
"org/gnome/shell/extensions/alphabetical-app-grid" = {
folder-order-position = "start";
};
"org/gnome/shell/extensions/caffeine" = {
enable-fullscreen = false;
enable-mpris = false;
indicator-position = gvariant.mkInt32 0;
indicator-position-index = gvariant.mkInt32 0;
indicator-position-max = gvariant.mkInt32 4;
restore-state = false;
show-indicator = "only-active";
};
"org/gnome/shell/extensions/color-picker" = {
enable-notify = false;
enable-preview = true;
enable-shortcut = true;
enable-sound = false;
enable-systray = false;
persistent-mode = false;
};
};
}
];
# Virtualisation. # Virtualisation.
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
users.groups.libvirtd.members = ["fern"]; users.groups.libvirtd.members = ["fern"];

View file

@ -1,6 +1,27 @@
{ {pkgs, ...}: {
imports = [../home.nix]; imports = [../home.nix];
# Autostart.
xdg.autostart = {
enable = true;
readOnly = true;
entries = let
smile = pkgs.writeText "smile.desktop" ''
[Desktop Entry]
Type=Application
Name=it.mijorus.smile
X-XDP-Autostart=it.mijorus.smile
Exec=smile --start-hidden
'';
in [
smile
"${pkgs.fluffychat}/share/applications/Fluffychat.desktop"
"${pkgs.feishin}/share/applications/feishin.desktop"
"${pkgs.protonmail-desktop}/share/applications/proton-mail.desktop"
"${pkgs.signal-desktop}/share/applications/signal.desktop"
];
};
# Ghostty settings. # Ghostty settings.
programs.ghostty = { programs.ghostty = {
enable = true; enable = true;
@ -16,12 +37,4 @@
profiles.default = {}; profiles.default = {};
profiles.default.settings."identity.sync.tokenserver.uri" = "https://fxsync.fern.garden/1.0/sync/1.5"; profiles.default.settings."identity.sync.tokenserver.uri" = "https://fxsync.fern.garden/1.0/sync/1.5";
}; };
# virt-manager - autoconnect to qemu.
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

After

Width:  |  Height:  |  Size: 282 KiB

Before After
Before After