Integrate hummelberg desktop configuration

This commit is contained in:
Fabian Hauser 2020-11-30 16:23:45 +01:00
parent e8f2a29484
commit 81eb15d52a
22 changed files with 824 additions and 25 deletions

View file

@ -0,0 +1,30 @@
{ config, pkgs, ... }: {
imports = [
./filesystems.nix
./networking.nix
./printing.nix
#./backup.nix #TODO: Extract applications from desktop role
../../hardware/dell-precision-3530.nix
../../defaults/base
../../defaults/cifs-auth-fix
../../defaults/desktop
../../defaults/development-tools
../../defaults/games
../../defaults/printing
];
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# This value determines the NixOS release from which the default
# settings for stateful data, like file 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.03"; # Did you read the comment?
}

View file

@ -0,0 +1,64 @@
{ config, pkgs, lib, ... }:
let
networkShares = let
hsr_options = [
"defaults"
"noauto"
#"iocharset=utf8"
"soft"
"user=fhauser"
"domain=hsr.ch"
"uid=1000"
"gid=1000"
];
hsr_share = share_name:
{ domain ? "hsr.ch/root", path ? share_name, extra_options ? [ ] }:
lib.nameValuePair "/mnt/hsr/${share_name}" {
device = "//${domain}/${path}";
fsType = "cifs";
options = hsr_options ++ extra_options;
noCheck = true;
};
in lib.mapAttrs' hsr_share {
"skripte".path = "alg/skripte";
"scratch".path = "alg/scratch";
"fhauser".domain = "c101.hsr.ch";
#"fabian.hauser".domain = "svm-c113.ost.ch"; # User!
"afe" = { };
"auw" = { };
"ebooks" = {
path = "alg/ebooks";
extra_options = [ "ro" ];
};
};
in {
boot.initrd.luks.devices = {
"root".device = "/dev/disk/by-uuid/28d2914f-c053-40a8-ad90-f2743190c772";
"swap".device = "/dev/disk/by-uuid/ed89158d-4460-4012-86d7-f8761127371c";
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/6396b6eb-a7e6-430c-8c97-970404f88b35";
fsType = "btrfs";
options = [ "subvol=nixos" ];
};
"/home" = {
device = "/dev/disk/by-uuid/6396b6eb-a7e6-430c-8c97-970404f88b35";
fsType = "btrfs";
options = [ "subvol=home" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/E86E-3C6C";
fsType = "vfat";
};
} // networkShares;
swapDevices = [{ device = "/dev/mapper/swap"; }];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

View file

@ -0,0 +1,15 @@
{ config, pkgs, ... }:
{
networking = {
networkmanager.enable = true;
useDHCP = false;
#wireless.enable = true; # Enables wireless support via wpa_supplicant.
hostName = "hummelberg";
};
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
}

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