diff --git a/flake.lock b/flake.lock index 013b2cb..aa43cc3 100644 --- a/flake.lock +++ b/flake.lock @@ -661,10 +661,33 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", "nvim": "nvim", + "scripts": "scripts", "sops-nix": "sops-nix", "stylix": "stylix" } }, + "scripts": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1791756354, + "narHash": "sha256-oBlr1pCkDwCrHapNpoU+AgwI+3IjV0jzheRMjJyHEeA=", + "ref": "main", + "rev": "36cef91b740a2e183aae2d2735d22d73951fab52", + "shallow": true, + "type": "git", + "url": "ssh://git@github.com/hektor/scripts" + }, + "original": { + "ref": "main", + "shallow": true, + "type": "git", + "url": "ssh://git@github.com/hektor/scripts" + } + }, "sops-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index 1dd59d0..d44304d 100644 --- a/flake.nix +++ b/flake.nix @@ -58,6 +58,10 @@ url = "path:./home/modules/nvim/config"; inputs.nixpkgs.follows = "nixpkgs"; }; + scripts = { + url = "git+ssh://git@github.com/hektor/scripts?shallow=1&ref=main"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = diff --git a/home/hosts/andromache/default.nix b/home/hosts/andromache/default.nix index dab67d8..2087c7c 100644 --- a/home/hosts/andromache/default.nix +++ b/home/hosts/andromache/default.nix @@ -49,6 +49,7 @@ pandoc.enable = true; photography.enable = true; reference-manager.enable = true; + scripts.enable = true; secrets.enable = true; shell = { enable = true; diff --git a/home/modules/scripts/default.nix b/home/modules/scripts/default.nix new file mode 100644 index 0000000..e894490 --- /dev/null +++ b/home/modules/scripts/default.nix @@ -0,0 +1,15 @@ +{ + config, + inputs, + lib, + pkgs, + ... +}: + +{ + options.scripts.enable = lib.mkOption { default = false; }; + + config = lib.mkIf config.scripts.enable { + home.packages = [ inputs.scripts.packages.${pkgs.stdenv.hostPlatform.system}.default ]; + }; +}