NixOS and Home Manager config

feat: very initial nixos config

nel.pet e0f03ce3 85cfa16c

verified
+124 -1
+6 -1
flake.nix
··· 1 1 { 2 - description = "Home Manager configuration of nel"; 2 + description = "Nel's flake"; 3 3 4 4 inputs = { 5 5 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; ··· 21 21 inherit pkgs; 22 22 extraSpecialArgs = { inherit inputs; }; 23 23 modules = [(import ./modules/home)]; 24 + }; 25 + 26 + nixosConfigurations."nel-desktop" = nixpkgs.lib.nixosSystem { 27 + specialArgs = { inherit inputs; }; 28 + modules = [ ./systems/nel-desktop/configuration.nix ]; 24 29 }; 25 30 }; 26 31 }
+75
systems/nel-desktop/configuration.nix
··· 1 + { ... }: { 2 + imports = [ 3 + ./hardware-configuration.nix 4 + ]; 5 + 6 + # Bootloader. 7 + boot.loader.systemd-boot.enable = true; 8 + boot.loader.efi.canTouchEfiVariables = true; 9 + 10 + networking.hostName = "nel-desktop"; 11 + networking.networkmanager.enable = true; 12 + 13 + nix.settings = { 14 + experimental-features = [ "nix-command" "flakes" ]; 15 + use-xdg-base-directories = true; 16 + }; 17 + 18 + programs.partition-manager.enable = true; 19 + services.flatpak.enable = true; 20 + environment.variables.PAGER = "less -FRX"; 21 + programs.ssh.enableAskPassword = true; 22 + 23 + # Set your time zone. 24 + time.timeZone = "Europe/Copenhagen"; 25 + 26 + # Select internationalisation properties. 27 + i18n.defaultLocale = "en_GB.UTF-8"; 28 + 29 + i18n.extraLocaleSettings = { 30 + LC_ADDRESS = "da_DK.UTF-8"; 31 + LC_IDENTIFICATION = "da_DK.UTF-8"; 32 + LC_MEASUREMENT = "da_DK.UTF-8"; 33 + LC_MONETARY = "da_DK.UTF-8"; 34 + LC_NAME = "da_DK.UTF-8"; 35 + LC_NUMERIC = "da_DK.UTF-8"; 36 + LC_PAPER = "da_DK.UTF-8"; 37 + LC_TELEPHONE = "da_DK.UTF-8"; 38 + LC_TIME = "da_DK.UTF-8"; 39 + }; 40 + 41 + services.displayManager.sddm.enable = true; 42 + services.desktopManager.plasma6.enable = true; 43 + 44 + services.pulseaudio.enable = false; 45 + security.rtkit.enable = true; 46 + services.pipewire = { 47 + enable = true; 48 + alsa.enable = true; 49 + alsa.support32Bit = true; 50 + pulse.enable = true; 51 + }; 52 + 53 + # Configure console keymap 54 + console.keyMap = "dk-latin1"; 55 + 56 + # Enable CUPS to print documents. 57 + services.printing.enable = true; 58 + 59 + users.users.nel = { 60 + isNormalUser = true; 61 + description = "nel"; 62 + extraGroups = [ "networkmanager" "wheel" ]; 63 + }; 64 + 65 + # Allow unfree packages 66 + nixpkgs.config.allowUnfree = true; 67 + 68 + # This value determines the NixOS release from which the default 69 + # settings for stateful data, like file locations and database versions 70 + # on your system were taken. It‘s perfectly fine and recommended to leave 71 + # this value at the release version of the first install of this system. 72 + # Before changing this value read the documentation for this option 73 + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). 74 + system.stateVersion = "25.05"; # Did you read the comment? 75 + }
+43
systems/nel-desktop/hardware-configuration.nix
··· 1 + # Do not modify this file! It was generated by ‘nixos-generate-config’ 2 + # and may be overwritten by future invocations. Please make changes 3 + # to /etc/nixos/configuration.nix instead. 4 + { config, lib, pkgs, modulesPath, ... }: 5 + 6 + { 7 + imports = 8 + [ (modulesPath + "/installer/scan/not-detected.nix") 9 + ]; 10 + 11 + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; 12 + boot.initrd.kernelModules = [ ]; 13 + boot.kernelModules = [ "kvm-amd" ]; 14 + boot.extraModulePackages = [ ]; 15 + 16 + fileSystems."/" = 17 + { device = "/dev/disk/by-uuid/77d1988d-5ac7-444c-a856-292742191a2f"; 18 + fsType = "ext4"; 19 + }; 20 + 21 + fileSystems."/boot" = 22 + { device = "/dev/disk/by-uuid/62F8-3117"; 23 + fsType = "vfat"; 24 + options = [ "fmask=0022" "dmask=0022" ]; 25 + }; 26 + 27 + fileSystems."/home" = 28 + { device = "/dev/disk/by-uuid/4db06561-1474-402e-989f-539e416e2663"; 29 + fsType = "ext4"; 30 + }; 31 + 32 + swapDevices = [ ]; 33 + 34 + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking 35 + # (the default) this is the recommended approach. When using systemd-networkd it's 36 + # still possible to use this option, but it's recommended to use it in conjunction 37 + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. 38 + networking.useDHCP = lib.mkDefault true; 39 + # networking.interfaces.enp7s0.useDHCP = lib.mkDefault true; 40 + 41 + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 42 + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; 43 + }