nixpkgs/systems/hikari/configuration.nix

179 lines
4.3 KiB
Nix
Raw Normal View History

2022-11-11 13:34:00 +01:00
# 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, ... }:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
2022-11-11 13:34:00 +01:00
./cachix.nix
./web-development
];
2022-11-11 13:34:00 +01:00
boot = {
# Bootloader.
loader = {
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
};
2022-11-11 13:34:00 +01:00
initrd = {
# Setup keyfile
secrets = {
"/crypto_keyfile.bin" = null;
};
luks.devices."luks-77a26fd0-f3c7-4eca-be5e-dba6b6c66e4f" = {
device = "/dev/disk/by-uuid/77a26fd0-f3c7-4eca-be5e-dba6b6c66e4f";
keyFile = "/crypto_keyfile.bin";
};
};
# NOTE: Keep last kernel as 6.1.15 doesn't work with mba6x_bl, this won't compile
kernelPackages = pkgs.linuxKernel.packages.linux_5_15;
};
2022-11-11 13:34:00 +01:00
networking = {
hostName = "hikari"; # Define your hostname.
2022-11-11 13:34:00 +01:00
nameservers = [
# DNS.WATCH
"84.200.69.80"
"84.200.70.40"
# Level3
"209.244.0.3"
"209.244.0.4"
];
# Enable networking
networkmanager.enable = true;
extraHosts = builtins.readFile ./files/hosts;
};
2022-11-11 13:34:00 +01:00
services.dnsmasq = {
enable = true;
settings = {
server = config.networking.nameservers;
};
2022-11-11 13:34:00 +01:00
};
documentation = {
info.enable = false;
};
programs = {
# Enable network manager applet
nm-applet.enable = true;
dconf.enable = true;
};
2022-11-11 13:34:00 +01:00
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n = {
defaultLocale = "en_US.utf8";
extraLocaleSettings = {
LC_ADDRESS = "de_DE.utf8";
LC_IDENTIFICATION = "de_DE.utf8";
LC_MEASUREMENT = "de_DE.utf8";
LC_MONETARY = "de_DE.utf8";
LC_NAME = "de_DE.utf8";
LC_NUMERIC = "de_DE.utf8";
LC_PAPER = "de_DE.utf8";
LC_TELEPHONE = "de_DE.utf8";
LC_TIME = "de_DE.utf8";
};
2022-11-11 13:34:00 +01:00
};
# Enable the X11 windowing system.
services.xserver = {
enable = true;
# Configure keymap in X11
2022-11-11 13:34:00 +01:00
layout = "us";
xkbVariant = "";
# Enable the LXQT Desktop Environment.
desktopManager.lxqt.enable = true;
displayManager = {
lightdm.enable = true;
# Enable automatic login for the user.
autoLogin = {
enable = true;
user = "daniels";
};
};
2022-11-11 13:34:00 +01:00
};
# 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 a user account. Don't forget to set a password with passwd.
users.users.daniels = {
isNormalUser = true;
description = "Daniel Siepmann";
extraGroups = [ "networkmanager" "wheel" "video" ];
packages = with pkgs; [
i3lock
xsel
2022-11-11 13:34:00 +01:00
];
};
virtualisation.podman = {
enable = true;
};
2022-11-11 13:34:00 +01:00
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
vim
git
2022-11-11 13:34:00 +01:00
xorg.xbacklight
];
environment.variables = {
EDITOR = "vim";
};
security = {
sudo.execWheelOnly = true;
};
2022-11-11 13:34:00 +01:00
services.udev.extraRules = ''
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="mba6x_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
'';
# 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 = "22.05"; # Did you read the comment?
}