diff --git a/default.nix b/default.nix index 05ed61f..5823096 100644 --- a/default.nix +++ b/default.nix @@ -1,7 +1,12 @@ -{ stdenv, hugo }: +{ stdenv, hugo, hugo-theme-anubis }: stdenv.mkDerivation rec { src = ./.; nativeBuildInputs = [ hugo ]; + # avoid git submodules using flakes :-) + patchPhase = '' + mkdir -p themes/ + ln -s ${hugo-theme-anubis} themes/anubis + ''; buildPhase = '' hugo ''; diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..14d275b --- /dev/null +++ b/flake.lock @@ -0,0 +1,41 @@ +{ + "nodes": { + "hugo-theme-anubis": { + "flake": false, + "locked": { + "lastModified": 1626675855, + "narHash": "sha256-Vj77NcXxPOcatDbLvW+d90hsUpYH+2eyhpyXv82ZTts=", + "owner": "mitrichius", + "repo": "hugo-theme-anubis", + "rev": "5dab60e04a37896c09a32137aefe821c63b3af04", + "type": "github" + }, + "original": { + "owner": "mitrichius", + "repo": "hugo-theme-anubis", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1629226339, + "narHash": "sha256-szvgmQcUJM3Kv/wNyIn+wtMrrvsks0bk9JOqI2Ij8Ao=", + "path": "/nix/store/vy5l0dvdwwhyc988z185f9i7rqbc1n8y-source", + "rev": "2435ea48c3b295d9cd490535730bb13ab8cfd8a5", + "type": "path" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "root": { + "inputs": { + "hugo-theme-anubis": "hugo-theme-anubis", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..90423d2 --- /dev/null +++ b/flake.nix @@ -0,0 +1,15 @@ +{ + description = "dadada's homepage"; + + inputs = { + hugo-theme-anubis = { + url = github:mitrichius/hugo-theme-anubis; + flake = false; + }; + }; + + outputs = { self, hugo-theme-anubis, nixpkgs }: { + packages.x86_64-linux.homePage = nixpkgs.legacyPackages.x86_64-linux.callPackage ./default.nix { inherit hugo-theme-anubis; }; + defaultPackage.x86_64-linux = self.packages.x86_64-linux.homePage; + }; +}