feat: Use mirai as substituter

This commit is contained in:
uttarayan21
2024-11-22 20:27:10 +05:30
parent 5a1729328e
commit f26456606b
9 changed files with 62 additions and 60 deletions

View File

@@ -45,7 +45,7 @@ lib.attrsets.optionalAttrs device.hasGui {
seahorse seahorse
nautilus nautilus
# nextcloud-client nextcloud-client
gparted gparted
polkit_gnome polkit_gnome

View File

@@ -119,7 +119,7 @@ in {
xdg.enable = true; xdg.enable = true;
xdg.userDirs = { xdg.userDirs = {
enable = device.isLinux; enable = device.isLinux;
# music = "${config.home.homeDirectory}/Nextcloud/Music"; music = "${config.home.homeDirectory}/Nextcloud/Music";
}; };
programs = { programs = {

View File

@@ -24,7 +24,6 @@ home:
nix --extra-experimental-features "nix-command flakes" run home-manager/master -- switch --flake . --show-trace nix --extra-experimental-features "nix-command flakes" run home-manager/master -- switch --flake . --show-trace
local: local:
nix flake update subflakes
nix flake update neovim nix flake update neovim
nvim: nvim:

View File

@@ -19,22 +19,22 @@
services.kdeconnect.enable = device.hasGui; services.kdeconnect.enable = device.hasGui;
services.kdeconnect.indicator = device.hasGui; services.kdeconnect.indicator = device.hasGui;
services.swayosd.enable = device.hasGui; services.swayosd.enable = device.hasGui;
# services.nextcloud-client = { services.swaync.enable = device.hasGui;
# # enable = device.hasGui; services.nextcloud-client = {
# # startInBackground = true; enable = device.hasGui;
# }; startInBackground = true;
systemd.user.services.spotify-player = {
Install = {WantedBy = ["graphical-session.target"];};
Unit = {
Description = "Spotify Player Daemon";
After = ["graphical-session.target"];
};
Service = {
ExecStart = "${pkgs.spotify-player}/bin/spotify_player -d";
Restart = "on-failure";
RestartSec = "5";
User = "${device.user}";
};
}; };
# systemd.user.services.spotify-player = {
# Install = {WantedBy = ["graphical-session.target"];};
# Unit = {
# Description = "Spotify Player Daemon";
# After = ["graphical-session.target"];
# };
# Service = {
# ExecStart = "${pkgs.spotify-player}/bin/spotify_player -d";
# Restart = "on-failure";
# RestartSec = "5";
# User = "${device.user}";
# };
# };
} }

View File

@@ -145,7 +145,7 @@
# "${pkgs.swww}/bin/swww init; swww img ~/.local/share/dotfiles/images/wallpaper.jpg" # "${pkgs.swww}/bin/swww init; swww img ~/.local/share/dotfiles/images/wallpaper.jpg"
"${pkgs.ironbar}/bin/ironbar" "${pkgs.ironbar}/bin/ironbar"
# "${pkgs.swayosd}/bin/swayosd-server" # "${pkgs.swayosd}/bin/swayosd-server"
# "${pkgs.nextcloud-client}/bin/nextcloud --background" "${pkgs.nextcloud-client}/bin/nextcloud --background"
]; ];
"$mainMod" = "SUPER"; "$mainMod" = "SUPER";

View File

