mirror of
https://github.com/thilobillerbeck/dotfiles.git
synced 2025-01-03 08:20:28 +01:00
Compare commits
2 commits
169c3f11bd
...
1cbab37a97
Author | SHA1 | Date | |
---|---|---|---|
1cbab37a97 | |||
bf2d1fd2af |
3 changed files with 31 additions and 6 deletions
12
flake.lock
12
flake.lock
|
@ -28,11 +28,11 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks"
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710144971,
|
"lastModified": 1710819219,
|
||||||
"narHash": "sha256-CjTOdoBvT/4AQncTL20SDHyJNgsXZjtGbz62yDIUYnM=",
|
"narHash": "sha256-SXTz20R4ZDXwr3iPxXJXQTftHmZwOPzSpIK7bIIculA=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "devenv",
|
"repo": "devenv",
|
||||||
"rev": "6c0bad0045f1e1802f769f7890f6a59504825f4d",
|
"rev": "169d2cbce65977289f2e0e863a4e8f42f9ce98af",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -119,11 +119,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1710714957,
|
"lastModified": 1710820906,
|
||||||
"narHash": "sha256-eZCxuF58YWgaJMMRrn8oRkwRhxooe5kBS/s2wRVr9PA=",
|
"narHash": "sha256-2bNMraoRB4pdw/HtxgYTFeMhEekBZeQ53/a8xkqpbZc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "7b3fca5adcf6c709874a8f2e0c364fe9c58db989",
|
"rev": "022464438a85450abb23d93b91aa82e0addd71fb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -51,6 +51,7 @@ in {
|
||||||
nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'
|
nix-build -E 'with import <nixpkgs> { }; callPackage ./default.nix { }'
|
||||||
'')
|
'')
|
||||||
(callPackage ./../pkgs/toggl-time-grouper/package.nix { inherit python3Packages; })
|
(callPackage ./../pkgs/toggl-time-grouper/package.nix { inherit python3Packages; })
|
||||||
|
(callPackage ./../pkgs/extract.nix { inherit pkgs; })
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
toolbox
|
toolbox
|
||||||
distrobox
|
distrobox
|
||||||
|
|
24
home-manager/pkgs/extract.nix
Normal file
24
home-manager/pkgs/extract.nix
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
{ pkgs }:
|
||||||
|
|
||||||
|
/* SOURCE: https://ostechnix.com/a-bash-function-to-extract-file-archives-of-various-types/ */
|
||||||
|
|
||||||
|
pkgs.writeShellScriptBin "extract" ''
|
||||||
|
if [ -f $1 ] ; then
|
||||||
|
case $1 in
|
||||||
|
*.tar.bz2) ${pkgs.gnutar}/bin/tar xjf $1 ;;
|
||||||
|
*.tar.gz) ${pkgs.gnutar}/bin/tar $1 ;;
|
||||||
|
*.bz2) ${pkgs.bzip2}/bin/bunzip2 $1 ;;
|
||||||
|
*.rar) ${pkgs.rar}/bin/rar x $1 ;;
|
||||||
|
*.gz) ${pkgs.gzip}/bin/gunzip $1 ;;
|
||||||
|
*.tar) ${pkgs.gnutar}/bin/tar xf $1 ;;
|
||||||
|
*.tbz2) ${pkgs.gnutar}/bin/tar xjf $1 ;;
|
||||||
|
*.tgz) ${pkgs.gnutar}/bin/tar xzf $1 ;;
|
||||||
|
*.zip) ${pkgs.unzip}/bin/unzip $1 ;;
|
||||||
|
*.Z) ${pkgs.gzip}/bin/uncompress $1 ;;
|
||||||
|
*.7z) ${pkgs._7zz}/bin/7z x $1 ;;
|
||||||
|
*) echo "'$1' cannot be extracted via extract()" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
echo "'$1' is not a valid file"
|
||||||
|
fi
|
||||||
|
''
|
Loading…
Reference in a new issue