Add 'nix run .#generateSealPosts' input and command

main
Bill Ewanick 2023-08-02 20:22:52 -04:00
parent 0117ab552e
commit 7aa1e8e19d
3 changed files with 144 additions and 10 deletions

101
config.dhall Normal file
View File

@ -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"
]
}

View File

@ -19,9 +19,33 @@
"root": { "root": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"spg": "spg",
"utils": "utils" "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": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,

View File

@ -3,10 +3,15 @@
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
utils.url = "github:numtide/flake-utils"; 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: utils.lib.eachDefaultSystem (system:
let let
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
@ -20,19 +25,23 @@
]); ]);
in in
{ {
apps.generateSealPosts = {
type = "app";
program = "${inputs.spg.packages.${system}.default}/bin/generateSealPosts";
};
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
name = "hakyll-shell"; name = "hakyll-shell";
buildInputs = with pkgs.haskellPackages; buildInputs = with pkgs.haskellPackages; [
[ ghc'
ghc' hlint
hlint haskell-language-server
haskell-language-server
(pkgs.writeShellScriptBin "build-site" '' (pkgs.writeShellScriptBin "build-site" ''
${ghc'}/bin/ghc --make website/site -outputdir dist -static -O2 ${ghc'}/bin/ghc --make website/site -outputdir dist -static -O2
'') '')
]; ];
}; };
}); });
} }