From 7aa1e8e19dac2c8f8d48b7b44a0a855d434deb95 Mon Sep 17 00:00:00 2001 From: Bill Ewanick Date: Wed, 2 Aug 2023 20:22:52 -0400 Subject: [PATCH] Add 'nix run .#generateSealPosts' input and command --- config.dhall | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ flake.lock | 24 ++++++++++++ flake.nix | 29 ++++++++++----- 3 files changed, 144 insertions(+), 10 deletions(-) create mode 100644 config.dhall diff --git a/config.dhall b/config.dhall new file mode 100644 index 0000000..9512ff0 --- /dev/null +++ b/config.dhall @@ -0,0 +1,101 @@ +{ sealImagesPath = "./website/images" +, postsOutputPath = "./website/posts" +, startDate = 2022-01-01 +, adjectives1 = + [ "absorbing" + , "adorable" + , "alluring" + , "ambrosial" + , "amiable" + , "appealing" + , "attractive" + , "beautiful" + , "bewitching" + , "captivating" + , "charismatic" + , "charming" + , "choice" + , "cute" + , "dainty" + , "darling" + , "dear" + , "delectable" + , "delicate" + , "delicious" + , "delightful" + , "desirable" + , "dishy" + , "dreamy" + , "electrifying" + , "elegant" + , "enamoring" + , "engaging" + , "engrossing" + , "enthralling" + , "entrancing" + , "eye-catching" + , "fascinating" + , "fetching" + , "glamorous" + , "graceful" + , "heavenly" + , "infatuating" + , "inviting" + , "irresistible" + , "likable" + , "lovable" + , "lovely" + , "magnetizing" + , "nice" + , "pleasant" + , "precious" + , "pretty" + , "provocative" + , "rapturous" + , "ravishing" + , "seducing" + , "seductive" + , "suave" + , "sweet" + , "tantalizing" + , "tempting" + , "titillating" + , "winning" + , "winsome" + ] +, adjectives2 = + [ "ample" + , "bearish" + , "big" + , "butterball" + , "buxom" + , "chunky" + , "fatty" + , "flabby" + , "fleshy" + , "full-figured" + , "hefty" + , "husky" + , "pleasingly plump" + , "plump" + , "plumpish" + , "podgy" + , "portly" + , "pudgy" + , "roly-poly" + , "rotund" + , "round" + , "stout" + , "tubby" + , "zaftig" + ] +, looks = + [ "Look at" + , "Gaze upon" + , "Check out" + , "Witness!" + , "Look upon and tremble at" + , "Lookie here at" + , "Whoa! See" + ] +} diff --git a/flake.lock b/flake.lock index dd13566..a91a7ae 100644 --- a/flake.lock +++ b/flake.lock @@ -19,9 +19,33 @@ "root": { "inputs": { "nixpkgs": "nixpkgs", + "spg": "spg", "utils": "utils" } }, + "spg": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ], + "utils": [ + "utils" + ] + }, + "locked": { + "lastModified": 1691015524, + "narHash": "sha256-Qg6wYm/T3qmEiwuff3hBmOnCe8MoC6LhHuKQDs+7YRE=", + "ref": "refs/heads/main", + "rev": "73235cf0ab75d9823db99210ba8bdaf426e29714", + "revCount": 10, + "type": "git", + "url": "https://git.ewanick.com/bill/sealPostGenerator.git" + }, + "original": { + "type": "git", + "url": "https://git.ewanick.com/bill/sealPostGenerator.git" + } + }, "systems": { "locked": { "lastModified": 1681028828, diff --git a/flake.nix b/flake.nix index d67a1b6..1ad80fd 100644 --- a/flake.nix +++ b/flake.nix @@ -3,10 +3,15 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; + utils.url = "github:numtide/flake-utils"; + + spg.url = "git+https://git.ewanick.com/bill/sealPostGenerator.git"; + spg.inputs.nixpkgs.follows = "nixpkgs"; + spg.inputs.utils.follows = "utils"; }; - outputs = { self, nixpkgs, utils }: + outputs = { self, nixpkgs, utils, ... }@inputs: utils.lib.eachDefaultSystem (system: let pkgs = nixpkgs.legacyPackages.${system}; @@ -20,19 +25,23 @@ ]); in { + apps.generateSealPosts = { + type = "app"; + program = "${inputs.spg.packages.${system}.default}/bin/generateSealPosts"; + }; + devShells.default = pkgs.mkShell { name = "hakyll-shell"; - buildInputs = with pkgs.haskellPackages; - [ - ghc' - hlint - haskell-language-server + buildInputs = with pkgs.haskellPackages; [ + ghc' + hlint + haskell-language-server - (pkgs.writeShellScriptBin "build-site" '' - ${ghc'}/bin/ghc --make website/site -outputdir dist -static -O2 - '') - ]; + (pkgs.writeShellScriptBin "build-site" '' + ${ghc'}/bin/ghc --make website/site -outputdir dist -static -O2 + '') + ]; }; }); }