darwin: add jakehillion-mbp-m1-13
This commit is contained in:
parent
a6a49847c0
commit
54b0c5dd8e
22
flake.lock
22
flake.lock
@ -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"
|
||||
|
32
flake.nix
32
flake.nix
@ -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;
|
||||
|
0
hosts/jakehillion-mbp-m1-13/darwin
Normal file
0
hosts/jakehillion-mbp-m1-13/darwin
Normal file
12
hosts/jakehillion-mbp-m1-13/default.nix
Normal file
12
hosts/jakehillion-mbp-m1-13/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs, config, agenix, ... }:
|
||||
|
||||
{
|
||||
config.services.nix-daemon.enable = true;
|
||||
|
||||
config.environment.systemPackages = with pkgs; [
|
||||
git
|
||||
htop
|
||||
nix
|
||||
vim
|
||||
];
|
||||
}
|
1
hosts/jakehillion-mbp-m1-13/system
Normal file
1
hosts/jakehillion-mbp-m1-13/system
Normal file
@ -0,0 +1 @@
|
||||
aarch64-darwin
|
Loading…
Reference in New Issue
Block a user