push new config

Signed-off-by: Jo <johannesreckers2006@gmail.com>
This commit is contained in:
Jo 2024-07-23 08:36:03 +02:00
parent 23635a9bda
commit 1defa37a73
11 changed files with 534 additions and 69 deletions

View file

@ -0,0 +1,177 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# Instance of `pkgs` with overlays and custom packages applied.
pkgs,
# All flake inputs.
inputs,
# Additional metadata, provided by Snowfall Lib.
namespace, # The flake namespace, set in flake.nix. If not set, defaults to "internal".
system, # The system architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
format, # A normalized name for the system target (eg. `iso`).
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
systems, # An attribute map of your defined hosts.
# All other arguments come from the system system.
config,
...
}: {
imports = [
./hardware-configuration.nix
inputs.hardware.nixosModules.common-pc-laptop
inputs.hardware.nixosModules.common-cpu-intel
inputs.hardware.nixosModules.common-pc-laptop-ssd
inputs.nixosModules.common.gnome
];
nix = {
# Add flake inputs as registries.
# Keeps nix3 commands consistent with flake.
registry = lib.mapAttrs (_: value: {flake = value;});
# Add inputs to system's legacy channels.
# Makes legacy nix commands consistent with flake as well.
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
settings = {
auto-optimise-store = true;
builders-use-substitutes = true;
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
keep-derivations = true;
keep-outputs = true;
max-jobs = "auto";
warn-dirty = false;
};
# Garbage collection configuration.
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 3d";
};
};
# Set hostname
networking.hostname = "puzzlevision";
# Enable networking through networkmanager (required for most desktop environments).
networking.networkmanager.enable = true;
boot = {
# Always run the latest kernel.
kernelPackages = pkgs.linuxPackages_latest;
# Configure additional kernel modules.
extraModulePackages = [
pkgs.linuxPackages_latest.rtl8821ce # Use custom network-card driver.
];
blacklistedKernelModules = [
"rtw88_8821ce" # Block the default network-card driver.
];
# Grub configuration.
loader.grub = {
enable = true;
devices = [ "nodev" ];
efiInstallAsRemovable = true;
efiSupport = true;
extraEntries = ''
menuentry "Reboot" {
reboot
}
menuentry "Poweroff" {
halt
}
'';
};
};
# Set timezone.
time.timeZone = "Europe/Berlin";
# Internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_DE.UTF-8";
LC_IDENTIFICATION = "de_DE.UTF-8";
LC_MEASUREMENT = "de_DE.UTF-8";
LC_MONETARY = "de_DE.UTF-8";
LC_NAME = "de_DE.UTF-8";
LC_NUMERIC = "de_DE.UTF-8";
LC_PAPER = "de_DE.UTF-8";
LC_TELEPHONE = "de_DE.UTF-8";
LC_TIME = "de_DE.UTF-8";
};
# Set console keymap.
console.keyMap = "de";
# Enable the power-profiles-daemon service for improved battery management.
services.power-profiles-daemon.enable = true;
# Enable printing.
services.printing.enable = true;
# Sound configuration based on pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Bluetooth configuration.
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
package = pkgs.bluez;
settings = {
General = {
ControllerMode = "dual";
FastConnectable = "true";
Experimental = "true";
KernelExperimental = "true";
};
};
};
# Enable flatpak support.
services.flatpak.enable = true;
# Enable iio-sensor for automatic screen rotation and similar features.
hardware.sensor.iio.enable = true;
# Configure system-wide default shell.
environment.shells = with pkgs; [ zsh ];
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
# Configure users.
snowfallorg.users.jo.admin = true;
# Provide users with some sane default packages.
environment.systemPackages = with pkgs; [
### General
nano
firefox
vlc
spotify
### Bluetooth
bluez
### Fonts
noto-fonts
noto-fonts-color-emoji
];
system.stateVersion = "24.05";
}

View file

@ -0,0 +1,68 @@
# 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.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "vmd" "nvme" "usbhid" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/864b1287-89fd-4cc0-98a5-40a3caf804c6";
fsType = "btrfs";
options = [ "subvol=@" ];
};
boot.initrd.luks.devices."luks-5fd4fc76-d5c5-46c3-b952-1a7a7ff3a1fc".device = "/dev/disk/by-uuid/5fd4fc76-d5c5-46c3-b952-1a7a7ff3a1fc";
fileSystems."/var/lib/docker/btrfs" =
{ device = "/@/@/var/lib/docker/btrfs";
fsType = "none";
options = [ "bind" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2429-4141";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/var/lib/docker/overlay2/eec00b6d746d533d213790aa0c8e5cca329148c50c0ab1b035020d27e218ed16/merged" =
{ device = "overlay";
fsType = "overlay";
};
fileSystems."/var/lib/docker/overlay2/bc060caf80f8891cd68f21563b8ece131b24b28772c2971a703bac1f5b54e8d1/merged" =
{ device = "overlay";
fsType = "overlay";
};
swapDevices = [ ];
# 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.br-01571e4eda2f.useDHCP = lib.mkDefault true;
# networking.interfaces.br-20785fae249b.useDHCP = lib.mkDefault true;
# networking.interfaces.br-64a49a5722c1.useDHCP = lib.mkDefault true;
# networking.interfaces.br-71e5fc5962fc.useDHCP = lib.mkDefault true;
# networking.interfaces.br-7df9905783da.useDHCP = lib.mkDefault true;
# networking.interfaces.br-9b746f4e7e2f.useDHCP = lib.mkDefault true;
# networking.interfaces.br-e2f470a56dfe.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s13f0u4u4.useDHCP = lib.mkDefault true;
# networking.interfaces.veth4e96b46.useDHCP = lib.mkDefault true;
# networking.interfaces.veth96a5ccd.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}