diff options
author | tdback <tyler@tdback.net> | 2025-03-03 21:20:12 -0500 |
---|---|---|
committer | tdback <tyler@tdback.net> | 2025-03-03 21:20:12 -0500 |
commit | 89ec44a7d3fc46b9ff41ccb059abd2e74d5f26dd (patch) | |
tree | 1ff64a6a02f4eb8ebe48e512e4af1512b3d98729 /flake.nix | |
parent | c59033510f0c872fdfddd03f453d105e9580e57e (diff) |
flake: add nix build steps and README
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -1,4 +1,6 @@ { + description = "tdback's website source code (tdback.net)"; + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; outputs = @@ -9,27 +11,25 @@ "x86_64-linux" ]; eachSystem = nixpkgs.lib.genAttrs supportedSystems; + forPkgs = + fn: + nixpkgs.lib.mapAttrs (system: pkgs: (fn pkgs)) ( + nixpkgs.lib.getAttrs supportedSystems nixpkgs.legacyPackages + ); in { + packages = forPkgs (pkgs: { + default = pkgs.callPackage ./default.nix { }; + }); + devShells = eachSystem ( system: let pkgs = import nixpkgs { inherit system; }; in { - default = pkgs.mkShell { - buildInputs = with pkgs; [ - hugo - rsync - ]; - - shellHook = '' - SITE="$HOME/projects/tdback.net" - - publish() { - hugo && rsync -avz --delete public/ thor:/var/www/tdback.net/ - } - ''; + default = with pkgs; mkShell { + buildInputs = [ hugo ]; }; } ); |