docs: ideas

This commit is contained in:
truxnell 2024-03-23 20:45:09 +11:00
parent d27d81b420
commit 5923c726bd
3 changed files with 72 additions and 5 deletions

View file

@ -49,7 +49,7 @@
# Use nixpkgs-fmt for 'nix fmt'
formatter = forAllSystems (system: nixpkgs.legacyPackages."${system}".nixpkgs-fmt);
nixosModules = import ./nixos/modules/nixos;
# nixosModules = import ./nixos/modules/nixos;
nixosConfigurations =
let
@ -61,6 +61,27 @@
specialArgs = {
inherit inputs outputs;
};
# generate a base nixos configuration with the
# specified overlays, hardware modules, and any extraModules applied
mkNixosConfig =
{ hostname
, system ? "x86_64-linux"
, nixpkgs ? inputs.nixpkgs
, hardwareModules
, baseModules ? [
# home-manager.nixosModules.home-manager
# ./modules/nixos
sops-nix.nixosModules.sops
./nixos/hosts/${hostname}
]
, extraModules ? [ ]
}:
nixpkgs.lib.nixosSystem {
inherit system;
modules = baseModules ++ hardwareModules ++ extraModules;
specialArgs = { inherit self inputs nixpkgs; };
};
in
{
nixosvm = nixpkgs.lib.nixosSystem {
@ -71,14 +92,45 @@
];
};
rickenbacker = nixpkgs.lib.nixosSystem {
inherit specialArgs;
# rickenbacker = nixpkgs.lib.nixosSystem {
# inherit specialArgs;
# system = "x86_64-linux";
# modules = defaultModules ++ [
# ./nixos/hosts/rickenbacker
# ];
# };
"rickenbacker" = mkNixosConfig {
hostname = "rickenbacker";
system = "x86_64-linux";
modules = defaultModules ++ [
./nixos/hosts/rickenbacker
hardwareModules = [
# ./modules/hardware/phil.nix
];
extraModules = [
# ./profiles/personal.nix
];
};
"citadel" = mkNixosConfig {
hostname = "citadel";
system = "x86_64-linux";
hardwareModules = [
# ./modules/hardware/phil.nix
];
extraModules = [
# ./profiles/personal.nix
];
};
# "kclejeune@aarch64-linux" = mkNixosConfig {
# system = "aarch64-linux";
# hardwareModules = [./modules/hardware/phil.nix];
# extraModules = [./profiles/personal.nix];
# };
dns01 = nixpkgs.lib.nixosSystem {
inherit specialArgs;
system = "aarch64-linux";

View file

@ -3,6 +3,7 @@
, lib
, ...
}: {
# TODO add USER settings.json
# Enable vscode & addons
environment.systemPackages = with pkgs; [
(vscode-with-extensions.override {

14
nixos/modules/README.md Normal file
View file

@ -0,0 +1,14 @@
Profiles:
Global: Settings for entire site - time local, chrony, timeservers, dns
Role: What the role is of the device - graphical/server
Hardware: Specifics of hardware (hw overlays, rpi4, etc)
Host: Host-specific (services, user setup)
nixos
system
locale
time
openssh
fish
chrony