Skip to content

Commit

Permalink
fix(syncthing): solved problem with missing encrypted config
Browse files Browse the repository at this point in the history
  • Loading branch information
Wittano committed Jun 27, 2024
1 parent a3dff63 commit 3c3c568
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 39 deletions.
66 changes: 33 additions & 33 deletions flake.lock

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

6 changes: 5 additions & 1 deletion modules/desktop/gaming/games.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ let
cfg = config.modules.desktop.gaming.games;
gamingCfg = config.modules.desktop.gaming;

fixedMindustry = unstable.mindustry.override {
gradle = unstable.gradle_7;
};

games = with unstable; [
# Games
osu-lazer # osu!lazer
airshipper # Veloren
mindustry # Mindustry
fixedMindustry # Mindustry
xivlauncher # FF XIV
];
in
Expand Down
4 changes: 2 additions & 2 deletions modules/desktop/submodules/qt.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ with lib.my;
home = {
packages = with pkgs; [ kdePackages.qt6ct libsForQt5.qt5ct ];
sessionVariables = {
QT_QPA_PLATFORMTHEME = "qt5ct";
QT_QPA_PLATFORMTHEME = "kvantum";
QT_QPA_PLATFORM = "xcb";
};
};

qt = {
enable = true;
platformTheme.name = "qtct";
platformTheme.name = "kvantum";
style = {
name = "kvantum";
catppuccin = {
Expand Down
1 change: 1 addition & 0 deletions modules/agenix.nix → modules/secrets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ in
done
'';


age.secrets = attrsets.mapAttrs'
(n: _:
{
Expand Down
8 changes: 5 additions & 3 deletions modules/services/syncthing.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ let
cfg = config.modules.services.syncthing;
homeDir = config.home-manager.users.wittano.home.homeDirectory;

encryptedConfig =
builtins.fromJSON (builtins.readFile config.age.secrets.syncthing.path);
encryptedConfig = trivial.pipe config.age.secrets.syncthing.path [
builtins.readFile
builtins.fromJSON
];
in
{
options = {
Expand All @@ -18,7 +20,7 @@ in
config =
mkIf (cfg.enable) {
services.syncthing = {
enable = builtins.pathExists config.age.secrets.syncthing.path;
enable = true;
systemService = true;
dataDir = "${homeDir}/.cache/syncthing";
configDir = "${homeDir}/.config/syncthing";
Expand Down

0 comments on commit 3c3c568

Please sign in to comment.