diff --git a/clan.nix b/clan.nix index ae8cbb9..9b5f125 100644 --- a/clan.nix +++ b/clan.nix @@ -13,17 +13,5 @@ # machines/jon/configuration.nix will be automatically imported. # See: https://docs.clan.lol/guides/more-machines/#automatic-registration machines = { - "yadunut-mbp" = { - nixpkgs.hostPlatform = "aarch64-darwin"; - clan.core.networking.targetHost = "root@localhost"; - system.stateVersion = 6; - nix.enable = false; - users.users."yadunut".openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXOpmWsAnl2RtOuJJMRUx+iJTwf2RWJ1iS3FqXJFzFG" - ]; - users.users."root".openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXOpmWsAnl2RtOuJJMRUx+iJTwf2RWJ1iS3FqXJFzFG" - ]; - }; }; } diff --git a/machines/yadunut-mbp/configuration.nix b/machines/yadunut-mbp/configuration.nix new file mode 100644 index 0000000..693850b --- /dev/null +++ b/machines/yadunut-mbp/configuration.nix @@ -0,0 +1,23 @@ +{ ... }@args: +{ + imports = [ + ../../modules/darwin/sane-defaults + ]; + system.primaryUser = "yadunut"; + users.users."yadunut" = { + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXOpmWsAnl2RtOuJJMRUx+iJTwf2RWJ1iS3FqXJFzFG" + ]; + }; + users.users."root" = { + openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXOpmWsAnl2RtOuJJMRUx+iJTwf2RWJ1iS3FqXJFzFG" + ]; + }; + + security.pam.services.sudo_local.touchIdAuth = true; + nixpkgs.hostPlatform = "aarch64-darwin"; + clan.core.networking.targetHost = "root@localhost"; + nix.enable = false; # since we're using nix darwin + system.stateVersion = 6; +} diff --git a/modules/darwin/sane-defaults/default.nix b/modules/darwin/sane-defaults/default.nix new file mode 100644 index 0000000..426f5a7 --- /dev/null +++ b/modules/darwin/sane-defaults/default.nix @@ -0,0 +1,29 @@ +{ + self, + lib, + inputs, + clan-core, + specialArgs, + config, + options, + _class, + modulesPath, + _prefix, +}@args: +let + _ = builtins.trace "MODULE ARGS:\n${lib.generators.toPretty { } (builtins.attrNames args)}" null; +in +{ + system.defaults = { + NSGlobalDomain = { + InitialKeyRepeat = 10; + KeyRepeat = 1; + AppleShowAllExtensions = true; + ApplePressAndHoldEnabled = false; + }; + dock.autohide = true; + dock.autohide-delay = 0.0; + + }; + +}