aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix30
1 files changed, 15 insertions, 15 deletions
diff --git a/flake.nix b/flake.nix
index 4f6b0dc..733e13b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -20,7 +20,7 @@
20 overlays.default = final: prev: { 20 overlays.default = final: prev: {
21 node_modules = with final; 21 node_modules = with final;
22 stdenv.mkDerivation { 22 stdenv.mkDerivation {
23 pname = "readit-node-modules"; 23 pname = "lurker-node-modules";
24 version = "0.0.1"; 24 version = "0.0.1";
25 impureEnvVars = 25 impureEnvVars =
26 lib.fetchers.proxyImpureEnvVars 26 lib.fetchers.proxyImpureEnvVars
@@ -42,9 +42,9 @@
42 outputHashAlgo = "sha256"; 42 outputHashAlgo = "sha256";
43 outputHashMode = "recursive"; 43 outputHashMode = "recursive";
44 }; 44 };
45 readit = with final; 45 lurker = with final;
46 stdenv.mkDerivation { 46 stdenv.mkDerivation {
47 pname = "readit"; 47 pname = "lurker";
48 version = "0.0.1"; 48 version = "0.0.1";
49 src = ./.; 49 src = ./.;
50 nativeBuildInputs = [makeBinaryWrapper]; 50 nativeBuildInputs = [makeBinaryWrapper];
@@ -84,17 +84,17 @@
84 }); 84 });
85 85
86 packages = forAllSystems (system: { 86 packages = forAllSystems (system: {
87 inherit (nixpkgsFor."${system}") readit node_modules; 87 inherit (nixpkgsFor."${system}") lurker node_modules;
88 }); 88 });
89 89
90 defaultPackage = forAllSystems (system: nixpkgsFor."${system}".readit); 90 defaultPackage = forAllSystems (system: nixpkgsFor."${system}".lurker);
91 91
92 apps = forAllSystems (system: let 92 apps = forAllSystems (system: let
93 pkgs = nixpkgsFor.${system}; 93 pkgs = nixpkgsFor.${system};
94 in { 94 in {
95 default = { 95 default = {
96 type = "app"; 96 type = "app";
97 program = "${pkgs.readit}/bin/readit"; 97 program = "${pkgs.lurker}/bin/lurker";
98 }; 98 };
99 }); 99 });
100 100
@@ -108,35 +108,35 @@
108 }: 108 }:
109 with lib; { 109 with lib; {
110 options = { 110 options = {
111 services.readit = { 111 services.lurker = {
112 enable = mkOption { 112 enable = mkOption {
113 type = types.bool; 113 type = types.bool;
114 default = false; 114 default = false;
115 description = "Enable readit"; 115 description = "Enable lurker";
116 }; 116 };
117 port = mkOption { 117 port = mkOption {
118 type = types.int; 118 type = types.int;
119 default = 3000; 119 default = 3000;
120 description = "Port to run readit on"; 120 description = "Port to run lurker on";
121 }; 121 };
122 }; 122 };
123 }; 123 };
124 124
125 config = mkIf config.services.readit.enable { 125 config = mkIf config.services.lurker.enable {
126 nixpkgs.overlays = [self.overlays.default]; 126 nixpkgs.overlays = [self.overlays.default];
127 systemd.services.readit = { 127 systemd.services.lurker = {
128 description = "readit service"; 128 description = "lurker service";
129 wantedBy = ["multi-user.target"]; 129 wantedBy = ["multi-user.target"];
130 130
131 serviceConfig = { 131 serviceConfig = {
132 ListenStream = "0.0.0.0:${toString config.services.readit.port}"; 132 ListenStream = "0.0.0.0:${toString config.services.lurker.port}";
133 ExecStart = "${pkgs.readit}/bin/readit"; 133 ExecStart = "${pkgs.lurker}/bin/lurker";
134 Restart = "always"; 134 Restart = "always";
135 }; 135 };
136 136
137 # If the binary needs specific environment variables, set them here 137 # If the binary needs specific environment variables, set them here
138 environment = { 138 environment = {
139 READIT_PORT = "${toString config.services.readit.port}"; 139 LURKER_PORT = "${toString config.services.lurker.port}";
140 }; 140 };
141 }; 141 };
142 }; 142 };