2022-01-18 09:32:55 +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’).
|
|
|
|
|
|
2022-03-05 18:52:59 +01:00
|
|
|
|
{ config, pkgs, stablePkgs, impermanence, ... }:
|
2022-02-23 12:40:21 +01:00
|
|
|
|
|
2022-04-24 16:53:55 +02:00
|
|
|
|
let home = "/home/rilla";
|
2022-05-12 11:00:26 +02:00
|
|
|
|
|
2022-04-24 16:53:55 +02:00
|
|
|
|
in {
|
2022-02-23 12:40:21 +01:00
|
|
|
|
imports = [ ./nixos/hardware-configuration/capibara.nix ./nixos/common.nix ];
|
|
|
|
|
|
2022-03-05 18:52:59 +01:00
|
|
|
|
home-manager = {
|
|
|
|
|
users.rilla.imports =
|
|
|
|
|
[ home/capibara.nix "${impermanence}/home-manager.nix" ];
|
|
|
|
|
extraSpecialArgs.stablePkgs = stablePkgs;
|
|
|
|
|
};
|
2022-01-25 12:27:52 +01:00
|
|
|
|
|
2022-05-12 11:00:26 +02:00
|
|
|
|
fileSystems = {
|
|
|
|
|
"/persist" = {
|
|
|
|
|
device = "/dev/mapper/root";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=persist" "compress=zstd" ];
|
|
|
|
|
neededForBoot = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-05-25 09:58:20 +02:00
|
|
|
|
"/logs" = {
|
|
|
|
|
device = "/dev/mapper/root";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=logs" "compress=zstd" ];
|
|
|
|
|
neededForBoot = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
"/data" = {
|
|
|
|
|
device = "/dev/mapper/root";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=data" "compress=zstd" ];
|
|
|
|
|
neededForBoot = true;
|
|
|
|
|
};
|
|
|
|
|
|
2022-05-12 11:00:26 +02:00
|
|
|
|
"/nix" = {
|
|
|
|
|
device = "/dev/mapper/root";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=nix" "compress=zstd" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
"/boot" = {
|
|
|
|
|
device = "/dev/mapper/root";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=boot" "compress=zstd" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
"/swap" = {
|
|
|
|
|
device = "/dev/mapper/root";
|
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=swap" ];
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-01-18 09:32:55 +01:00
|
|
|
|
|
2022-04-24 16:53:55 +02:00
|
|
|
|
environment.variables = {
|
|
|
|
|
NIXOS_CONFIG = "${home}/configs/nix-config/capibara.nix";
|
|
|
|
|
LV2_PATH =
|
|
|
|
|
"${home}/.nix-profile/lib/lv2:${home}/Audio/plugins/lv2:/run/current-system/sw/lib/lv2";
|
|
|
|
|
LXVST_PATH =
|
|
|
|
|
"${home}/.nix-profile/lib/lxvst:${home}/Audio/plugins/lxvst:/run/current-system/sw/lib/lxvst";
|
|
|
|
|
LADSPA_PATH =
|
|
|
|
|
"${home}/.nix-profile/lib/ladspa:${home}/Audio/plugins/ladspa:/run/current-system/sw/lib/ladspa";
|
|
|
|
|
};
|
2022-01-19 16:34:20 +01:00
|
|
|
|
|
2022-01-18 09:32:55 +01:00
|
|
|
|
networking.networkmanager.wifi.macAddress = "CC:AF:78:75:29:32";
|
|
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
programs.steam.enable = true;
|
|
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
|
|
|
|
|
|
loader = {
|
|
|
|
|
grub = {
|
|
|
|
|
efiSupport = false;
|
|
|
|
|
efiInstallAsRemovable = false;
|
|
|
|
|
enable = true;
|
|
|
|
|
version = 2;
|
2022-05-12 11:00:26 +02:00
|
|
|
|
# device = "/dev/disk/by-id/ata-KINGSTON_SKC600MS512G_50026B7783FC3D2F";
|
|
|
|
|
device = "/dev/disk/by-id/ata-WDC_WDBNCE0010PNC_21112S803178";
|
2022-01-18 09:32:55 +01:00
|
|
|
|
enableCryptodisk = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
initrd = {
|
|
|
|
|
luks.devices = {
|
2022-05-12 11:00:26 +02:00
|
|
|
|
root = {
|
2022-01-18 09:32:55 +01:00
|
|
|
|
device = "/dev/disk/by-uuid/0fdb839e-dee8-4374-81e6-4455cfc3ae39";
|
2022-05-12 11:00:26 +02:00
|
|
|
|
keyFile = "/keyfile.bin";
|
2022-02-13 14:33:47 +01:00
|
|
|
|
allowDiscards = true;
|
2022-01-18 09:32:55 +01:00
|
|
|
|
};
|
|
|
|
|
};
|
2022-05-12 11:00:26 +02:00
|
|
|
|
secrets = { "/keyfile.bin" = "/boot/keyfile.bin"; };
|
2022-01-18 09:32:55 +01:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2022-02-25 18:19:13 +01:00
|
|
|
|
services.earlyoom.enable = true;
|
|
|
|
|
|
|
|
|
|
# Power management
|
|
|
|
|
powerManagement.enable = true;
|
|
|
|
|
services.upower.enable = true;
|
2022-03-05 18:52:59 +01:00
|
|
|
|
# services.thermald.enable = true;
|
2022-02-25 18:19:13 +01:00
|
|
|
|
services.tlp.enable = true;
|
|
|
|
|
services.power-profiles-daemon.enable = false;
|
|
|
|
|
environment.systemPackages = with pkgs; [ powertop acpi ];
|
|
|
|
|
|
2022-01-18 09:32:55 +01:00
|
|
|
|
networking = {
|
|
|
|
|
hostName = "capibara";
|
|
|
|
|
interfaces = {
|
|
|
|
|
eno0.useDHCP = true;
|
|
|
|
|
wlp2s0.useDHCP = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
# 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 = "21.05"; # Did you read the comment?
|
|
|
|
|
}
|