nix: Format with alejandra

Alejandra is written in Rust, has more tests than nixfmt, and handles
non-trivial code examples in Nix better.
This commit is contained in:
Donovan Glover 2023-06-05 20:37:52 -04:00
parent 1077200205
commit 3119b789f8
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65
41 changed files with 1773 additions and 1698 deletions

View File

@ -1,6 +1,12 @@
{ pkgs, lib, hypr-contrib, nix-gaming, ... }: {
pkgs,
let VARIABLES = import ./variables.nix; in { lib,
hypr-contrib,
nix-gaming,
...
}: let
VARIABLES = import ./variables.nix;
in {
imports = [ imports = [
./modules ./modules
./containers/rar.nix ./containers/rar.nix
@ -9,8 +15,7 @@ let VARIABLES = import ./variables.nix; in {
# locale # locale
i18n.defaultLocale = "ja_JP.UTF-8"; i18n.defaultLocale = "ja_JP.UTF-8";
i18n.supportedLocales = i18n.supportedLocales = ["ja_JP.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8"];
[ "ja_JP.UTF-8/UTF-8" "en_US.UTF-8/UTF-8" "fr_FR.UTF-8/UTF-8" ];
# nix # nix
nix.package = pkgs.nixFlakes; nix.package = pkgs.nixFlakes;
@ -72,7 +77,8 @@ let VARIABLES = import ./variables.nix; in {
bacon bacon
]; ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"osu-lazer-bin" "osu-lazer-bin"
"vmware-workstation" "vmware-workstation"
]; ];
@ -93,7 +99,8 @@ let VARIABLES = import ./variables.nix; in {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
sharedModules = [{ sharedModules = [
{
home.stateVersion = "22.11"; home.stateVersion = "22.11";
editorconfig = { editorconfig = {
@ -127,7 +134,8 @@ let VARIABLES = import ./variables.nix; in {
}; };
}; };
}; };
}]; }
];
}; };
# systemd # systemd
@ -189,8 +197,7 @@ let VARIABLES = import ./variables.nix; in {
restrictNetwork = true; restrictNetwork = true;
}; };
virtualisation.qemu.options = virtualisation.qemu.options = ["-device virtio-vga-gl" "-display sdl,gl=on,show-cursor=off" "-full-screen"];
[ "-device virtio-vga-gl" "-display sdl,gl=on,show-cursor=off" "-full-screen" ];
environment.sessionVariables = { environment.sessionVariables = {
WLR_NO_HARDWARE_CURSORS = "1"; WLR_NO_HARDWARE_CURSORS = "1";

View File

@ -9,7 +9,11 @@
}; };
}; };
config = { pkgs, lib, ... }: { config = {
pkgs,
lib,
...
}: {
programs = { programs = {
fish.enable = true; fish.enable = true;
neovim.enable = true; neovim.enable = true;
@ -43,7 +47,8 @@
unrar unrar
]; ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
"rar" "rar"
"unrar" "unrar"
]; ];

View File

@ -1,8 +1,6 @@
{ config, ... }: {config, ...}: let
hostCfg = config;
let hostCfg = config; in in {
{
containers.wine = { containers.wine = {
privateNetwork = true; privateNetwork = true;
@ -24,7 +22,11 @@ let hostCfg = config; in
}; };
}; };
config = { pkgs, lib, ... }: { config = {
pkgs,
lib,
...
}: {
programs = { programs = {
fish.enable = true; fish.enable = true;
neovim.enable = true; neovim.enable = true;

View File

@ -1,5 +1,13 @@
{ {
outputs = { self, nixpkgs, home-manager, hyprland, stylix, nix-gaming, ... }@attrs: let outputs = {
self,
nixpkgs,
home-manager,
hyprland,
stylix,
nix-gaming,
...
} @ attrs: let
VARIABLES = import ./variables.nix; VARIABLES = import ./variables.nix;
in { in {
formatter."${VARIABLES.system}" = nixpkgs.legacyPackages."${VARIABLES.system}".alejandra; formatter."${VARIABLES.system}" = nixpkgs.legacyPackages."${VARIABLES.system}".alejandra;

View File

@ -1,8 +1,12 @@
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
pkgs,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "usb_storage" "sd_mod"];
@ -10,15 +14,15 @@
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-label/nixos"; device = "/dev/disk/by-label/nixos";
fsType = "btrfs"; fsType = "btrfs";
}; };
boot.initrd.luks.devices."root".device = "/dev/disk/by-label/nixos-luks"; boot.initrd.luks.devices."root".device = "/dev/disk/by-label/nixos-luks";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-label/boot"; device = "/dev/disk/by-label/boot";
fsType = "vfat"; fsType = "vfat";
}; };

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
./feh ./feh
./kitty ./kitty
@ -130,9 +128,11 @@
(pkgs.callPackage ../packages/hyprland-autorename-workspaces {}) (pkgs.callPackage ../packages/hyprland-autorename-workspaces {})
]; ];
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
programs.bat.enable = true; programs.bat.enable = true;
}]; }
];
programs.htop = { programs.htop = {
enable = true; enable = true;

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.interception-tools = { services.interception-tools = {
enable = true; enable = true;
plugins = [pkgs.interception-tools-plugins.dual-function-keys]; plugins = [pkgs.interception-tools-plugins.dual-function-keys];

View File

@ -1,9 +1,8 @@
{ pkgs, ... }: {pkgs, ...}: {
{
environment.systemPackages = [pkgs.libnotify]; environment.systemPackages = [pkgs.libnotify];
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
services.dunst = { services.dunst = {
enable = true; enable = true;
@ -26,5 +25,6 @@
}; };
}; };
}; };
}]; }
];
} }

