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’).
|
|
|
|
|
|
|
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
2022-01-25 12:27:52 +01:00
|
|
|
|
let
|
|
|
|
|
impermanence = builtins.fetchTarball {
|
|
|
|
|
url = "https://github.com/nix-community/impermanence/archive/master.tar.gz";
|
|
|
|
|
};
|
|
|
|
|
home-manager = builtins.fetchTarball {
|
|
|
|
|
url =
|
|
|
|
|
"https://github.com/nix-community/home-manager/archive/release-21.11.tar.gz";
|
|
|
|
|
};
|
|
|
|
|
in {
|
2022-01-18 09:32:55 +01:00
|
|
|
|
imports = [ # Include the results of the hardware scan.
|
2022-01-25 12:27:52 +01:00
|
|
|
|
./nixos/hardware-configuration/trantor.nix
|
|
|
|
|
./nixos/common.nix
|
|
|
|
|
"${home-manager}/nixos"
|
|
|
|
|
"${impermanence}/nixos.nix"
|
2022-01-18 09:32:55 +01:00
|
|
|
|
];
|
|
|
|
|
|
2022-01-25 12:27:52 +01:00
|
|
|
|
home-manager.users.rilla = import home/trantor.nix;
|
|
|
|
|
|
2022-01-18 09:32:55 +01:00
|
|
|
|
fileSystems = {
|
|
|
|
|
"/" = {
|
2022-01-25 12:34:22 +01:00
|
|
|
|
device = "/dev/mapper/system";
|
2022-01-18 09:32:55 +01:00
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=root" "compress-force=zstd" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
"/nix" = {
|
2022-01-25 12:34:22 +01:00
|
|
|
|
device = "/dev/mapper/system";
|
2022-01-18 09:32:55 +01:00
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=nix" "compress-force=zstd" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
"/var/log" = {
|
2022-01-25 12:34:22 +01:00
|
|
|
|
device = "/dev/mapper/system";
|
2022-01-18 09:32:55 +01:00
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=log" "compress-force=zstd" ];
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
"/home" = {
|
2022-01-25 12:34:22 +01:00
|
|
|
|
device = "/dev/mapper/user";
|
2022-01-18 09:32:55 +01:00
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=home" "compress-force=zstd" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-01-25 12:27:52 +01:00
|
|
|
|
"/boot/efi" = {
|
|
|
|
|
device = "/dev/disk/by-uuid/0BFA-9A66";
|
|
|
|
|
fsType = "vfat";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
"/home/rilla/Maildir" = {
|
2022-01-25 12:34:22 +01:00
|
|
|
|
device = "/dev/mapper/user";
|
2022-01-18 09:32:55 +01:00
|
|
|
|
fsType = "btrfs";
|
2022-01-25 12:27:52 +01:00
|
|
|
|
options = [ "subvol=mail" "compress-force=zstd" ];
|
2022-01-18 09:32:55 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
"/swap" = {
|
2022-01-25 12:34:22 +01:00
|
|
|
|
device = "/dev/mapper/system";
|
2022-01-18 09:32:55 +01:00
|
|
|
|
fsType = "btrfs";
|
|
|
|
|
options = [ "subvol=swap" ];
|
|
|
|
|
};
|
|
|
|
|
|
2022-01-25 12:27:52 +01:00
|
|
|
|
# "/home/rilla/music" = {
|
|
|
|
|
# device = "narwhal:/music";
|
|
|
|
|
# fsType = "nfs";
|
|
|
|
|
# options = [
|
|
|
|
|
# "nfsvers=4"
|
|
|
|
|
# "noauto"
|
|
|
|
|
# "x-systemd.automount"
|
|
|
|
|
# "x-systemd.idle-timeout=1min"
|
|
|
|
|
# ];
|
|
|
|
|
# };
|
|
|
|
|
|
|
|
|
|
# "/home/rilla/calibre" = {
|
|
|
|
|
# device = "narwhal:/calibre";
|
|
|
|
|
# fsType = "nfs";
|
|
|
|
|
# options = [
|
|
|
|
|
# "nfsvers=4"
|
|
|
|
|
# "noauto"
|
|
|
|
|
# "x-systemd.automount"
|
|
|
|
|
# "x-systemd.idle-timeout=1min"
|
|
|
|
|
# ];
|
|
|
|
|
# };
|
2022-01-18 09:32:55 +01:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
swapDevices = [{ device = "/swap/swapfile"; }];
|
|
|
|
|
|
2022-01-25 12:27:52 +01:00
|
|
|
|
environment.variables = {
|
|
|
|
|
NIXOS_CONFIG = "/home/rilla/configs/nix-config/trantor.nix";
|
|
|
|
|
WINT_HDPI_FACTOR = "1";
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking.networkmanager.wifi.macAddress = "80:FA:5B:41:12:0F";
|
|
|
|
|
|
2022-01-18 09:32:55 +01:00
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
2022-01-25 12:27:52 +01:00
|
|
|
|
programs.steam.enable = true;
|
2022-01-18 09:32:55 +01:00
|
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
|
loader = {
|
|
|
|
|
systemd-boot.enable = true;
|
|
|
|
|
efi = {
|
|
|
|
|
canTouchEfiVariables = true;
|
|
|
|
|
efiSysMountPoint = "/boot/efi";
|
|
|
|
|
};
|
|
|
|
|
grub = {
|
|
|
|
|
enable = true;
|
|
|
|
|
version = 2;
|
|
|
|
|
device = "nodev";
|
|
|
|
|
enableCryptodisk = true;
|
2022-01-25 12:27:52 +01:00
|
|
|
|
efiSupport = true;
|
2022-01-18 09:32:55 +01:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
initrd = {
|
|
|
|
|
luks.devices = {
|
2022-01-25 12:34:22 +01:00
|
|
|
|
"system" = {
|
2022-01-18 09:32:55 +01:00
|
|
|
|
device = "/dev/disk/by-uuid/b9778e01-a86c-4c6b-beb3-f97888d4a6eb";
|
|
|
|
|
keyFile = "/root_keyfile.bin";
|
|
|
|
|
};
|
2022-01-25 12:34:22 +01:00
|
|
|
|
"user" = {
|
2022-01-18 09:32:55 +01:00
|
|
|
|
device = "/dev/disk/by-uuid/d8e9b35d-704a-4f66-bc19-0dd3e158de36";
|
|
|
|
|
keyFile = "/home_keyfile.bin";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
secrets = {
|
2022-01-25 12:34:22 +01:00
|
|
|
|
"/root_keyfile.bin" = "/boot/system_keyfile.bin";
|
|
|
|
|
"/home_keyfile.bin" = "/boot/user_keyfile.bin";
|
2022-01-18 09:32:55 +01:00
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
networking = {
|
|
|
|
|
hostName = "trantor";
|
|
|
|
|
interfaces = {
|
|
|
|
|
enp3s0f1.useDHCP = true;
|
|
|
|
|
wlp4s0.useDHCP = true;
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2022-01-25 12:27:52 +01:00
|
|
|
|
services.xserver = { videoDrivers = [ "nvidia" ]; };
|
|
|
|
|
hardware.nvidia = {
|
|
|
|
|
nvidiaPersistenced = true;
|
|
|
|
|
modesetting.enable = true;
|
|
|
|
|
prime = {
|
|
|
|
|
sync.enable = true;
|
|
|
|
|
nvidiaBusId = "PCI:1:0:0";
|
|
|
|
|
intelBusId = "PCI:0:2:0";
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
2022-01-18 09:32:55 +01: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).
|
|
|
|
|
system.stateVersion = "21.05"; # Did you read the comment?
|
|
|
|
|
}
|