The code and data behind xeiaso.net
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

Use pinned nixpkgs (#117)

* pin nixpkgs

* use pinned nixpkgs

* use pinned nixpkgs for docker build

* use buildLayeredImage

* test dhall

* dhall channel

* fix??

* fix???

* fix????

* easy-dhall-nix

* fix?????

* pin dhall-yaml to shell, update xepkgs to use inherit

authored by

Christine Dodrill and committed by
GitHub
4429504f 1f009f0d

+90 -14
+7
.github/workflows/nix.yml
··· 10 10 - uses: cachix/cachix-action@v3 11 11 with: 12 12 name: xe 13 + - run: | 14 + nix-build docker.nix 15 + docker load -i result 16 + docker tag xena/christinewebsite:latest xena/christinewebsite:$(echo $GITHUB_SHA | head -c7) 17 + - run: | 18 + nix-env -if ./nix/dhall-yaml.nix 19 + dhall-to-yaml-ng --omit-empty --file site.dhall
+5 -2
default.nix
··· 1 - { pkgs ? import <nixpkgs> {} }: 1 + { }: 2 2 3 - pkgs.callPackage ./site.nix {} 3 + let 4 + sources = import ./nix/sources.nix; 5 + pkgs = import sources.nixpkgs { }; 6 + in pkgs.callPackage ./site.nix { inherit pkgs; }
+2 -4
docker.nix
··· 1 1 { system ? builtins.currentSystem }: 2 2 3 3 let 4 - pkgs = import <nixpkgs> { inherit system; }; 5 - 4 + pkgs = import (import ./nix/sources.nix).nixpkgs { inherit system; }; 6 5 callPackage = pkgs.lib.callPackageWith pkgs; 7 - 8 6 site = callPackage ./site.nix { }; 9 7 10 8 dockerImage = pkg: 11 - pkgs.dockerTools.buildImage { 9 + pkgs.dockerTools.buildLayeredImage { 12 10 name = "xena/christinewebsite"; 13 11 tag = pkg.version; 14 12
+5
nix/dhall-yaml.nix
··· 1 + let 2 + sources = import ./sources.nix; 3 + pkgs = import sources.nixpkgs { }; 4 + dhall = import sources.easy-dhall-nix { inherit pkgs; }; 5 + in dhall.dhall-yaml-simple
+37 -1
nix/sources.json
··· 1 1 { 2 + "easy-dhall-nix": { 3 + "branch": "master", 4 + "description": "Derivations for easily downloading Dhall binaries and putting them to use.", 5 + "homepage": "", 6 + "owner": "justinwoo", 7 + "repo": "easy-dhall-nix", 8 + "rev": "735ad924fd829c9bbee0a167e0b2bbbf91e2cad5", 9 + "sha256": "1r3sqs1cz0mcfwfvaq1d21vnppg5sqzqdl6w9krsw5ad5czkk190", 10 + "type": "tarball", 11 + "url": "https://github.com/justinwoo/easy-dhall-nix/archive/735ad924fd829c9bbee0a167e0b2bbbf91e2cad5.tar.gz", 12 + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" 13 + }, 14 + "niv": { 15 + "branch": "master", 16 + "description": "Easy dependency management for Nix projects", 17 + "homepage": "https://github.com/nmattia/niv", 18 + "owner": "nmattia", 19 + "repo": "niv", 20 + "rev": "2ecfd86b631714b457e56d70dd83fa60435baeb6", 21 + "sha256": "01j6727cws8blg1npp54b4w6xa0gpgyzhyws2vqgp8clnlnmqqhi", 22 + "type": "tarball", 23 + "url": "https://github.com/nmattia/niv/archive/2ecfd86b631714b457e56d70dd83fa60435baeb6.tar.gz", 24 + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" 25 + }, 26 + "nixpkgs": { 27 + "branch": "nixpkgs-unstable", 28 + "description": "A read-only mirror of NixOS/nixpkgs tracking the released channels. Send issues and PRs to", 29 + "homepage": "https://github.com/NixOS/nixpkgs", 30 + "owner": "NixOS", 31 + "repo": "nixpkgs-channels", 32 + "rev": "cc1ae9f21b9e0ce998e706a3de1bad0b5259f22d", 33 + "sha256": "0zjafww05h50ncapw51b5qxgbv9prjyag0j22jnfc3kcs5xr4ap0", 34 + "type": "tarball", 35 + "url": "https://github.com/NixOS/nixpkgs-channels/archive/cc1ae9f21b9e0ce998e706a3de1bad0b5259f22d.tar.gz", 36 + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" 37 + }, 2 38 "vgo2nix": { 3 39 "branch": "master", 4 40 "description": null, ··· 14 50 "xepkgs": { 15 51 "ref": "master", 16 52 "repo": "https://tulpa.dev/Xe/nixpkgs", 17 - "rev": "71488e7dd46c9530d6781ab7845e6f720591a0b0", 53 + "rev": "e0027d79c85aab9411c69acaadaabd2189400cc9", 18 54 "type": "git" 19 55 } 20 56 }
+9 -4
shell.nix
··· 1 1 let 2 - pkgs = import <nixpkgs> { }; 3 2 sources = import ./nix/sources.nix; 4 - xepkgs = import sources.xepkgs { }; 5 - vgo2nix = import sources.vgo2nix { }; 6 - in pkgs.mkShell { buildInputs = [ pkgs.go pkgs.niv xepkgs.gopls vgo2nix ]; } 3 + pkgs = import sources.nixpkgs { }; 4 + niv = (import sources.niv { }).niv; 5 + dhall-yaml = 6 + (import sources.easy-dhall-nix { inherit pkgs; }).dhall-yaml-simple; 7 + xepkgs = import sources.xepkgs { inherit pkgs; }; 8 + vgo2nix = import sources.vgo2nix { inherit pkgs; }; 9 + in pkgs.mkShell { 10 + buildInputs = [ pkgs.go xepkgs.gopls dhall-yaml niv vgo2nix ]; 11 + }
+23
site.dhall
··· 1 + let kms = 2 + https://xena.greedo.xeserv.us/pkg/dhall/kubermemes/k8s/package.dhall sha256:e47e95aba6a08f8ca3e38fbabc436566d6558a05a9b4ac149e8e712c8583b8f0 3 + 4 + let kubernetes = 5 + https://xena.greedo.xeserv.us/pkg/dhall/dhall-kubernetes/1.15/package.dhall sha256:271494d6e3daba2a47d9d023188e35bf44c9c477a1cfbad1c589695a6b626e56 6 + 7 + let tag = env:GITHUB_SHA as Text ? "latest" 8 + 9 + let image = "xena/christinewebsite:${tag}" 10 + 11 + let vars 12 + : List kubernetes.EnvVar.Type 13 + = [ kubernetes.EnvVar::{ name = "PORT", value = Some "5000" } ] 14 + 15 + in kms.app.make 16 + kms.app.Config::{ 17 + , name = "christinewebsite" 18 + , appPort = 5000 19 + , image = image 20 + , domain = "christine.website" 21 + , leIssuer = "prod" 22 + , envVars = vars 23 + }
+2 -3
site.nix
··· 1 - { pkgs ? import <nixpkgs> {} }: 1 + { pkgs ? import (import ./nix/sources.nix).nixpkgs }: 2 2 with pkgs; 3 3 4 4 assert lib.versionAtLeast go.version "1.13"; ··· 8 8 version = "latest"; 9 9 goPackagePath = "christine.website"; 10 10 src = ./.; 11 - nativeBuildInputs = [ makeWrapper ]; 12 - 13 11 goDeps = ./deps.nix; 14 12 allowGoReference = false; 13 + 15 14 preBuild = '' 16 15 export CGO_ENABLED=0 17 16 buildFlagsArray+=(-pkgdir "$TMPDIR")