added hardware-configuration.nix import for nixos-anywhere
This commit is contained in:
parent
8bfb4156ee
commit
cd073c6aac
22
flake.lock
generated
22
flake.lock
generated
@ -2,7 +2,9 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"disko": {
|
"disko": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1766150702,
|
"lastModified": 1766150702,
|
||||||
@ -19,22 +21,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
|
||||||
"lastModified": 1763618868,
|
|
||||||
"narHash": "sha256-v5afmLjn/uyD9EQuPBn7nZuaZVV9r+JerayK/4wvdWA=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "a8d610af3f1a5fb71e23e08434d8d61a466fc942",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "nixpkgs-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765838191,
|
"lastModified": 1765838191,
|
||||||
"narHash": "sha256-m5KWt1nOm76ILk/JSCxBM4MfK3rYY7Wq9/TZIIeGnT8=",
|
"narHash": "sha256-m5KWt1nOm76ILk/JSCxBM4MfK3rYY7Wq9/TZIIeGnT8=",
|
||||||
@ -53,7 +39,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
15
flake.nix
15
flake.nix
@ -4,33 +4,40 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
|
||||||
disko.url = "github:nix-community/disko";
|
disko.url = "github:nix-community/disko";
|
||||||
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, disko }:
|
outputs = { self, nixpkgs, disko }:
|
||||||
let
|
let
|
||||||
|
# options
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
release = "25.11";
|
release = "25.11";
|
||||||
mainDisk = "/dev/sda";
|
mainDisk = "/dev/sda";
|
||||||
myUser = "victor";
|
myUser = "victor";
|
||||||
|
|
||||||
|
# helper
|
||||||
|
lib = nixpkgs.lib;
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
isengard = nixpkgs.lib.nixosSystem {
|
isengard = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit release mainDisk myUser disko; };
|
specialArgs = { inherit release mainDisk myUser disko; };
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/isengard.nix
|
./hosts/isengard.nix
|
||||||
./modules/base.nix
|
./modules/base.nix
|
||||||
./modules/docker.nix
|
./modules/docker.nix
|
||||||
];
|
]
|
||||||
|
++ lib.optional (builtins.pathExists ./hardware-configuration.nix) ./hardware-configuration.nix;
|
||||||
};
|
};
|
||||||
palantir = nixpkgs.lib.nixosSystem {
|
palantir = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit release mainDisk myUser disko; };
|
specialArgs = { inherit release mainDisk myUser disko; };
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/palantir.nix
|
./hosts/palantir.nix
|
||||||
./modules/base.nix
|
./modules/base.nix
|
||||||
./modules/gaming.nix
|
./modules/gaming.nix
|
||||||
];
|
]
|
||||||
|
++ lib.optional (builtins.pathExists ./hardware-configuration.nix) ./hardware-configuration.nix;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user