nixos/hosts/gendry.jakehillion-terminals.ts.hillion.co.uk/default.nix

96 lines
2.3 KiB
Nix
Raw Normal View History

2022-11-18 20:47:23 +00:00
{ config, pkgs, lib, ... }:
{
imports = [
2023-01-24 20:26:59 +00:00
./bluetooth.nix
2022-11-18 20:47:23 +00:00
./hardware-configuration.nix
];
2023-04-08 15:29:11 +01:00
config = {
system.stateVersion = "22.05";
networking.hostName = "gendry";
networking.domain = "jakehillion-terminals.ts.hillion.co.uk";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
custom.defaults = true;
2023-07-26 21:05:14 +01:00
## Impermanence
custom.impermanence = {
enable = true;
userExtraFiles.jake = [
".ssh/id_rsa"
".ssh/id_ecdsa"
];
userExtraDirs.jake = [
".local/share/PrismLauncher"
];
};
2024-07-16 18:15:22 +01:00
## Enable ZRAM swap to help with root on tmpfs
zramSwap = {
enable = true;
memoryPercent = 200;
algorithm = "zstd";
};
2023-04-19 20:41:53 +01:00
## Desktop
2024-02-07 21:54:26 +00:00
custom.users.jake.password = true;
2023-04-19 20:41:53 +01:00
custom.desktop.awesome.enable = true;
2023-04-08 15:29:11 +01:00
## Resilio
custom.resilio.enable = true;
services.resilio.deviceName = "gendry.jakehillion-terminals";
services.resilio.directoryRoot = "/data/sync";
services.resilio.storagePath = "/data/sync/.sync";
custom.resilio.folders =
let
folderNames = [
"dad"
"joseph"
"projects"
"resources"
"sync"
];
mkFolder = name: {
name = name;
secret = {
name = "resilio/plain/${name}";
file = ../../secrets/resilio/plain/${name}.age;
};
};
in
builtins.map (mkFolder) folderNames;
2022-11-18 20:47:23 +00:00
2023-04-08 15:29:11 +01:00
## Tailscale
age.secrets."tailscale/gendry.jakehillion-terminals.ts.hillion.co.uk".file = ../../secrets/tailscale/gendry.jakehillion-terminals.ts.hillion.co.uk.age;
services.tailscale = {
2023-04-17 21:22:04 +01:00
enable = true;
authKeyFile = config.age.secrets."tailscale/gendry.jakehillion-terminals.ts.hillion.co.uk".path;
2023-04-17 21:22:04 +01:00
};
2022-11-18 20:47:23 +00:00
2023-04-08 15:29:11 +01:00
security.sudo.wheelNeedsPassword = lib.mkForce true;
2022-11-18 20:47:23 +00:00
2023-04-08 15:29:11 +01:00
## Enable btrfs compression
fileSystems."/data".options = [ "compress=zstd" ];
fileSystems."/nix".options = [ "compress=zstd" ];
2023-01-07 17:02:16 +00:00
2023-04-08 15:29:11 +01:00
## Graphics
boot.initrd.kernelModules = [ "amdgpu" ];
services.xserver.videoDrivers = [ "amdgpu" ];
2022-11-18 20:47:23 +00:00
2023-05-12 18:27:06 +01:00
users.users."${config.custom.user}" = {
packages = with pkgs; [
prismlauncher
];
};
2024-04-26 19:29:13 +01:00
## Networking
networking.nameservers = lib.mkForce [ ]; # Trust the DHCP nameservers
2023-01-21 18:32:16 +00:00
};
}