Dan's NixOS, nix-on-droid, and home-manager configuration using the dendritic model with flake-parts.
Add this flake as an input and import flakeModules.default:
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
dans-dotfiles.url = "github:danhab99/dotfiles";
};
outputs = inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [
inputs.dans-dotfiles.flakeModules.default
];
# All modules, devshells, and templates are now available.
# Enable modules in your NixOS configuration:
# module.neovim.enable = true;
# module.zsh.enable = true;
# module.git.enable = true;
};
}This gives you:
| Output | Description |
|---|---|
flake.modules.nixos.* |
NixOS modules (enable with module.<name>.enable = true) |
flake.modules.droid.* |
nix-on-droid modules |
flake.modules.homeManager.* |
Standalone home-manager modules |
perSystem.devShells.* |
Development shells (nix develop .#node-22, etc.) |
flake.templates.* |
Project templates (nix flake init -t .#blank, etc.) |
nix flake show github:danhab99/dotfiles#devShells
nix flake show github:danhab99/dotfiles#templates
just update: Updates the flake.lock to the latestjust switch: Builds nix and applies the new versionjust clean: cleans the nix store
name=..
device=nixos|droid
keep_garbage=10d
max_jobs=100-
cd to
./machineand run./mkMachine.sh -
Copy hardware-configuration.nix to the correct machine
-
Configure modules
-
cd to
./modulesand run./mkModule.sh -
Fillout nixos and homemanager modules
-
Git add new module
-
Enable module in machine file
cd to ./modules/templates and run ./mkTemplate.sh. This will copy blank into the new workflow.
-
cd to
./usersand run./mkUser.sh -
Disable any of the things you want to disable