From db88d50e8924cba8b424c0ea7546b81baccd9c5c Mon Sep 17 00:00:00 2001 From: schererleander Date: Tue, 29 Apr 2025 16:59:25 +0200 Subject: initial commit --- hosts/nixos/configuration.nix | 63 ++++++++++++++++++++++++++++++++ hosts/nixos/hardware-configuration.nix | 41 +++++++++++++++++++++ hosts/nixos/home.nix | 65 ++++++++++++++++++++++++++++++++++ 3 files changed, 169 insertions(+) create mode 100644 hosts/nixos/configuration.nix create mode 100644 hosts/nixos/hardware-configuration.nix create mode 100644 hosts/nixos/home.nix (limited to 'hosts') diff --git a/hosts/nixos/configuration.nix b/hosts/nixos/configuration.nix new file mode 100644 index 0000000..5d8578c --- /dev/null +++ b/hosts/nixos/configuration.nix @@ -0,0 +1,63 @@ +{ config, pkgs, ...}: + +{ + + imports = [ + ./hardware-configuration.nix + ../../modules/nixos + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Use latest kernel + boot.kernelPackages = pkgs.linuxPackages_latest; + + # Graphics + hardware.graphics = { + enable = true; + enable32Bit = true; + extraPackages = with pkgs; [ + amdvlk + ]; + }; + + environment.variables.AMD_VULKAN_ICD = "RADV"; + + # Network + networking = { + hostName = "nixos"; + networkmanager.enable = true; + }; + + # Time + time.timeZone = "Europe/Berlin"; + + # Keymap + console.keyMap = "de"; + + # User + users.users.leander = { + isNormalUser = true; + extraGroups = [ "networkmanager" "wheel" "video" "input" ]; + }; + + services = { + openssh.enable = true; + gnome.gnome-keyring.enable = true; + }; + + # Security + security.polkit.enable = true; + + # home manager crash when disabled + programs.dconf.enable = true; + + audio.enable = true; + wooting.enable = true; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nixpkgs.config.allowUnfree = true; + system.stateVersion = "24.11"; +} diff --git a/hosts/nixos/hardware-configuration.nix b/hosts/nixos/hardware-configuration.nix new file mode 100644 index 0000000..9338f30 --- /dev/null +++ b/hosts/nixos/hardware-configuration.nix @@ -0,0 +1,41 @@ +# 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 = [ "nvme" "xhci_pci" "ahci" "usbhid" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/9723eaab-4969-45e2-8364-b20aa6f4e120"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/29E6-B167"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/fb68b9c4-9305-4cf5-8279-3cae83524983"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.eno1.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp11s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/nixos/home.nix b/hosts/nixos/home.nix new file mode 100644 index 0000000..f8fe6ee --- /dev/null +++ b/hosts/nixos/home.nix @@ -0,0 +1,65 @@ +{ config, lib, pkgs, inputs, ...}: + +{ + + _module.args.inputs = inputs; + + imports = [ + ../../modules/home-manager + ]; + + home.username = "leander"; + home.homeDirectory = "/home/leander"; + + home.packages = with pkgs; [ + firefox + obsidian + fzf + imv + + #dev + gcc + + # fomts + noto-fonts + noto-fonts-cjk-sans + noto-fonts-emoji + + ]; + + gtk = { + enable = true; + theme = { + name = "Adwaita-dark"; + package = pkgs.gnome-themes-extra; + }; + gtk3.extraConfig = { + Settings = '' + gtk-application-prefer-dark-theme=1 + ''; + }; + gtk4.extraConfig = { + Settings = '' + gtk-application-prefer-dark-theme=1 + ''; + }; + }; + + home.pointerCursor = { + gtk.enable = true; + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; + size = 24; + }; + + foot.enable = true; + neovim.enable = true; + git.enable = true; + zsh.enable = true; + tmux.enable = true; + + sway.enable = true; + waybar.enable = true; + + home.stateVersion = "24.11"; +} -- cgit v1.3.1