Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .sops.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ keys:
- &system_hetznix01 age1rd55wsu0hhvxk25tm69d9h57z0z0u6556x4ypg09muj3vh4yqs5qaw23nu
- &system_hetznix02 age180w4c04kga07097u0us6d72aslnv2523hx64x8fzgzu4tccrxuyqa50hpm
- &system_kiosk_gene_desk age1an6t5f0rr6h55rzsv5ejycxju72rp46jka840fwvupwfk65jegrq7hmkl9
- &system_nixnas1 age1g4h5a4f5xfle2a6np8te342pphs3mcuan60emz2zp87nrwjzl5yquhr5vl
- &system_beancoin1 age1g4h5a4f5xfle2a6np8te342pphs3mcuan60emz2zp87nrwjzl5yquhr5vl
- &system_nixnuc age1g24zhwvgenpc4wqejt63thvgd4rn5x9n7nnwwme7dm83nfqpp93se2vmq4
- &system_rainbow_planet age15xlw5vnnjdx2ypz6rq0mqcywuaj3yx8y6lrgf95satafqf7y4qus6rv6ck
- &user_airpuppet age1awdf9h0avajf57cudx0rjfmxu2wlxw8wf3sa7yvfk8rp4j6taecsu74x77
Expand All @@ -27,10 +27,10 @@ creation_rules:
key_groups:
- age:
- *system_kiosk_gene_desk
- path_regex: nixnas1/secrets.yaml$
- path_regex: beancoin1/secrets.yaml$
key_groups:
- age:
- *system_nixnas1
- *system_beancoin1
- path_regex: nixnuc/secrets.yaml$
key_groups:
- age:
Expand Down Expand Up @@ -58,7 +58,7 @@ creation_rules:
- *system_hetznix01
- *system_hetznix02
- *system_kiosk_gene_desk
- *system_nixnas1
- *system_beancoin1
- *system_nixnuc
- *system_rainbow_planet
- *user_airpuppet
Expand Down
90 changes: 88 additions & 2 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
inputs.nixpkgs.follows = "nixpkgs";
};

nix-bitcoin = {
url = "github:fort-nix/nix-bitcoin/nixos-24.11";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nixpkgs-unstable.follows = "nixpkgs-unstable";
};

# Controls system level software and settings including fonts on macOS
nix-darwin = {
url = "github:lnl7/nix-darwin/nix-darwin-24.11";
Expand Down Expand Up @@ -125,6 +131,9 @@

# NixOS hosts
nixosConfigurations = {
beancoin1 = localLib.mkNixBitcoinHost {
hostname = "beancoin1";
};
bigboy = localLib.mkNixosHost {
hostname = "bigboy";
additionalModules = [
Expand Down
2 changes: 2 additions & 0 deletions lib/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{ inputs, ... }: let
mkDarwinHost = import ./mkDarwinHost.nix { inherit inputs; };
mkNixosHost = import ./mkNixosHost.nix { inherit inputs; };
mkNixBitcoinHost = import ./mkNixBitcoinHost.nix { inherit inputs; };
in {
inherit (mkDarwinHost) mkDarwinHost;
inherit (mkNixosHost) mkNixosHost;
inherit (mkNixBitcoinHost) mkNixBitcoinHost;
}
36 changes: 36 additions & 0 deletions lib/mkNixBitcoinHost.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{ inputs, ... }: {
mkNixBitcoinHost = {
system ? "x86_64-linux",
hostname,
username ? "gene",
additionalModules ? [],
additionalSpecialArgs ? {}
}: inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs hostname username; } // additionalSpecialArgs;
modules = [
./nixpkgs-settings.nix

inputs.disko.nixosModules.disko
inputs.nix-bitcoin.nixosModules.default
inputs.sops-nix.nixosModules.sops # system wide secrets management

../modules/hosts/nixos # system-wide stuff
../modules/hosts/nixos/${hostname} # host specific stuff

inputs.home-manager.nixosModules.home-manager {
home-manager = {
extraSpecialArgs = { inherit inputs hostname username; };
useGlobalPkgs = true;
useUserPackages = true;
users.${username}.imports = [
../modules/hosts/common
../modules/hosts/common/linux/home.nix
../modules/hosts/nixos/${hostname}/home-${username}.nix
];
};
}
Comment on lines +12 to +32
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section still needs work - the reason this is in a different file within lib is that it is intended to be paired back and to support the "secure-node preset" from Nix Bitcoin


] ++ additionalModules;
};
}
Loading