HM now follows machine specific version

This commit is contained in:
Julien Malka 2023-05-07 14:25:12 +02:00
parent 4b785a723a
commit a214f2a2e7
Signed by: Luj
GPG key ID: 6FC74C847011FD83
4 changed files with 35 additions and 2 deletions

22
flake.lock generated
View file

@ -96,6 +96,27 @@
"type": "github" "type": "github"
} }
}, },
"home-manager-unstable": {
"inputs": {
"nixpkgs": [
"unstable"
]
},
"locked": {
"lastModified": 1683459775,
"narHash": "sha256-Ab1pIKOj7XRZbJAv4g9937ElhaZF7Pob3hqGTDKt5w8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "6fc82e56971523acfe1a61dbcb20f4bb969b3990",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
},
"homepage": { "homepage": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -284,6 +305,7 @@
"deploy-rs": "deploy-rs", "deploy-rs": "deploy-rs",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"home-manager-unstable": "home-manager-unstable",
"homepage": "homepage", "homepage": "homepage",
"hyprland": "hyprland", "hyprland": "hyprland",
"hyprpaper": "hyprpaper", "hyprpaper": "hyprpaper",

View file

@ -11,6 +11,11 @@
inputs.nixpkgs.follows = "unstable"; inputs.nixpkgs.follows = "unstable";
}; };
home-manager-unstable = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "unstable";
};
homepage = { homepage = {
url = "github:JulienMalka/homepage"; url = "github:JulienMalka/homepage";
flake = false; flake = false;
@ -86,6 +91,7 @@
modules = self.nixosModules; modules = self.nixosModules;
nixpkgs = lib.luj.machines.${name}.nixpkgs_version; nixpkgs = lib.luj.machines.${name}.nixpkgs_version;
system = lib.luj.machines.${name}.arch; system = lib.luj.machines.${name}.arch;
home-manager = lib.luj.machines.${name}.hm_version;
})) }))
(lib.importConfig ./machines); (lib.importConfig ./machines);

View file

@ -9,7 +9,7 @@ let
in in
{ {
mkMachine = { host, host-config, modules, nixpkgs ? inputs.nixpkgs, system ? "x86_64-linux" }: nixpkgs.lib.nixosSystem { mkMachine = { host, host-config, modules, nixpkgs ? inputs.nixpkgs, system ? "x86_64-linux", home-manager ? inputs.home-manager }: nixpkgs.lib.nixosSystem {
lib = final; lib = final;
system = system; system = system;
specialArgs = { specialArgs = {
@ -19,7 +19,7 @@ in
../base.nix ../base.nix
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
host-config host-config
inputs.home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
inputs.simple-nixos-mailserver.nixosModule inputs.simple-nixos-mailserver.nixosModule
inputs.hyprland.nixosModules.default inputs.hyprland.nixosModules.default
{ {

View file

@ -27,22 +27,27 @@ inputs: lib: with lib; let
lisa = { lisa = {
arch = "x86_64-linux"; arch = "x86_64-linux";
nixpkgs_version = inputs.nixpkgs; nixpkgs_version = inputs.nixpkgs;
hm_version = inputs.home-manager;
}; };
newton = { newton = {
arch = "x86_64-linux"; arch = "x86_64-linux";
nixpkgs_version = inputs.nixpkgs; nixpkgs_version = inputs.nixpkgs;
hm_version = inputs.home-manager;
}; };
macintosh = { macintosh = {
arch = "aarch64-linux"; arch = "aarch64-linux";
nixpkgs_version = inputs.nixos-apple-silicon.inputs.nixpkgs; nixpkgs_version = inputs.nixos-apple-silicon.inputs.nixpkgs;
hm_version = inputs.home-manager-unstable;
}; };
lambda = { lambda = {
arch = "aarch64-linux"; arch = "aarch64-linux";
nixpkgs_version = inputs.nixpkgs; nixpkgs_version = inputs.nixpkgs;
hm_version = inputs.home-manager;
}; };
tower = { tower = {
arch = "x86_64-linux"; arch = "x86_64-linux";
nixpkgs_version = inputs.nixpkgs; nixpkgs_version = inputs.nixpkgs;
hm_version = inputs.home-manager;
}; };
}; };