This commit is contained in:
Sandro - 2021-09-07 21:13:41 +02:00
parent c6f8c97378
commit 69e9cf8d2e
Signed by: sandro
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -11,17 +11,21 @@ in {
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
boot.loader.grub.enable = false; boot = {
boot.loader.generic-extlinux-compatible.enable = false; loader = {
boot.loader.raspberryPi = { grub.enable = false;
enable = true; generic-extlinux-compatible.enable = false;
version = 4; raspberryPi = {
uboot.enable = false; enable = true;
}; version = 4;
#boot.kernelPackages = pkgs.linuxPackages_rpi4; uboot.enable = false;
boot.kernelPackages = pkgs.linuxPackages_latest; };
};
#kernelPackages = pkgs.linuxPackages_rpi4;
kernelPackages = pkgs.linuxPackages_latest;
boot.tmpOnTmpfs = true; tmpOnTmpfs = true;
};
c3d2 = { c3d2 = {
isInHq = true; isInHq = true;
@ -29,17 +33,22 @@ in {
hq.interface = "eth0"; hq.interface = "eth0";
}; };
nix.buildCores = 4; nix = {
nix.maxJobs = 4; buildCores = 4;
maxJobs = 4;
};
networking.hostName = "pulsebert"; # Define your hostname. networking = {
hostName = "pulsebert"; # Define your hostname.
# The global useDHCP flag is deprecated, therefore explicitly set to false here. # The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config # Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour. # replicates the default behaviour.
networking.useDHCP = false; useDHCP = false;
networking.interfaces.eth0.useDHCP = true; interfaces.eth0.useDHCP = true;
networking.interfaces.wlan0.useDHCP = true; interfaces.wlan0.useDHCP = true;
firewall.enable = false;
};
# List packages installed in system profile. To search, run: # List packages installed in system profile. To search, run:
# $ nix search wget # $ nix search wget
@ -61,8 +70,10 @@ in {
''; '';
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh.enable = true; services.openssh = {
services.openssh.permitRootLogin = "yes"; enable = true;
permitRootLogin = "yes";
};
security.sudo = { security.sudo = {
enable = true; enable = true;
wheelNeedsPassword = false; wheelNeedsPassword = false;
@ -73,8 +84,6 @@ in {
extraGroups = [ "wheel" "audio" ]; extraGroups = [ "wheel" "audio" ];
}; };
networking.firewall.enable = false;
# Enable sound. # Enable sound.
sound.enable = true; sound.enable = true;
hardware.bluetooth = { hardware.bluetooth = {
@ -108,9 +117,11 @@ in {
# tell Avahi to publish CUPS and PulseAudio # tell Avahi to publish CUPS and PulseAudio
services.avahi = { services.avahi = {
enable = true; enable = true;
publish.enable = true; publish = {
publish.addresses = true; enable = true;
publish.userServices = true; addresses = true;
userServices = true;
};
}; };
security.acme = { security.acme = {
@ -183,8 +194,7 @@ in {
}; };
# Allow access to printer serial port and GPIO # Allow access to printer serial port and GPIO
users.users.${config.services.octoprint.user}.extraGroups = users.users.${config.services.octoprint.user}.extraGroups = [ "dialout" "gpio" ];
[ "dialout" "gpio" ];
services.mjpg-streamer = { services.mjpg-streamer = {
enable = true; enable = true;
@ -205,5 +215,4 @@ in {
# Before changing this value read the documentation for this option # Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.09"; # Did you read the comment? system.stateVersion = "20.09"; # Did you read the comment?
} }