This commit is contained in:
2026-07-30 15:24:55 +09:00
parent c566f426ec
commit 8dc9452d95
14 changed files with 218 additions and 102 deletions
-56
View File
@@ -1,56 +0,0 @@
{ pkgs, lib, ... }:
lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
dconf.settings = {
"org/gnome/desktop/sound" = {
event-sounds = false;
input-feedback-sounds = false;
};
"org/gnome/desktop/wm/keybindings" = {
close = [ "<Super>q" ];
show-desktop = [ ];
};
"org/gnome/settings-daemon/plugins/media-keys" = {
home = [ ];
screensaver = [ "<Super>l" ];
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/custom3/"
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4/"
];
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
name = "Open Terminal";
command = "ghostty";
binding = "<Super>t";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
name = "Run Application";
command = "vicinae toggle";
binding = "<Super>d";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2" = {
name = "Open File Manager";
command = "nautilus --new-window";
binding = "<Super>e";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3" = {
name = "Clipboard History";
command = "vicinae vicinae://extensions/vicinae/clipboard/history";
binding = "<Super>v";
};
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom4" = {
name = "Log Out";
command = "gnome-session-quit --logout --no-prompt";
binding = "<Super><Shift>e";
};
"org/gnome/shell".favorite-apps = [
"google-chrome.desktop"
"code.desktop"
"com.mitchellh.ghostty.desktop"
"slack.desktop"
"vesktop.desktop"
];
};
}
-10
View File
@@ -1,10 +0,0 @@
{ pkgs, lib, ... }:
{
services.desktopManager.gnome.enable = true;
services.displayManager.gdm.enable = lib.mkForce false;
environment.systemPackages = [
pkgs.gnome-tweaks
pkgs.gnome-extension-manager
];
}
+20
View File
@@ -0,0 +1,20 @@
{ lib, pkgs, ... }:
{
xdg.configFile = {
"labwc/rc.xml".source = ./rc.xml;
"labwc/environment".text = ''
XKB_DEFAULT_LAYOUT=jp
XKB_DEFAULT_OPTIONS=ctrl:nocaps
'';
"labwc/autostart".text = ''
# Pull in graphical-session.target so Home Manager services such as
# portals, Vicinae, and the idle manager follow the labwc session.
${lib.getExe' pkgs.systemd "systemctl"} --user --no-block start labwc-session.target
noctalia >/dev/null 2>&1 &
${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1 >/dev/null 2>&1 &
'';
};
}
+5
View File
@@ -0,0 +1,5 @@
{
description = "labwc Wayland stacking compositor";
includes = [ "systems.wayland" ];
}
+20
View File
@@ -0,0 +1,20 @@
{ inputs, pkgs, ... }:
let
unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
programs.labwc = {
enable = true;
package = unstable.labwc;
};
xdg.portal.config.labwc.default = [
"wlr"
"gtk"
];
environment.systemPackages = [
pkgs.wdisplays
pkgs.wlr-randr
];
}
+125
View File
@@ -0,0 +1,125 @@
<?xml version="1.0" encoding="UTF-8"?>
<labwc_config>
<core>
<decoration>server</decoration>
<gap>10</gap>
<autoEnableOutputs>yes</autoEnableOutputs>
<reuseOutputMode>yes</reuseOutputMode>
</core>
<theme>
<name>Dracula</name>
<cornerRadius>8</cornerRadius>
<dropShadows>yes</dropShadows>
<dropShadowsOnTiled>yes</dropShadowsOnTiled>
</theme>
<windowSwitcher preview="no" outlines="yes">
<osd style="thumbnail" />
</windowSwitcher>
<focus>
<followMouse>yes</followMouse>
<followMouseRequiresMovement>yes</followMouseRequiresMovement>
<raiseOnFocus>no</raiseOnFocus>
</focus>
<desktops number="9" popupTime="500" prefix="Workspace" />
<keyboard>
<default />
<keybind key="W-q">
<action name="Close" />
</keybind>
<keybind key="W-t">
<action name="Execute" command="ghostty" />
</keybind>
<keybind key="W-d">
<action name="Execute" command="vicinae toggle" />
</keybind>
<keybind key="W-e">
<action name="Execute" command="nautilus --new-window" />
</keybind>
<keybind key="W-l">
<action name="Execute" command="loginctl lock-session" />
</keybind>
<keybind key="W-v">
<action name="Execute" command="vicinae vicinae://launch/clipboard/history?toggle=true" />
</keybind>
<keybind key="W-space">
<action name="Execute" command="ghostty +toggle-quick-terminal" />
</keybind>
<keybind key="W-p">
<action name="Execute" command="wdisplays" />
</keybind>
<keybind key="W-s">
<action name="Execute" command="noctalia msg panel-toggle control-center" />
</keybind>
<keybind key="W-comma">
<action name="Execute" command="noctalia msg settings-toggle" />
</keybind>
<keybind key="W-S-e">
<action name="Exit" />
</keybind>
<keybind key="W-1"><action name="GoToDesktop" to="1" /></keybind>
<keybind key="W-2"><action name="GoToDesktop" to="2" /></keybind>
<keybind key="W-3"><action name="GoToDesktop" to="3" /></keybind>
<keybind key="W-4"><action name="GoToDesktop" to="4" /></keybind>
<keybind key="W-5"><action name="GoToDesktop" to="5" /></keybind>
<keybind key="W-6"><action name="GoToDesktop" to="6" /></keybind>
<keybind key="W-7"><action name="GoToDesktop" to="7" /></keybind>
<keybind key="W-8"><action name="GoToDesktop" to="8" /></keybind>
<keybind key="W-9"><action name="GoToDesktop" to="9" /></keybind>
<keybind key="W-C-1"><action name="SendToDesktop" to="1" /></keybind>
<keybind key="W-C-2"><action name="SendToDesktop" to="2" /></keybind>
<keybind key="W-C-3"><action name="SendToDesktop" to="3" /></keybind>
<keybind key="W-C-4"><action name="SendToDesktop" to="4" /></keybind>
<keybind key="W-C-5"><action name="SendToDesktop" to="5" /></keybind>
<keybind key="W-C-6"><action name="SendToDesktop" to="6" /></keybind>
<keybind key="W-C-7"><action name="SendToDesktop" to="7" /></keybind>
<keybind key="W-C-8"><action name="SendToDesktop" to="8" /></keybind>
<keybind key="W-C-9"><action name="SendToDesktop" to="9" /></keybind>
<keybind key="XF86AudioRaiseVolume">
<action name="Execute" command="noctalia msg volume-up" />
</keybind>
<keybind key="XF86AudioLowerVolume">
<action name="Execute" command="noctalia msg volume-down" />
</keybind>
<keybind key="XF86AudioMute">
<action name="Execute" command="noctalia msg volume-mute" />
</keybind>
<keybind key="XF86AudioMicMute">
<action name="Execute" command="noctalia msg mic-mute" />
</keybind>
<keybind key="XF86MonBrightnessUp">
<action name="Execute" command="noctalia msg brightness-up" />
</keybind>
<keybind key="XF86MonBrightnessDown">
<action name="Execute" command="noctalia msg brightness-down" />
</keybind>
</keyboard>
<mouse>
<default />
</mouse>
<libinput>
<device category="touchpad">
<naturalScroll>yes</naturalScroll>
<tap>yes</tap>
<tapAndDrag>yes</tapAndDrag>
<dragLock>yes</dragLock>
<clickMethod>clickfinger</clickMethod>
<scrollMethod>twoFinger</scrollMethod>
<scrollFactor>4.0</scrollFactor>
</device>
<device category="non-touch">
<pointerSpeed>-0.1</pointerSpeed>
<accelProfile>flat</accelProfile>
</device>
</libinput>
</labwc_config>
+4 -4
View File
@@ -27,7 +27,7 @@ when removing it from any supported host would make that host invalid.
| `interface.gui` | NixOS, macOS with Home Manager |
| `interface.macos` | macOS |
| `interface.linux-desktop` | NixOS with Home Manager |
| `interface.gnome` | NixOS with Home Manager |
| `interface.labwc` | NixOS with Home Manager |
| `interface.niri` | NixOS with Home Manager |
| `platform.nixos` | NixOS |
| `platform.desktop` | Physical NixOS desktop |
@@ -47,9 +47,9 @@ when removing it from any supported host would make that host invalid.
| `security.tpm-storage` | NixOS with a host-defined LUKS device |
Select independent concerns independently in `hosts/default.nix`. For example,
a NixOS desktop can combine `interface.gnome` and `interface.niri` to provide
both sessions while sharing `interface.linux-desktop` and `interface.gui`; niri
supplies ly. A
a NixOS desktop can combine `interface.labwc` and `interface.niri` to provide
both sessions while sharing `interface.linux-desktop` and `interface.gui`; both
session profiles select ly. A
daily-use macOS development machine can combine `interface.macos`,
`workload.development`, and `workload.personal`. Hardware support does not
implicitly select an interface or workload.
@@ -1,8 +0,0 @@
{
description = "GNOME desktop session for NixOS";
includes = [
"profiles.interface.linux-desktop"
"applications.gnome"
];
}
+12
View File
@@ -0,0 +1,12 @@
{
description = "labwc desktop session for NixOS";
includes = [
"profiles.interface.linux-desktop"
"applications.labwc"
"applications.noctalia"
"services.ly"
"services.swayidle"
"services.swaylock"
];
}
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
alacritty
grim
slurp
wf-recorder
];
}
+2 -2
View File
@@ -1,9 +1,9 @@
{ lib, pkgs, ... }:
let
brightnessctl = lib.getExe pkgs.brightnessctl;
niri = lib.getExe pkgs.niri;
rm = "${pkgs.coreutils}/bin/rm";
systemctl = lib.getExe' pkgs.systemd "systemctl";
wlopm = lib.getExe pkgs.wlopm;
brightnessState = "$XDG_RUNTIME_DIR/swayidle-brightness";
skipIfOnAC = ''
@@ -37,7 +37,7 @@ let
'';
afterResume = pkgs.writeShellScript "swayidle-after-resume" ''
${niri} msg action power-on-monitors
${wlopm} --on '*'
${restoreBrightness}
'';
in
+1 -3
View File
@@ -1,5 +1,3 @@
{
description = "swayidle idle management for Niri";
includes = [ "applications.niri" ];
description = "swayidle idle management for Wayland sessions";
}