30 lines
1.1 KiB
Nix
30 lines
1.1 KiB
Nix
{pkgs, lib, ... }:
|
|
|
|
let
|
|
nixos-cosmic = builtins.fetchGit {
|
|
url = "https://github.com/lilyinstarlight/nixos-cosmic.git";
|
|
# rev = "b61e7a0da2fa1d5f05d41e3db6386b2ac5f5079b";
|
|
};
|
|
cosmicPkgsMainDir = builtins.readDir "${nixos-cosmic}/pkgs";
|
|
cosmicPkgsDirs = builtins.filter (v: cosmicPkgsMainDir."${v}" == "directory") (builtins.attrNames cosmicPkgsMainDir);
|
|
cosmicPkgsOverlay = final: prev: builtins.listToAttrs (
|
|
builtins.map (v: {name = v; value = final.callPackage "${nixos-cosmic}/pkgs/${v}/package.nix" {};}) cosmicPkgsDirs
|
|
);
|
|
in
|
|
{
|
|
imports = [
|
|
"${nixos-cosmic}/nixos/cosmic-greeter/module.nix"
|
|
];
|
|
config = {
|
|
services.xserver.desktopManager.cosmic.enable = true;
|
|
services.xserver.displayManager.cosmic-greeter.enable = true;
|
|
nixpkgs.overlays = [ cosmicPkgsOverlay ];
|
|
nix.settings = {
|
|
substituters = [ "https://cosmic.cachix.org/" ];
|
|
trusted-public-keys = [ "cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE=" ];
|
|
};
|
|
};
|
|
options = {
|
|
cosmic-greeter = lib.mkOption {default = pkgs.cosmic-greeter;};
|
|
};
|
|
}
|