NixOS and Home Manager config

feat: very initial nixos config

nel.pet e0f03ce3 85cfa16c

verified
Changed files
+124 -1
systems
+6 -1
flake.nix
···
{
-
description = "Home Manager configuration of nel";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
···
inherit pkgs;
extraSpecialArgs = { inherit inputs; };
modules = [(import ./modules/home)];
};
};
}
···
{
+
description = "Nel's flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
···
inherit pkgs;
extraSpecialArgs = { inherit inputs; };
modules = [(import ./modules/home)];
+
};
+
+
nixosConfigurations."nel-desktop" = nixpkgs.lib.nixosSystem {
+
specialArgs = { inherit inputs; };
+
modules = [ ./systems/nel-desktop/configuration.nix ];
};
};
}
+75
systems/nel-desktop/configuration.nix
···
···
+
{ ... }: {
+
imports = [
+
./hardware-configuration.nix
+
];
+
+
# Bootloader.
+
boot.loader.systemd-boot.enable = true;
+
boot.loader.efi.canTouchEfiVariables = true;
+
+
networking.hostName = "nel-desktop";
+
networking.networkmanager.enable = true;
+
+
nix.settings = {
+
experimental-features = [ "nix-command" "flakes" ];
+
use-xdg-base-directories = true;
+
};
+
+
programs.partition-manager.enable = true;
+
services.flatpak.enable = true;
+
environment.variables.PAGER = "less -FRX";
+
programs.ssh.enableAskPassword = true;
+
+
# Set your time zone.
+
time.timeZone = "Europe/Copenhagen";
+
+
# Select internationalisation properties.
+
i18n.defaultLocale = "en_GB.UTF-8";
+
+
i18n.extraLocaleSettings = {
+
LC_ADDRESS = "da_DK.UTF-8";
+
LC_IDENTIFICATION = "da_DK.UTF-8";
+
LC_MEASUREMENT = "da_DK.UTF-8";
+
LC_MONETARY = "da_DK.UTF-8";
+
LC_NAME = "da_DK.UTF-8";
+
LC_NUMERIC = "da_DK.UTF-8";
+
LC_PAPER = "da_DK.UTF-8";
+
LC_TELEPHONE = "da_DK.UTF-8";
+
LC_TIME = "da_DK.UTF-8";
+
};
+
+
services.displayManager.sddm.enable = true;
+
services.desktopManager.plasma6.enable = true;
+
+
services.pulseaudio.enable = false;
+
security.rtkit.enable = true;
+
services.pipewire = {
+
enable = true;
+
alsa.enable = true;
+
alsa.support32Bit = true;
+
pulse.enable = true;
+
};
+
+
# Configure console keymap
+
console.keyMap = "dk-latin1";
+
+
# Enable CUPS to print documents.
+
services.printing.enable = true;
+
+
users.users.nel = {
+
isNormalUser = true;
+
description = "nel";
+
extraGroups = [ "networkmanager" "wheel" ];
+
};
+
+
# Allow unfree packages
+
nixpkgs.config.allowUnfree = true;
+
+
# 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
+
# this value at the release version of the first install of this system.
+
# Before changing this value read the documentation for this option
+
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
+
system.stateVersion = "25.05"; # Did you read the comment?
+
}
+43
systems/nel-desktop/hardware-configuration.nix
···
···
+
# 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" "usb_storage" "usbhid" "sd_mod" ];
+
boot.initrd.kernelModules = [ ];
+
boot.kernelModules = [ "kvm-amd" ];
+
boot.extraModulePackages = [ ];
+
+
fileSystems."/" =
+
{ device = "/dev/disk/by-uuid/77d1988d-5ac7-444c-a856-292742191a2f";
+
fsType = "ext4";
+
};
+
+
fileSystems."/boot" =
+
{ device = "/dev/disk/by-uuid/62F8-3117";
+
fsType = "vfat";
+
options = [ "fmask=0022" "dmask=0022" ];
+
};
+
+
fileSystems."/home" =
+
{ device = "/dev/disk/by-uuid/4db06561-1474-402e-989f-539e416e2663";
+
fsType = "ext4";
+
};
+
+
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.enp7s0.useDHCP = lib.mkDefault true;
+
+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+
}