Make shell scripts a bit more OS independent
This commit is contained in:
parent
4317ab1dcf
commit
693220a895
4 changed files with 12 additions and 5 deletions
|
@ -38,7 +38,6 @@
|
|||
aria2
|
||||
arp-scan
|
||||
cachix
|
||||
cliclick
|
||||
curlFull
|
||||
dasel
|
||||
exa
|
||||
|
@ -51,7 +50,6 @@
|
|||
lnav
|
||||
mtr
|
||||
nix-prefetch
|
||||
nvd
|
||||
parallel
|
||||
q
|
||||
ripgrep
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
# Disable greeting
|
||||
set fish_greeting
|
||||
|
||||
if [ -z "$__NIX_DARWIN_SET_ENVIRONMENT_DONE" ]
|
||||
if test (uname) = "Darwin"; and test -z "$__NIX_DARWIN_SET_ENVIRONMENT_DONE"
|
||||
set __nifoc_nix_darwin_set_env (cat /run/current-system/etc/bashrc | grep '-set-environment' | cut -d '.' -f 2)
|
||||
fenv source "$__nifoc_nix_darwin_set_env"
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
customPlugins = import ./plugins.nix { inherit pkgs; };
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
{ config, ... }:
|
||||
{ pkgs, config, lib, ... }:
|
||||
|
||||
let
|
||||
inherit (pkgs.stdenv) isDarwin;
|
||||
inherit (lib) optionals;
|
||||
|
||||
user-bin-directory = "${config.home.homeDirectory}/.bin";
|
||||
in
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
nvd
|
||||
] ++ optionals isDarwin [
|
||||
cliclick
|
||||
];
|
||||
|
||||
home.file."${user-bin-directory}" = {
|
||||
source = ./scripts;
|
||||
recursive = true;
|
||||
|
|
Loading…
Reference in a new issue