1
0
Fork 0

Make shell scripts a bit more OS independent

This commit is contained in:
Daniel Kempkens 2022-08-02 20:48:28 +02:00
parent 4317ab1dcf
commit 693220a895
4 changed files with 12 additions and 5 deletions

View file

@ -38,7 +38,6 @@
aria2
arp-scan
cachix
cliclick
curlFull
dasel
exa
@ -51,7 +50,6 @@
lnav
mtr
nix-prefetch
nvd
parallel
q
ripgrep

View file

@ -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

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ pkgs, config, lib, ... }:
let
customPlugins = import ./plugins.nix { inherit pkgs; };

View file

@ -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;