View File

@ -1,10 +1,9 @@
{ pkgs, ... }: {pkgs, ...}: {
{
i18n.inputMethod.enabled = "fcitx5"; i18n.inputMethod.enabled = "fcitx5";
i18n.inputMethod.fcitx5.addons = [pkgs.fcitx5-mozc]; i18n.inputMethod.fcitx5.addons = [pkgs.fcitx5-mozc];
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
xdg.configFile."mozc/ibus_config.textproto".force = true; xdg.configFile."mozc/ibus_config.textproto".force = true;
xdg.configFile."mozc/ibus_config.textproto".text = '' xdg.configFile."mozc/ibus_config.textproto".text = ''
engines { engines {
@ -169,5 +168,6 @@
# Trigger Key # Trigger Key
TriggerKey= TriggerKey=
''; '';
}]; }
];
} }

View File

@ -1,5 +1,6 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
programs.feh = { programs.feh = {
enable = true; enable = true;
@ -75,5 +76,6 @@
menu_select = null; menu_select = null;
}; };
}; };
}]; }
];
} }

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
users.defaultUserShell = pkgs.fish; users.defaultUserShell = pkgs.fish;
environment.shells = [pkgs.fish]; environment.shells = [pkgs.fish];
@ -9,8 +7,7 @@
shellAliases = { shellAliases = {
ls = "exa --group-directories-first -I 'lost+found'"; ls = "exa --group-directories-first -I 'lost+found'";
tree = tree = "exa --group-directories-first --all --long --tree -I 'node_modules|.git|public|lost+found'";
"exa --group-directories-first --all --long --tree -I 'node_modules|.git|public|lost+found'";
mv = "mv -i"; mv = "mv -i";
cp = "cp -ia"; cp = "cp -ia";
rg = "rg --max-columns=2000"; rg = "rg --max-columns=2000";
@ -37,8 +34,7 @@
gra = "git remote add"; gra = "git remote add";
gre = "git remote --verbose"; # List all remotes gre = "git remote --verbose"; # List all remotes
grh = "git reset HEAD"; grh = "git reset HEAD";
grr = grr = "git reset --hard HEAD~"; # Remove the last commit and all changes with it
"git reset --hard HEAD~"; # Remove the last commit and all changes with it
gs = "git status"; gs = "git status";
gst = "git stash"; gst = "git stash";
gstp = "git stash pop"; gstp = "git stash pop";
@ -53,15 +49,12 @@
yu = "yarn upgrade-interactive"; yu = "yarn upgrade-interactive";
dl = "yt-dlp"; dl = "yt-dlp";
vol = vol = "wpctl set-volume '@DEFAULT_AUDIO_SINK@'"; # Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
"wpctl set-volume '@DEFAULT_AUDIO_SINK@'"; # Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
nf = "tput reset; and neofetch --size 56%"; nf = "tput reset; and neofetch --size 56%";
df = "df --human-readable --type=ext4 --total"; df = "df --human-readable --type=ext4 --total";
du = "du --human-readable --summarize"; du = "du --human-readable --summarize";
jis = jis = "recode shift_jis..utf8"; # Easily convert shift_jis-encoded files to utf8
"recode shift_jis..utf8"; # Easily convert shift_jis-encoded files to utf8 utf16 = "recode utf16..utf8"; # Rarely, some files from Japan are utf16 instead
utf16 =
"recode utf16..utf8"; # Rarely, some files from Japan are utf16 instead
jp = "LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8"; jp = "LANG=ja_JP.UTF-8 LC_ALL=ja_JP.UTF-8";
c = "tput reset"; # Clear the terminal completely c = "tput reset"; # Clear the terminal completely
@ -74,7 +67,8 @@
}; };
}; };
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
xdg.configFile."fish/config.fish".text = '' xdg.configFile."fish/config.fish".text = ''
set -U fish_greeting "" set -U fish_greeting ""
@ -132,7 +126,8 @@
end end
end end
''; '';
}]; }
];
programs.starship = { programs.starship = {
enable = true; enable = true;

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
fonts = { fonts = {
enableDefaultFonts = true; enableDefaultFonts = true;
fonts = with pkgs; [ fonts = with pkgs; [

View File

@ -1,10 +1,8 @@
{ pkgs, ... }: {pkgs, ...}: {
{
environment.systemPackages = with pkgs; [tig git]; environment.systemPackages = with pkgs; [tig git];
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
xdg.configFile."tig/config".text = '' xdg.configFile."tig/config".text = ''
color cursor black green bold color cursor black green bold
color title-focus black blue bold color title-focus black blue bold
@ -57,5 +55,6 @@
diff-so-fancy.enable = true; diff-so-fancy.enable = true;
}; };
}]; }
];
} }

