All machines, expose configuration as nixosModules.home-manager
This commit is contained in:
parent
6d3b301246
commit
b439ce59d0
14
flake.lock
14
flake.lock
|
@ -7,17 +7,19 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"host": "git.dodsorf.as",
|
||||
"lastModified": 1654132489,
|
||||
"narHash": "sha256-7L6gKN5Y2PbjK2aHX2jwOCZfe9R+7RusvuULy9EbKGs=",
|
||||
"ref": "master",
|
||||
"owner": "Dandellion",
|
||||
"repo": "NUR",
|
||||
"rev": "9b6f60ce8a94d8269190dbe4ac9450f87910ac8b",
|
||||
"revCount": 159,
|
||||
"type": "git",
|
||||
"url": "https://git.dodsorf.as/Dandellion/NUR"
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.dodsorf.as/Dandellion/NUR"
|
||||
"host": "git.dodsorf.as",
|
||||
"owner": "Dandellion",
|
||||
"repo": "NUR",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"home-manager-2205": {
|
||||
|
|
41
flake.nix
41
flake.nix
|
@ -11,33 +11,34 @@
|
|||
nur.url = "github:nix-community/NUR";
|
||||
nur.inputs.nixpkgs.follows = "unstable";
|
||||
|
||||
dan.url = "git+https://git.dodsorf.as/Dandellion/NUR";
|
||||
dan.url = "gitlab:Dandellion/NUR?host=git.dodsorf.as"; #"git+https://git.dodsorf.as/Dandellion/NUR";
|
||||
dan.inputs.nixpkgs.follows = "unstable";
|
||||
};
|
||||
|
||||
outputs = {self, home-manager-2205, unstable, nur, dan, ... }:
|
||||
let
|
||||
pvv-home = "/home/pvv/d/${pvv-username}";
|
||||
pvv-username = "danio";
|
||||
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;
|
||||
};
|
||||
in
|
||||
{
|
||||
homeConfigurations.laptop = home-manager-2205.lib.homeManagerConfiguration {
|
||||
configuration = import ./machines/laptop.nix;
|
||||
system = "x86_64-linux";
|
||||
username = "daniel";
|
||||
homeDirectory = "/home/daniel";
|
||||
stateVersion = "22.05";
|
||||
extraSpecialArgs = { inherit (self) overlays; };
|
||||
};
|
||||
homeConfigurations = nixlib.genAttrs [ "laptop" "desktop" ] (machine: mkHome { inherit machine; })
|
||||
// nixlib.genAttrs [ "pvv-terminal" ] (machine: mkHome {inherit machine; username = "danio"; homeDirectory = "/home/pvv/d/danio";});
|
||||
|
||||
|
||||
homeConfigurations.pvv-terminal = home-manager-2205.lib.homeManagerConfiguration {
|
||||
configuration = import ./machines/pvv-terminal.nix;
|
||||
system = "x86_64-linux";
|
||||
username = pvv-username;
|
||||
homeDirectory = pvv-home;
|
||||
stateVersion = "22.05";
|
||||
extraSpecialArgs = { inherit (self) overlays; };
|
||||
nixosModules = {
|
||||
home-manager = nixlib.genAttrs [ "laptop" "desktop" "pvv-terminal" ] (machine: import ./machines/${machine}.nix);
|
||||
};
|
||||
|
||||
overlays = [
|
||||
|
@ -50,4 +51,4 @@
|
|||
nur.overlay
|
||||
];
|
||||
};
|
||||
}
|
||||
}
|
|
@ -1,5 +1,9 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, overlays, ... }:
|
||||
{
|
||||
nixpkgs.overlays = overlays;
|
||||
nixpkgs.config.allowUnfreePredicate = (pkg: true);
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
imports = [ ../profiles ];
|
||||
|
||||
machine = {
|
||||
|
@ -13,9 +17,4 @@
|
|||
profiles.zsh.enable = true;
|
||||
|
||||
profiles.games.enable = true;
|
||||
|
||||
programs.home-manager = {
|
||||
enable = true;
|
||||
path = "https://github.com/rycee/home-manager/archive/release-21.11.tar.gz";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -23,9 +23,4 @@
|
|||
};
|
||||
|
||||
profiles.games.enable = true;
|
||||
|
||||
programs.home-manager = {
|
||||
enable = true;
|
||||
path = "https://github.com/rycee/home-manager/archive/release-22.05.tar.gz";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -34,9 +34,4 @@
|
|||
interval = 10;
|
||||
format = "ﴥ <label>";
|
||||
};
|
||||
|
||||
programs.home-manager = {
|
||||
enable = true;
|
||||
path = "https://github.com/rycee/home-manager/archive/release-21.11.tar.gz";
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue