AWS: don't clutter homedir

This commit is contained in:
Alexander Bantyev 2021-06-14 23:51:55 +03:00
parent 791aaaa836
commit 28a2a7aec4
Signed by: balsoft
GPG Key ID: E081FF12ADCB4AD5
2 changed files with 13 additions and 2 deletions

View File

@ -3,6 +3,7 @@
./hardware-configuration.nix ./hardware-configuration.nix
inputs.self.nixosProfiles.desktop inputs.self.nixosProfiles.desktop
inputs.self.nixosModules.print-scan inputs.self.nixosModules.print-scan
inputs.self.nixosModules.aws
]; ];
deviceSpecific.devInfo = { deviceSpecific.devInfo = {
cpu = { cpu = {
@ -28,8 +29,6 @@
enable = true; enable = true;
cache.clean.enable = false; # Scary... cache.clean.enable = false; # Scary...
state.homeFiles = [ ".aws/credentials" ];
state.directories = [ "/home/balsoft/.local/share/Steam" ]; state.directories = [ "/home/balsoft/.local/share/Steam" ];
derivative.directories = [ "/home/balsoft/.wine" "/home/balsoft/.wine32" ]; derivative.directories = [ "/home/balsoft/.wine" "/home/balsoft/.wine32" ];

12
modules/workspace/aws.nix Normal file
View File

@ -0,0 +1,12 @@
{ config, pkgs, lib, ... }: {
secrets.aws_credentials = {
owner = "balsoft:users";
services = [ ];
};
environment.sessionVariables = {
AWS_SHARED_CREDENTIALS_FILE = config.secrets.aws_credentials.decrypted;
AWS_CONFIG_FILE = toString (pkgs.writeText "aws_config"
(pkgs.my-lib.genIni { default.region = "eu-west-2"; }));
};
}