A new start

This commit is contained in:
Andrea Ciceri 2021-09-29 21:37:59 +02:00
commit 72271e8cae
78 changed files with 2472 additions and 0 deletions

18
hosts/bootstrap.nix Normal file
View file

@ -0,0 +1,18 @@
{ profiles, ... }:
{
# build with: `bud build bootstrap bootstrapIso`
# reachable on the local link via ssh root@fe80::47%eno1
# where 'eno1' is replaced by your own machine's network
# interface that has the local link to the target machine
imports = [
# profiles.networking
profiles.core
profiles.users.root # make sure to configure ssh keys
profiles.users.ccr
];
boot.loader.systemd-boot.enable = true;
# will be overridden by the bootstrapIso instrumentation
fileSystems."/" = { device = "/dev/disk/by-label/nixos"; };
}

View file

@ -0,0 +1,51 @@
{ config, lib, pkgs, profiles, pbpKernelLatest, ... }:
{
imports = with profiles; [ mount-nas sshd dbus ];
boot = {
initrd.availableKernelModules = [ "usbhid" ];
kernelPackages = pbpKernelLatest;
kernelModules = [ ];
extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
loader = {
grub.enable = false;
generic-extlinux-compatible.enable = true;
};
};
hardware = {
opengl.enable = true;
pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
};
};
networking = {
useDHCP = false;
interfaces.wlan0.useDHCP = true;
networkmanager.enable = true;
};
time.timeZone = "Europe/Rome";
location.provider = "geoclue2";
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/5aa67d2d-93fd-4e7c-b634-aa8d7b65bbb8";
fsType = "btrfs";
};
"/boot" = {
device = "/dev/disk/by-uuid/C406-2AFC";
fsType = "vfat";
};
};
swapDevices =
[{ device = "/dev/disk/by-uuid/e236d328-496e-4cf8-ba54-857789ca258f"; }];
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}

9
hosts/pbp/default.nix Normal file
View file

@ -0,0 +1,9 @@
{ suites, ... }:
{
imports = [
./configuration.nix
] ++ suites.base;
bud.enable = true;
bud.localFlakeClone = "/home/andrea/fleet";
}

View file

@ -0,0 +1,47 @@
{ config, lib, pkgs, profiles, ... }:
{
imports = with profiles; [ mount-nas sshd dbus avahi printing ];
boot = {
initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
extraModprobeConfig = ''
options v42loopback exclusive_caps=1 max_buffers=2
'';
binfmt.emulatedSystems = [ "aarch64-linux" ];
loader.grub = pkgs.lib.mkForce {
enable = true;
version = 2;
device = "/dev/sda";
};
};
sound.enable = true;
hardware = {
opengl.enable = true;
pulseaudio = {
enable = true;
package = pkgs.pulseaudioFull;
};
};
fileSystems."/" =
{
device = "/dev/disk/by-label/nixos";
fsType = "btrfs";
};
swapDevices =
[{ device = "/dev/disk/by-label/swap"; }];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

9
hosts/pc/default.nix Normal file
View file

@ -0,0 +1,9 @@
{ suites, ... }:
{
imports = [
./configuration.nix
] ++ suites.base;
bud.enable = true;
bud.localFlakeClone = "/home/andrea/fleet";
}