added nuc

This commit is contained in:
Rouven Seifert 2023-01-23 17:30:09 +01:00
parent 9346f157b7
commit c0767193c9
7 changed files with 127 additions and 1 deletions

View file

@ -37,6 +37,14 @@
} }
]; ];
}; };
nuc = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs.inputs = attrs;
modules = [
./hosts/nuc
sops-nix.nixosModules.sops
];
};
}; };
}; };
} }

62
hosts/nuc/default.nix Normal file
View file

@ -0,0 +1,62 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
nix.settings.experimental-features = [ "nix-command" "flakes" ];
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
../../shared/vim.nix
# ../../shared/sops.nix
];
# Use the systemd-boot EFI boot loader.
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
supportedFilesystems = [ "zfs" ];
};
networking.hostName = "nuc"; # Define your hostname.
networking.hostId = "795a4952";
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "dvorak";
};
environment.systemPackages = with pkgs; [
vim
wget
htop
];
programs.git = {
enable = true;
config = {
user.name = "Rouven Seifert";
user.email = "rouven@rfive.de";
};
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keyFiles = [
../../keys/ssh/rouven-thinkpad
../../keys/ssh/rouven-pixel
# ../../keys/ssh/rouven-smartcard
];
system.stateVersion = "22.11"; # Did you read the comment?
}

View file

@ -0,0 +1,56 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "rpool/nixos/root";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/var/lib" =
{
device = "rpool/nixos/var/lib";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/var/log" =
{
device = "rpool/nixos/var/log";
fsType = "zfs";
options = [ "zfsutil" ];
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/7026-251E";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/a861a381-3a9d-4fc7-a4d0-facbe130c219"; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

1
keys/ssh/rouven-thinkpad Normal file
View file

@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILkxTuzjS3EswMfj+wSKu9ciRyStvjDlDUXzkqEUGDaP rouven@thinkpad

View file

@ -1 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDGP2m7ccMts/y/PFtYQraFQ7P7GEJlSGueM+9WS9UeT rouven@thinkpad