Nix fmt rfc style (more or less)
This commit is contained in:
parent
e7496c447a
commit
515f098644
146 changed files with 2607 additions and 906 deletions
|
|
@ -3,15 +3,20 @@
|
|||
, xclip
|
||||
, coreutils
|
||||
, terminal-command ? "kitty -e"
|
||||
,
|
||||
}:
|
||||
# 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
|
||||
# 65 │ function clippaste() { xclip -out -selection clipboard; } clip
|
||||
writeShellScriptBin "clipedit" ''
|
||||
PATH=$PATH:"${lib.makeBinPath [ coreutils xclip ]}"
|
||||
PATH=$PATH:"${
|
||||
lib.makeBinPath [
|
||||
coreutils
|
||||
xclip
|
||||
]
|
||||
}"
|
||||
tmp_file=$(mktemp)
|
||||
xclip -out -selection -clipboard > $tmp_file
|
||||
${terminal-command} $VISUAL $tmp_file || ${terminal-command} $EDITOR $tmp_file
|
||||
xclip -in -selection clipboard < $tmp_file
|
||||
rm $tmp_file
|
||||
''
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
{ pkgs ? import <nixos> { inherit system; }, system ? builtins.currentSystem }:
|
||||
{ pkgs ? import <nixos> { inherit system; }
|
||||
, system ? builtins.currentSystem
|
||||
,
|
||||
}:
|
||||
let
|
||||
self = {
|
||||
clipedit = pkgs.callPackage ./clipedit { };
|
||||
|
|
|
|||
|
|
@ -4,11 +4,18 @@
|
|||
, libnotify
|
||||
, coreutils
|
||||
, keyboard_name ? "AT Translated Set 2 keyboard"
|
||||
,
|
||||
}:
|
||||
writeShellScriptBin "keyboard-switch" ''
|
||||
set -e
|
||||
|
||||
PATH=$PATH:"${lib.makeBinPath [ coreutils xorg.xinput libnotify ]}"
|
||||
PATH=$PATH:"${
|
||||
lib.makeBinPath [
|
||||
coreutils
|
||||
xorg.xinput
|
||||
libnotify
|
||||
]
|
||||
}"
|
||||
fconfig="''${XDG_DATA_HOME:-$HOME/.local/share}/keyboard-switch.state"
|
||||
if [ ! -f $fconfig ]; then
|
||||
echo "Creating config file"
|
||||
|
|
@ -31,5 +38,3 @@ writeShellScriptBin "keyboard-switch" ''
|
|||
echo 'disabled' > $fconfig
|
||||
fi
|
||||
''
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -10,8 +10,10 @@
|
|||
, palette ? rice.palette.palette { }
|
||||
, ...
|
||||
}:
|
||||
let strPalette = lib.nix-rice.palette.toRGBAHex palette;
|
||||
in writeScriptBin "lockscreen" ''
|
||||
let
|
||||
strPalette = lib.nix-rice.palette.toRGBAHex palette;
|
||||
in
|
||||
writeScriptBin "lockscreen" ''
|
||||
# Using font package ${font.package}
|
||||
${i3lock-color}/bin/i3lock-color \
|
||||
--insidever-color="${strPalette.normal.green}" \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
{ lib, stdenv, fetchFromGitHub, sddm, qt5 }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, sddm
|
||||
, qt5
|
||||
,
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "sddm-sugar-dark";
|
||||
version = "2023-02-17";
|
||||
|
|
@ -35,4 +41,3 @@ stdenv.mkDerivation {
|
|||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
{ lib, stdenv, fetchFromGitHub, fira-mono, wallpaper ? null }:
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fira-mono
|
||||
, wallpaper ? null
|
||||
,
|
||||
}:
|
||||
with lib;
|
||||
stdenv.mkDerivation {
|
||||
pname = "sddm-theme-clairvoyance";
|
||||
|
|
@ -13,12 +19,14 @@ stdenv.mkDerivation {
|
|||
|
||||
buildInputs = [ fira-mono ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/usr/share/sddm/themes/
|
||||
cp -a . $out/usr/share/sddm/themes/clairvoyance
|
||||
'' + optionalString (wallpaper != null) ''
|
||||
cp ${wallpaper} $out/usr/share/sddm/themes/clairvoyance/Assets/Background.jpg
|
||||
'';
|
||||
installPhase =
|
||||
''
|
||||
mkdir -p $out/usr/share/sddm/themes/
|
||||
cp -a . $out/usr/share/sddm/themes/clairvoyance
|
||||
''
|
||||
+ optionalString (wallpaper != null) ''
|
||||
cp ${wallpaper} $out/usr/share/sddm/themes/clairvoyance/Assets/Background.jpg
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Clairvoyance theme for SDDM";
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
, coreutils
|
||||
, writeScriptBin
|
||||
, backgrounds_directory ? "$HOME/Immagini/Sfondi"
|
||||
,
|
||||
}:
|
||||
let
|
||||
find = "${findutils}/bin/find";
|
||||
|
|
|
|||
|
|
@ -11,8 +11,10 @@
|
|||
, palette ? rice.palette.palette { }
|
||||
, ...
|
||||
}:
|
||||
let strPalette = lib.nix-rice.palette.toRgbaShortHex palette;
|
||||
in writeScriptBin "way-lockscreen" ''
|
||||
let
|
||||
strPalette = lib.nix-rice.palette.toRgbaShortHex palette;
|
||||
in
|
||||
writeScriptBin "way-lockscreen" ''
|
||||
# Using font package ${font.package}
|
||||
${swaylock}/bin/swaylock \
|
||||
--color "${strPalette.primary.background}" \
|
||||
|
|
@ -35,4 +37,3 @@ in writeScriptBin "way-lockscreen" ''
|
|||
# --indicator-radius 120 \
|
||||
# --indicator-thickness 15 \
|
||||
''
|
||||
|
||||
|
|
|
|||
|
|
@ -4,16 +4,20 @@
|
|||
, coreutils
|
||||
, editor ? "hx"
|
||||
, terminal-command ? "kitty -e"
|
||||
,
|
||||
}:
|
||||
# 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; }
|
||||
# 65 │ function clippaste() { xclip -out -selection clipboard; } clip
|
||||
writeShellScriptBin "wl-clipedit" ''
|
||||
PATH=$PATH:"${lib.makeBinPath [ coreutils wl-clipboard ]}"
|
||||
PATH=$PATH:"${
|
||||
lib.makeBinPath [
|
||||
coreutils
|
||||
wl-clipboard
|
||||
]
|
||||
}"
|
||||
tmp_file=$(mktemp)
|
||||
wl-paste -t 'text/plain;charset=utf-8' -n > "$tmp_file"
|
||||
${terminal-command} ''${VISUAL:-''${EDITOR:-${editor}}} "$tmp_file"
|
||||
wl-copy -t 'text/plain;charset=utf-8' -n < "$tmp_file"
|
||||
rm "$tmp_file"
|
||||
''
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue