ref(home-manager): is a flake now

This commit is contained in:
Léana 江 2023-12-30 12:06:41 +01:00 committed by Léana 江
parent 978968fbc7
commit d38927c9ef
6 changed files with 222 additions and 112 deletions

View file

@ -0,0 +1,54 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
nixunstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { home-manager, nixpkgs, nixunstable, ... }:
let
pkgsS = s:
import nixpkgs {
system = s;
overlays = [
(final: prev: {
cmus = prev.cmus.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [
(prev.fetchpatch {
url = "https://github.com/cmus/cmus/commit/4123b54bad3d8874205aad7f1885191c8e93343c.patch";
hash = "sha256-YKqroibgMZFxWQnbmLIHSHR5sMJduyEv6swnKZQ33Fg=";
})
];
});
})
];
};
unstableS = s: import nixunstable { system = s; };
withSystem = (device: system:
let
pkgs = pkgsS system;
unstable = unstableS system;
in home-manager.lib.homeManagerConfiguration {
pkgs = pkgs;
extraSpecialArgs = {
system = system;
inherit unstable;
};
modules = [ ./home/${device} ];
});
in {
homeConfigurations."leana@macOS" =
withSystem "leana@macOS" "aarch64-darwin";
};
}