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

View file

@ -181,6 +181,15 @@
position = "4480,0";
})
];
home-pc.outputs = [
(mkScreen "Dell Inc. DELL P2720DC 22JPK53" // {
position = "0,0";
})
(mkScreen "Unknown HP Z27 CN482201RP" // {
position = "2560,0";
scale = 1.5;
})
];
};
};
# TODO: Move these services elsewhere

20
hardware/amd-board.nix Normal file
View file

@ -0,0 +1,20 @@
{ config, lib, pkgs, modulesPath, ... }: {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
"xhci_pci"
"ahci"
"virtio-pci"
"igb"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
hardware.cpu.amd.updateMicrocode = true;
nix.maxJobs = lib.mkDefault 24;
}

View file

@ -1,5 +1,6 @@
{ config, pkgs, ... }: {
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.initrd.luks.devices = {
"system".device = "/dev/disk/by-uuid/ba646016-2618-4d9b-acf2-41986ab76f7e";
"data".device = "/dev/disk/by-uuid/6cfe504d-992f-4b11-be3e-31d00c3e108d";

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";
};
}];
}