2023-06-29 14:00:39 +02: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’).
|
2023-06-30 04:39:01 +02:00
|
|
|
|
|
|
|
|
|
# Nix Reference Manual:
|
|
|
|
|
# https://nixos.org/manual/nix/stable/
|
|
|
|
|
# NixOS Packages / Options:
|
|
|
|
|
# https://search.nixos.org/packages?
|
|
|
|
|
|
2023-06-30 07:08:28 +02:00
|
|
|
|
# Other things to consider:
|
|
|
|
|
# Telegraf
|
|
|
|
|
|
2023-07-01 10:23:32 +02:00
|
|
|
|
{ lib, config, pkgs, ... }: {
|
2023-06-29 14:00:39 +02:00
|
|
|
|
imports =
|
|
|
|
|
[
|
2023-06-30 00:56:45 +02:00
|
|
|
|
# Gnome configuration file.
|
2023-07-01 09:48:31 +02:00
|
|
|
|
./desktops/gnome.nix
|
2023-06-30 04:39:01 +02:00
|
|
|
|
# Promtail logging
|
2023-07-01 09:48:31 +02:00
|
|
|
|
./software/promtail.nix
|
2023-06-29 14:00:39 +02:00
|
|
|
|
];
|
2023-06-29 08:32:19 +02:00
|
|
|
|
|
2023-06-29 14:40:55 +02:00
|
|
|
|
# Keep the system up-to-date automatically
|
|
|
|
|
system = {
|
|
|
|
|
autoUpgrade = {
|
|
|
|
|
enable = true;
|
|
|
|
|
allowReboot = false;
|
2023-06-29 14:44:24 +02:00
|
|
|
|
channel = https://channels.nixos.org/nixos-23.05;
|
2023-06-29 14:40:55 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2023-06-30 16:22:59 +02:00
|
|
|
|
# Bootloader
|
2023-06-29 14:00:39 +02:00
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
2023-06-29 15:01:32 +02:00
|
|
|
|
boot.tmp.cleanOnBoot = true;
|
2023-07-02 11:14:32 +02:00
|
|
|
|
|
2023-06-29 14:00:39 +02:00
|
|
|
|
# Plymouth splash screen
|
|
|
|
|
boot.plymouth.enable = true;
|
2023-06-29 14:16:58 +02:00
|
|
|
|
boot.initrd.systemd.enable = true;
|
|
|
|
|
boot.kernelParams = ["quiet"];
|
2023-07-01 01:53:34 +02:00
|
|
|
|
|
2023-06-30 12:57:39 +02:00
|
|
|
|
# SecureBoot
|
|
|
|
|
boot.loader.systemd-boot.enable = lib.mkForce false;
|
|
|
|
|
boot.lanzaboote.enable = true;
|
2023-06-30 13:03:44 +02:00
|
|
|
|
boot.lanzaboote.pkiBundle = "/etc/secureboot";
|
2023-06-30 12:57:39 +02:00
|
|
|
|
|
2023-06-29 14:00:39 +02:00
|
|
|
|
# Enable networking
|
2023-06-29 08:32:19 +02:00
|
|
|
|
networking = {
|
2023-06-29 14:00:39 +02:00
|
|
|
|
networkmanager = {
|
2023-06-29 08:32:19 +02:00
|
|
|
|
enable = true;
|
|
|
|
|
};
|
2023-07-02 10:12:20 +02:00
|
|
|
|
|
2023-07-02 11:14:32 +02:00
|
|
|
|
# Password set via wpa_supplicant command
|
|
|
|
|
# https://nixos.org/manual/nixos/unstable/index.html#sec-wireless
|
|
|
|
|
wireless.networks = {
|
|
|
|
|
copeland-5g.psk = "5b43054e4c927ecd94cf19103fa80a7ce99ca69f27cdd75026be3c261d7f78cb";
|
|
|
|
|
};
|
2023-07-02 10:13:05 +02:00
|
|
|
|
|
2023-06-29 14:00:39 +02:00
|
|
|
|
enableIPv6 = false;
|
|
|
|
|
firewall = {
|
2023-06-29 08:32:19 +02:00
|
|
|
|
enable = true;
|
2023-07-02 09:56:44 +02:00
|
|
|
|
allowedTCPPorts = [ ];
|
2023-06-29 14:00:39 +02:00
|
|
|
|
allowedUDPPorts = [ ];
|
2023-07-02 10:14:19 +02:00
|
|
|
|
trustedInterfaces = [ "tailscale0" ];
|
2023-06-29 08:32:19 +02:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2023-06-29 14:00:39 +02:00
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "Asia/Tokyo";
|
|
|
|
|
|
|
|
|
|
# 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";
|
2023-06-29 08:32:19 +02:00
|
|
|
|
};
|
|
|
|
|
|
2023-06-29 14:00:39 +02:00
|
|
|
|
# Configure keymap in X11
|
|
|
|
|
services.xserver = {
|
|
|
|
|
enable = true;
|
|
|
|
|
layout = "us";
|
|
|
|
|
xkbVariant = "";
|
|
|
|
|
libinput = {
|
2023-06-29 08:32:19 +02:00
|
|
|
|
enable = true;
|
2023-06-29 14:00:39 +02:00
|
|
|
|
touchpad.tapping = true;
|
2023-06-29 08:32:19 +02:00
|
|
|
|
};
|
2023-06-29 14:00:39 +02:00
|
|
|
|
# Enable nVidia drivers
|
|
|
|
|
videoDrivers = [ "nvidia" ];
|
|
|
|
|
autorun = true;
|
2023-06-29 08:32:19 +02:00
|
|
|
|
};
|
|
|
|
|
|
2023-06-29 14:00:39 +02:00
|
|
|
|
# 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;
|
|
|
|
|
};
|
2023-06-29 08:32:19 +02:00
|
|
|
|
|
2023-06-29 14:00:39 +02:00
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.users.albert = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
description = "Albert J. Copeland";
|
|
|
|
|
extraGroups = [ "networkmanager" "wheel" ];
|
2023-06-30 16:22:59 +02:00
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
firefox
|
|
|
|
|
bitwarden
|
|
|
|
|
steam
|
|
|
|
|
lutris
|
|
|
|
|
vlc
|
|
|
|
|
vscodium
|
|
|
|
|
];
|
2023-06-29 08:32:19 +02:00
|
|
|
|
};
|
|
|
|
|
|
2023-06-30 07:08:28 +02:00
|
|
|
|
# Allow unfree packages
|
2023-06-29 14:00:39 +02:00
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
2023-06-30 07:08:28 +02:00
|
|
|
|
# Enable flakes: https://nixos.wiki/wiki/Flakes
|
2023-06-30 11:30:55 +02:00
|
|
|
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
|
|
|
|
2023-07-02 11:14:32 +02:00
|
|
|
|
# List packages installed in system profile
|
2023-06-29 14:00:39 +02:00
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
# Secureboot
|
|
|
|
|
sbctl
|
2023-06-30 16:22:59 +02:00
|
|
|
|
|
2023-07-01 12:15:17 +02:00
|
|
|
|
# Bash powerline
|
|
|
|
|
powerline-go
|
|
|
|
|
|
2023-06-29 14:00:39 +02:00
|
|
|
|
# General packages
|
2023-06-30 01:13:12 +02:00
|
|
|
|
# https://github.com/gvolpe/dconf2nix
|
|
|
|
|
dconf2nix
|
2023-06-29 14:00:39 +02:00
|
|
|
|
wget
|
2023-07-01 14:21:31 +02:00
|
|
|
|
neovim
|
2023-06-29 14:00:39 +02:00
|
|
|
|
git
|
|
|
|
|
curl
|
|
|
|
|
htop
|
|
|
|
|
iftop
|
|
|
|
|
nload
|
|
|
|
|
iotop
|
|
|
|
|
glxinfo
|
|
|
|
|
tailscale
|
2023-06-30 15:51:09 +02:00
|
|
|
|
neofetch
|
2023-06-29 14:00:39 +02:00
|
|
|
|
];
|
|
|
|
|
|
2023-07-02 11:14:32 +02:00
|
|
|
|
# Enable various system services
|
|
|
|
|
services {
|
|
|
|
|
openssh.enable = true;
|
|
|
|
|
tailscale.enable = true;
|
|
|
|
|
};
|
2023-06-29 14:00:39 +02:00
|
|
|
|
|
2023-06-29 14:16:58 +02:00
|
|
|
|
# Garbage collection -- Keep the system clean
|
2023-06-29 14:24:22 +02:00
|
|
|
|
nix.gc = {
|
2023-07-02 09:56:44 +02:00
|
|
|
|
automatic = true;
|
|
|
|
|
dates = "daily";
|
|
|
|
|
options = "--delete-older-than 7d";
|
2023-06-29 08:32:19 +02:00
|
|
|
|
};
|
2023-06-29 14:00:39 +02:00
|
|
|
|
|
2023-07-02 09:39:12 +02:00
|
|
|
|
# Fonts
|
2023-07-02 09:50:31 +02:00
|
|
|
|
fonts = {
|
|
|
|
|
fontconfig = {
|
|
|
|
|
defaultFonts = {
|
2023-07-02 09:56:44 +02:00
|
|
|
|
emoji = [ "Noto Color Emoji" ];
|
2023-07-02 09:50:31 +02:00
|
|
|
|
monospace = [ "JetBrainsMono Nerd Font" "Cascadia Code" "Sarasa Mono SC" ];
|
|
|
|
|
sansSerif = [ "Arimo Nerd Font" "Sarasa Gothic SC" ];
|
2023-07-02 09:56:44 +02:00
|
|
|
|
serif = [ "Arimo Nerd Font" "Sarasa Gothic SC" ];
|
2023-07-02 09:50:31 +02:00
|
|
|
|
};
|
|
|
|
|
includeUserConf = false;
|
2023-07-02 09:39:12 +02:00
|
|
|
|
};
|
2023-07-02 09:50:31 +02:00
|
|
|
|
|
|
|
|
|
fonts = with pkgs; [
|
|
|
|
|
cascadia-code
|
|
|
|
|
(nerdfonts.override { fonts = [ "Arimo" "JetBrainsMono" ]; })
|
|
|
|
|
noto-fonts-emoji
|
|
|
|
|
sarasa-gothic
|
|
|
|
|
];
|
2023-07-02 09:39:12 +02:00
|
|
|
|
};
|
|
|
|
|
|
2023-06-29 14:00:39 +02:00
|
|
|
|
# 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. It‘s 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).
|
2023-06-29 14:25:10 +02:00
|
|
|
|
system.stateVersion = "23.05"; # Did you read the comment?
|
2023-06-29 14:45:45 +02:00
|
|
|
|
}
|