Skip to content

Commit

Permalink
aaaaaaaaah
Browse files Browse the repository at this point in the history
  • Loading branch information
gepbird committed Feb 10, 2024
1 parent 4fc7a28 commit a4e465f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions nix/module.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{ config, pkgs, lib, specialArgs, ... }:
{ config, pkgs, lib, self, ... }:

with lib;
with types;
let
cfg = config.moe;
version = builtins.substring 0 8 self.lastModifiedDate or "dirty";
print = v: builtins.trace v null;
printKeys = keys: lib.attrsets.mapAttrsToList(name: value: print name) keys;
in
{
options.moe = {
enable = mkEnableOption "Enable the moe service";
package = mkOption {
type = package;
default = specialArgs.moe.packages.${pkgs.system}.default;
default = printKeys specialArgs;
};
group = mkOption {
type = str;
Expand Down Expand Up @@ -83,7 +86,7 @@ in
User = "moe";
Environment =
let
fromFile = file: builtins.replaceStrings [ "\n" ] [ "" ] (builtins.readFile file);
fromFile = file: builtins.replaceStrings ["\n"] [""] (builtins.readFile file);
token = "TOKEN=${fromFile cfg.settings.tokenFile}";
owners = "OWNERS=${fromFile cfg.settings.ownersFile}";
backups-interval-minutes = "BACKUP_INTERVAL_MINUTES=${toString cfg.settings.backups-interval-minutes}";
Expand Down

0 comments on commit a4e465f

Please sign in to comment.