133 lines
3.9 KiB
Nix
133 lines
3.9 KiB
Nix
{
|
|
description = "Nomarchy - A NixOS-based distribution with Omarchy flavour";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
|
|
disko = {
|
|
url = "github:nix-community/disko";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
impermanence = {
|
|
url = "github:nix-community/impermanence";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-25.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nix-colors = {
|
|
url = "github:misterio77/nix-colors";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
stylix = {
|
|
url = "github:danth/stylix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
walker = {
|
|
url = "github:abenz1267/walker";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = { self, nixpkgs, nixos-hardware, disko, impermanence, home-manager, nix-colors, stylix, walker, ... } @ inputs: let
|
|
# Helper to create standalone home configurations
|
|
mkHome = { username, modules ? [] }: home-manager.lib.homeManagerConfiguration {
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
extraSpecialArgs = { inherit inputs; };
|
|
modules = [
|
|
./features
|
|
{
|
|
home.username = username;
|
|
home.homeDirectory = "/home/${username}";
|
|
home.stateVersion = "25.11";
|
|
}
|
|
] ++ modules;
|
|
};
|
|
|
|
homeConfigs = {
|
|
"nixos" = mkHome { username = "nixos"; };
|
|
"nomarchy" = mkHome { username = "nomarchy"; };
|
|
};
|
|
in {
|
|
# Expose inputs for downstream use
|
|
inherit inputs;
|
|
|
|
nixosModules = {
|
|
system = import ./core;
|
|
home = import ./features;
|
|
};
|
|
|
|
nixosConfigurations = {
|
|
# Minimal TTY installer ISO (new golden path)
|
|
installerIso = nixpkgs.lib.nixosSystem {
|
|
specialArgs = { inherit inputs; };
|
|
modules = [
|
|
{ nixpkgs.hostPlatform = "x86_64-linux"; }
|
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
|
./hosts/installer-iso.nix
|
|
{
|
|
system.stateVersion = "25.11";
|
|
networking.hostName = "nomarchy-installer";
|
|
}
|
|
];
|
|
};
|
|
|
|
# Graphical installer ISO (legacy, for users who prefer GUI)
|
|
installerIsoGraphical = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs;
|
|
homeActivationPackage = homeConfigs."nixos".activationPackage;
|
|
};
|
|
modules = [
|
|
{ nixpkgs.hostPlatform = "x86_64-linux"; }
|
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-base.nix"
|
|
./hosts/live-iso.nix
|
|
./core
|
|
{
|
|
system.stateVersion = "25.11";
|
|
services.displayManager.autoLogin.enable = true;
|
|
services.displayManager.autoLogin.user = "nixos";
|
|
}
|
|
];
|
|
};
|
|
|
|
# Default configuration (VM and testing)
|
|
default = nixpkgs.lib.nixosSystem {
|
|
specialArgs = {
|
|
inherit inputs;
|
|
homeActivationPackage = homeConfigs."nomarchy".activationPackage;
|
|
};
|
|
modules = [
|
|
{ nixpkgs.hostPlatform = "x86_64-linux"; }
|
|
./core/default.nix
|
|
./core/system/vm-guest.nix
|
|
{
|
|
system.stateVersion = "25.11";
|
|
networking.hostName = "nomarchy";
|
|
|
|
virtualisation.vmVariant.virtualisation.memorySize = 4096;
|
|
virtualisation.vmVariant.virtualisation.cores = 2;
|
|
|
|
# Setup default user for testing
|
|
users.users.nomarchy = {
|
|
isNormalUser = true;
|
|
extraGroups = [ "wheel" "video" "render" "networkmanager" ];
|
|
initialPassword = "nixos";
|
|
};
|
|
|
|
services.displayManager.autoLogin.enable = true;
|
|
services.displayManager.autoLogin.user = "nomarchy";
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
homeConfigurations = homeConfigs;
|
|
};
|
|
}
|