Format using nixfmt rfc style
This commit is contained in:
parent
d07a224bbc
commit
f6be5f8b80
37 changed files with 934 additions and 612 deletions
|
|
@ -1,4 +1,5 @@
|
|||
{ pkgs, config, lib, ... }: {
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
modules = {
|
||||
|
|
@ -26,20 +27,27 @@
|
|||
|
||||
services.tlp.enable = true;
|
||||
|
||||
home-manager.users.${config.user.name} = { pkgs, config, ... }: {
|
||||
services.network-manager-applet.enable = true;
|
||||
services.blueman-applet.enable = true;
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
dwindle.no_gaps_when_only = 1;
|
||||
home-manager.users.${config.user.name} =
|
||||
{ _ }:
|
||||
{
|
||||
services.network-manager-applet.enable = true;
|
||||
services.blueman-applet.enable = true;
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
dwindle.no_gaps_when_only = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.pipewire.wireplumber.extraConfig = {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.enable-sbc-xq" = true;
|
||||
"bluez5.enable-msbc" = true;
|
||||
"bluez5.enable-hw-volume" = true;
|
||||
"bluez5.roles" = [ "hsp_hs" "hsp_ag" "hfp_hf" "hfp_ag" ];
|
||||
"bluez5.roles" = [
|
||||
"hsp_hs"
|
||||
"hsp_ag"
|
||||
"hfp_hf"
|
||||
"hfp_ag"
|
||||
];
|
||||
};
|
||||
};
|
||||
system.stateVersion = "21.05";
|
||||
|
|
|
|||
|
|
@ -1,19 +1,28 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{ modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [ "nvme" "xhci_pci" "sdhci_pci" ];
|
||||
initrd.kernelModules = [ "dm-snapshot" ];
|
||||
initrd = {
|
||||
availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"sdhci_pci"
|
||||
];
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
};
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
# Required, otherwise the kernel freezes on boot
|
||||
kernelParams = [ "amd_iommu=on" "iommu=pt" "pci=noats" ];
|
||||
kernelParams = [
|
||||
"amd_iommu=on"
|
||||
"iommu=pt"
|
||||
"pci=noats"
|
||||
];
|
||||
extraModulePackages = [ ];
|
||||
loader.systemd-boot.enable = true;
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
initrd.luks.devices."crypted".device =
|
||||
"/dev/disk/by-uuid/1e900b2e-daea-4558-b18f-3d3a5843de61";
|
||||
initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/1e900b2e-daea-4558-b18f-3d3a5843de61";
|
||||
};
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
|
@ -28,8 +37,7 @@
|
|||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/bb8fa9ef-9b8f-413d-913a-6c891649a954"; }];
|
||||
swapDevices = [ { device = "/dev/disk/by-uuid/bb8fa9ef-9b8f-413d-913a-6c891649a954"; } ];
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
|
|
@ -37,7 +45,11 @@
|
|||
bluetooth = {
|
||||
enable = true;
|
||||
# Enable A2DP Sink
|
||||
settings = { General = { Enable = "Source,Sink,Media,Socket"; }; };
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
{ pkgs, config, lib, ... }: {
|
||||
{ ... }:
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
modules = {
|
||||
|
|
|
|||
|
|
@ -19,28 +19,29 @@
|
|||
loader.efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/f1e21558-88e6-413e-b56a-04e0b25e9ddd";
|
||||
fsType = "ext4";
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-uuid/f1e21558-88e6-413e-b56a-04e0b25e9ddd";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-uuid/CCD1-0415";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
"/home/froidmpa/Nextcloud" = {
|
||||
device = "/dev/disk/by-uuid/a4ba8b21-ea33-4487-b6f6-9bb7470a0acb";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
"/home/froidmpa/Backup" = {
|
||||
device = "/dev/disk/by-uuid/7fdc4e44-ecb4-49c7-9fb0-cb1ef6235b05";
|
||||
fsType = "ext4";
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/CCD1-0415";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/home/froidmpa/Nextcloud" = {
|
||||
device = "/dev/disk/by-uuid/a4ba8b21-ea33-4487-b6f6-9bb7470a0acb";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/home/froidmpa/Backup" = {
|
||||
device = "/dev/disk/by-uuid/7fdc4e44-ecb4-49c7-9fb0-cb1ef6235b05";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-uuid/f714775c-b5af-4c0c-8330-999b43db4794"; }];
|
||||
swapDevices = [ { device = "/dev/disk/by-uuid/f714775c-b5af-4c0c-8330-999b43db4794"; } ];
|
||||
|
||||
zramSwap.enable = true;
|
||||
|
||||
|
|
@ -54,11 +55,14 @@
|
|||
enable = true;
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
extraPackages = with pkgs; [ rocm-opencl-icd rocm-opencl-runtime amdvlk ];
|
||||
extraPackages = with pkgs; [
|
||||
rocm-opencl-icd
|
||||
rocm-opencl-runtime
|
||||
amdvlk
|
||||
];
|
||||
};
|
||||
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
services.resolved.dnssec = "false";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,28 @@
|
|||
{ inputs, pkgs, ... }: {
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
|
||||
nix = {
|
||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
};
|
||||
|
||||
boot.loader.grub.enable = false;
|
||||
boot.loader.generic-extlinux-compatible.enable = true;
|
||||
boot.kernelParams = [ "cma=256M" ];
|
||||
boot = {
|
||||
loader.grub.enable = false;
|
||||
loader.generic-extlinux-compatible.enable = true;
|
||||
kernelParams = [ "cma=256M" ];
|
||||
};
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [{
|
||||
device = "/swapfile";
|
||||
size = 1024;
|
||||
}];
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 1024;
|
||||
}
|
||||
];
|
||||
|
||||
services.openssh.enable = true;
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
|
|
@ -33,15 +38,20 @@
|
|||
mutableSettings = false;
|
||||
|
||||
settings = {
|
||||
http = { address = "0.0.0.0:80"; };
|
||||
http = {
|
||||
address = "0.0.0.0:80";
|
||||
};
|
||||
auth_attempts = 5;
|
||||
block_auth_min = 15;
|
||||
dns = {
|
||||
bind_hosts = [ "0.0.0.0" ];
|
||||
port = 53;
|
||||
statistics_interval = 90;
|
||||
upstream_dns =
|
||||
[ "tls://doh.mullvad.net" "[/lan/]192.168.1.1" "[//]192.168.1.1" ];
|
||||
upstream_dns = [
|
||||
"tls://doh.mullvad.net"
|
||||
"[/lan/]192.168.1.1"
|
||||
"[//]192.168.1.1"
|
||||
];
|
||||
local_ptr_upstreams = [ "192.168.1.1" ];
|
||||
use_private_ptr_resolvers = true;
|
||||
resolve_clients = true;
|
||||
|
|
@ -64,11 +74,19 @@
|
|||
};
|
||||
};
|
||||
|
||||
networking.hostName = "rpi3";
|
||||
networking.firewall.allowedTCPPorts = [ 53 80 ];
|
||||
networking.firewall.allowedUDPPorts = [ 53 ];
|
||||
networking = {
|
||||
hostName = "rpi3";
|
||||
firewall.allowedTCPPorts = [
|
||||
53
|
||||
80
|
||||
];
|
||||
firewall.allowedUDPPorts = [ 53 ];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ vim htop-vim ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
htop-vim
|
||||
];
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue