mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-07 07:09:15 +00:00
ref(home-manager): is a flake now
This commit is contained in:
parent
978968fbc7
commit
d38927c9ef
6 changed files with 222 additions and 112 deletions
54
.config/home-manager/flake.nix
Normal file
54
.config/home-manager/flake.nix
Normal 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";
|
||||
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue