diff --git a/flake.nix b/flake.nix index be9aa8f..359e1a1 100644 --- a/flake.nix +++ b/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; diff --git a/nodes.nix b/nodes.nix index dfaee67..21729dc 100644 --- a/nodes.nix +++ b/nodes.nix @@ -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"; + }; }; } \ No newline at end of file diff --git a/shared/commons/basics.nix b/shared/commons/basics.nix index ec8daef..8af7611 100644 --- a/shared/commons/basics.nix +++ b/shared/commons/basics.nix @@ -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"; }; } \ No newline at end of file diff --git a/shared/commons/boot.nix b/shared/commons/boot.nix index d7b5392..28e1ffc 100644 --- a/shared/commons/boot.nix +++ b/shared/commons/boot.nix @@ -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"; } \ No newline at end of file