Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
isabelroses committed Mar 18, 2024
2 parents 2fe1246 + 29017c3 commit 6e40762
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 11 deletions.
27 changes: 24 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@
url = "github:isabelroses/website";
inputs.nixpkgs.follows = "nixpkgs";
};
blahaj = {
url = "github:isabelroses/blahaj";
inputs.nixpkgs.follows = "nixpkgs";
};

# a tree-wide formatter
treefmt-nix = {
Expand Down
2 changes: 1 addition & 1 deletion home/isabel/programs/configs/gui/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
imports = [
./bars
./browsers
./discord
./fileMangers
./launchers
./terminals

./discord.nix
./swaync.nix
./viewnior.nix
./zathura.nix
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
lib,
pkgs,
config,
osConfig,
...
}: let
inherit (lib) mkIf isWayland ldTernary;
inherit (osConfig.modules) environment system;

fmt = pkgs.formats.json {};
in {
config = mkIf osConfig.modules.programs.gui.discord.enable {
home.packages =
Expand Down Expand Up @@ -34,8 +34,8 @@ in {
})
];

xdg.configFile = {
"discord/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${environment.flakePath}/home/${system.mainUser}/programs/configs/gui/discord/settings.json";
xdg.configFile."discord/settings.json".source = fmt.generate "discord.json" {
SKIP_HOST_UPDATE = true;
};
};
}
3 changes: 0 additions & 3 deletions home/isabel/programs/configs/gui/discord/settings.json

This file was deleted.

1 change: 1 addition & 0 deletions hosts/luz/services.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
modules.services = {
vaultwarden.enable = true;
isabelroses-website.enable = true;
blahaj.enable = true;
vikunja.enable = true;
kanidm.enable = true;
mailserver.enable = true;
Expand Down
2 changes: 2 additions & 0 deletions modules/base/options/services/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ in {
port = 3000;
};

blahaj = {};

vikunja = {
domain = "todo.${rdomain}";
port = 3456;
Expand Down
4 changes: 4 additions & 0 deletions modules/base/secrets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ in {
group = "forgejo";
};

blahaj-env = mkSecret services.blahaj.enable {
file = "blahaj-env";
};

vikunja-env = mkSecret services.vikunja.enable {
file = "vikunja-env";
owner = "vikunja";
Expand Down
21 changes: 21 additions & 0 deletions modules/nixos/services/blahaj.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
lib,
pkgs,
config,
inputs',
...
}: {
systemd.services."blahaj" = lib.mkIf config.modules.services.blahaj.enable {
description = "blahaj";
after = ["network.target"];
wantedBy = ["multi-user.target"];

serviceConfig = {
Type = "simple";
DynamicUser = true;
EnvironmentFile = config.age.secrets.blahaj-env.path;
ExecStart = "${lib.getExe pkgs.nodejs-slim} ${inputs'.blahaj.packages.default}/lib/node_modules/blahaj/src/bot.js";
Restart = "always";
};
};
}
1 change: 1 addition & 0 deletions modules/nixos/services/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
./monitoring
./networking

./blahaj.nix
./kanidm.nix
./mailserver.nix
./vaultwarden.nix
Expand Down
Binary file added secrets/blahaj-env.age
Binary file not shown.
2 changes: 2 additions & 0 deletions secrets/secrets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ in {
"mailserver-grafana-nohash.age".publicKeys = defAccess types.servers;
"mailserver-git-nohash.age".publicKeys = defAccess types.servers;

"blahaj-env.age".publicKeys = defAccess types.servers;

"vikunja-env.age".publicKeys = defAccess types.servers;

"nextcloud-passwd.age".publicKeys = defAccess types.servers;
Expand Down

0 comments on commit 6e40762

Please sign in to comment.