From 99ef22140dfa65f9c7b80db06cd0abafa6cc5e30 Mon Sep 17 00:00:00 2001 From: Leon Vatthauer Date: Sat, 6 Apr 2024 18:38:07 +0200 Subject: [PATCH] nix fuckery... --- default.nix | 21 +++++++-------- flake.lock | 78 ----------------------------------------------------- flake.nix | 29 -------------------- 3 files changed, 10 insertions(+), 118 deletions(-) delete mode 100644 flake.lock delete mode 100644 flake.nix diff --git a/default.nix b/default.nix index f817afa..1689bfc 100644 --- a/default.nix +++ b/default.nix @@ -1,11 +1,10 @@ -# Make this flake based dir work like a normal derivation: -# https://nixos.wiki/wiki/Flakes#Using_flakes_with_stable_Nix -(import ( - let - lock = builtins.fromJSON (builtins.readFile ./flake.lock); - in fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; - sha256 = lock.nodes.flake-compat.locked.narHash; } -) { - src = ./.; -}).defaultNix +{ stdenv, git, go, hugo }: +stdenv.mkDerivation { + name = "resumee-website"; + src = "."; + nativeBuildInputs = [ git go hugo ]; + buildPhase = "hugo -d $out"; + outputHashAlgo = "sha256"; + outputHashMode = "recursive"; + outputHash = "sha256-k46/umNJ9Q8FsZDCRvG/YmyU3IAkL5bzTvhWxdbNXso="; +} diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 5a6da4f..0000000 --- a/flake.lock +++ /dev/null @@ -1,78 +0,0 @@ -{ - "nodes": { - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1712310679, - "narHash": "sha256-XgC/a/giEeNkhme/AV1ToipoZ/IVm1MV2ntiK4Tm+pw=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "72da83d9515b43550436891f538ff41d68eecc7f", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-23.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix deleted file mode 100644 index 9ef8ccc..0000000 --- a/flake.nix +++ /dev/null @@ -1,29 +0,0 @@ -{ - # Source: https://yejun.dev/posts/static-website-with-hugo-and-nix/ - description = "My personal website"; - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; - inputs.flake-utils.url = "github:numtide/flake-utils"; - inputs.flake-compat = { - url = "github:edolstra/flake-compat"; - flake = false; - }; - - outputs = { self, nixpkgs, flake-utils, flake-compat }: - flake-utils.lib.eachDefaultSystem (system: - let pkgs = nixpkgs.legacyPackages.${system}; - in { - packages.resumee-website = pkgs.stdenv.mkDerivation { - name = "resumee-website"; - src = self; - nativeBuildInputs = [ pkgs.git pkgs.go pkgs.hugo ]; - buildPhase = "hugo -d $out"; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = "sha256-k46/umNJ9Q8FsZDCRvG/YmyU3IAkL5bzTvhWxdbNXso="; - }; - - defaultPackage = self.packages.${system}.resumee-website; - devShells.default = pkgs.mkShell { packages = [ pkgs.hugo ]; }; - }); -} -