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": {
|
"locked": {
|
||||||
|
"host": "git.dodsorf.as",
|
||||||
"lastModified": 1654132489,
|
"lastModified": 1654132489,
|
||||||
"narHash": "sha256-7L6gKN5Y2PbjK2aHX2jwOCZfe9R+7RusvuULy9EbKGs=",
|
"narHash": "sha256-7L6gKN5Y2PbjK2aHX2jwOCZfe9R+7RusvuULy9EbKGs=",
|
||||||
"ref": "master",
|
"owner": "Dandellion",
|
||||||
|
"repo": "NUR",
|
||||||
"rev": "9b6f60ce8a94d8269190dbe4ac9450f87910ac8b",
|
"rev": "9b6f60ce8a94d8269190dbe4ac9450f87910ac8b",
|
||||||
"revCount": 159,
|
"type": "gitlab"
|
||||||
"type": "git",
|
|
||||||
"url": "https://git.dodsorf.as/Dandellion/NUR"
|
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"type": "git",
|
"host": "git.dodsorf.as",
|
||||||
"url": "https://git.dodsorf.as/Dandellion/NUR"
|
"owner": "Dandellion",
|
||||||
|
"repo": "NUR",
|
||||||
|
"type": "gitlab"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"home-manager-2205": {
|
"home-manager-2205": {
|
||||||
|
|
39
flake.nix
39
flake.nix
|
@ -11,33 +11,34 @@
|
||||||
nur.url = "github:nix-community/NUR";
|
nur.url = "github:nix-community/NUR";
|
||||||
nur.inputs.nixpkgs.follows = "unstable";
|
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";
|
dan.inputs.nixpkgs.follows = "unstable";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {self, home-manager-2205, unstable, nur, dan, ... }:
|
outputs = {self, home-manager-2205, unstable, nur, dan, ... }:
|
||||||
let
|
let
|
||||||
pvv-home = "/home/pvv/d/${pvv-username}";
|
nixlib = unstable.lib;
|
||||||
pvv-username = "danio";
|
|
||||||
|
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
|
in
|
||||||
{
|
{
|
||||||
homeConfigurations.laptop = home-manager-2205.lib.homeManagerConfiguration {
|
homeConfigurations = nixlib.genAttrs [ "laptop" "desktop" ] (machine: mkHome { inherit machine; })
|
||||||
configuration = import ./machines/laptop.nix;
|
// nixlib.genAttrs [ "pvv-terminal" ] (machine: mkHome {inherit machine; username = "danio"; homeDirectory = "/home/pvv/d/danio";});
|
||||||
system = "x86_64-linux";
|
|
||||||
username = "daniel";
|
|
||||||
homeDirectory = "/home/daniel";
|
|
||||||
stateVersion = "22.05";
|
|
||||||
extraSpecialArgs = { inherit (self) overlays; };
|
|
||||||
};
|
|
||||||
|
|
||||||
|
nixosModules = {
|
||||||
homeConfigurations.pvv-terminal = home-manager-2205.lib.homeManagerConfiguration {
|
home-manager = nixlib.genAttrs [ "laptop" "desktop" "pvv-terminal" ] (machine: import ./machines/${machine}.nix);
|
||||||
configuration = import ./machines/pvv-terminal.nix;
|
|
||||||
system = "x86_64-linux";
|
|
||||||
username = pvv-username;
|
|
||||||
homeDirectory = pvv-home;
|
|
||||||
stateVersion = "22.05";
|
|
||||||
extraSpecialArgs = { inherit (self) overlays; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
overlays = [
|
overlays = [
|
||||||
|
|
|
@ -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 ];
|
imports = [ ../profiles ];
|
||||||
|
|
||||||
machine = {
|
machine = {
|
||||||
|
@ -13,9 +17,4 @@
|
||||||
profiles.zsh.enable = true;
|
profiles.zsh.enable = true;
|
||||||
|
|
||||||
profiles.games.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;
|
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;
|
interval = 10;
|
||||||
format = "ﴥ <label>";
|
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