introduce new host
This commit is contained in:
parent
9dfaa540fe
commit
b421c3de68
|
@ -13,7 +13,7 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.${namespace}.submodules.basics = with types; {
|
options.${namespace}.submodules.basics = with types; {
|
||||||
enable = mkBoolOpt false "Whether or not to enable basic configuration.";
|
enable = mkEnableOption "Whether or not to enable basic configuration.";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -29,7 +29,7 @@ in
|
||||||
#optional
|
#optional
|
||||||
pciutils
|
pciutils
|
||||||
usbutils
|
usbutils
|
||||||
htop
|
btop
|
||||||
];
|
];
|
||||||
|
|
||||||
${namespace} = {
|
${namespace} = {
|
||||||
|
|
|
@ -24,7 +24,7 @@ in
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
gitAndTools.gh
|
gitAndTools.gh
|
||||||
gitbutler
|
# gitbutler
|
||||||
];
|
];
|
||||||
|
|
||||||
${namespace}.home.extraOptions = {
|
${namespace}.home.extraOptions = {
|
||||||
|
|
|
@ -48,6 +48,11 @@ in
|
||||||
icon = mkOpt (nullOr package) defaultIcon "The profile picture to use for the user.";
|
icon = mkOpt (nullOr package) defaultIcon "The profile picture to use for the user.";
|
||||||
extraGroups = mkOpt (listOf str) [ ] "Groups for the user to be assigned.";
|
extraGroups = mkOpt (listOf str) [ ] "Groups for the user to be assigned.";
|
||||||
extraOptions = mkOpt attrs { } (mdDoc "Extra options passed to `users.users.<name>`.");
|
extraOptions = mkOpt attrs { } (mdDoc "Extra options passed to `users.users.<name>`.");
|
||||||
|
trustedPublicKeys = mkOption {
|
||||||
|
default = [ ];
|
||||||
|
type = nullOr (listOf str);
|
||||||
|
description = "Trusted public keys for this user for the machine";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
@ -92,6 +97,8 @@ in
|
||||||
# system to select).
|
# system to select).
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
|
|
||||||
|
openssh.authorizedKeys.keys = cfg.trustedPublicKeys;
|
||||||
|
|
||||||
extraGroups = [ "steamcmd" ] ++ cfg.extraGroups;
|
extraGroups = [ "steamcmd" ] ++ cfg.extraGroups;
|
||||||
} // cfg.extraOptions;
|
} // cfg.extraOptions;
|
||||||
};
|
};
|
||||||
|
|
37
systems/x86_64-linux/loptland/default.nix
Normal file
37
systems/x86_64-linux/loptland/default.nix
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
namespace,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib.${namespace}) enabled;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ ./hardware.nix ];
|
||||||
|
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
${namespace} = {
|
||||||
|
submodules = {
|
||||||
|
basics = enabled;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
factorio-server = enabled;
|
||||||
|
};
|
||||||
|
|
||||||
|
user.trustedPublicKeys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHFrDiO5+vMfD5MimkzN32iw3MnSMLZ0mHvOrHVVmLD0"
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
}
|
35
systems/x86_64-linux/loptland/hardware.nix
Normal file
35
systems/x86_64-linux/loptland/hardware.nix
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"ata_piix"
|
||||||
|
"uhci_hcd"
|
||||||
|
"virtio_pci"
|
||||||
|
"sr_mod"
|
||||||
|
"virtio_blk"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostplatform = lib.mkDefault "x86_64-linux";
|
||||||
|
}
|
Loading…
Reference in a new issue