Compare commits

...

2 Commits

4 changed files with 73 additions and 5 deletions

15
backup-target.nix Normal file
View File

@@ -0,0 +1,15 @@
# configuration allowing this machine to be user as a backup server
{ config, lib, pkgs, ... }:
{
users.users.backup = {
isNormalUser = true;
openssh.authorizedKeys.keys = [
''command="${pkgs.rrsync}/bin/rrsync /mnt/backup/",restrict sh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF1e7hxxQD7pVKMquEuiBrLNFfx9ZRAOU1SGky4iXacD Ithuriel@openmediavault''
];
packages = [
pkgs.rsync
];
};
}

View File

@@ -5,11 +5,6 @@
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;

View File

@@ -20,6 +20,8 @@
system = "x86_64-linux";
specialArgs = inputs;
modules = [
./hardware/desk.nix
./configuration.nix
./nvidia.nix
./plasma.nix

56
hardware/desk.nix Normal file
View File

@@ -0,0 +1,56 @@
# 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.
##test
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "NIX_DESK_POOL/root";
fsType = "zfs";
};
fileSystems."/nix" =
{ device = "NIX_DESK_POOL/nix";
fsType = "zfs";
};
fileSystems."/var" =
{ device = "NIX_DESK_POOL/var";
fsType = "zfs";
};
fileSystems."/home" =
{ device = "NIX_DESK_POOL/home";
fsType = "zfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/E943-DA32";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/7e1ada61-7a9b-4d28-b608-23d1ac7f4e29"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}