2022-06-02 03:32:14 +02:00
|
|
|
{
|
|
|
|
description = "dandellion's home-manager profiles";
|
2022-06-08 20:32:33 +02:00
|
|
|
|
|
|
|
nixConfig.extra-substituters = ["https://helix.cachix.org"];
|
|
|
|
nixConfig.exta-trusted-public-keys = "mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=";
|
2022-06-02 03:32:14 +02:00
|
|
|
|
|
|
|
inputs = {
|
|
|
|
home-manager-2205.url = "github:nix-community/home-manager/release-22.05";
|
|
|
|
nixos-2205.url = "github:nixos/nixpkgs/nixos-22.05";
|
|
|
|
home-manager-2205.inputs.nixpkgs.follows = "nixos-2205";
|
|
|
|
|
|
|
|
unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
|
|
|
|
nur.url = "github:nix-community/NUR";
|
|
|
|
nur.inputs.nixpkgs.follows = "unstable";
|
|
|
|
|
2022-06-02 18:18:20 +02:00
|
|
|
dan.url = "gitlab:Dandellion/NUR?host=git.dodsorf.as"; #"git+https://git.dodsorf.as/Dandellion/NUR";
|
2022-06-02 03:32:14 +02:00
|
|
|
dan.inputs.nixpkgs.follows = "unstable";
|
2022-06-08 04:56:02 +02:00
|
|
|
|
|
|
|
helix.url = "github:helix-editor/helix";
|
|
|
|
helix.inputs.nixpkgs.follows = "unstable";
|
2022-06-02 03:32:14 +02:00
|
|
|
};
|
|
|
|
|
2022-06-08 04:56:02 +02:00
|
|
|
outputs = {self, home-manager-2205, unstable, nur, dan, ... }@inputs:
|
2022-06-02 05:08:38 +02:00
|
|
|
let
|
2022-06-02 18:18:20 +02:00
|
|
|
nixlib = unstable.lib;
|
|
|
|
|
|
|
|
mkHome =
|
|
|
|
{ machine
|
|
|
|
, hmChannel ? home-manager-2205
|
|
|
|
, configuration ? self.nixosModules.home-manager.${machine}
|
|
|
|
, system ? "x86_64-linux"
|
|
|
|
, username ? "daniel"
|
|
|
|
, homeDirectory ? "/home/${username}"
|
|
|
|
, stateVersion ? "22.05"
|
|
|
|
, extraSpecialArgs ? { inherit (self) overlays; }
|
|
|
|
}:
|
|
|
|
hmChannel.lib.homeManagerConfiguration {
|
|
|
|
inherit configuration system username homeDirectory stateVersion extraSpecialArgs;
|
|
|
|
};
|
2022-06-03 12:22:24 +02:00
|
|
|
|
2022-06-03 12:28:06 +02:00
|
|
|
mkHomes = machines: extraArgs: nixlib.genAttrs machines (machine: mkHome ({inherit machine; } // extraArgs));
|
2022-06-03 12:22:24 +02:00
|
|
|
|
|
|
|
allMachines = [ "laptop" "desktop" "headless" "pvv-terminal" ];
|
2022-06-02 05:08:38 +02:00
|
|
|
in
|
2022-06-02 03:32:14 +02:00
|
|
|
{
|
2022-06-08 05:48:18 +02:00
|
|
|
|
2022-06-03 12:22:24 +02:00
|
|
|
homeConfigurations = mkHomes [ "laptop" "headless" ] { }
|
|
|
|
// mkHomes [ "desktop" ] { username = "dan"; }
|
|
|
|
// mkHomes [ "pvv-terminal" ] { username = "danio"; homeDirectory = "/home/pvv/d/danio"; };
|
2022-06-02 05:08:38 +02:00
|
|
|
|
2022-06-02 18:18:20 +02:00
|
|
|
nixosModules = {
|
2022-06-03 12:22:24 +02:00
|
|
|
home-manager = nixlib.genAttrs allMachines (machine: import ./machines/${machine}.nix);
|
2022-06-02 05:08:38 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
overlays = [
|
|
|
|
(final: prev: {
|
|
|
|
unstable = import unstable {
|
|
|
|
inherit (prev) system config;
|
|
|
|
};
|
|
|
|
dan = dan.packages.${prev.system};
|
2022-06-08 04:56:02 +02:00
|
|
|
helix = inputs.helix.packages.${prev.system}.helix;
|
2022-06-02 05:08:38 +02:00
|
|
|
})
|
|
|
|
nur.overlay
|
|
|
|
];
|
2022-06-03 12:22:24 +02:00
|
|
|
|
|
|
|
homeActivations = nixlib.genAttrs allMachines (machine: self.homeConfigurations.${machine}.activationPackage);
|
|
|
|
|
|
|
|
apps.x86_64-linux = nixlib.genAttrs allMachines (machine: {
|
|
|
|
type = "app";
|
|
|
|
program = "${self.homeActivations.${machine}}/activate";
|
|
|
|
});
|
2022-06-02 03:32:14 +02:00
|
|
|
};
|
2022-06-03 00:15:16 +02:00
|
|
|
}
|