View File

@ -1,5 +1,6 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
programs.gpg = { programs.gpg = {
enable = true; enable = true;
# homedir = "${config.xdg.dataHome}/gnupg" # homedir = "${config.xdg.dataHome}/gnupg"
@ -21,5 +22,6 @@
defaultCacheTtl = 43200; defaultCacheTtl = 43200;
maxCacheTtl = 43200; maxCacheTtl = 43200;
}; };
}]; }
];
} }

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.hyprland.enable = true; programs.hyprland.enable = true;
services.udisks2 = { services.udisks2 = {
enable = true; enable = true;
@ -17,7 +15,8 @@
excludePackages = [pkgs.xterm]; excludePackages = [pkgs.xterm];
}; };
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
xdg.configFile."hypr/hyprland.conf".text = '' xdg.configFile."hypr/hyprland.conf".text = ''
env=XCURSOR_SIZE,24 env=XCURSOR_SIZE,24
env=BROWSER,librewolf env=BROWSER,librewolf
@ -247,5 +246,6 @@
}; };
services.udiskie.enable = true; services.udiskie.enable = true;
}]; }
];
} }

View File

@ -1,11 +1,10 @@
{ pkgs, ... }: {pkgs, ...}: {
{
environment.systemPackages = [ environment.systemPackages = [
(pkgs.callPackage ../../packages/joshuto {}) (pkgs.callPackage ../../packages/joshuto {})
]; ];
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
xdg.configFile."joshuto/joshuto.toml".text = '' xdg.configFile."joshuto/joshuto.toml".text = ''
[display] [display]
automatically_count_files = true automatically_count_files = true
@ -24,5 +23,6 @@
xdg.configFile."joshuto/preview.sh".source = ./preview.sh; xdg.configFile."joshuto/preview.sh".source = ./preview.sh;
xdg.configFile."joshuto/kitty-show.sh".source = ./kitty-show.sh; xdg.configFile."joshuto/kitty-show.sh".source = ./kitty-show.sh;
xdg.configFile."joshuto/kitty-remove.sh".source = ./kitty-remove.sh; xdg.configFile."joshuto/kitty-remove.sh".source = ./kitty-remove.sh;
}]; }
];
} }

View File

