cleanup configurations

This commit is contained in:
♥ Minnie ♥ 2023-05-16 13:57:01 +08:00
parent 7d0d1b7ffc
commit 0243be74c8
2 changed files with 48 additions and 75 deletions

View file

@ -13,6 +13,12 @@
# You can also split up your configuration and import pieces of it here: # You can also split up your configuration and import pieces of it here:
# Containers
./containers/homepage.nix
./containers/jellyfin.nix
./containers/sonarr.nix
./containers/radarr.nix
# Import your generated (nixos-generate-config) hardware configuration # Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -80,10 +86,6 @@
boot = { boot = {
# Kernel to install # Kernel to install
kernelPackages = pkgs.linuxPackages_rpi4; kernelPackages = pkgs.linuxPackages_rpi4;
tmp.useTmpfs = true;
initrd.availableKernelModules = [ "usbhid" "usb_storage" ];
# ttyAMA0 is the serial console broken out to the GPIO # ttyAMA0 is the serial console broken out to the GPIO
kernelParams = [ kernelParams = [
@ -100,96 +102,73 @@
# Enables the generation of /boot/extlinux/extlinux.conf # Enables the generation of /boot/extlinux/extlinux.conf
generic-extlinux-compatible.enable = true; generic-extlinux-compatible.enable = true;
}; };
# Mount a tmpfs on /tmp during boot
tmpOnTmpfs = true;
}; };
# Required for the Wireless firmware hardware = {
hardware.enableRedistributableFirmware = true; # Required for the Wireless firmware
enableRedistributableFirmware = true;
};
networking = { networking = {
hostName = "lavender"; hostName = "lavender";
domain = "kanto.dev";
networkmanager = { networkmanager = {
enable = true; enable = true;
}; };
}; };
# Install docker
virtualisation.docker = {
enable = true;
# Reduce container downtime due to daemon crashes
liveRestore = false;
};
environment = {
systemPackages = with pkgs; [
# System tools
vim wget git home-manager
# Developer tools
docker-compose
# Configure keymap in X11 arion docker-client
# services.xserver.layout = "us"; ];
# services.xserver.xkbOptions = {
# "eurosign:e"; # Completions for system packages
# "caps:escape" # map caps to escape. pathsToLink = [ "/share/zsh" ];
# }; };
# Enable CUPS to print documents. # Some programs need SUID wrappers, can be configured further or are
# services.printing.enable = true; # started in user sessions.
programs = {
# Enable sound. zsh.enable = true;
# sound.enable = true; gnupg.agent = {
# hardware.pulseaudio.enable = true; enable = true;
enableSSHSupport = true;
# Enable touchpad support (enabled default in most desktopManager). };
# services.xserver.libinput.enable = true; };
# List services that you want to enable:
services = {
# Enable the OpenSSH daemon.
openssh = {
enable = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
};
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.admin = { users.users.admin = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "docker" "wheel" ]; # Enable sudo for the user. extraGroups = [ "docker" "networkmanager" "wheel" ];
shell = pkgs.zsh; shell = pkgs.zsh;
openssh.authorizedKeys.keyFiles = [ ../fuchsia/id_ed25519_sk.pub ]; openssh.authorizedKeys.keyFiles = [ ../fuchsia/id_ed25519_sk.pub ];
}; };
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
git
home-manager
docker-compose
];
environment.pathsToLink = [ "/share/zsh" ];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.zsh.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
# Open ports in the firewall. # Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether. # Or disable the firewall altogether.
# networking.firewall.enable = false; # networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions # settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave # on your system were taken. Its perfectly fine and recommended to leave
@ -197,6 +176,5 @@
# 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 = "22.11"; # Did you read the comment? system.stateVersion = "22.11"; # Did you read the comment?
} }

View file

@ -8,7 +8,7 @@
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@ -18,11 +18,6 @@
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/drive/HDD1" =
{ device = "/dev/disk/by-uuid/3548fbc6-6efd-4ed1-acc1-bd3ffed9d7a7";
fsType = "ext4";
};
swapDevices = [ ]; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking