diff options
author | tdback <tyler@tdback.net> | 2025-01-16 20:17:00 -0500 |
---|---|---|
committer | tdback <tyler@tdback.net> | 2025-01-16 20:17:00 -0500 |
commit | 98728ae9065b1ab75801067552530b68aaaca840 (patch) | |
tree | 21ab9baf358949b94a28576cace5bad4c82e718f /flake.nix | |
parent | 0c1201c4447293ef819285d99b95be9a5be9cedf (diff) |
Diffstat (limited to 'flake.nix')
-rw-r--r-- | flake.nix | 60 |
1 files changed, 33 insertions, 27 deletions
@@ -1,33 +1,39 @@ { - inputs = { - nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - flake-utils.url = "github:numtide/flake-utils"; - }; + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - outputs = { ... }@inputs: - inputs.flake-utils.lib.eachDefaultSystem (system: - let - pkgs = import inputs.nixpkgs { inherit system; }; - in - { - devShells.default = pkgs.mkShell { - buildInputs = with pkgs; [ - hugo - ]; + outputs = + { nixpkgs, ... }: + let + supportedSystems = [ "x86_64-linux" ]; + eachSystem = nixpkgs.lib.genAttrs supportedSystems; + in + { + devShells = eachSystem ( + system: + let + pkgs = import nixpkgs { inherit system; }; + in + { + default = pkgs.mkShell { + buildInputs = with pkgs; [ + hugo + ]; - shellHook = '' - SITE="$HOME/projects/tdback.net" + shellHook = '' + SITE="$HOME/projects/tdback.net" - new-post() { - hugo new "posts/$1/index.md" - $EDITOR "$SITE/content/posts/$1/index.md" - } + new-post() { + hugo new "posts/$1/index.md" + $EDITOR "$SITE/content/posts/$1/index.md" + } - del-post() { - POST="$SITE/content/posts/$1" - [ -d $POST ] && rm -r $POST - } - ''; - }; - }); + del-post() { + POST="$SITE/content/posts/$1" + [ -d $POST ] && rm -r $POST + } + ''; + }; + } + ); + }; } |