@ -1,5 +1,6 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
programs.kitty = { programs.kitty = {
enable = true; enable = true;
@ -26,5 +27,6 @@
map g scroll_to start map g scroll_to start
map G scroll_to end map G scroll_to end
''; '';
}]; }
];
} }

View File

@ -1,5 +1,6 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
programs.librewolf = { programs.librewolf = {
enable = true; enable = true;
@ -17,5 +18,6 @@
"sidebar.position_start" = false; "sidebar.position_start" = false;
}; };
}; };
}]; }
];
} }

View File

@ -1,7 +1,6 @@
{ pkgs, ... }: {pkgs, ...}: {
home-manager.sharedModules = [
{ {
home-manager.sharedModules = [{
programs.mpv = { programs.mpv = {
enable = true; enable = true;
config = { config = {
@ -18,8 +17,7 @@
sub-file-paths = "subs:subtitles:"; sub-file-paths = "subs:subtitles:";
fullscreen = "yes"; fullscreen = "yes";
title = "\${filename} - mpv"; title = "\${filename} - mpv";
script-opts = script-opts = "osc-title=\${filename},osc-boxalpha=150,osc-showfullscreen=no,osc-boxvideo=yes";
"osc-title=\${filename},osc-boxalpha=150,osc-showfullscreen=no,osc-boxvideo=yes";
osc = "no"; osc = "no";
osd-on-seek = "no"; osd-on-seek = "no";
osd-bar = "no"; osd-bar = "no";
@ -33,5 +31,6 @@
thumbnail thumbnail
]; ];
}; };
}]; }
];
} }

View File

@ -1,7 +1,6 @@
{ pkgs, ... }: {pkgs, ...}: {
home-manager.sharedModules = [
{ {
home-manager.sharedModules = [{
services.mpd = { services.mpd = {
enable = true; enable = true;
musicDirectory = "/home/user/Music"; musicDirectory = "/home/user/Music";
@ -145,7 +144,8 @@
mpd_crossfade_time = 3; mpd_crossfade_time = 3;
}; };
}; };
}]; }
];
environment.systemPackages = with pkgs; [mpc-cli]; environment.systemPackages = with pkgs; [mpc-cli];
} }

View File

@ -1,9 +1,8 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.neovim.enable = true; programs.neovim.enable = true;
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
programs.neovim = { programs.neovim = {
enable = true; enable = true;
extraConfig = '' extraConfig = ''
@ -176,5 +175,6 @@
neoformat neoformat
]; ];
}; };
}]; }
];
} }

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.ratbagd.enable = true; services.ratbagd.enable = true;
environment.systemPackages = [pkgs.piper]; environment.systemPackages = [pkgs.piper];

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
services.pipewire = { services.pipewire = {
enable = true; enable = true;

View File

@ -1,7 +1,6 @@
{ pkgs, ... }: {pkgs, ...}: {
home-manager.sharedModules = [
{ {
home-manager.sharedModules = [{
programs.qutebrowser = { programs.qutebrowser = {
enable = true; enable = true;
package = pkgs.qutebrowser-qt6; package = pkgs.qutebrowser-qt6;
@ -137,5 +136,6 @@
} }
''; '';
}; };
}]; }
];
} }

View File

@ -1,13 +1,16 @@
{ pkgs, lib, ... }:
{ {
home-manager.sharedModules = [{ pkgs,
lib,
...
}: {
home-manager.sharedModules = [
{
programs.rofi = { programs.rofi = {
enable = true; enable = true;
package = (pkgs.callPackage ../../packages/rofi/wrapper.nix { package = pkgs.callPackage ../../packages/rofi/wrapper.nix {
rofi-unwrapped = (pkgs.callPackage ../../packages/rofi/wayland.nix { }); rofi-unwrapped = pkgs.callPackage ../../packages/rofi/wayland.nix {};
}); };
cycle = false; cycle = false;
@ -29,5 +32,6 @@
theme = lib.mkForce ./launchpad.rasi; theme = lib.mkForce ./launchpad.rasi;
}; };
}]; }
];
} }

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
stylix.image = ./wallpaper.png; stylix.image = ./wallpaper.png;
stylix.polarity = "dark"; stylix.polarity = "dark";
stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/monokai.yaml"; stylix.base16Scheme = "${pkgs.base16-schemes}/share/themes/monokai.yaml";

View File

