mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 00:57:22 +01:00
refactor: inherit name from mkPackages
This commit is contained in:
parent
d397be861b
commit
d538762c7e
23 changed files with 81 additions and 147 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{ writeShellApplication, ... }:
|
||||
{ name, writeShellApplication, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "bak";
|
||||
inherit name;
|
||||
text = ''
|
||||
cp -r "$1"{,.bak}
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ writeShellApplication, fzf, ... }:
|
||||
{ name, writeShellApplication, fzf, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "cdb";
|
||||
inherit name;
|
||||
runtimeInputs = [ fzf ];
|
||||
text = ''
|
||||
git checkout "$(git branch --list | grep -v "^\*" | fzf | awk '{print $1}')"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ writeShellApplication, fzf, ... }:
|
||||
{ name, writeShellApplication, fzf, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "cdw";
|
||||
inherit name;
|
||||
runtimeInputs = [ fzf ];
|
||||
text = ''
|
||||
cd "$(git worktree list | fzf | awk '{print $1}')"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, emacs30-pgtk, sway, jq }:
|
||||
let
|
||||
name = "e";
|
||||
in
|
||||
{ self, name, writeShellApplication, emacs30-pgtk, sway, jq }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ emacs30-pgtk sway jq ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication }:
|
||||
let
|
||||
name = "fs-diff";
|
||||
in
|
||||
{ self, name, writeShellApplication }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
text = builtins.readFile "${self}/scripts/${name}.sh";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ writeShellApplication, jq, ... }:
|
||||
{ name, writeShellApplication, jq, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "github-notifications";
|
||||
inherit name;
|
||||
runtimeInputs = [ jq ];
|
||||
text = ''
|
||||
count=$(curl -u Swarsel:"$(cat /run/user/1000/secrets/github_notif)" https://api.github.com/notifications | jq '. | length')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ writeShellApplication, fzf, findutils, home-manager, ... }:
|
||||
{ name, writeShellApplication, fzf, findutils, home-manager, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "hm-specialisation";
|
||||
inherit name;
|
||||
runtimeInputs = [ fzf findutils home-manager ];
|
||||
text = ''
|
||||
genpath=$(home-manager generations | head -1 | awk '{print $7}')
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, sway }:
|
||||
let
|
||||
name = "opacitytoggle";
|
||||
in
|
||||
{ self, name, writeShellApplication, sway }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ sway ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, libnotify, pass, fuzzel, wtype }:
|
||||
let
|
||||
name = "pass-fuzzel";
|
||||
in
|
||||
{ self, name, writeShellApplication, libnotify, pass, fuzzel, wtype }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ libnotify (pass.withExtensions (exts: [ exts.pass-otp ])) fuzzel wtype ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, sway }:
|
||||
let
|
||||
name = "screenshare";
|
||||
in
|
||||
{ self, name, writeShellApplication, sway }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ sway ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, openssh }:
|
||||
let
|
||||
name = "swarsel-bootstrap";
|
||||
in
|
||||
{ self, name, writeShellApplication, openssh }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ openssh ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, git }:
|
||||
let
|
||||
name = "swarsel-install";
|
||||
in
|
||||
{ self, name, writeShellApplication, git }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ git ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, git }:
|
||||
let
|
||||
name = "swarsel-postinstall";
|
||||
in
|
||||
{ self, name, writeShellApplication, git }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ git ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, git }:
|
||||
let
|
||||
name = "swarsel-rebuild";
|
||||
in
|
||||
{ self, name, writeShellApplication, git }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ git ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, kitty, element-desktop-wayland, vesktop, spotify-player, jq }:
|
||||
let
|
||||
name = "swarselcheck";
|
||||
in
|
||||
{ self, name, writeShellApplication, kitty, element-desktop-wayland, vesktop, spotify-player, jq }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ kitty element-desktop-wayland vesktop spotify-player jq ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ writeShellApplication, ... }:
|
||||
{ name, writeShellApplication, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "t2ts";
|
||||
inherit name;
|
||||
runtimeInputs = [ ];
|
||||
text = ''
|
||||
date -d"$1" +%s
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ writeShellApplication, speechd, ... }:
|
||||
{ name, writeShellApplication, speechd, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "timer";
|
||||
inherit name;
|
||||
runtimeInputs = [ speechd ];
|
||||
text = ''
|
||||
sleep "$1"; while true; do spd-say "$2"; sleep 0.5; done;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ writeShellApplication, ... }:
|
||||
{ name, writeShellApplication, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "ts2t";
|
||||
inherit name;
|
||||
runtimeInputs = [ ];
|
||||
text = ''
|
||||
date -d @"$1" 2>/dev/null || date -r "$1"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, nvd }:
|
||||
let
|
||||
name = "update-checker";
|
||||
in
|
||||
{ self, name, writeShellApplication, nvd }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ nvd ];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{ writeShellApplication, ... }:
|
||||
{ name, writeShellApplication, ... }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "vershell";
|
||||
inherit name;
|
||||
runtimeInputs = [ ];
|
||||
text = ''
|
||||
nix shell github:nixos/nixpkgs/"$1"#"$2";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{ self, writeShellApplication, git }:
|
||||
let
|
||||
name = "waybarupdate";
|
||||
in
|
||||
{ self, name, writeShellApplication, git }:
|
||||
writeShellApplication {
|
||||
inherit name;
|
||||
runtimeInputs = [ git ];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue