Files
dotfiles/nixos/configuration.nix
T
2025-08-25 20:05:20 +02:00

128 lines
2.4 KiB
Nix
Raw 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.
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports =
[
/etc/nixos/hardware-configuration.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Oslo";
services.gnome.gnome-keyring.enable = true;
services.pipewire = {
enable = true;
pulse.enable = true;
};
services.printing.enable = true;
hardware.uinput.enable = true;
services.libinput.enable = true;
services.kanata = {
enable = true;
keyboards.default.configFile = "/etc/nixos/kanata.kbd";
};
users.users.ivar = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
tree
];
};
programs.firefox.enable = true;
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd sway";
user = "greeter";
};
};
};
services.tlp = {
enable = true;
settings = {
CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_BATTERY = "powersave";
START_CHARGE_THRESH_BAT0 = 90;
STOP_CHARGE_THRESH_BAT0 = 97;
RUNTIME_PM_ON_BAT = "auto";
};
};
hardware.graphics.enable=true;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"discord"
"steam"
"steam-unwrapped"
];
programs.steam.enable = true;
fonts.packages = [
# add specific ones here
] ++ builtins.filter lib.attrsets.isDerivation (builtins.attrValues pkgs.nerd-fonts); # all nerdfonts
environment.systemPackages = with pkgs; [
xorg.xauth
discord
networkmanagerapplet
grim
slurp
wl-clipboard
mako
unzip
neovim
git
lazygit
wget
stow
go
gopls
fzf
waybar
python313
python313Packages.pip
python313Packages.pipx
poetry
basedpyright
rustc
cargo
gcc
clang-tools
];
programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
system.stateVersion = "25.05"; # dont change ever
}