add fs & state version & fixes
This commit is contained in:
parent
b153246f90
commit
662d5a9f2e
4 changed files with 26 additions and 14 deletions
14
flake.nix
14
flake.nix
|
@ -46,7 +46,7 @@
|
|||
nixosConfigurations = builtins.mapAttrs (name: config:
|
||||
(getNixpkgs config.ver).lib.nixosSystem {
|
||||
system = config.system;
|
||||
modules = config.modules ++ defaultModules ++ [{ hostName = ${name}; }];
|
||||
modules = config.modules ++ defaultModules ++ [{ hostName = "${name}"; }];
|
||||
}
|
||||
) nodes;
|
||||
|
||||
|
@ -56,13 +56,11 @@
|
|||
magicRollback = true;
|
||||
remoteBuild = true;
|
||||
nodes = builtins.mapAttrs (name: config: {
|
||||
"${name}" = {
|
||||
hostname = builtins.head (builtins.split "/" config.ip4);
|
||||
profilesOrder = [ "system" ];
|
||||
profiles = {
|
||||
system = {
|
||||
path = (getDeployPkgs config.ver).deploy-rs.lib.activate.nixos self.nixosConfigurations.${name};
|
||||
};
|
||||
hostname = builtins.head (builtins.split "/" config.ip4);
|
||||
profilesOrder = [ "system" ];
|
||||
profiles = {
|
||||
system = {
|
||||
path = (getDeployPkgs config.ver).deploy-rs.lib.activate.nixos self.nixosConfigurations.${name};
|
||||
};
|
||||
};
|
||||
}) nodes;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"bastion.mtz.lasuite.federez" = {
|
||||
bastion-mtz-lasuite-federez = {
|
||||
system = "x86_64-linux";
|
||||
ver = "25.05";
|
||||
modules = [
|
||||
|
@ -7,9 +7,14 @@
|
|||
];
|
||||
|
||||
ip4 = "193.48.225.150/24";
|
||||
gIp4 = "193.48.225.254/24";
|
||||
gIp4 = "193.48.225.254";
|
||||
|
||||
dev = "ens18";
|
||||
|
||||
grubDevice = "/dev/sda";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/04722f8d-5368-484b-8ec1-1dc10aad1b4a";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.hostName = lib.mkOption {
|
||||
|
@ -8,8 +8,6 @@
|
|||
};
|
||||
|
||||
config = {
|
||||
hostName = "awendap";
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# Global packages
|
||||
|
@ -25,5 +23,7 @@
|
|||
curl
|
||||
wget
|
||||
];
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ ... }:
|
||||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
let
|
||||
# Import nodes
|
||||
|
@ -6,6 +6,15 @@ let
|
|||
myNode = nodes."${config.hostName}";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
fileSystems = myNode.fileSystems;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = myNode.grubDevice;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue