darwin: add jakehillion-mbp-m1-13
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
Jake Hillion 2023-03-17 21:35:13 +00:00
parent a6a49847c0
commit 54b0c5dd8e
5 changed files with 63 additions and 4 deletions

View File

@ -43,6 +43,27 @@
"type": "github"
}
},
"darwin_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1673295039,
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -99,6 +120,7 @@
"root": {
"inputs": {
"agenix": "agenix",
"darwin": "darwin_2",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"

View File

@ -3,6 +3,9 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
darwin.url = "github:lnl7/nix-darwin/master";
darwin.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
@ -12,26 +15,47 @@
description = "Hillion Nix flake";
outputs = { self, nixpkgs, nixpkgs-unstable, agenix, home-manager }@inputs: {
outputs = { self, nixpkgs, nixpkgs-unstable, agenix, home-manager, darwin, ... }@inputs: {
nixosConfigurations =
let
fqdns = builtins.attrNames (builtins.readDir ./hosts);
isNixos = fqdn: !builtins.pathExists ./hosts/${fqdn}/darwin;
mkHost = fqdn:
let system = builtins.readFile ./hosts/${fqdn}/system; in
let system = builtins.readFile ./hosts/${fqdn}/system;
in
nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = inputs;
modules = [
./hosts/${fqdn}/default.nix
agenix.nixosModules.default
home-manager.nixosModule
home-manager.nixosModules.default
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
];
};
in
nixpkgs.lib.genAttrs fqdns mkHost;
nixpkgs.lib.genAttrs (builtins.filter isNixos fqdns) mkHost;
darwinConfigurations =
let
hosts = builtins.attrNames (builtins.readDir ./hosts);
isDarwin = host: builtins.pathExists ./hosts/${host}/darwin;
mkHost = host:
let system = builtins.readFile ./hosts/${host}/system;
in
darwin.lib.darwinSystem {
inherit system;
inherit inputs;
modules = [
./hosts/${host}/default.nix
agenix.darwinModules.default
home-manager.darwinModules.default
];
};
in
nixpkgs.lib.genAttrs (builtins.filter isDarwin hosts) mkHost;
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".nixpkgs-fmt;
formatter."aarch64-darwin" = nixpkgs.legacyPackages."aarch64-darwin".nixpkgs-fmt;

View File

View File

@ -0,0 +1,12 @@
{ pkgs, config, agenix, ... }:
{
config.services.nix-daemon.enable = true;
config.environment.systemPackages = with pkgs; [
git
htop
nix
vim
];
}

View File

@ -0,0 +1 @@
aarch64-darwin