Files
moonix/flake.nix
T
nevaforget d9d616c45d Fix niri config discovery, polkit path, wallpaper stack
- NIRI_CONFIG points niri at /etc/xdg; without it niri writes its own
  default config, so none of the Moonarch settings applied.
- config.kdl spawns the polkit agent by FHS path, provided via tmpfiles
  instead of diverging the config shared with Arch.
- waypaper was missing entirely, hence no wallpaper. It invokes swww,
  which the maintained awww provides under a different name.
2026-08-07 13:17:46 +02:00

93 lines
2.6 KiB
Nix

# ABOUTME: Flake for running the Moonarch desktop on NixOS.
# ABOUTME: Pulls the Moonarch project repos as sources and builds them with Nix.
{
description = "Moonarch on NixOS — packages and modules";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# Project sources. These repos are not flakes themselves, they are
# consumed as plain source trees pinned to a release tag.
moonarch = {
url = "git+https://gitea.moonarch.de/nevaforget/moonarch.git";
flake = false;
};
moonlock = {
url = "git+https://gitea.moonarch.de/nevaforget/moonlock.git?ref=refs/tags/v0.6.20";
flake = false;
};
# Note the repo name: the project is moongreet, the repo is greetd-moongreet.
moongreet = {
url = "path:/home/kresdo/moongreet-local";
flake = false;
};
moonset = {
url = "git+https://gitea.moonarch.de/nevaforget/moonset.git?ref=refs/tags/v0.9.1";
flake = false;
};
sweet-cursors = {
url = "git+https://gitea.moonarch.de/nevaforget/Sweet-cursors.git";
flake = false;
};
};
outputs = { self, nixpkgs, ... }@inputs:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
moonarchPackages = {
moonlock = pkgs.callPackage ./pkgs/moonlock.nix {
src = inputs.moonlock;
version = "0.6.20";
};
moongreet = pkgs.callPackage ./pkgs/moongreet.nix {
src = inputs.moongreet;
version = "0.10.2";
};
moonset = pkgs.callPackage ./pkgs/moonset.nix {
src = inputs.moonset;
version = "0.9.1";
};
sweet-cursors = pkgs.callPackage ./pkgs/sweet-cursors.nix {
src = inputs.sweet-cursors;
version = "0-unstable";
};
};
in
{
packages.${system} = moonarchPackages;
# Makes the packages and the moonarch source tree available to every
# module without threading arguments through by hand.
nixosModules.moonarch = { ... }: {
imports = [
./modules/desktop.nix
./modules/greetd.nix
./modules/services.nix
];
_module.args = {
moonarchSrc = inputs.moonarch;
moonarchPkgs = moonarchPackages;
};
};
nixosConfigurations.moonarch-vm = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./hosts/moonarch-vm
self.nixosModules.moonarch
];
};
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [ nixpkgs-fmt ];
};
};
}