refactor(nix-hm): improve bob-nvim flake

This commit is contained in:
Price Hiller 2024-02-04 22:26:31 -06:00
parent 92e41d2010
commit a0c05a91ca
Signed by: Price
SSH Key Fingerprint: SHA256:Y4S9ZzYphRn1W1kbJerJFO6GGsfu9O70VaBSxJO7dF8
2 changed files with 83 additions and 11 deletions

78
pkgs/bob-nvim/flake.lock Normal file
View File

@ -0,0 +1,78 @@
{
"nodes": {
"bob": {
"flake": false,
"locked": {
"lastModified": 1706612487,
"narHash": "sha256-OTmsb1tnautQTdO/oeqbwd5MmyHbG946/kPCGSluIrM=",
"owner": "MordechaiHadad",
"repo": "bob",
"rev": "e521723d2c084f4b610c27d79f870f83e964fe95",
"type": "github"
},
"original": {
"owner": "MordechaiHadad",
"repo": "bob",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1705309234,
"narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1706925685,
"narHash": "sha256-hVInjWMmgH4yZgA4ZtbgJM1qEAel72SYhP5nOWX4UIM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "79a13f1437e149dc7be2d1290c74d378dad60814",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"bob": "bob",
"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
}

View File

@ -16,16 +16,9 @@
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
rust-toolchain = pkgs.symlinkJoin { rust-toolchain = pkgs.symlinkJoin {
name = "rust-toolchain"; name = "rust-toolchain";
paths = with pkgs; [ paths = with pkgs; [ rustc cargo cargo-watch rust-analyzer rustfmt ];
rustc
cargo
cargo-watch
rust-analyzer
rustfmt
];
}; };
in in rec {
rec {
# This builds the blog binary then runs it and collects the output. Once done it throws away the binary and # This builds the blog binary then runs it and collects the output. Once done it throws away the binary and
# shoves the newly created static site into the result. # shoves the newly created static site into the result.
packages.default = pkgs.rustPlatform.buildRustPackage { packages.default = pkgs.rustPlatform.buildRustPackage {
@ -35,7 +28,6 @@
cargoLock.lockFile = "${bob}/Cargo.lock"; cargoLock.lockFile = "${bob}/Cargo.lock";
}; };
overlays.default = packages.default;
# Rust dev environment # Rust dev environment
devShells.default = pkgs.mkShell { devShells.default = pkgs.mkShell {
shellHook = '' shellHook = ''
@ -44,5 +36,7 @@
''; '';
nativeBuildInputs = [ rust-toolchain ]; nativeBuildInputs = [ rust-toolchain ];
}; };
}); }) // {
overlays.default = final: prev: { bob-nvim = self.packages.${final.system}.default; };
};
} }