added sanddorn config

This commit is contained in:
revol-xut 2022-04-10 13:59:39 +02:00
parent 10ece5d65f
commit a8a8e6bad5
No known key found for this signature in database
GPG key ID: B966009D57E69CC6
28 changed files with 327 additions and 38 deletions

29
hosts/birne/configuration.nix Normal file → Executable file
View file

@ -8,21 +8,12 @@
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
../../modules/base.nix
../../modules/autoupdate.nix
../../modules/desktop.nix
../../modules/printing.nix
../../modules/wifi.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Set your time zone.
time.timeZone = "Europe/Busingen";
networking = {
hostName = "birne";
interfaces.wlp4s0.useDHCP = true;
@ -34,33 +25,13 @@
};
nixpkgs.config.allowUnfree = true;
nix = {
package = pkgs.nixUnstable; # or versioned attributes like nix_2_4
extraOptions = ''
experimental-features = nix-command flakes
'';
};
# Enable CUPS to print documents.
# services.printing.enable = true;
# Enable sound.
# sound.enable = true;
# hardware.pulseaudio.enable = true;
users.users.printer = {
isNormalUser = true;
password = "printer";
extraGroups = [];
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
git
firefox
];

0
hosts/birne/hardware-configuration.nix Normal file → Executable file
View file

View file

@ -0,0 +1,42 @@
{ config, lib, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
boot = {
loader = {
grub.enable = false;
raspberryPi = {
enable = true;
version = 3;
uboot.enable = true;
};
};
kernelPackages = pkgs.linuxPackages_latest;
# No ZFS on latest kernel:
tmpOnTmpfs = true;
};
networking = {
hostName = "sanddorn";
useDHCP = false;
interfaces.eth0.useDHCP = true;
interfaces.wlan0.useDHCP = true;
firewall.enable = false;
};
# Do not log to flash:
services.journald.extraConfig = ''
Storage=volatile
'';
security.sudo = {
enable = true;
wheelNeedsPassword = false;
};
system.stateVersion = "21.11";
}

View file

@ -0,0 +1,48 @@
# 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 = [ "usbhid" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
boot.kernelParams = [ "snd_bcm2835.enable_headphones=1" ];
boot.blacklistedKernelModules = [ "vc4_hdmi" ];
fileSystems = {
"/boot" = {
device = "/dev/disk/by-label/FIRMWARE";
fsType = "vfat";
};
"/swap" = {
device = "/dev/disk/by-uuid/SWAP";
fsType = "btrfs";
options = [ "subvol=swap" "compress=lzo" "noatime" ]; # Note these options effect the entire BTRFS filesystem and not just this volume, with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
};
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
};
};
swapDevices = [{
device = "/swap/swapfile";
size = (1024 * 2);
}];
hardware.enableRedistributableFirmware = true;
#networking.wireless.enable = true;
boot.loader.raspberryPi.firmwareConfig = ''
gpu_mem=192
dtparam=audio=on
'';
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}

0
hosts/tomate/.gitkeep Normal file → Executable file
View file