Created
March 4, 2024 20:38
-
-
Save MathiasReker/693cb6e5ac62790113b7092093a47f5d to your computer and use it in GitHub Desktop.
configuration.nix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, pkgs, ... }: | |
{ | |
imports = | |
[ | |
./hardware-configuration.nix | |
]; | |
# Bootloader. | |
boot.loader.systemd-boot.enable = true; | |
boot.loader.efi.canTouchEfiVariables = true; | |
boot.loader.efi.efiSysMountPoint = "/boot/efi"; | |
boot.kernelPackages = pkgs.linuxPackages_latest; | |
networking.hostName = "tp15"; # Define your hostname. | |
# Enable networking | |
networking.networkmanager.enable = true; | |
# Time zone. | |
time.timeZone = "Europe/Copenhagen"; | |
# Internationalisation properties. | |
i18n.defaultLocale = "en_DK.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"; | |
}; | |
# Enable the X11 windowing system. | |
services.xserver.enable = true; | |
# Enable the GNOME Desktop Environment. | |
services.xserver.displayManager.gdm.enable = true; | |
services.xserver.desktopManager.gnome.enable = true; | |
# Configure keymap in X11. | |
services.xserver = { | |
layout = "dk"; | |
xkbVariant = ""; | |
}; | |
# Configure console keymap. | |
console.keyMap = "dk-latin1"; | |
# Enable CUPS to print documents. | |
services.printing.enable = true; | |
# Enable sound with pipewire. | |
sound.enable = true; | |
hardware.pulseaudio.enable = false; | |
security.rtkit.enable = true; | |
services.pipewire = { | |
enable = true; | |
alsa.enable = true; | |
alsa.support32Bit = true; | |
pulse.enable = true; | |
}; | |
# Define user account. | |
users.users.reker = { | |
isNormalUser = true; | |
description = "Reker"; | |
extraGroups = [ "networkmanager" "wheel" "docker" ]; | |
packages = with pkgs; [ ]; | |
}; | |
# Allow unfree packages. | |
nixpkgs.config.allowUnfree = true; | |
# Installed packages in system profile. | |
environment.systemPackages = with pkgs; [ | |
# CLI. | |
git wget curl docker docker-compose platformsh tree openssl eza vim nodejs_20 php83 | |
# GUI. | |
firefox firefox-devedition-bin google-chrome chromium dbeaver insomnia slack jetbrains.phpstorm meld | |
]; | |
virtualisation.docker.enable = true; | |
# Custom user directories. | |
# Run "xdg-user-dirs-update --force" after changing these. | |
environment.etc."xdg/user-dirs.defaults".text = '' | |
DESKTOP=system/desktop | |
DOWNLOAD=downloads | |
TEMPLATES=system/templates | |
PUBLICSHARE=system/public | |
DOCUMENTS=documents | |
MUSIC=media/music | |
PICTURES=media/photos | |
VIDEOS=media/video | |
''; | |
# Set fish as the default shell. | |
programs.fish.enable = true; | |
users.defaultUserShell = pkgs.fish; | |
programs.fish.interactiveShellInit = '' | |
# Forcing true colors. | |
set -g fish_term24bit 1 | |
set -g fish_greeting "" | |
''; | |
environment.shellAliases = { | |
# Replace ls commands with exa counterparts. | |
ls = "eza"; # ls replacement | |
l = "eza -lbF --git"; # list, size, type, git | |
ll = "eza -lbGF --git"; # long list | |
llm = "eza -lbGd --git --sort=modified"; # long list, modified date sort | |
la = "eza -lbhHigUmuSa --time-style=long-iso --git --color-scale"; # all list | |
lx = "eza -lbhHigUmuSa@ --time-style=long-iso --git --color-scale"; # all + extended list | |
# Specialty views. | |
lS = "eza -1"; # one column, just names | |
lt = "eza --tree --level=2"; # tree | |
}; | |
# 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. | |
# (man configuration.nix or https://nixos.org/nixos/options.html). | |
system.stateVersion = "23.05"; # Did you read the comment? | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment