2023-12-21 06:38:32 +00:00
|
|
|
{ pkgs, ... }:
|
2022-10-07 04:58:13 +00:00
|
|
|
let
|
2022-10-26 03:39:52 +00:00
|
|
|
persist = "/nix/persist";
|
2022-10-07 04:58:13 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
environment.etc = {
|
|
|
|
"machine-id".source = "${persist}/machine-id";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.openssh.hostKeys = [
|
2024-11-08 03:59:57 +00:00
|
|
|
{
|
|
|
|
type = "ed25519";
|
|
|
|
path = "${persist}/ssh_host_ed25519_key";
|
|
|
|
}
|
2022-10-07 04:58:13 +00:00
|
|
|
];
|
|
|
|
|
2024-10-26 06:44:50 +00:00
|
|
|
# services.ollama = {
|
|
|
|
# enable = true;
|
|
|
|
# acceleration = "cuda";
|
|
|
|
# };
|
|
|
|
# programs.bash.interactiveShellInit = ''
|
|
|
|
# alias ai='ollama run llama3.1:8b'
|
|
|
|
# '';
|
|
|
|
|
2022-10-07 04:58:13 +00:00
|
|
|
sconfig = {
|
|
|
|
gnome = true;
|
2023-03-27 15:21:48 +00:00
|
|
|
desktop.enable = true;
|
2024-11-08 03:59:57 +00:00
|
|
|
wg-home = {
|
|
|
|
enable = true;
|
|
|
|
path = "${persist}/wireguard_home.conf";
|
|
|
|
};
|
2022-10-07 04:58:13 +00:00
|
|
|
};
|
|
|
|
|
2022-10-26 03:39:52 +00:00
|
|
|
environment.persistence."${persist}/system".directories = [
|
|
|
|
"/etc/NetworkManager/system-connections"
|
2024-06-06 02:21:51 +00:00
|
|
|
"/tmp"
|
2022-11-19 22:27:29 +00:00
|
|
|
"/var/lib/bluetooth"
|
2022-10-26 03:39:52 +00:00
|
|
|
"/var/lib/nixos"
|
2024-09-30 03:05:05 +00:00
|
|
|
"/var/lib/private"
|
2023-06-23 17:11:01 +00:00
|
|
|
"/var/lib/systemd/coredump"
|
2022-10-26 16:32:15 +00:00
|
|
|
"/var/log/journal"
|
2024-06-06 02:21:51 +00:00
|
|
|
"/var/tmp"
|
2022-10-26 03:39:52 +00:00
|
|
|
];
|
|
|
|
|
2023-12-05 20:51:47 +00:00
|
|
|
environment.systemPackages = [
|
|
|
|
(pkgs.writeShellScriptBin "eco" ''
|
|
|
|
exec taskset ff000 "$@"
|
|
|
|
'')
|
|
|
|
];
|
2023-01-17 01:53:05 +00:00
|
|
|
|
2024-06-03 03:56:14 +00:00
|
|
|
nix.extraOptions = ''
|
|
|
|
extra-platforms = i686-linux
|
|
|
|
'';
|
|
|
|
|
2022-10-07 04:58:13 +00:00
|
|
|
boot = {
|
|
|
|
loader.systemd-boot.enable = true;
|
|
|
|
loader.efi.canTouchEfiVariables = true;
|
2024-11-08 03:59:57 +00:00
|
|
|
initrd.availableKernelModules = [
|
|
|
|
"xhci_pci"
|
|
|
|
"vmd"
|
|
|
|
"nvme"
|
|
|
|
"sd_mod"
|
|
|
|
];
|
2022-10-07 04:58:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
2024-11-08 03:59:57 +00:00
|
|
|
"/" = {
|
|
|
|
device = "tmpfs";
|
|
|
|
fsType = "tmpfs";
|
|
|
|
options = [ "mode=755" ];
|
|
|
|
};
|
|
|
|
"/boot" = {
|
|
|
|
fsType = "vfat";
|
|
|
|
device = "/dev/nvme0n1p1";
|
|
|
|
};
|
|
|
|
"/nix" = {
|
|
|
|
device = "levi/nix";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
|
|
|
"/home" = {
|
|
|
|
device = "levi/home";
|
|
|
|
fsType = "zfs";
|
|
|
|
};
|
2022-10-07 04:58:13 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
users.mutableUsers = false;
|
2023-11-27 20:21:55 +00:00
|
|
|
users.users.sean.hashedPasswordFile = "${persist}/shadow_sean";
|
|
|
|
users.users.root.hashedPasswordFile = "${persist}/shadow_sean";
|
2022-10-07 04:58:13 +00:00
|
|
|
|
2023-04-12 14:20:43 +00:00
|
|
|
services.zfs.trim.interval = "03:05";
|
|
|
|
|
2022-10-07 04:58:13 +00:00
|
|
|
hardware.cpu.intel.updateMicrocode = true;
|
|
|
|
hardware.enableRedistributableFirmware = true;
|
|
|
|
system.stateVersion = "22.05";
|
|
|
|
}
|