mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
ref(nix): sorted into modules
This commit is contained in:
parent
c228945485
commit
7a39b3e3fd
12 changed files with 2630 additions and 217 deletions
|
|
@ -2,23 +2,67 @@
|
|||
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 = {
|
||||
nixpkgs,
|
||||
nixunstable,
|
||||
home-manager,
|
||||
...
|
||||
}: let
|
||||
inherit (nixpkgs) lib;
|
||||
pkgsWith = system:
|
||||
import nixpkgs {
|
||||
inherit system;
|
||||
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=";
|
||||
})
|
||||
];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (nixpkgs.lib.getName pkg) [
|
||||
"discord"
|
||||
"prl-tools"
|
||||
];
|
||||
};
|
||||
|
||||
unstableWith = system: import nixunstable {inherit system;};
|
||||
|
||||
withSystem = (
|
||||
device: system: hostname: (lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit nixpkgs;
|
||||
inherit nixunstable;
|
||||
inherit system;
|
||||
inherit hostname;
|
||||
device: system: hostname: let
|
||||
args = {
|
||||
pkgs = pkgsWith system;
|
||||
unstable = unstableWith system;
|
||||
inherit system hostname;
|
||||
};
|
||||
modules = [./hosts/${device}/configuration.nix];
|
||||
in (nixpkgs.lib.nixosSystem {
|
||||
specialArgs = args;
|
||||
modules = [
|
||||
./hosts/${device}/default.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.leana = import ./home;
|
||||
extraSpecialArgs = args;
|
||||
};
|
||||
}
|
||||
];
|
||||
})
|
||||
);
|
||||
in {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue