nixos-configuration/flake.nix

162 lines
5.4 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# vim: set ts=2 sw=2 et: vim #
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-25.05";
};
outputs = inputs@{ nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {};
in { nixosConfigurations = {
hue = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
({ pkgs, ...}: {
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
# boot.kernelParams = [ ];
boot.extraModulePackages = [ ];
boot.resumeDevice = "/dev/disk/by-partlabel/Swap";
fileSystems."/" = {
device = "/dev/disk/by-uuid/74285f6a-b237-4372-b64c-13bd53186460";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/51E2-1C85";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [{ device = "/dev/nvme0n1p7"; }];
nixpkgs.hostPlatform = system;
hardware.graphics.enable = true;
hardware.enableAllFirmware = true;
networking.hostName = "hue";
networking.useDHCP = pkgs.lib.mkDefault true;
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Chicago";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the Pantheon Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.displayManager.lightdm.greeters.pantheon.enable = true;
services.xserver.desktopManager.pantheon.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
options = "caps:enter";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Define a user account. Don't forget to set a password with passwd.
users.users.zander = {
isNormalUser = true;
description = "zander";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
vim wget graphviz
nix-tree htop
pantheon-tweaks
obsidian
direnv
file
sgt-puzzles
google-chrome
mpv
git
vlc
tree
gparted
man-pages man-pages-posix
];
};
documentation.dev.enable = true;
# Install firefox.
programs.firefox.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# environment.pantheon.excludePackages = [
# pkgs.pantheon.epiphany
# pkgs.pantheon.elementary-mail
# pkgs.pantheon.elementary-tasks
# ];
# List packages installed in system profile. To search, run:
# $ nix search wget
# environment.systemPackages = with pkgs; [
# ];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = 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. Its 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?
})
];
};
};
};
}