feat: add configuration dk1

This commit is contained in:
Bladesy 2025-04-04 15:17:03 +01:00
parent 91c91cbf10
commit d91a06a0e7
4 changed files with 102 additions and 0 deletions

View File

@ -1,3 +1,4 @@
{lib}: {
sv1 = lib.callFragment ./sv1.nix {};
dk1 = lib.callFragment ./dk1.nix {};
}

9
configurations/dk1.nix Normal file
View File

@ -0,0 +1,9 @@
{
nixosSystem,
nixosSystems,
nixosModules,
}:
nixosSystem {
system = nixosSystems.x86_64-linux;
modules = [nixosModules.dk1];
}

View File

@ -1,3 +1,4 @@
{
sv1 = import ./sv1.nix;
dk1 = import ./dk1.nix;
}

91
modules/dk1.nix Normal file
View File

@ -0,0 +1,91 @@
{
lib,
config,
pkgs,
...
}: {
imports = with lib.nixosModules; [disko];
disko.devices.disk.NixOS = {
device = "/dev/";
type = "disk";
content = {
type = "gpt";
partitions = {
ESP = {
type = "EF00";
size = "100M";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/efi";
};
};
Swap = {
type = "8200";
size = "16G";
content.type = "swap";
};
Root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
boot = {
loader = {
grub = {
enable = true;
efiSupport = true;
device = "nodev";
};
efi.efiSysMountPoint = "/efi";
};
extraModulePackages = with config.boot.kernelPackages; [rtl88xxau-aircrack];
};
networking = {
hostName = "dk1";
networkmanager.enable = true;
};
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
console.keyMap = "uk";
users = {
mutableUsers = false;
users = {
root = {
isSystemUser = true;
password = "root";
};
user = {
isNormalUser = true;
extraGroups = ["wheel"];
password = "user";
};
};
};
nixpkgs.overlays = with lib.overlays; [pkgs];
environment.systemPackages = with pkgs; [
git
my-vim
];
nix.settings = {
trusted-users = ["root"];
experimental-features = [
"nix-command"
"flakes"
];
};
system.stateVersion = "24.11";
}