update flake to use local repo

This commit is contained in:
Anish Lakhwara 2022-12-20 12:25:22 +10:00
parent 485dbca54e
commit 247c1d1acb

View file

@ -4,8 +4,6 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs"; nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
grasp.url = "github:karlicoss/grasp";
grasp.flake = false;
}; };
outputs = { self, nixpkgs, flake-utils, grasp }: outputs = { self, nixpkgs, flake-utils, grasp }:
@ -17,8 +15,8 @@
{ {
packages.grasp = pkgs.stdenv.mkDerivation rec { packages.grasp = pkgs.stdenv.mkDerivation rec {
pname = "grasp"; pname = "grasp";
version = "v0.6.6"; version = "v0.6.7";
src = grasp; src = ./.;
installPhase = '' installPhase = ''
mkdir -p $out/bin mkdir -p $out/bin
@ -31,7 +29,7 @@
}) // { }) // {
nixosModule = { options, lib, config, pkgs, ... }: nixosModule = { options, lib, config, pkgs, ... }:
let let
graspConfig = config.services."grasp"; graspConfig = config.services.grasp;
options = { options = {
enable = lib.mkEnableOption "Grasp service"; enable = lib.mkEnableOption "Grasp service";
@ -96,9 +94,9 @@
# Only allow this to boot as a container # Only allow this to boot as a container
boot.isContainer = true; boot.isContainer = true;
networking.hostName = "grasp"; networking.hostName = "grasp";
services."grasp".enable = true; services.grasp.enable = true;
services."grasp".user = "anish"; services.grasp.user = "anish";
services."grasp".path = "/home/anish/grasp/capture.org"; services.grasp.path = "/home/anish/grasp/capture.org";
# I think I actually created the above folder as well in the container # I think I actually created the above folder as well in the container
# I figured dynamic user with their own text file seems less useful # I figured dynamic user with their own text file seems less useful
# I didn't know how to default to a # I didn't know how to default to a