fix attic... again
This commit is contained in:
parent
84ccadf117
commit
19939ce067
24
flake.lock
generated
24
flake.lock
generated
@ -257,22 +257,6 @@
|
||||
}
|
||||
},
|
||||
"flake-compat_7": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat_8": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1668681692,
|
||||
@ -1019,11 +1003,11 @@
|
||||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1686616570,
|
||||
"narHash": "sha256-p3oVr5qXyIW9T0/JMFcT6daNdUqRHVOmzoNCF/oKDDE=",
|
||||
"lastModified": 1686696247,
|
||||
"narHash": "sha256-gZL5rk1iySrvKbdw8NU5BaSDWuWA5O7ZWw+j+vxXjc4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "06ada9731059fffb363ee259c62db475380745e6",
|
||||
"rev": "c3677b051af4921de6e184749035d08859e4ed62",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1184,7 +1168,7 @@
|
||||
"simple-nixos-mailserver": {
|
||||
"inputs": {
|
||||
"blobs": "blobs",
|
||||
"flake-compat": "flake-compat_8",
|
||||
"flake-compat": "flake-compat_7",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
|
@ -220,6 +220,9 @@
|
||||
specialArgs = { inherit inputs; };
|
||||
format = "install-iso";
|
||||
};
|
||||
# Build the entire system for uploading to attic
|
||||
host-workstation = self.nixosConfigurations."AMD-Workstation".config.system.build.toplevel;
|
||||
host-hypervisor = self.nixosConfigurations."Home-Hypervisor".config.system.build.toplevel;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -40,6 +40,7 @@ in {
|
||||
nixosProfiles.homepage
|
||||
nixosProfiles.matrix
|
||||
nixosProfiles.atticd
|
||||
nixosProfiles.attic
|
||||
];
|
||||
|
||||
deviceSpecific.devInfo = {
|
||||
@ -134,6 +135,7 @@ in {
|
||||
networking.extraHosts = ''
|
||||
127.0.0.1 mail.ataraxiadev.com
|
||||
127.0.0.1 code.ataraxiadev.com
|
||||
127.0.0.1 cache.ataraxiadev.com
|
||||
'';
|
||||
|
||||
# networking.proxy.default = "http://127.0.0.1:3128";
|
||||
|
@ -8,18 +8,30 @@ let
|
||||
endpoint = "https://cache.ataraxiadev.com/"
|
||||
token = "@token@"
|
||||
'';
|
||||
nix-config = pkgs.writeText "netrc" ''
|
||||
machine cache.ataraxiadev.com
|
||||
password @token@
|
||||
'';
|
||||
in {
|
||||
home-manager.users.${config.mainuser}.home.packages = [ pkgs.attic ];
|
||||
home-manager.users.${config.mainuser} = {
|
||||
home.packages = [ pkgs.attic ];
|
||||
nix.settings = {
|
||||
substituters = config.nix.settings.substituters;
|
||||
trusted-public-keys = config.nix.settings.trusted-public-keys;
|
||||
};
|
||||
};
|
||||
|
||||
secrets.attic-token.services = [ "attic-config.service" ];
|
||||
secrets.attic-token.services = [ "attic-config" ];
|
||||
systemd.services.attic-config = {
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
mkdir -p ${homeDir}/.config/attic > /dev/null 2>&1
|
||||
token=$(cat ${token-file})
|
||||
mkdir -p ${homeDir}/.config/{nix,attic} > /dev/null 2>&1
|
||||
cp ${attic-config} ${homeDir}/.config/attic/config.toml
|
||||
cp ${nix-config} ${homeDir}/.config/nix/netrc
|
||||
sed -i "s/@token@/$token/" ${homeDir}/.config/attic/config.toml
|
||||
chown -R ${config.mainuser}:users ${homeDir}/.config/attic
|
||||
sed -i "s/@token@/$token/" ${homeDir}/.config/nix/netrc
|
||||
chown -R ${config.mainuser}:users ${homeDir}/.config/{attic,nix}
|
||||
'';
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
|
@ -345,7 +345,10 @@ in {
|
||||
"cache.ataraxiadev.com" = {
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:8083";
|
||||
extraConfig = proxySettings;
|
||||
extraConfig = ''
|
||||
client_max_body_size 0;
|
||||
send_timeout 15m;
|
||||
'' + proxySettings;
|
||||
};
|
||||
} // default;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user