2022-12-18 15:15:15 +00:00
|
|
|
|
# sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
|
|
|
|
|
# sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
|
|
|
|
|
|
2022-12-18 18:49:19 +00:00
|
|
|
|
let systemInformation = import ./system/system-information.nix; in
|
2023-03-16 13:32:37 +00:00
|
|
|
|
{ config, pkgs, lib, ... }@nixpkgs:
|
2022-12-18 15:15:15 +00:00
|
|
|
|
{
|
2022-12-19 04:12:08 +00:00
|
|
|
|
networking.hostName = systemInformation.hostname;
|
2022-12-18 15:15:15 +00:00
|
|
|
|
|
|
|
|
|
imports =
|
2022-12-18 17:38:51 +00:00
|
|
|
|
[
|
2022-12-18 18:49:19 +00:00
|
|
|
|
./configs/filesystems.nix
|
|
|
|
|
./system/hardware-requirements.nix
|
2023-03-16 15:15:47 +00:00
|
|
|
|
./modules/machine-info.nix
|
2022-12-18 15:15:15 +00:00
|
|
|
|
<home-manager/nixos>
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Bootloader
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
|
|
|
|
|
|
|
|
boot.kernelParams = [
|
|
|
|
|
# Power efficiency
|
|
|
|
|
# https://wiki.archlinux.org/title/Power_management#Kernel_parameters
|
|
|
|
|
"nmi_watchdog=0"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
boot.kernel.sysctl = {
|
|
|
|
|
# Set IO batching to 2 minutes for power reasons
|
|
|
|
|
"vm.dirty_writeback_centisecs" = 12000;
|
|
|
|
|
};
|
2023-01-15 20:16:40 +00:00
|
|
|
|
boot.initrd.supportedFilesystems = [ "btrfs" ];
|
2022-12-18 15:15:15 +00:00
|
|
|
|
|
|
|
|
|
# Setup keyfile
|
|
|
|
|
boot.initrd.secrets = {
|
|
|
|
|
"/crypto_keyfile.bin" = null;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Enable networking
|
|
|
|
|
networking.networkmanager.enable = true;
|
|
|
|
|
|
2022-12-18 17:38:51 +00:00
|
|
|
|
powerManagement.cpuFreqGovernor = "powersave";
|
|
|
|
|
|
2022-12-18 15:15:15 +00:00
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "America/New_York";
|
|
|
|
|
|
|
|
|
|
# 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";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Enable the X11 windowing system.
|
|
|
|
|
services.xserver.enable = true;
|
|
|
|
|
services.logind.lidSwitch = "ignore";
|
|
|
|
|
|
|
|
|
|
# Enable the GNOME Desktop Environment.
|
|
|
|
|
services.xserver.displayManager.gdm.enable = true;
|
2022-12-20 19:44:49 +00:00
|
|
|
|
services.xserver.desktopManager.gnome.enable = true;
|
2022-12-18 15:15:15 +00:00
|
|
|
|
|
|
|
|
|
# Configure keymap in X11
|
|
|
|
|
services.xserver = {
|
|
|
|
|
layout = "us";
|
|
|
|
|
xkbVariant = "3l";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# 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;
|
|
|
|
|
# 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;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.users.ember = {
|
|
|
|
|
uid = 1312;
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
description = "Ember";
|
2023-07-22 17:32:39 +00:00
|
|
|
|
extraGroups = [ "networkmanager" "wheel" "dialout"];
|
2022-12-18 15:15:15 +00:00
|
|
|
|
shell = pkgs.fish;
|
2023-02-28 23:44:39 +00:00
|
|
|
|
openssh.authorizedKeys.keys = import ./configs/programs/ssh/authorizedKeys.nix;
|
2022-12-18 15:15:15 +00:00
|
|
|
|
};
|
2022-12-18 20:10:45 +00:00
|
|
|
|
home-manager.users.ember = import ./configs/home.full.nix;
|
2023-07-22 17:32:39 +00:00
|
|
|
|
programs.fish.enable = true;
|
2022-12-18 15:15:15 +00:00
|
|
|
|
|
|
|
|
|
# Allow unfree packages
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2022-12-18 17:38:51 +00:00
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
2022-12-18 15:15:15 +00:00
|
|
|
|
|
|
|
|
|
# List packages installed in system profile. To search, run:
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
wget
|
|
|
|
|
gnumake
|
|
|
|
|
htop
|
|
|
|
|
wl-clipboard
|
|
|
|
|
unzip
|
2023-02-22 23:20:19 +00:00
|
|
|
|
appimage-run
|
2022-12-18 15:15:15 +00:00
|
|
|
|
vlc
|
2022-12-18 15:18:35 +00:00
|
|
|
|
file
|
2022-12-30 16:30:13 +00:00
|
|
|
|
pavucontrol
|
2023-06-09 20:08:16 +00:00
|
|
|
|
nix-index
|
2022-12-18 15:15:15 +00:00
|
|
|
|
gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-libav gst_all_1.gst-vaapi gst_all_1.gst-plugins-bad gst_all_1.gst-plugins-good gst_all_1.gst-plugins-ugly
|
|
|
|
|
];
|
|
|
|
|
environment.gnome.excludePackages = with pkgs.gnome; [
|
2023-03-26 04:08:12 +00:00
|
|
|
|
pkgs.gnome-console
|
|
|
|
|
pkgs.gnome-text-editor
|
2023-03-21 19:42:03 +00:00
|
|
|
|
gnome-software
|
2022-12-18 15:15:15 +00:00
|
|
|
|
gnome-music
|
|
|
|
|
gedit
|
|
|
|
|
totem
|
|
|
|
|
];
|
2023-07-22 17:32:55 +00:00
|
|
|
|
fonts = {
|
|
|
|
|
fonts = with pkgs; with import packages/all-packages.nix nixpkgs; [
|
|
|
|
|
justseeds
|
|
|
|
|
manrope
|
|
|
|
|
google-fonts
|
|
|
|
|
comic-mono
|
|
|
|
|
atkinson-hyperlegible
|
|
|
|
|
];
|
|
|
|
|
fontDir.enable = true;
|
|
|
|
|
enableDefaultFonts = true;
|
|
|
|
|
fontconfig.defaultFonts = {
|
|
|
|
|
sansSerif = ["Atkinson Hyperlegible"];
|
|
|
|
|
monospace = ["Comic Mono:style=Normal"];
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-12-18 15:15:15 +00:00
|
|
|
|
|
|
|
|
|
# List services that you want to enable:
|
|
|
|
|
|
|
|
|
|
services = {
|
2023-03-21 19:42:03 +00:00
|
|
|
|
gnome.tracker.enable = false;
|
|
|
|
|
gnome.tracker-miners.enable = false;
|
2022-12-18 15:15:15 +00:00
|
|
|
|
flatpak = {
|
|
|
|
|
enable = true;
|
|
|
|
|
};
|
|
|
|
|
fwupd.enable = true;
|
2022-12-18 20:11:03 +00:00
|
|
|
|
syncthing = {
|
|
|
|
|
enable = true;
|
2022-12-19 17:25:25 +00:00
|
|
|
|
dataDir = "/home/ember";
|
|
|
|
|
configDir = "/home/ember/.config/syncthing";
|
2022-12-18 20:11:03 +00:00
|
|
|
|
user = "ember";
|
2022-12-19 17:25:25 +00:00
|
|
|
|
devices = {
|
2023-01-15 20:16:20 +00:00
|
|
|
|
redwood.name = "🍂 Redwood";
|
|
|
|
|
redwood.id =
|
|
|
|
|
"WY2GFMX-CQ52VBK-M3Y4JJH-4FIA6F2-NGB3S2I-SJ42D45-7FT77KH-2OGO2AZ";
|
2022-12-19 17:25:25 +00:00
|
|
|
|
|
|
|
|
|
mugwort.name = "🌿 Mugwort";
|
|
|
|
|
mugwort.id =
|
|
|
|
|
"GVJZF4E-5BYFG7U-P6KZPLL-CSM3O3H-JOJUZIX-YGZ3QXM-CHWTA4J-AG6KFQK";
|
|
|
|
|
|
|
|
|
|
kudzu.name = "🥦 Kudzu";
|
|
|
|
|
kudzu.id =
|
|
|
|
|
"RQUVE3L-D345NMM-4KUE7D6-PCJ3HIO-VFZNYJ6-BNF2YH3-6UBCXF7-NS5YKQR";
|
|
|
|
|
};
|
|
|
|
|
overrideDevices = true;
|
2022-12-18 20:11:03 +00:00
|
|
|
|
};
|
2023-01-15 22:07:03 +00:00
|
|
|
|
openssh = {
|
|
|
|
|
# Disable by default
|
2023-03-01 15:51:56 +00:00
|
|
|
|
banner = "Welcome to ${systemInformation.prettyHostname}!\n";
|
2023-07-22 17:31:43 +00:00
|
|
|
|
settings.PasswordAuthentication = false;
|
2023-01-15 22:07:03 +00:00
|
|
|
|
};
|
2022-12-18 15:15:15 +00:00
|
|
|
|
};
|
|
|
|
|
|
2023-03-16 15:15:47 +00:00
|
|
|
|
environment.machineInfo.prettyHostname = systemInformation.prettyHostname;
|
2023-03-01 15:51:56 +00:00
|
|
|
|
|
2022-12-18 15:15:15 +00:00
|
|
|
|
# Enable the OpenSSH daemon.
|
|
|
|
|
# services.openssh.enable = true;
|
|
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
|
networking.firewall.enable = false;
|
|
|
|
|
networking.hosts = {
|
|
|
|
|
"162.255.119.254" = ["www.librepunk.club"];
|
|
|
|
|
"129.21.49.69" = ["www.librepunk.club"];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# 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).
|
|
|
|
|
system.stateVersion = "22.11"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
# Set up hardware acceleration
|
|
|
|
|
# https://nixos.wiki/wiki/Accelerated_Video_Playback
|
|
|
|
|
hardware.opengl = {
|
|
|
|
|
enable = true;
|
|
|
|
|
extraPackages = with pkgs; [
|
|
|
|
|
intel-compute-runtime
|
|
|
|
|
intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
|
|
|
|
vaapiIntel # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
|
|
|
|
vaapiVdpau
|
|
|
|
|
libvdpau-va-gl
|
|
|
|
|
];
|
|
|
|
|
};
|
2022-12-18 17:38:51 +00:00
|
|
|
|
hardware.enableAllFirmware = true;
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = systemInformation.isIntel;
|
2023-01-15 20:17:21 +00:00
|
|
|
|
hardware.cpu.amd.updateMicrocode = systemInformation.isAmd;
|
2022-12-18 17:38:51 +00:00
|
|
|
|
|
2023-01-16 17:11:40 +00:00
|
|
|
|
nix.settings.auto-optimise-store = true;
|
2023-07-22 17:32:39 +00:00
|
|
|
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
2023-09-28 16:20:51 +00:00
|
|
|
|
|
|
|
|
|
# Needed for Gnome Boxes
|
|
|
|
|
virtualisation.libvirtd.enable = true;
|
|
|
|
|
virtualisation.spiceUSBRedirection.enable = true;
|
|
|
|
|
|
|
|
|
|
# Needed for Anbox
|
|
|
|
|
virtualisation.waydroid.enable = true;
|
2022-12-18 17:38:51 +00:00
|
|
|
|
}
|