feat: format via 'ls **/*.nix | each { |it| nixfmt $it.name }'

This commit is contained in:
Ryan Yin
2025-07-30 12:17:24 +08:00
parent d10b30b06b
commit 13bb77108c
219 changed files with 2103 additions and 1728 deletions

View File

@@ -2,7 +2,8 @@
pkgs,
anyrun,
...
}: {
}:
{
programs.anyrun = {
enable = true;
config = {

View File

@@ -1,4 +1 @@
{mylib, ...} @ args:
map
(path: import path args)
(mylib.scanPaths ./.)
{ mylib, ... }@args: map (path: import path args) (mylib.scanPaths ./.)

View File

@@ -2,19 +2,23 @@
pkgs,
config,
...
}: let
}:
let
package = pkgs.hyprland;
in {
xdg.configFile = let
mkSymlink = config.lib.file.mkOutOfStoreSymlink;
hyprPath = "${config.home.homeDirectory}/nix-config/home/linux/gui/hyprland/conf";
in {
"mako".source = mkSymlink "${hyprPath}/mako";
"waybar".source = mkSymlink "${hyprPath}/waybar";
"wlogout".source = mkSymlink "${hyprPath}/wlogout";
"hypr/hypridle.conf".source = mkSymlink "${hyprPath}/hypridle.conf";
"hypr/configs".source = mkSymlink "${hyprPath}/configs";
};
in
{
xdg.configFile =
let
mkSymlink = config.lib.file.mkOutOfStoreSymlink;
hyprPath = "${config.home.homeDirectory}/nix-config/home/linux/gui/hyprland/conf";
in
{
"mako".source = mkSymlink "${hyprPath}/mako";
"waybar".source = mkSymlink "${hyprPath}/waybar";
"wlogout".source = mkSymlink "${hyprPath}/wlogout";
"hypr/hypridle.conf".source = mkSymlink "${hyprPath}/hypridle.conf";
"hypr/configs".source = mkSymlink "${hyprPath}/configs";
};
# status bar
programs.waybar = {
@@ -46,15 +50,17 @@ in {
inherit package;
enable = true;
settings = {
source = let
configPath = "${config.home.homeDirectory}/.config/hypr/configs";
in [
"${configPath}/exec.conf"
"${configPath}/fcitx5.conf"
"${configPath}/keybindings.conf"
"${configPath}/settings.conf"
"${configPath}/windowrules.conf"
];
source =
let
configPath = "${config.home.homeDirectory}/.config/hypr/configs";
in
[
"${configPath}/exec.conf"
"${configPath}/fcitx5.conf"
"${configPath}/keybindings.conf"
"${configPath}/settings.conf"
"${configPath}/windowrules.conf"
];
env = [
"NIXOS_OZONE_WL,1" # for any ozone-based browser & electron apps to run on wayland
"MOZ_ENABLE_WAYLAND,1" # for firefox to run on wayland
@@ -71,7 +77,7 @@ in {
# gammastep/wallpaper-switcher need this to be enabled.
systemd = {
enable = true;
variables = ["--all"];
variables = [ "--all" ];
};
};

View File

@@ -1,8 +1,8 @@
{
pkgs,
...
}: {
}:
{
home.packages = with pkgs; [
swaybg # the wallpaper

View File

@@ -1,7 +1,8 @@
{
pkgs,
...
}: {
}:
{
home.packages = with pkgs; [
# firefox-wayland
nixpaks.firefox
@@ -31,25 +32,23 @@
vscode = {
enable = true;
package =
pkgs.vscode.override
{
isInsiders = false;
# https://wiki.archlinux.org/title/Wayland#Electron
commandLineArgs = [
"--ozone-platform-hint=auto"
"--ozone-platform=wayland"
# make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it.
# (only supported by chromium/chrome at this time, not electron)
"--gtk-version=4"
# make it use text-input-v1, which works for kwin 5.27 and weston
"--enable-wayland-ime"
package = pkgs.vscode.override {
isInsiders = false;
# https://wiki.archlinux.org/title/Wayland#Electron
commandLineArgs = [
"--ozone-platform-hint=auto"
"--ozone-platform=wayland"
# make it use GTK_IM_MODULE if it runs with Gtk4, so fcitx5 can work with it.
# (only supported by chromium/chrome at this time, not electron)
"--gtk-version=4"
# make it use text-input-v1, which works for kwin 5.27 and weston
"--enable-wayland-ime"
# TODO: fix https://github.com/microsoft/vscode/issues/187436
# still not works...
"--password-store=gnome" # use gnome-keyring as password store
];
};
# TODO: fix https://github.com/microsoft/vscode/issues/187436
# still not works...
"--password-store=gnome" # use gnome-keyring as password store
];
};
};
};
}

View File

@@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
xdg.portal = {
enable = true;