✨ [pi4] Split module config
This commit is contained in:
16
hosts/pi4/boot.nix
Normal file
16
hosts/pi4/boot.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
@ -1,45 +1,15 @@
|
||||
{
|
||||
pkgs,
|
||||
systemConfig,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
||||
initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
networking = {
|
||||
hostName = systemConfig.hostName;
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
services.pcscd.enable = true;
|
||||
imports = [
|
||||
./boot.nix
|
||||
./hardware.nix
|
||||
./networking.nix
|
||||
./security.nix
|
||||
];
|
||||
|
||||
system.stateVersion = systemConfig.version;
|
||||
|
||||
|
12
hosts/pi4/hardware.nix
Normal file
12
hosts/pi4/hardware.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
# TODO mount ext hdd
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
{
|
||||
lib,
|
||||
inputs,
|
||||
outputs,
|
||||
systemConfig,
|
||||
...
|
||||
@ -7,9 +8,10 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
(lib.custom.relativeToRoot "shared/home-manager/btop.nix")
|
||||
(lib.custom.relativeToRoot "shared/home-manager/development/git.nix")
|
||||
(lib.custom.relativeToRoot "shared/home-manager/development/nixvim.nix")
|
||||
(lib.custom.relativeToRoot "shared/home-manager/development/nixvim")
|
||||
(lib.custom.relativeToRoot "shared/home-manager/fastfetch.nix")
|
||||
(lib.custom.relativeToRoot "shared/home-manager/fish.nix")
|
||||
(lib.custom.relativeToRoot "shared/home-manager/gpg.nix")
|
||||
|
10
hosts/pi4/networking.nix
Normal file
10
hosts/pi4/networking.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ systemConfig, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = systemConfig.hostName;
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
services.openssh.enable = true;
|
||||
}
|
7
hosts/pi4/security.nix
Normal file
7
hosts/pi4/security.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
services.pcscd.enable = true;
|
||||
}
|
Reference in New Issue
Block a user