diff --git a/home/scripts/default.nix b/home/scripts/default.nix index bb788f0..da12c77 100644 --- a/home/scripts/default.nix +++ b/home/scripts/default.nix @@ -60,4 +60,12 @@ in genswitch = nixos-rebuild "genswitch" "switch"; fishl = pkgs.writers.writeFishBin "fishl" ./logo.fish; + + nrun = pkgs.writers.writeFishBin "nrun" '' + if echo $argv[1] | grep -Eq '^(github):.+/.+$' + nix run $argv[1] -- $argv[2..] + else + nix run nixpkgs#$argv[1] -- $argv[2..] + end + ''; } diff --git a/home/terminal/fish/default.nix b/home/terminal/fish/default.nix index 8564c4f..5cb0c25 100644 --- a/home/terminal/fish/default.nix +++ b/home/terminal/fish/default.nix @@ -13,10 +13,8 @@ cp = "cp -i"; mv = "mv -i"; }; - functions = rec { + functions = { gitignore = "curl -sL https://www.gitignore.io/api/$argv"; - nrun = "nix run nixpkgs#$argv[1] -- $argv[2..]"; - nrunb = "${nrun} & disown"; mv-bad-creation-date = '' ${lib.my.checkPath pkgs.exiftool "exiftool"} -if 'not $CreateDate' -p '$FileName' "$PWD/$argv[1]" | xargs -I {} mv -i "$PWD/$argv[1]/{}" "$argv[2]" ''; diff --git a/modules/nix/default.nix b/modules/nix/default.nix index e25277e..95c8ed4 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -1,10 +1,11 @@ { ... }: { - imports = [ - ./nixpkgs.nix - ./overlays.nix - ]; + imports = [ ./overlays.nix ]; + + nixpkgs.config = { + allowUnfree = true; + }; nix = { gc = { diff --git a/modules/nix/nixpkgs.nix b/modules/nix/nixpkgs.nix deleted file mode 100644 index ff47289..0000000 --- a/modules/nix/nixpkgs.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ inputs, lib, ... }: -{ - nixpkgs.config = { - allowUnfree = true; - packageOverrides = pkgs: { - custom = { - scripts = import ../../home/scripts { inherit pkgs lib; }; - rofi-obsidian = inputs.rofi-obsidian.outputs.packages.${pkgs.system}.rofi-obsidian; - }; - }; - }; -} diff --git a/modules/programs/ssh.nix b/modules/programs/ssh.nix index a174fc4..bf85321 100644 --- a/modules/programs/ssh.nix +++ b/modules/programs/ssh.nix @@ -4,4 +4,6 @@ "github.com".publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl"; }; }; + + services.openssh.enable = true; }