Fix the flake!
continuous-integration/drone the build was successful
Details
continuous-integration/drone the build was successful
Details
This commit is contained in:
parent
ca45371d40
commit
bc2801d7f0
|
@ -50,9 +50,22 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"src": "src",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"narHash": "sha256-9DWcuVadnJPko8LjBbV7nnYhCBc2VGQKKfo5QYUJFk0=",
|
||||||
|
"path": "..",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"path": "..",
|
||||||
|
"type": "path"
|
||||||
|
}
|
||||||
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648297722,
|
"lastModified": 1648297722,
|
||||||
|
|
|
@ -4,9 +4,11 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
utils.url = "github:numtide/flake-utils";
|
utils.url = "github:numtide/flake-utils";
|
||||||
naersk.url = "github:nix-community/naersk";
|
naersk.url = "github:nix-community/naersk";
|
||||||
|
src.url = "path:..";
|
||||||
|
src.flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, utils, naersk }:
|
outputs = { self, nixpkgs, utils, naersk, src }:
|
||||||
utils.lib.eachDefaultSystem (system: let
|
utils.lib.eachDefaultSystem (system: let
|
||||||
pkgs = nixpkgs.legacyPackages."${system}";
|
pkgs = nixpkgs.legacyPackages."${system}";
|
||||||
naersk-lib = naersk.lib."${system}";
|
naersk-lib = naersk.lib."${system}";
|
||||||
|
@ -14,7 +16,7 @@
|
||||||
# `nix build`
|
# `nix build`
|
||||||
packages.quickpeep = naersk-lib.buildPackage {
|
packages.quickpeep = naersk-lib.buildPackage {
|
||||||
pname = "quickpeep";
|
pname = "quickpeep";
|
||||||
root = ./..;
|
root = src;
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
openssl
|
openssl
|
||||||
pkgconfig
|
pkgconfig
|
||||||
|
@ -39,7 +41,7 @@
|
||||||
|
|
||||||
# NixOS Modules
|
# NixOS Modules
|
||||||
nixosModules = {
|
nixosModules = {
|
||||||
quickpeepSearch = import ./modules/quickpeepSearch.nix;
|
quickpeepSearch = import ./modules/quickpeepSearch.nix self;
|
||||||
};
|
};
|
||||||
|
|
||||||
# `nix run`
|
# `nix run`
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{config, pkgs, lib, quickpeep, ...}:
|
flake: {config, pkgs, lib, ...}:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.quickpeepSearch;
|
cfg = config.services.quickpeepSearch;
|
||||||
|
inherit (flake.packages.${pkgs.stdenv.hostPlatform.system}) quickpeep;
|
||||||
in
|
in
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -19,7 +20,7 @@ with lib;
|
||||||
|
|
||||||
user = mkOption {
|
user = mkOption {
|
||||||
default = "quickpeep";
|
default = "quickpeep";
|
||||||
type = with types; uniq string;
|
type = with types; uniq str;
|
||||||
description = ''
|
description = ''
|
||||||
Name of the user.
|
Name of the user.
|
||||||
'';
|
'';
|
||||||
|
@ -27,7 +28,7 @@ with lib;
|
||||||
|
|
||||||
bindHost = mkOption {
|
bindHost = mkOption {
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
type = with types; string;
|
type = with types; str;
|
||||||
description = ''
|
description = ''
|
||||||
Host upon which to bind the web interface.
|
Host upon which to bind the web interface.
|
||||||
'';
|
'';
|
||||||
|
@ -44,6 +45,13 @@ with lib;
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
users.users."${cfg.user}" = {
|
||||||
|
description = "Hallo daemon user";
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "${cfg.user}";
|
||||||
|
};
|
||||||
|
users.groups."${cfg.user}" = {};
|
||||||
|
|
||||||
systemd.services.quickpeepSearch = {
|
systemd.services.quickpeepSearch = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
@ -51,11 +59,8 @@ with lib;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
User = "${cfg.user}";
|
User = "${cfg.user}";
|
||||||
ExecStart = ''${quickpeep.quickpeep}/bin/quickpeep ${cfg.bindHost}:${cfg.bindPort}'';
|
ExecStart = ''${quickpeep}/bin/quickpeep ${cfg.bindHost}:${builtins.toString cfg.bindPort}'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# TODO Do we need to specify quickpeep here?
|
|
||||||
environment.systemPackages = [ quickpeep.quickpeep ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,11 +102,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648383610,
|
"lastModified": 1649117019,
|
||||||
"narHash": "sha256-egKvd+S5FEpjwK2aCoJ+NrBG2m+9Njl4I1OXrDTZHvE=",
|
"narHash": "sha256-ID7nw/8MDgqj/cbJ0wy6AtQ9wp58hSnE6+weZwuHnso=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7a3f9d626c8a88141077ab99d8352469aa6feeb7",
|
"rev": "ccb90fb9e11459aeaf83cc28d5f8910816d90dd0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -148,10 +148,11 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_4",
|
||||||
|
"src": "src",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-sIsKWG16MmzhkFFyHBgRPeSnREpDY1ylPjCBKhogsjs=",
|
"narHash": "sha256-ottHXBWVE2yM6xPwbKQuBL39BZTa1hlMYR30QA7TmzY=",
|
||||||
"path": "..",
|
"path": "..",
|
||||||
"type": "path"
|
"type": "path"
|
||||||
},
|
},
|
||||||
|
@ -168,6 +169,18 @@
|
||||||
"quickpeep": "quickpeep"
|
"quickpeep": "quickpeep"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"src": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"narHash": "sha256-9DWcuVadnJPko8LjBbV7nnYhCBc2VGQKKfo5QYUJFk0=",
|
||||||
|
"path": "..",
|
||||||
|
"type": "path"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"path": "..",
|
||||||
|
"type": "path"
|
||||||
|
}
|
||||||
|
},
|
||||||
"utils": {
|
"utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648297722,
|
"lastModified": 1648297722,
|
||||||
|
|
Loading…
Reference in New Issue