@@ -10,15 +10,13 @@
./services.nix ./services.nix
]; ];
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
sops = {
sops.defaultSopsFile = ../../secrets/secrets.yaml; defaultSopsFile = ../../secrets/secrets.yaml;
sops.defaultSopsFormat = "yaml"; defaultSopsFormat = "yaml";
sops.age.keyFile = "/home/fs0c131y/.config/sops/age/keys.txt"; age.keyFile = "/home/fs0c131y/.config/sops/age/keys.txt";
sops.secrets."nextcloud/adminpass" = { secrets."nextcloud/adminpass".owner = config.users.users.nextcloud.name;
owner = config.users.users.nextcloud.name; secrets."llama/user".owner = config.services.caddy.user;
}; secrets."builder/mirai/cache/private" = {};
sops.secrets."llama/user" = {
owner = config.services.caddy.user;
}; };
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
@@ -35,6 +33,7 @@
build-users-group = nixbld build-users-group = nixbld
extra-nix-path = nixpkgs=flake:nixpkgs extra-nix-path = nixpkgs=flake:nixpkgs
builders-use-substitutes = true builders-use-substitutes = true
secret-key-files = ${config.sops.secrets."builder/mirai/cache/private".path}
''; '';
gc = { gc = {
automatic = true; automatic = true;

View File

@@ -8,36 +8,32 @@
factorio-headless factorio-headless
]; ];
sops = { sops = {
secrets = { # secrets = {
"authelia/darksailor/jwtSecret" = { # "authelia/darksailor/jwtSecret".owner = config.systemd.services.authelia-darksailor.serviceConfig.User;
owner = config.systemd.services.authelia-darksailor.serviceConfig.User; # "authelia/darksailor/storageEncryptionSecret".owner = config.systemd.services.authelia-darksailor.serviceConfig.User;
}; # };
"authelia/darksailor/storageEncryptionSecret" = {
owner = config.systemd.services.authelia-darksailor.serviceConfig.User;
};
};
}; };
services = { services = {
authelia = { # authelia = {
instances.darksailor = { # instances.darksailor = {
enable = true; # enable = false;
settings = { # settings = {
# server = { # # server = {
# address = "unix:///run/authelia/authelia.sock"; # # address = "unix:///run/authelia/authelia.sock";
# }; # # };
# session.domain = "auth.darksailor.dev"; # # session.domain = "auth.darksailor.dev";
access_control = { # access_control = {
rules = { # rules = {
}; # };
}; # };
storage = "local"; # storage = "local";
}; # };
secrets = { # secrets = {
jwtSecretFile = config.sops.secrets."authelia/darksailor/jwtSecret".path; # jwtSecretFile = config.sops.secrets."authelia/darksailor/jwtSecret".path;
storageEncryptionKeyFile = config.sops.secrets."authelia/darksailor/storageEncryptionSecret".path; # storageEncryptionKeyFile = config.sops.secrets."authelia/darksailor/storageEncryptionSecret".path;
}; # };
}; # };
}; # };
tailscale = { tailscale = {
enable = true; enable = true;
}; };

View File

@@ -1,5 +1,6 @@
{ {
pkgs, pkgs,
config,
device, device,
... ...
}: { }: {
@@ -20,6 +21,8 @@
auto-optimise-store = true; auto-optimise-store = true;
extra-experimental-features = "nix-command flakes auto-allocate-uids"; extra-experimental-features = "nix-command flakes auto-allocate-uids";
trusted-users = ["root" "servius"]; trusted-users = ["root" "servius"];
substituters = ["https://sh.darksailor.dev"];
trusted-public-keys = ["mirai:bcVPoFGBZ0i7JAKMXIqLj2GY3CulLC4kP7rQyqes1RM="];
}; };
extraOptions = '' extraOptions = ''
build-users-group = nixbld build-users-group = nixbld

View File

@@ -6,6 +6,11 @@ authelia:
darksailor: darksailor:
jwtSecret: ENC[AES256_GCM,data:7xRxh+1DkA+CRtgbdnfQWM205DZnkhX7VvUw9Xf6sPn1TpxU6wKTVA==,iv:82Z59P2ZZAMj8bHUvWfMsIRZDdLBXOmCkLq82m6ZbRo=,tag:DwwuUs4jva4gZRhgrIdRyg==,type:str] jwtSecret: ENC[AES256_GCM,data:7xRxh+1DkA+CRtgbdnfQWM205DZnkhX7VvUw9Xf6sPn1TpxU6wKTVA==,iv:82Z59P2ZZAMj8bHUvWfMsIRZDdLBXOmCkLq82m6ZbRo=,tag:DwwuUs4jva4gZRhgrIdRyg==,type:str]
storageEncryptionSecret: ENC[AES256_GCM,data:s6BtWvvF+kWmejlWCFbfl382L9hsAIItz7BvWD3mA2s3qVUV0pl92WrOS6d3gXqrRqnSy9djhk3pqmHH,iv:ChUd8CqcFvXRlCRXWOqd5U55Yn4UXImG3jJDz+kTa6s=,tag:uPnAZjI+O6kFjzZWbmFzKQ==,type:str] storageEncryptionSecret: ENC[AES256_GCM,data:s6BtWvvF+kWmejlWCFbfl382L9hsAIItz7BvWD3mA2s3qVUV0pl92WrOS6d3gXqrRqnSy9djhk3pqmHH,iv:ChUd8CqcFvXRlCRXWOqd5U55Yn4UXImG3jJDz+kTa6s=,tag:uPnAZjI+O6kFjzZWbmFzKQ==,type:str]
builder:
mirai:
cache:
private: ENC[AES256_GCM,data:W52mWGwPMIOXneH3QmnuVtALxxfczhaNvjeQiRwNjF30uP/LlQOtiMI4RPm5d90+i8ok1ampLFMFjCqt2MK+ouT6ETa0FcpB4KlV7toA5FEev5NIiLO2NT9M5Is9GQ==,iv:fkKN1VEHHCT3PEi/zZR92Z6yP4jRUjpKBXPs4QtFGAQ=,tag:sjt0YATf8BSlQC5S9y0n2w==,type:str]
public: ENC[AES256_GCM,data:w63JgOzg3IfLzPzESjgiqKTVmlbc6hcWLNRX8Vyl27eyXeh++agOBpmCDgxZLX/jSFc=,iv:r0Cv5bwPzCxTgDNjUJ3ExYBR5BUfuf4+8bNs2kOTzEU=,tag:SqCcc89wRwDjwEazV7M5nw==,type:str]
sops: sops:
kms: [] kms: []
gcp_kms: [] gcp_kms: []
@@ -21,8 +26,8 @@ sops:
VGZKdHpVeFRpQUxtSEkyaEhLMlBJcGsKLb0DvPNZosPBUuiX6qz1s5IO5INQh8CK VGZKdHpVeFRpQUxtSEkyaEhLMlBJcGsKLb0DvPNZosPBUuiX6qz1s5IO5INQh8CK
ZtXTVClwMSmaUYhdSB2gKFrKVZHXTJZ4oAL5t/BpC0pOHyr+o96T3Q== ZtXTVClwMSmaUYhdSB2gKFrKVZHXTJZ4oAL5t/BpC0pOHyr+o96T3Q==
-----END AGE ENCRYPTED FILE----- -----END AGE ENCRYPTED FILE-----
lastmodified: "2024-11-22T12:28:32Z" lastmodified: "2024-11-22T14:39:51Z"
mac: ENC[AES256_GCM,data:0aEEjxPmDhiBz0IaptZqBjCD8yrSSYnhmiF81qD8KqhpvOfFyx9QvAhcfJKi5ZC5eECDyu0pt95VLzCdJqD11DqGu9CcQBV2Y23i4qgbPoognV0q1KZ4AJpuViGUqFQt2QW/ESNgjVRnmOteoaOkvB3K9EWr0Jt8eXMfoOE3lMw=,iv:P/Bcbpbq0mMNm6qHPWnT2gq7fn4xirDifJdHHrDidmU=,tag:P8eHjW6oHvBzz1fcxmnEIA==,type:str] mac: ENC[AES256_GCM,data:IbgSuP9+6fzS7MqPPDwqH1JPLvoeJOUuGTlPGQDdMBkO03A8dLwjMLwipHmSX4HBMX3sUkUyZanDHFoW3LBdMSpP3jSCOUSYo2K0NeUDKKKrbuJE2J9xFRuCpQIABXfdJrbaQhG/xK1jQEkV8u6nq4bthDhyxhgV7HZmL0nqLl8=,iv:LpXyJYITejYg2zlPy9KOWr+YkHUztw3WrwgL8Ii2qzk=,tag:0s2RGAMfMGzVoNSEwPXknA==,type:str]
pgp: [] pgp: []
unencrypted_suffix: _unencrypted unencrypted_suffix: _unencrypted
version: 3.9.1 version: 3.9.1