Normalize format of nix files

This commit is contained in:
Manuel Thalmann 2024-05-01 14:00:39 +02:00
parent 819990937a
commit 3a2ce0ed87
2 changed files with 63 additions and 63 deletions

View file

@ -1,29 +1,29 @@
{
description = "NixOS Machine Configurations by manuth";
description = "NixOS Machine Configurations by manuth";
inputs = {
nixpkgs.url = "nixpkgs/38c01297e7ec11f7b9e3f2cae7d6fcec6cc767ec";
inputs = {
nixpkgs.url = "nixpkgs/38c01297e7ec11f7b9e3f2cae7d6fcec6cc767ec";
};
outputs = { self, nixpkgs }:
let
system = import ./lib/system.nix {
inherit nixpkgs;
};
systems = [
{
name = "nixos";
}
];
in {
nixosConfigurations = builtins.listToAttrs
(
builtins.map (
{ name, config ? {} }:
{
inherit name;
value = system name config;
})
systems);
};
outputs = { self, nixpkgs }:
let
system = import ./lib/system.nix {
inherit nixpkgs;
};
systems = [
{
name = "nixos";
}
];
in {
nixosConfigurations = builtins.listToAttrs
(
builtins.map (
{ name, config ? {} }:
{
inherit name;
value = system name config;
})
systems);
};
}

View file

@ -1,42 +1,42 @@
{ nixpkgs }:
name :
{ dualBoot ? false } :
let
lib = nixpkgs.lib;
configPath = ./machines/${name}.nix;
machineConfig =
if builtins.pathExists configPath then
configPath
else
./hardware/base.nix;
in
lib.nixosSystem {
system = "x86_64-linux";
modules = [
(
{ config, pkgs, lib, ... }: {
imports = [
machineConfig
./config/custom-build-vm.nix
];
name :
{ dualBoot ? false } :
let
lib = nixpkgs.lib;
configPath = ./machines/${name}.nix;
machineConfig =
if builtins.pathExists configPath then
configPath
else
./hardware/base.nix;
in
lib.nixosSystem {
system = "x86_64-linux";
modules = [
(
{ config, pkgs, lib, ... }: {
imports = [
machineConfig
./config/custom-build-vm.nix
];
system.stateVersion = "23.11";
system.stateVersion = "23.11";
virtualisation =
let
vmConfig = {
virtualisation = {
sharedHostKeys = true;
virt-viewer = true;
};
};
in {
vmVariant = vmConfig;
vmVariantWithBootLoader = vmConfig;
};
virtualisation =
let
vmConfig = {
virtualisation = {
sharedHostKeys = true;
virt-viewer = true;
};
};
in {
vmVariant = vmConfig;
vmVariantWithBootLoader = vmConfig;
};
# Networking
networking.hostName = name;
})
];
}
# Networking
networking.hostName = name;
})
];
}