Restructured nixos code for better structure. Commented what each package is for.
This commit is contained in:
@ -1,18 +1,11 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
#Access Internet using:
|
||||
#nmcli device wifi list
|
||||
#nmcli device wifi connect <ssid> password <password>
|
||||
# or if no password (open wifi)
|
||||
#nmcli device wifi connect <ssid>
|
||||
|
||||
#Nix flake file limit: ulimit -n 500000
|
||||
|
||||
{ inputs, config, pkgs, lib, username, project, host, version, system, ... }:
|
||||
{
|
||||
# in configuration.nix
|
||||
#Assign Swap to the PC
|
||||
#swapDevices = [{
|
||||
# device = "/swapfile";
|
||||
@ -20,19 +13,18 @@
|
||||
#}];
|
||||
|
||||
imports =
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.grub2-themes.nixosModules.default
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
./hardware-configuration.nix
|
||||
[
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.grub2-themes.nixosModules.default
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
./hardware-configuration.nix
|
||||
|
||||
./firefox.nix
|
||||
./boot-splash.nix
|
||||
./zsh.nix
|
||||
./neovim.nix
|
||||
./packages
|
||||
#./portainer.nix
|
||||
];
|
||||
./firefox.nix
|
||||
./boot-splash.nix
|
||||
./zsh.nix
|
||||
./neovim.nix
|
||||
./packages
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot = {
|
||||
@ -50,15 +42,8 @@
|
||||
efiSupport = true;
|
||||
useOSProber = true;
|
||||
configurationLimit = 5;
|
||||
#splashImage =
|
||||
# extraConfig = ''
|
||||
# menuentry "NixOS - Default" {
|
||||
# set hidden=1
|
||||
# }
|
||||
# '';
|
||||
};
|
||||
|
||||
|
||||
grub2-theme = {
|
||||
enable = true;
|
||||
theme = "whitesur";
|
||||
@ -74,13 +59,29 @@
|
||||
#Apply
|
||||
#Manage flags -> Add bios_grub
|
||||
|
||||
networking.hostName = host;
|
||||
# Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
networking = {
|
||||
|
||||
# Enable networking
|
||||
networkmanager.enable = true;
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
extraHosts = ''
|
||||
100.89.141.79 tail-rpi
|
||||
'';
|
||||
|
||||
hostName = host;
|
||||
# Define your hostname.
|
||||
# wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# proxy.default = "http://user:password@proxy:port/";
|
||||
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Open ports in the firewall.
|
||||
# firewall.allowedTCPPorts = [ ... ];
|
||||
# firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# firewall.enable = false;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
@ -91,13 +92,6 @@
|
||||
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
|
||||
};
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
networking.extraHosts = ''
|
||||
100.89.141.79 tail-rpi
|
||||
'';
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
@ -143,6 +137,31 @@
|
||||
"--accept-routes"
|
||||
];
|
||||
};
|
||||
|
||||
# security.rtkit.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
#jack.enable = true;
|
||||
};
|
||||
|
||||
pipewire.wireplumber = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
"10-bluez-monitor.properties" = {
|
||||
"bluez5.msbc-support" = false;
|
||||
"bluez5.hfphsp-support" = false;
|
||||
"bluez5.hfphsp-backend" = "none"; # Key addition: no backend
|
||||
"bluez5.roles" = [ "a2dp_sink" ];
|
||||
};
|
||||
"11-bluetooth-policy" = {
|
||||
"wireplumber.settings" = {
|
||||
"bluetooth.autoswitch-to-headset-profile" = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
#Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
@ -173,80 +192,56 @@
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#In order for dynamically linked executables to work
|
||||
programs.nix-ld.enable = true;
|
||||
programs = {
|
||||
steam.enable = true;
|
||||
|
||||
programs.ssh.askPassword = lib.mkForce "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass";
|
||||
ssh.askPassword = lib.mkForce "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass";
|
||||
|
||||
programs.steam.enable = true;
|
||||
#In order for dynamically linked executables to work
|
||||
nix-ld.enable = true;
|
||||
};
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
#Enables proprietary, redistributable firmware so hardware devices function properly
|
||||
hardware = {
|
||||
#Enables proprietary, redistributable firmware so hardware devices function properly
|
||||
enableRedistributableFirmware = true;
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
# Mesa should be enabled by default for Vulkan, but you can be explicit
|
||||
enable32Bit = true; # For 32-bit applications
|
||||
extraPackages = with pkgs; [ rocmPackages.clr.icd ];
|
||||
};
|
||||
|
||||
hardware.cpu.amd.updateMicrocode = true;
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
# Shows battery charge of connected devices on supported
|
||||
# Bluetooth adapters. Defaults to 'false'.
|
||||
Experimental = true;
|
||||
# When enabled other devices can connect faster to us, however
|
||||
# the tradeoff is increased power consumption. Defaults to
|
||||
# 'false'.
|
||||
FastConnectable = true;
|
||||
};
|
||||
Policy = {
|
||||
# Enable all controllers when they are found. This includes
|
||||
# adapters present on start as well as adapters that are plugged
|
||||
# in later on. Defaults to 'true'.
|
||||
AutoEnable = true;
|
||||
};
|
||||
graphics = {
|
||||
enable = true;
|
||||
# Mesa should be enabled by default for Vulkan, but you can be explicit
|
||||
enable32Bit = true; # For 32-bit applications
|
||||
extraPackages = with pkgs; [ rocmPackages.clr.icd ];
|
||||
};
|
||||
};
|
||||
|
||||
# security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
#jack.enable = true;
|
||||
};
|
||||
cpu.amd.updateMicrocode = true;
|
||||
|
||||
services.pipewire.wireplumber = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
"10-bluez-monitor.properties" = {
|
||||
"bluez5.msbc-support" = false;
|
||||
"bluez5.hfphsp-support" = false;
|
||||
"bluez5.hfphsp-backend" = "none"; # Key addition: no backend
|
||||
"bluez5.roles" = [ "a2dp_sink" ];
|
||||
};
|
||||
"11-bluetooth-policy" = {
|
||||
"wireplumber.settings" = {
|
||||
"bluetooth.autoswitch-to-headset-profile" = false;
|
||||
amdgpu.opencl.enable = true;
|
||||
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
# Shows battery charge of connected devices on supported
|
||||
# Bluetooth adapters. Defaults to 'false'.
|
||||
Experimental = true;
|
||||
# When enabled other devices can connect faster to us, however
|
||||
# the tradeoff is increased power consumption. Defaults to
|
||||
# 'false'.
|
||||
FastConnectable = true;
|
||||
};
|
||||
Policy = {
|
||||
# Enable all controllers when they are found. This includes
|
||||
# adapters present on start as well as adapters that are plugged
|
||||
# in later on. Defaults to 'true'.
|
||||
AutoEnable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
@ -257,12 +252,28 @@
|
||||
];
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation = {
|
||||
docker.enable = true;
|
||||
|
||||
environment.etc."gitconfig".text = ''
|
||||
[init]
|
||||
defaultBranch = main
|
||||
'';
|
||||
waydroid.enable = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
etc."gitconfig".text = ''
|
||||
[init]
|
||||
defaultBranch = main
|
||||
'';
|
||||
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
# XKB_DEFAULT_LAYOUT = "de";
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1"; #For chromium to work under wayland and with virtual Keyboards (Only really needed for virtual keyboards, but doest hurt ...)
|
||||
TERMINAL = "kitty";
|
||||
};
|
||||
};
|
||||
|
||||
#So no user in the group Wheel has to input the password in order to use sudo
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
@ -273,31 +284,6 @@
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "nvim";
|
||||
# XKB_DEFAULT_LAYOUT = "de";
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1"; #For chromium to work under wayland and with virtual Keyboards (Only really needed for virtual keyboards, but doest hurt ...)
|
||||
TERMINAL = "kitty";
|
||||
};
|
||||
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
|
||||
Reference in New Issue
Block a user