[NixOS] Automatically add configurations for machine files

This commit is contained in:
2021-08-20 19:19:50 -06:00
parent 5b9febb4d8
commit 4fbef3f0a3
4 changed files with 37 additions and 58 deletions

View File

@@ -7,7 +7,6 @@
networking.hostName = "air-gapped-pi";
hardware.video.hidpi.enable = true;
networking.enable = false;
system.stateVersion = "21.05";
}

View File

@@ -2,11 +2,12 @@
{
imports = [
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
../users.nix
../full.nix
# ../cachix.nix
];
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
@@ -45,43 +46,15 @@
nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
boot.initrd.luks.devices = [
{
name = "root";
device = "/dev/sda3";
preLVM = true;
}
];
# boot.initrd.luks.devices."cryptroot" = {
# name = "root";
# device = "/dev/sda3";
# preLVM = true;
# };
networking.hostName = "imalison-home";
boot.loader.efi.canTouchEfiVariables = true;
services.samba = {
enable = true;
syncPasswordsByPam = true;
extraConfig = ''
workgroup = WORKGROUP
server string = smbnix
netbios name = smbnix
#use sendfile = yes
#max protocol = smb2
hosts allow = 192.168.0 localhost
hosts deny = 0.0.0.0/0
'';
shares = {
private = {
path = "/backups";
browseable = "yes";
"read only" = "no";
"guest ok" = "no";
"create mask" = "0644";
"directory mask" = "0755";
"force user" = "username";
"force group" = "groupname";
};
};
};
services.xserver = {
screenSection = ''
DefaultDepth 24

View File

@@ -2,12 +2,13 @@
{
imports = [
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
../full.nix
../games.nix
../extra.nix
];
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ pkgs.linuxPackages.rtl8814au ];