xin/hosts/europa/default.nix

200 lines
4.1 KiB
Nix
Raw Normal View History

2022-11-16 21:19:35 -07:00
{ config, pkgs, lib, modulesPath, inputs, ... }:
let
2022-09-11 09:44:34 -06:00
myEmacs = pkgs.callPackage ../../configs/emacs.nix { };
2022-11-28 21:36:55 -07:00
kurinto = pkgs.callPackage ../../pkgs/kurinto.nix { };
peerixUser = if builtins.hasAttr "peerix" config.users.users then
config.users.users.peerix.name
else
"root";
2022-08-25 12:21:35 -06:00
in {
_module.args.isUnstable = true;
imports =
[ ./hardware-configuration.nix ../../pkgs ../../configs/neomutt.nix ];
2022-08-25 12:21:35 -06:00
sops.secrets = {
fastmail = {
sopsFile = config.xin-secrets.europa.qbit;
owner = "qbit";
group = "wheel";
mode = "400";
};
fastmail_user = {
sopsFile = config.xin-secrets.europa.qbit;
owner = "qbit";
group = "wheel";
mode = "400";
};
nix_review = {
sopsFile = config.xin-secrets.europa.qbit;
owner = "qbit";
group = "wheel";
mode = "400";
};
netrc = {
sopsFile = config.xin-secrets.europa.qbit;
owner = "qbit";
group = "wheel";
mode = "400";
};
2022-08-30 15:56:37 -06:00
peerix_private_key = {
sopsFile = config.xin-secrets.europa.peerix;
owner = "${peerixUser}";
2022-08-30 15:56:37 -06:00
group = "wheel";
mode = "400";
};
2022-08-25 12:21:35 -06:00
};
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
nixpkgs.config.allowUnsupportedSystem = true;
boot = {
2022-11-16 20:25:14 -07:00
initrd.systemd.enable = true;
2022-08-25 12:21:35 -06:00
loader = {
systemd-boot.enable = true;
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
2022-08-25 12:21:35 -06:00
};
2022-09-08 06:26:54 -06:00
kernelParams = [ "boot.shell_on_fail" "mem_sleep_default=deep" ];
kernelPackages = pkgs.linuxPackages;
2022-08-25 12:21:35 -06:00
};
programs.zsh.shellAliases = {
2022-09-26 10:51:05 -06:00
"nixpkgs-review" =
"GITHUB_TOKEN=$(cat /run/secrets/nix_review) nixpkgs-review";
2022-08-25 12:21:35 -06:00
"neomutt" = "neomutt -F /etc/neomuttrc";
"mutt" = "neomutt -F /etc/neomuttrc";
};
sshFidoAgent.enable = true;
nixManager = {
enable = true;
user = "qbit";
};
kde.enable = true;
jetbrains.enable = true;
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true;
networking = {
hostName = "europa";
hostId = "87703c3e";
wireless.userControlled.enable = true;
networkmanager.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [ 22 ];
checkReversePath = "loose";
};
};
2022-08-30 15:56:37 -06:00
tsPeerix = {
2022-09-01 12:14:46 -06:00
enable = false;
2022-08-30 15:56:37 -06:00
privateKeyFile = "${config.sops.secrets.peerix_private_key.path}";
2022-09-01 08:09:01 -06:00
interfaces = [ "wlp170s0" "ztksevmpn3" ];
2022-08-30 15:56:37 -06:00
};
2022-08-25 12:21:35 -06:00
programs.steam.enable = true;
2022-08-25 12:21:35 -06:00
services = {
2022-11-26 06:31:10 -07:00
startpage.enable = false;
2022-11-16 21:18:36 -07:00
vnstat.enable = true;
2022-09-21 16:35:46 -06:00
clamav.updater.enable = true;
2022-09-11 09:44:34 -06:00
emacs = {
enable = true;
package = myEmacs;
install = true;
};
2022-08-25 12:21:35 -06:00
tor = {
enable = true;
client.enable = true;
};
cron = {
enable = true;
systemCronJobs = [
2022-09-16 20:38:12 -06:00
"*/2 * * * * qbit . /etc/profile; (cd ~/Brain && git sync) >/dev/null 2>&1"
2022-08-25 12:21:35 -06:00
"*/5 * * * * qbit . /etc/profile; (cd ~/org && git sync) >/dev/null 2>&1"
2022-10-17 08:09:34 -06:00
"*/30 * * * * qbit . /etc/profile; taskobs"
2022-08-25 12:21:35 -06:00
];
};
2022-09-08 06:26:54 -06:00
2022-08-25 12:21:35 -06:00
fwupd = {
enable = true;
enableTestRemote = true;
};
udev.extraRules = ''
SUBSYSTEM=="usb", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="5bf0", GROUP="users", TAG+="uaccess"
'';
};
2022-11-04 09:03:41 -06:00
users.users.qbit.extraGroups = [ "dialout" "libvirtd" ];
2022-08-25 12:21:35 -06:00
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
arcanPackages.all-wrapped
barrier
2022-09-06 13:37:44 -06:00
calibre
2022-08-25 12:21:35 -06:00
cider
2022-10-14 07:31:38 -06:00
clementine
2022-08-25 12:21:35 -06:00
drawterm
element-desktop
2022-11-15 13:24:12 -07:00
cinny-desktop
2022-08-25 12:21:35 -06:00
exercism
2022-09-08 18:16:56 -06:00
fido2luks
2022-08-25 12:21:35 -06:00
isync
klavaro
linphone
logseq
2022-10-14 07:32:14 -06:00
minicom
2022-08-25 12:21:35 -06:00
mu
2022-09-12 07:18:48 -06:00
nheko
2022-08-25 12:21:35 -06:00
nix-index
nixpkgs-review
2022-08-25 12:21:35 -06:00
nix-top
2022-08-30 15:57:40 -06:00
nmap
2022-09-14 14:21:30 -06:00
obsidian
pharo
pharo-launcher
2022-08-25 12:21:35 -06:00
rofi
signal-desktop
taskobs
2022-08-30 15:57:40 -06:00
tcpdump
2022-08-25 12:21:35 -06:00
tidal-hifi
tigervnc
2022-08-30 15:57:40 -06:00
unzip
2022-09-11 19:17:13 -06:00
virt-manager
2022-08-25 12:21:35 -06:00
yt-dlp
2022-08-30 20:53:03 -06:00
zig
2022-11-16 21:28:02 -07:00
(callPackage ../../pkgs/zutty.nix { })
2022-11-28 21:36:55 -07:00
kurinto
2022-08-25 12:21:35 -06:00
];
# for Pharo
security.pam.loginLimits = [
{
domain = "qbit";
type = "hard";
item = "rtprio";
value = "2";
}
{
domain = "qbit";
type = "soft";
item = "rtprio";
value = "2";
}
];
2022-11-08 14:54:41 -07:00
system.autoUpgrade.allowReboot = false;
2022-08-25 12:21:35 -06:00
system.stateVersion = "21.11";
}