Add speer

This commit is contained in:
Fabian Hauser 2021-05-03 14:10:55 +02:00
parent c754f862b6
commit 7ff389b92c
7 changed files with 142 additions and 0 deletions

42
host/speer/default.nix Normal file
View file

@ -0,0 +1,42 @@
{ config, pkgs, ... }: {
imports = [
./filesystems.nix
./networking.nix
#./printing.nix
#./backup.nix #TODO: Extract applications from desktop role
../../hardware/amd-board.nix
../../defaults/base
../../defaults/cifs-auth-fix
../../defaults/desktop
../../defaults/games
../../defaults/user-configuration
../../defaults/user-configuration/fhauser
#../../defaults/printing
];
#TODO: Clean up next section
#services.xserver.dpi = 180;
virtualisation = { # TODO: This should probably be somewhere else.
docker = {
enable = true;
enableOnBoot = false;
};
libvirtd.enable = true;
};
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# This value determines the NixOS release from which the default
# settings for stateful data, like fi:le locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.09"; # Did you read the comment?
}

View file

@ -0,0 +1,28 @@
{ config, pkgs, lib, ... }: {
boot.initrd.luks.devices.system.device = "/dev/disk/by-uuid/bf353bb1-43bf-453f-ae7e-0fa9b4d8778c";
boot.initrd.kernelModules = [ "dm-snapshot" ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/661ad230-72da-4326-bb3a-4965006475f8";
fsType = "btrfs";
options = [ "subvol=nixos" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/661ad230-72da-4326-bb3a-4965006475f8";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A5C5-1372";
fsType = "vfat";
};
swapDevices = [];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

26
host/speer/networking.nix Normal file
View file

@ -0,0 +1,26 @@
{ config, pkgs, ... }:
{
networking = {
networkmanager.enable = true;
useDHCP = false;
#wireless.enable = true; # Enables wireless support via wpa_supplicant.
hostName = "speer";
};
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
#networking.wireguard.enable = true;
#networking.wireguard.interfaces = let
# meta = import ../../meta;
# vnetworks = meta.network.virtual;
# vnetworkName = "mgmt";
#in {
# "wg-${vnetworkName}" =
# pkgs.lib.qois.wireguard.makeInterface config.networking.hostName
# vnetworkName vnetworks.${vnetworkName};
#};
}

16
host/speer/printing.nix Normal file
View file

@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
hardware.printers.ensureDefaultPrinter = "hsr-mfp-8261";
hardware.printers.ensurePrinters = [{
name = "hsr-mfp-8261";
deviceUri = "smb://hsr.ch/printsrv-d.hsr.ch/d8261-a4mfp";
location = "HSR 8.261";
model = "HP/hp-color_laserjet_mfp_m577-ps.ppd.gz";
ppdOptions = {
Duplex = "DuplexNoTumble";
PageSize = "A4";
auth-info-required = "username,password";
};
}];
}