Re-enable darwin builds

home-manager only for now
This commit is contained in:
Christopher Mühl 2026-01-30 11:14:58 +01:00
parent 08f1aefbd1
commit bd0a03e7b8
47 changed files with 75 additions and 30 deletions

6
flake.lock generated
View file

@ -556,11 +556,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1765480374, "lastModified": 1769723138,
"narHash": "sha256-HlbvQAqLx7WqZFFQZ8nu5UUJAVlXiV/kqKbyueA8srw=", "narHash": "sha256-kgkwjs33YfJasADIrHjHcTIDs3wNX0xzJhnUP+oldEw=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "39cb677ed9e908e90478aa9fe5f3383dfc1a63f3", "rev": "175532b6275b34598a0ceb1aef4b9b4006dd4073",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

Before

Width:  |  Height:  |  Size: 2.2 MiB

After

Width:  |  Height:  |  Size: 2.2 MiB

View file

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View file

Before

Width:  |  Height:  |  Size: 5.9 MiB

After

Width:  |  Height:  |  Size: 5.9 MiB

View file

Before

Width:  |  Height:  |  Size: 411 KiB

After

Width:  |  Height:  |  Size: 411 KiB

View file

Before

Width:  |  Height:  |  Size: 971 KiB

After

Width:  |  Height:  |  Size: 971 KiB

View file

@ -0,0 +1,16 @@
{
pkgs,
config,
...
} @ all: {
bosun.key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHl33DPxxzxrNNjM8rL4ktAj4ExzCyGiU8rKog0csxNA";
imports =
[
];
home.username = "christopher";
home.homeDirectory = "/Users/christopher";
elements.kitty.enable = true;
}

View file

@ -1,13 +1,10 @@
{...}: { {...}: {
system.stateVersion = 5; system.stateVersion = 5;
elements = { # bosun = {
hostname = "molybdenum"; # key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPjqieS4GkYAa1WRYZpxjgYsj7VGZ9U+rTFCkX8M0umD";
secrets = { # };
key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPjqieS4GkYAa1WRYZpxjgYsj7VGZ9U+rTFCkX8M0umD";
};
};
# For some reason this is required for hm to work with nix-darwin # For some reason this is required for hm to work with nix-darwin
users.users.christopher = {}; # users.users.christopher = {};
} }

View file

@ -0,0 +1,5 @@
{
imports = [
./secrets.nix
];
}

View file

@ -0,0 +1,8 @@
{
inputs,
...
}: {
imports = [
# inputs.agenix.darwinModules.default
];
}

View file

@ -1,12 +1,16 @@
{inputs, ...}: let {inputs, ...}: let
inherit (inputs) self; inherit (inputs) self;
mkHome = user: host: { mkHome = user: host: system: inputs.home-manager.lib.homeManagerConfiguration {
imports = [ pkgs = inputs.nixpkgs.legacyPackages.${system};
(self + "/home") extraSpecialArgs = {
# TODO: Import this conditionally! inherit inputs;
# (self + "/home/by-host/${host}") hostname = host;
};
modules = [
(self + "/modules/home") (self + "/modules/home")
(self + "/home/by-host/${host}")
]; ];
}; };
in { in {
@ -15,8 +19,7 @@ in {
]; ];
flake.homeConfigurations = { flake.homeConfigurations = {
"toph@endurance" = mkHome "toph" "endurance"; "toph@endurance" = mkHome "toph" "endurance" "x86_64-linux";
"toph@vasa" = mkHome "toph" "vasa"; "toph@vasa" = mkHome "toph" "vasa" "x86_64-darwin";
"toph@aepplet" = mkHome "toph" "aepplet";
}; };
} }

View file

@ -9,22 +9,18 @@
./nix.nix ./nix.nix
./profiles.nix ./profiles.nix
./secrets.nix ./secrets.nix
./ssh.nix
]; ];
# TODO: Move all of these into their own modules? # TODO: Move all of these into their own modules?
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
};
networking.hostName = hostname; networking.hostName = hostname;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pre-commit pre-commit
git git
gitleaks gitleaks
helix
fish
just just
nh nh
age age

View file

@ -2,6 +2,7 @@
pkgs, pkgs,
lib, lib,
inputs, inputs,
hostname,
... ...
}: { }: {
nix = { nix = {
@ -15,7 +16,8 @@
# automatic cleanup # automatic cleanup
gc = { gc = {
automatic = true; automatic = true;
dates = "weekly"; # TODO: nix-darwin uses "interval" as a key
dates = lib.mkIf (hostname != "vasa") "weekly";
options = "--delete-older-than 21d"; options = "--delete-older-than 21d";
}; };

View file

@ -11,11 +11,6 @@
with lib; let with lib; let
cfg = config.bosun; cfg = config.bosun;
in { in {
imports = [
inputs.agenix.nixosModules.default
inputs.agenix-rekey.nixosModules.default
];
options.bosun = { options.bosun = {
rekeyPath = mkOption { rekeyPath = mkOption {
type = types.str; type = types.str;

View file

@ -5,5 +5,12 @@
./system.nix ./system.nix
./users.nix ./users.nix
./nix-ld.nix ./nix-ld.nix
./ssh.nix
./secrets.nix
]; ];
console = {
font = "Lat2-Terminus16";
useXkbConfig = true; # use xkbOptions in tty.
};
} }

16
modules/nixos/secrets.nix Normal file
View file

@ -0,0 +1,16 @@
{
config,
inputs',
inputs,
hostname,
pkgs,
lib,
self,
...
}: {
imports = [
inputs.agenix.nixosModules.default
inputs.agenix-rekey.nixosModules.default
../generic/secrets.nix
];
}