Compare commits
3 commits
fba46e0d0d
...
343f3d481f
Author | SHA1 | Date | |
---|---|---|---|
343f3d481f | |||
79b83cfc70 | |||
f502810dae |
3 changed files with 43 additions and 4 deletions
21
nix/homes/rafiq/darwin.nix
Normal file
21
nix/homes/rafiq/darwin.nix
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib.modules) mkIf;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
flake.modules.homeManager.rafiq =
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
hostName,
|
||||||
|
hostConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
mkIf (pkgs.system == "aarch64-darwin" || pkgs.system == "x86_64-darwin") {
|
||||||
|
home.file."Library/Application Support/aichat/config.yaml".text = ''
|
||||||
|
model: gemini:gemini-2.0-flash
|
||||||
|
clients:
|
||||||
|
- type: gemini
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -30,6 +30,21 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
flake.modules.darwin.default =
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
imports = [ inputs.sops-nix.darwinModules.sops ];
|
||||||
|
config = {
|
||||||
|
sops = {
|
||||||
|
age.sshKeyPaths = [ "${config.users.users.${username}.home}/.ssh/id_ed25519" ];
|
||||||
|
secrets."keys/gemini".sopsFile = secrets + "/keys.yaml";
|
||||||
|
};
|
||||||
|
environment.shellInit = # sh
|
||||||
|
''
|
||||||
|
export GEMINI_API_KEY=$(sudo cat ${config.sops.secrets."keys/gemini".path})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
flake.modules.homeManager.default.persistDirs = [ ".config/sops/age" ];
|
flake.modules.homeManager.default.persistDirs = [ ".config/sops/age" ];
|
||||||
perSystem =
|
perSystem =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
|
@ -8,9 +8,12 @@ in
|
||||||
nix.settings.trusted-users = [ "@wheel" ];
|
nix.settings.trusted-users = [ "@wheel" ];
|
||||||
users.users.${cfg.admin.username}.extraGroups = [ "wheel" ];
|
users.users.${cfg.admin.username}.extraGroups = [ "wheel" ];
|
||||||
};
|
};
|
||||||
flake.modules.darwin.default.security.pam.services.sudo_local = {
|
flake.modules.darwin.default.security = {
|
||||||
enable = true;
|
sudo.extraConfig = "%admin ALL = (ALL) NOPASSWD: ALL";
|
||||||
reattach = true;
|
pam.services.sudo_local = {
|
||||||
touchIdAuth = true;
|
enable = true;
|
||||||
|
reattach = true;
|
||||||
|
touchIdAuth = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue