imladris/configuration.nix

248 lines
5.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.

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, lib, ... }:
{
# this allows you to access `pkgsUnstable` anywhere in your config
#_module.args.pkgsUnstable = import inputs.nixpkgs-unstable {
# inherit (pkgs.stdenv.hostPlatform) system;
# inherit (config.nixpkgs) config;
#};
imports =
[
./hardware-configuration.nix
./configs
];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.auto-optimise-store = true;
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 10d";
};
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# 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";
};
networking.hostName = "imladris"; # Define your hostname.
networking.networkmanager.enable = true;
services.resolved.enable = true;
services.resolved.fallbackDns = [
"1.1.1.1"
"8.8.8.8"
];
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ 22 ];
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "prohibit-password";
};
# passwordAuthentication = false;
};
security.doas = {
enable = true;
extraRules = [{
users = ["kyle"];
keepEnv = true;
noPass = true;
}];
};
services.cron.enable = true;
services.xserver = {
displayManager = {
gdm = {
enable = true;
wayland = false;
};
};
enable = true;
windowManager = {
i3.enable = true;
};
xkb = {
layout = "us";
options = "ctrl:swapcaps,compose:ralt";
};
};
# Enable touchpad support (enabled default in most desktopManager).
services.libinput = {
enable = true;
mouse.naturalScrolling = true;
touchpad.naturalScrolling = true;
};
console.useXkbConfig = true;
users.users.kyle = {
isNormalUser = true;
extraGroups = [
"wheel"
"networkmanager"
"dialout"
];
};
programs.direnv.enable = true;
programs.command-not-found.enable = false;
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
# Add any missing dynamic libraries for unpackaged programs
# here, NOT in environment.systemPackages
];
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Install firefox.
programs.firefox.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable common container config files in /etc/containers
virtualisation.containers.enable = true;
virtualisation = {
podman = {
enable = true;
# Create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# Required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
arduino
binutils-unwrapped
bitwarden
brave
cloc
cscope
direnv
doas
elinks
emacs
feh
ffmpeg
file
fira-code
firefox
fzf
gcc
gdb
gforth
git
graphviz
gnumake
go
go-font
hexyl
htop
i3
keychain
lagrange
libzip
lxterminal
mercurial
mg
mutt
nyxt
nmap
obsidian
ops
pciutils
picocom
pwgen
python3Full
rlwrap
sbcl
scdoc
scrot
silver-searcher
stumpwm
syncthing
tailscale
tcpdump
terminator
texinfo
texliveFull
tmux
tree
wget
xfce.xfce4-terminal
dive
podman-tui
docker-compose
podman-compose
];
services.tailscale.enable = true;
services.syncthing.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
nix.settings.experimental-features = [ "nix-command" ];
# 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 = "24.11"; # Did you read the comment?
}