204 lines
3.9 KiB
Nix
204 lines
3.9 KiB
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
## 'configuration.nix' is primarily where you'll install packages and manage system configurations.
|
|
|
|
let
|
|
secrets = import ./secrets.nix;
|
|
|
|
# Needed for installing unstable channel packages.
|
|
unstableTarball =
|
|
fetchTarball
|
|
https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz;
|
|
in
|
|
{
|
|
imports =
|
|
[ # Include the results of the hardware scan.
|
|
./hardware-configuration.nix
|
|
];
|
|
|
|
nixpkgs.config =
|
|
{
|
|
# Enable unfree packages.
|
|
allowUnfree = true;
|
|
|
|
# Needed for installing unstable channel packages.
|
|
packageOverrides = pkgs:
|
|
{
|
|
unstable = import unstableTarball
|
|
{
|
|
config = config.nixpkgs.config;
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
nix = {
|
|
# Specifying the Nix daemon is allowed by anyone with sudo privileges.
|
|
settings.allowed-users = [ "@wheel" ];
|
|
|
|
# Enable flakes.
|
|
settings.experimental-features = [ "nix-command" "flakes" ];
|
|
};
|
|
|
|
# Set your time zone.
|
|
time.timeZone = "America/Edmonton";
|
|
|
|
|
|
boot =
|
|
{
|
|
supportedFilesystems = ["vfat" "btrfs"];
|
|
|
|
loader =
|
|
{
|
|
timeout = 5;
|
|
|
|
efi =
|
|
{
|
|
canTouchEfiVariables = true;
|
|
efiSysMountPoint = "/boot";
|
|
};
|
|
|
|
# Use the GRUB boot loader.
|
|
# Uses GRUB 2 by default.
|
|
grub = {
|
|
enable = true;
|
|
# "nodev" for efi only
|
|
device = "nodev";
|
|
efiSupport = true;
|
|
|
|
# Set grub resolution to 1920x1080px.
|
|
gfxmodeEfi = "1920x1080";
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
users =
|
|
{
|
|
mutableUsers = false;
|
|
|
|
users =
|
|
{
|
|
root.hashedPassword = "!";
|
|
|
|
${secrets.systemUsername} =
|
|
{
|
|
hashedPassword = "${secrets.hashedPassword}";
|
|
isNormalUser = true;
|
|
# description = "Your User";
|
|
extraGroups = ["wheel" "storage" "networkmanager"];
|
|
|
|
packages = with pkgs;
|
|
[
|
|
## Browsers
|
|
firefox
|
|
librewolf
|
|
|
|
## Coding/programming.
|
|
git
|
|
|
|
(vscode-with-extensions.override
|
|
{
|
|
vscode = vscodium;
|
|
vscodeExtensions = with vscode-extensions;
|
|
[
|
|
## Extension examples:
|
|
# dracula-theme.theme-dracula
|
|
# ms-python.python
|
|
# rust-lang.rust-analyzer
|
|
];
|
|
}
|
|
)
|
|
];
|
|
};
|
|
};
|
|
};
|
|
|
|
|
|
environment =
|
|
{
|
|
systemPackages = with pkgs;
|
|
[
|
|
# nano
|
|
];
|
|
|
|
## Hyprland required environment variables.
|
|
sessionVariables =
|
|
{
|
|
## If your cursor becomes invisible
|
|
WLR_NO_HARDWARE_CURSORS = "1";
|
|
|
|
## Hint electron apps to use wayland.
|
|
## Required to run VSCodium with wayland.
|
|
NIXOS_OZONE_WL = "1";
|
|
};
|
|
};
|
|
|
|
security = {
|
|
## require a password for all sudo usage
|
|
sudo.wheelNeedsPassword = true;
|
|
};
|
|
|
|
networking = {
|
|
## Set your hostname.
|
|
hostName = "${secrets.hostName}";
|
|
|
|
## Enable networking
|
|
networkmanager.enable = true;
|
|
};
|
|
|
|
programs =
|
|
{
|
|
## Fixes GTK theming in Wayland applications.
|
|
dconf.enable = true;
|
|
|
|
# network diagnostics tool.
|
|
# mtr.enable = true;
|
|
# gnupg.agent =
|
|
# {
|
|
# enable = true;
|
|
# };
|
|
};
|
|
|
|
|
|
services =
|
|
{
|
|
## Disable CUPS print dameon.
|
|
printing.enable = false;
|
|
|
|
## xserver configurations.
|
|
xserver =
|
|
{
|
|
## Enable the X11 windowing system.
|
|
enable = true;
|
|
|
|
## Enable the KDE Plasma Desktop Environment.
|
|
desktopManager.plasma5.enable = true;
|
|
|
|
## Uncomment to enable touchpad support.
|
|
# libinput.enable = true;
|
|
|
|
## Configure keymap in X11.
|
|
layout = "us";
|
|
xkbVariant = "";
|
|
|
|
displayManager =
|
|
{
|
|
## Uncomment to set default session as plasma wayland during login.
|
|
# defaultSession = "plasmawayland";
|
|
|
|
sddm =
|
|
{
|
|
## Enable SDDM.
|
|
enable = true;
|
|
|
|
## Enable numlock at login.
|
|
autoNumlock = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
system.stateVersion = "23.11";
|
|
}
|