@ -1,9 +1,8 @@
{ pkgs, ... }: {pkgs, ...}: {
{
security.pam.services.swaylock = {}; security.pam.services.swaylock = {};
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
programs.swaylock = { programs.swaylock = {
package = pkgs."swaylock-effects"; package = pkgs."swaylock-effects";
settings = { settings = {
@ -19,5 +18,6 @@
fade-in = 1; fade-in = 1;
}; };
}; };
}]; }
];
} }

View File

@ -1,6 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs.thunar.enable = true; programs.thunar.enable = true;
services.tumbler.enable = true; # Thumbnail support services.tumbler.enable = true; # Thumbnail support
@ -13,10 +11,12 @@
services.gvfs.enable = true; # Trash support services.gvfs.enable = true; # Trash support
services.gnome.gnome-keyring.enable = true; # Mount support services.gnome.gnome-keyring.enable = true; # Mount support
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
xdg.configFile."xfce4/helpers.rc".text = '' xdg.configFile."xfce4/helpers.rc".text = ''
TerminalEmulator=kitty TerminalEmulator=kitty
TerminalEmulatorDismissed=true TerminalEmulatorDismissed=true
''; '';
}]; }
];
} }

View File

@ -1,10 +1,13 @@
{ lib, pkgs, ... }:
{ {
home-manager.sharedModules = [{ lib,
pkgs,
...
}: {
home-manager.sharedModules = [
{
programs.waybar = { programs.waybar = {
enable = true; enable = true;
package = (pkgs.callPackage ../../packages/waybar { }); package = pkgs.callPackage ../../packages/waybar {};
settings = { settings = {
mainBar = { mainBar = {
@ -14,8 +17,7 @@
spacing = 8; spacing = 8;
modules-left = ["wlr/workspaces" "custom/new-workspace"]; modules-left = ["wlr/workspaces" "custom/new-workspace"];
modules-right = modules-right = ["tray" "wireplumber" "backlight" "battery" "clock"];
[ "tray" "wireplumber" "backlight" "battery" "clock" ];
tray = { tray = {
icon-size = 24; icon-size = 24;
@ -150,5 +152,6 @@
} }
''; '';
}; };
}]; }
];
} }

View File

@ -1,5 +1,6 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
xdg.userDirs = { xdg.userDirs = {
enable = true; enable = true;
@ -15,5 +16,6 @@
}; };
xdg.configFile."user-dirs.locale".text = "ja_JP"; xdg.configFile."user-dirs.locale".text = "ja_JP";
}]; }
];
} }

View File

@ -1,5 +1,6 @@
{ {
home-manager.sharedModules = [{ home-manager.sharedModules = [
{
programs.zathura = { programs.zathura = {
enable = true; enable = true;
@ -11,5 +12,6 @@
scroll-step = 120; scroll-step = 120;
}; };
}; };
}]; }
];
} }

View File

