Add bachtel config
This commit is contained in:
parent
cb2c45fd4e
commit
d395f45f91
7 changed files with 127 additions and 10 deletions
28
defaults/hardware/apu.nix
Normal file
28
defaults/hardware/apu.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
# 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.loader.grub.extraConfig =
|
||||
"\n serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1\n terminal_input serial\n terminal_output serial\n ";
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"ehci_pci"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sdhci_pci"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" "virtio" "tun" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelParams = [ "console=ttyS0,115200n8" ];
|
||||
|
||||
# CPU Configuration
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
nix.maxJobs = lib.mkDefault 4;
|
||||
}
|
|
@ -1 +1 @@
|
|||
Subproject commit 5f75497e0f9a19ab4a2f509e177163a012c888d6
|
||||
Subproject commit dd6ec3ad8996533f49320f13e340d3f9966195ef
|
16
flake.lock
generated
16
flake.lock
generated
|
@ -54,11 +54,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1658826464,
|
||||
"narHash": "sha256-94ZTF0uIX/iZdiD4RJ5f933ak/OM4XLl7hF+gCa4Iuk=",
|
||||
"lastModified": 1658916876,
|
||||
"narHash": "sha256-BG7MCClmy9esk8pZLCtKoggNv91tAMm7P6dGHXMl3zc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ce49cb7792a7ffd65ef352dda1110a4e4a204eac",
|
||||
"rev": "2b0dd45aca6a260762395ca2e94beab247f455a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -108,11 +108,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1658502202,
|
||||
"narHash": "sha256-Qo0A+x/rbxtlTaB4+DtCYvM2+8UWC1lrvXg09hM2Mm4=",
|
||||
"ref": "HEAD",
|
||||
"rev": "5f75497e0f9a19ab4a2f509e177163a012c888d6",
|
||||
"revCount": 16,
|
||||
"lastModified": 1659046155,
|
||||
"narHash": "sha256-/e2GlMu4YjuXv0J/ylEE89eKl477Q7aG3vjsvh7HPDs=",
|
||||
"ref": "master",
|
||||
"rev": "dd6ec3ad8996533f49320f13e340d3f9966195ef",
|
||||
"revCount": 17,
|
||||
"type": "git",
|
||||
"url": "file:///etc/nixos/defaults/threema"
|
||||
},
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
inherit system;
|
||||
config.allowUnfree = true; # For vscode
|
||||
};
|
||||
hosts = [ "speer" "hummelberg" "ochsenchopf" ];
|
||||
hosts = [ "speer" "hummelberg" "ochsenchopf" "bachtel" ];
|
||||
in {
|
||||
checks.${system}.formatCheck = let pkgs = pkgsUnstable;
|
||||
in pkgs.runCommand "nixfmt-check" { } ''
|
||||
|
|
27
host/bachtel/default.nix
Normal file
27
host/bachtel/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, pkgs, threemaModules, ... }: {
|
||||
|
||||
imports = [
|
||||
./networking.nix
|
||||
./filesystems.nix
|
||||
../../defaults/base
|
||||
../../defaults/hardware/apu.nix
|
||||
];
|
||||
|
||||
# Set your time zone.
|
||||
# time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
# users.users.jane = {
|
||||
# isNormalUser = true;
|
||||
# extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
# };
|
||||
|
||||
# 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. It‘s 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 = "22.05"; # Did you read the comment?
|
||||
|
||||
}
|
20
host/bachtel/filesystems.nix
Normal file
20
host/bachtel/filesystems.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ config, pkgs, threemaModules, ... }: {
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/360a6bc9-fc4e-4803-bd53-69320ac32ac5";
|
||||
fsType = "btrfs";
|
||||
options = [ "defaults" "subvol=nixos" "noatime" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/73f91e99-d856-4504-b6b2-d60f855d6d95"; }];
|
||||
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.version = 2;
|
||||
# boot.loader.grub.efiSupport = true;
|
||||
# boot.loader.grub.efiInstallAsRemovable = true;
|
||||
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
# Define on which hard drive you want to install Grub.
|
||||
boot.loader.grub.device = "/dev/sda"; # or "nodev" for efi only
|
||||
}
|
42
host/bachtel/networking.nix
Normal file
42
host/bachtel/networking.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ config, pkgs, threemaModules, ... }: {
|
||||
|
||||
services.qois.wwan = {
|
||||
enable = true;
|
||||
apn = "gprs.swisscom.ch";
|
||||
networkInterface = "wwp0s19u1u3i12";
|
||||
};
|
||||
|
||||
services.qois.router = {
|
||||
enable = true;
|
||||
wanInterface = "enp1s0";
|
||||
wirelessInterfaces = [ "wlp5s0" ];
|
||||
lanInterfaces = [ "enp2s0" "enp3s0" "enp4s0" ];
|
||||
internalRouterIP = "10.2.1.1";
|
||||
dhcp = {
|
||||
enable = true;
|
||||
localDomain = "iot-bachtel-lan.net.fh2.ch";
|
||||
dhcpRange = "10.2.1.2,10.2.1.249";
|
||||
};
|
||||
#recursiveDns = {
|
||||
# enable = true;
|
||||
# networkIdIp = "10.2.1.0";
|
||||
#};
|
||||
wireless = {
|
||||
enable = true;
|
||||
wleInterface24Ghz = "wlp5s0";
|
||||
#wleInterface5Ghz = "wlp5s0";
|
||||
ssid = "jona-iot";
|
||||
passphrase = "vrzjYq36xA";
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "bachtel"; # Define your hostname.
|
||||
#networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
#networking.wireless.networks = {
|
||||
# yummi = {
|
||||
# psk = "cookies!";
|
||||
# };
|
||||
#};
|
||||
networking.interfaces.enp1s0.useDHCP = true;
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue