Switch to the dendritic flake-parts layout, with stubs for phase 2
flake.nix now only declares inputs and calls flake-parts with import-tree
over ./modules: every .nix file under modules/ is a flake-parts module.
Features are aspects (flake.modules.nixos.<name> and
flake.modules.homeManager.<name>); importing an aspect enables it, so the
my.* option modules and their enable flags are gone.
- Add the flake-parts glue: modules/flake/ (systems, shared meta data,
host construction through configurations.nixos, overlays, packages,
apps, dev shell, formatter, checks), modules/users/faumaray.nix
(meta.owner) and modules/core/{nixpkgs,home-manager,install-facts}.nix.
config.my is kept as one read-only derived option so install-system
keeps working unchanged.
- Add the aspects that are already final: secrets, ssh, hyprland,
wezterm, git, stylix, proxy-suite, gitea-runner and claude-code, and
the desktop host (modules/hosts/desktop/{host,hardware,disks}.nix).
- Port the always-on basics to the `core` aspect (nix, boot, locale,
networking, users), lanzaboote and plain systemd-boot to the
`secure-boot` and `systemd-boot` aspects, and the installer ISO to
modules/installer/iso.nix. Behaviour is unchanged; the time zone,
default locale, XKB layouts and the firewall setting now live in
modules/hosts/desktop/host.nix.
- Move the Lua files (Hyprland settings, binds, rules; Neovim init.lua)
with git mv, byte-identical.
- Add bare stubs, marked STUB, for the aspects that the next phase
ports: amd, rocm, gaming, vpn, docker, noctalia, audio, fonts, xdg,
apps, shell and neovim. The host evaluates with them, but those
features are not configured until they are ported.
- Remove lib/, overlays/, apps/, modules/nixos/, modules/home/,
modules/installer/default.nix and hosts/desktop/{default,disks,home}.nix.
- flake.lock: add flake-parts, import-tree, stylix and serena with their
transitive inputs (22 new nodes); every existing pin is unchanged.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JZ16yf4acmaSiHq81vyQ6Z
This commit is contained in:
84 files changed
+2121
-1928
No files matched your search
@@ -1,12 +1,11 @@
|
||||
{
|
||||
description = "faumaray's NixOS configuration: Hyprland + Noctalia, agenix, disko, lanzaboote";
|
||||
description = "faumaray's NixOS configuration: Hyprland + Noctalia, Stylix, agenix, disko, lanzaboote";
|
||||
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://noctalia.cachix.org"
|
||||
];
|
||||
allowUnfree = true;
|
||||
extra-trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"noctalia.cachix.org-1:pCOR47nnMEo5thcxNDtzWpOxNFQsBRglJzxWPp3dkU4="
|
||||
@@ -17,6 +16,14 @@
|
||||
# Hyprland git and Noctalia v5 both track nixos-unstable.
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
# Dendritic glue: every .nix file under ./modules is a flake-parts module,
|
||||
# imported by import-tree (paths containing `/_` are skipped).
|
||||
flake-parts = {
|
||||
url = "github:hercules-ci/flake-parts";
|
||||
inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||
};
|
||||
import-tree.url = "github:vic/import-tree";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -41,9 +48,10 @@
|
||||
url = "github:FUFSoB/proxy-suite-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
||||
# Hyprland is consumed through its own overlay (see overlays/default.nix),
|
||||
# Hyprland is consumed through its own overlay (modules/flake/overlays.nix),
|
||||
# built against our nixpkgs so mesa/libdrm always match the system.
|
||||
hyprland = {
|
||||
url = "github:hyprwm/Hyprland";
|
||||
@@ -52,76 +60,21 @@
|
||||
|
||||
# No `follows` on purpose: keeps the noctalia.cachix.org binary cache usable.
|
||||
noctalia.url = "github:noctalia-dev/noctalia";
|
||||
|
||||
# Theming (modules/theme/stylix.nix). Stylix has no home-manager input.
|
||||
stylix = {
|
||||
url = "github:nix-community/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-parts.follows = "flake-parts";
|
||||
};
|
||||
|
||||
# Serena MCP server for Claude Code (modules/ai/claude-code.nix); not in
|
||||
# nixpkgs. Pinned to a release tag: bump the tag to update.
|
||||
serena = {
|
||||
url = "github:oraios/serena/v1.7.0";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self, nixpkgs, ... }@inputs:
|
||||
let
|
||||
inherit (nixpkgs) lib;
|
||||
systems = [ "x86_64-linux" ];
|
||||
forAllSystems = lib.genAttrs systems;
|
||||
myLib = import ./lib { inherit inputs self lib; };
|
||||
pkgsFor =
|
||||
system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlays.default ];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
lib = myLib;
|
||||
|
||||
overlays = import ./overlays { inherit inputs; };
|
||||
|
||||
nixosModules.default = ./modules/nixos;
|
||||
homeModules.default = ./modules/home;
|
||||
|
||||
nixosConfigurations = {
|
||||
desktop = myLib.mkHost {
|
||||
hostname = "desktop";
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
# Bootable installer ISO with this flake baked in: `nix build .#iso`.
|
||||
installer = myLib.mkInstaller { system = "x86_64-linux"; };
|
||||
};
|
||||
|
||||
packages = forAllSystems (system: {
|
||||
iso = self.nixosConfigurations.installer.config.system.build.isoImage;
|
||||
});
|
||||
|
||||
apps = forAllSystems (
|
||||
system:
|
||||
import ./apps {
|
||||
pkgs = pkgsFor system;
|
||||
inherit inputs self;
|
||||
}
|
||||
);
|
||||
|
||||
devShells = forAllSystems (
|
||||
system:
|
||||
let
|
||||
pkgs = pkgsFor system;
|
||||
in
|
||||
{
|
||||
default = pkgs.mkShell {
|
||||
name = "nixos-config";
|
||||
packages = [
|
||||
inputs.agenix.packages.${system}.default
|
||||
inputs.disko.packages.${system}.disko
|
||||
pkgs.age
|
||||
pkgs.ssh-to-age
|
||||
pkgs.sbctl
|
||||
pkgs.git
|
||||
pkgs.nixfmt
|
||||
pkgs.nixd
|
||||
pkgs.shellcheck
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
|
||||
formatter = forAllSystems (system: (pkgsFor system).nixfmt-tree);
|
||||
};
|
||||
outputs = inputs: inputs.flake-parts.lib.mkFlake { inherit inputs; } (inputs.import-tree ./modules);
|
||||
}
|
||||
Reference in new issue
Block a user