@ -1,10 +1,10 @@
{ lib {
, buildGoModule lib,
, fetchFromGitHub buildGoModule,
, pkg-config fetchFromGitHub,
, vips pkg-config,
vips,
}: }:
buildGoModule rec { buildGoModule rec {
pname = "go-thumbnailer"; pname = "go-thumbnailer";
version = "0.1.0"; version = "0.1.0";

View File

@ -1,5 +1,8 @@
{ lib, rustPlatform, fetchFromGitHub }: {
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "hyprland-autoname-workspaces"; pname = "hyprland-autoname-workspaces";
version = "1.0.0"; version = "1.0.0";

View File

@ -1,5 +1,8 @@
{ lib, rustPlatform, fetchFromGitHub }: {
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "joshuto"; pname = "joshuto";
version = "493af3185092036cbbae81ae620b101f66cf4e9a"; version = "493af3185092036cbbae81ae620b101f66cf4e9a";

View File

@ -1,11 +1,11 @@
{ lib {
, buildGoModule lib,
, fetchFromGitHub buildGoModule,
, pkg-config fetchFromGitHub,
, gtk3 pkg-config,
, gtk-layer-shell gtk3,
gtk-layer-shell,
}: }:
buildGoModule rec { buildGoModule rec {
pname = "nwg-dock-hyprland"; pname = "nwg-dock-hyprland";
version = "0.1.2"; version = "0.1.2";

View File

@ -1,28 +1,28 @@
{ stdenv {
, lib stdenv,
, fetchFromGitHub lib,
, meson fetchFromGitHub,
, ninja meson,
, pkg-config ninja,
, libxkbcommon pkg-config,
, pango libxkbcommon,
, which pango,
, git which,
, cairo git,
, libxcb cairo,
, xcbutil libxcb,
, xcbutilwm xcbutil,
, xcbutilxrm xcbutilwm,
, xcb-util-cursor xcbutilxrm,
, libstartup_notification xcb-util-cursor,
, bison libstartup_notification,
, flex bison,
, librsvg flex,
, check librsvg,
, glib check,
, buildPackages glib,
buildPackages,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "rofi-unwrapped"; pname = "rofi-unwrapped";
version = "1.7.5"; version = "1.7.5";

View File

@ -1,12 +1,12 @@
{ stdenv {
, lib stdenv,
, fetchFromGitHub lib,
, rofi-unwrapped fetchFromGitHub,
, wayland-scanner rofi-unwrapped,
, wayland-protocols wayland-scanner,
, wayland wayland-protocols,
wayland,
}: }:
rofi-unwrapped.overrideAttrs (oldAttrs: rec { rofi-unwrapped.overrideAttrs (oldAttrs: rec {
pname = "rofi-wayland-unwrapped"; pname = "rofi-wayland-unwrapped";
version = "git"; version = "git";

View File

@ -1,11 +1,23 @@
{ symlinkJoin, lib, rofi-unwrapped, makeWrapper, wrapGAppsHook, gdk-pixbuf, hicolor-icon-theme, theme ? null, plugins ? [], symlink-dmenu ? false }: {
symlinkJoin,
lib,
rofi-unwrapped,
makeWrapper,
wrapGAppsHook,
gdk-pixbuf,
hicolor-icon-theme,
theme ? null,
plugins ? [],
symlink-dmenu ? false,
}:
symlinkJoin { symlinkJoin {
name = "rofi-${rofi-unwrapped.version}"; name = "rofi-${rofi-unwrapped.version}";
paths = [ paths =
[
rofi-unwrapped.out rofi-unwrapped.out
] ++ (lib.forEach plugins (p: p.out)); ]
++ (lib.forEach plugins (p: p.out));
nativeBuildInputs = [makeWrapper wrapGAppsHook]; nativeBuildInputs = [makeWrapper wrapGAppsHook];
buildInputs = [gdk-pixbuf]; buildInputs = [gdk-pixbuf];
@ -36,7 +48,9 @@ symlinkJoin {
--prefix XDG_DATA_DIRS : $out/share --prefix XDG_DATA_DIRS : $out/share
''; '';
meta = rofi-unwrapped.meta // { meta =
rofi-unwrapped.meta
// {
priority = (rofi-unwrapped.meta.priority or 0) - 1; priority = (rofi-unwrapped.meta.priority or 0) - 1;
}; };
} }

View File

@ -1,25 +1,23 @@
{ lib {
, stdenv lib,
, fetchurl stdenv,
, fetchFromGitHub fetchurl,
, cmake fetchFromGitHub,
, curl cmake,
, nasm curl,
, libopenmpt nasm,
, p7zip libopenmpt,
, libgme p7zip,
, libpng libgme,
, SDL2 libpng,
, SDL2_mixer SDL2,
, zlib SDL2_mixer,
, unzip zlib,
, makeWrapper unzip,
, makeDesktopItem makeWrapper,
, copyDesktopItems makeDesktopItem,
}: copyDesktopItems,
}: let
let
version = "2.2.11"; version = "2.2.11";
# Normal assets found on the official release # Normal assets found on the official release
@ -37,9 +35,8 @@ let
cp -r *pk3 *dta *dat models/ $out/share/srb2/ cp -r *pk3 *dta *dat models/ $out/share/srb2/
''; '';
}; };
in
in stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "srb2"; pname = "srb2";
inherit version; inherit version;

View File

@ -1,39 +1,56 @@
{ lib {
, stdenv lib,
, fetchFromGitHub stdenv,
, meson fetchFromGitHub,
, pkg-config meson,
, ninja pkg-config,
, wrapGAppsHook ninja,
, wayland wrapGAppsHook,
, wlroots wayland,
, gtkmm3 wlroots,
, libsigcxx gtkmm3,
, jsoncpp libsigcxx,
, scdoc jsoncpp,
, spdlog scdoc,
, gtk-layer-shell spdlog,
, howard-hinnant-date gtk-layer-shell,
, libinotify-kqueue howard-hinnant-date,
, libxkbcommon libinotify-kqueue,
, evdevSupport ? true, libevdev libxkbcommon,
, inputSupport ? true, libinput evdevSupport ? true,
, jackSupport ? true, libjack2 libevdev,
, mpdSupport ? true, libmpdclient inputSupport ? true,
, mprisSupport ? stdenv.isLinux, playerctl ? false libinput,
, nlSupport ? true, libnl jackSupport ? true,
, pulseSupport ? true, libpulseaudio libjack2,
, rfkillSupport ? true mpdSupport ? true,
, runTests ? true, catch2_3 libmpdclient,
, sndioSupport ? true, sndio mprisSupport ? stdenv.isLinux,
, swaySupport ? true, sway playerctl ? false,
, traySupport ? true, libdbusmenu-gtk3 nlSupport ? true,
, udevSupport ? true, udev libnl,
, upowerSupport ? true, upower pulseSupport ? true,
, wireplumberSupport ? true, wireplumber libpulseaudio,
, withMediaPlayer ? mprisSupport && false, glib, gobject-introspection, python3 rfkillSupport ? true,
runTests ? true,
catch2_3,
sndioSupport ? true,
sndio,
swaySupport ? true,
sway,
traySupport ? true,
libdbusmenu-gtk3,
udevSupport ? true,
udev,
upowerSupport ? true,
upower,
wireplumberSupport ? true,
wireplumber,
withMediaPlayer ? mprisSupport && false,
glib,
gobject-introspection,
python3,
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "waybar"; pname = "waybar";
version = "0.9.18"; version = "0.9.18";
@ -45,9 +62,15 @@ stdenv.mkDerivation rec {
hash = "sha256-bnaYNa1jb7kZ1mtMzeOQqz4tmBG1w5YXlQWoop1Q0Yc="; hash = "sha256-bnaYNa1jb7kZ1mtMzeOQqz4tmBG1w5YXlQWoop1Q0Yc=";
}; };
nativeBuildInputs = [ nativeBuildInputs =
meson ninja pkg-config scdoc wrapGAppsHook [
] ++ lib.optional withMediaPlayer gobject-introspection; meson
ninja
pkg-config
scdoc
wrapGAppsHook
]
++ lib.optional withMediaPlayer gobject-introspection;
propagatedBuildInputs = lib.optionals withMediaPlayer [ propagatedBuildInputs = lib.optionals withMediaPlayer [
glib glib
@ -77,8 +100,14 @@ stdenv.mkDerivation rec {
nativeCheckInputs = [catch2_3]; nativeCheckInputs = [catch2_3];
doCheck = runTests; doCheck = runTests;
mesonFlags = (lib.mapAttrsToList mesonFlags =
(option: enable: "-D${option}=${if enable then "enabled" else "disabled"}") (
lib.mapAttrsToList
(option: enable: "-D${option}=${
if enable
then "enabled"
else "disabled"
}")
{ {
dbusmenu-gtk = traySupport; dbusmenu-gtk = traySupport;
jack = jackSupport; jack = jackSupport;
@ -94,7 +123,8 @@ stdenv.mkDerivation rec {
upower_glib = upowerSupport; upower_glib = upowerSupport;
wireplumber = wireplumberSupport; wireplumber = wireplumberSupport;
} }
) ++ [ )
++ [
"-Dsystemd=disabled" "-Dsystemd=disabled"
"-Dgtk-layer-shell=enabled" "-Dgtk-layer-shell=enabled"
"-Dman-pages=enabled" "-Dman-pages=enabled"

View File

@ -1,10 +1,10 @@
{ lib {
, makeWrapper lib,
, rustPlatform makeWrapper,
, pkg-config rustPlatform,
, fetchFromGitHub pkg-config,
, wayland fetchFromGitHub,
, wayland,
}: }:
rustPlatform.buildRustPackage rec { rustPlatform.buildRustPackage rec {
pname = "waycorner"; pname = "waycorner";