summaryrefslogtreecommitdiff
path: root/flake.nix
diff options
context:
space:
mode:
authorKyren223 <Kyren223@proton.me>2025-07-22 17:05:08 +0300
committerKyren223 <Kyren223@proton.me>2025-07-22 17:05:08 +0300
commite6cfdac5a83d8d2e2664e3b313900b7b1a145114 (patch)
treeea2e23feb6945b5900483611d5577b5fe287a145 /flake.nix
parentc2db60b773ad54e6991ca21b2775f9ed408c1cf9 (diff)
Improved flake.nix and added service.nix to run the server as a NixOS
systemd service
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix28
1 files changed, 26 insertions, 2 deletions
diff --git a/flake.nix b/flake.nix
index be0ab9b..988a4fd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -1,5 +1,6 @@
{
description = "Localias is a tool for developers to securely manage local aliases for development servers.";
+
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
@@ -23,9 +24,14 @@
version = (builtins.readFile ./VERSION);
buildDate = builtins.readFile (
pkgs.runCommand "build-date" { } ''
- date -u +'%Y-%m-%d' > $out
+ ${pkgs.coreutils}/bin/date --date=@${toString self.lastModified} +%Y-%m-%d -u > $out
''
);
+ # buildDate = builtins.readFile (
+ # pkgs.runCommand "build-date" { } ''
+ # date -u +'%Y-%m-%d' > $out
+ # ''
+ # );
commit = if (builtins.hasAttr "rev" self) then (builtins.substring 0 7 self.rev) else "unknown";
# vendorHash = pkgs.lib.fakeHash;
vendorHash = "sha256-2yCQ40T5N90lKpPOc+i6vz+1mI/p4Ey6PdRCJbGD+TE=";
@@ -82,15 +88,33 @@
eko = {
type = "app";
program = "${packages.eko}/bin/eko";
+ meta = {
+ description = "A terminal-native social media platform (client)";
+ homepage = "https://github.com/kyren223/eko";
+ license = pkgs.lib.licenses.agpl3Plus;
+ maintainers = with pkgs.lib.maintainers; [ kyren223 ];
+ platforms = pkgs.lib.platforms.all;
+ };
};
eko-server = {
type = "service";
program = "${packages.eko}/bin/eko-server";
- # TODO: add systemd service
+ meta = {
+ description = "A terminal-native social media platform (server)";
+ homepage = "https://github.com/kyren223/eko";
+ license = pkgs.lib.licenses.agpl3Plus;
+ maintainers = with pkgs.lib.maintainers; [ kyren223 ];
+ platforms = pkgs.lib.platforms.all;
+ };
};
default = eko;
};
+ nixosModules = rec {
+ default = eko;
+ eko = import ./service.nix inputs;
+ };
+
# TODO: make my own devshell?
# devShells = rec {
# default = pkgs.mkShell {