diff options
author | Emile <git@emile.space> | 2024-03-09 22:56:01 +0100 |
---|---|---|
committer | Emile <git@emile.space> | 2024-03-09 22:56:01 +0100 |
commit | 55ee036fd7ebed24097c8da1ca8a0b0829264670 (patch) | |
tree | 9c600d75a4f59f8ec253c5caadc1f77b2cecb0da /nix/hosts/caladan/darwin-configuration.nix |
big bang
Diffstat (limited to 'nix/hosts/caladan/darwin-configuration.nix')
-rw-r--r-- | nix/hosts/caladan/darwin-configuration.nix | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/nix/hosts/caladan/darwin-configuration.nix b/nix/hosts/caladan/darwin-configuration.nix new file mode 100644 index 0000000..b31b6b3 --- /dev/null +++ b/nix/hosts/caladan/darwin-configuration.nix @@ -0,0 +1,82 @@ +{ pkgs, lib, ... }: + +{ + imports = [ + ./overlay.nix + ]; + + users.users.emile = { + name = "emile"; + home = "/Users/emile"; + }; + + users.users.hydra = { + name = "hydra"; + home = "/Users/hydra"; + }; + + nix = { + useDaemon = true; + package = pkgs.nixFlakes; + extraOptions = '' + builders-use-substitutes = true + auto-optimise-store = true + '' + lib.optionalString (pkgs.system == "aarch64-darwin") '' + extra-platforms = x86_64-darwin aarch64-darwin + ''; + + settings = { + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + ]; + substituters = [ + "https://cache.nixos.org" + ]; + + experimental-features = [ "nix-command" "flakes" ]; + }; + + distributedBuilds = true; + + buildMachines = [ + { + hostName = "corrino.emile.space"; + system = "x86_64-linux"; + maxJobs = 1; + speedFactor = 2; + + # Feature | Derivations requiring it + # --------------|----------------------------------------------------- + # kvm | Everything which builds inside a vm, like NixOS tests + # nixos-test | Machine can run NixOS tests + # big-parallel | kernel config, libreoffice, evolution, llvm and chromium. + # benchmark | Machine can generate metrics (Means the builds usually + # | takes the same amount of time) + + # cat /etc/nix/machines + # root@corrino x86_64-linux /home/nix/.ssh/id_ed25519 8 1 kvm,benchmark + + supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; + mandatoryFeatures = [ ]; + } + ]; + }; + + nixpkgs = { + config.allowUnfree = true; + }; + + programs.fish.enable = true; + + services.nix-daemon.enable = true; + + security.pam.enableSudoTouchIdAuth = true; + + environment = { + systemPackages = [ + pkgs.yarr + ]; + shells = with pkgs; [ bashInteractive zsh fish ]; + }; + +} |