nixos-config/hosts/ni/default.nix

206 lines
4.8 KiB
Nix
Raw Normal View History

2022-07-28 09:29:58 +00:00
{ config, pkgs, lib, ... }:
{
imports = [
# Include the results of the hardware scan.
2021-11-25 13:45:48 +00:00
./hardware-configuration.nix
./modules/wireguard.nix
(lib.mapHomeManagerUser "foo-dogsquared" {
2022-08-10 04:14:11 +00:00
extraGroups = [
"adbusers"
"wheel"
"audio"
"docker"
"podman"
"networkmanager"
2023-02-11 01:01:31 +00:00
"wireshark"
2022-08-10 04:14:11 +00:00
];
hashedPassword =
"$6$.cMYto0K0CHbpIMT$dRqyKs4q1ppzmTpdzy5FWP/V832a6X..FwM8CJ30ivK0nfLjQ7DubctxOZbeOtygfjcUd1PZ0nQoQpOg/WMvg.";
isNormalUser = true;
createHome = true;
home = "/home/foo-dogsquared";
description = "Gabriel Arazas";
})
2021-11-25 13:45:48 +00:00
];
2023-06-30 05:38:22 +00:00
disko.devices = import ./disko.nix {
disks = [ "/dev/nvme0n1" ];
};
services.openssh.hostKeys = [{
path = config.sops.secrets."ssh-key".path;
type = "ed25519";
}];
2022-12-31 03:13:27 +00:00
2023-09-11 02:14:39 +00:00
# My portable music streaming server.
2023-05-27 05:17:35 +00:00
services.gonic = {
enable = true;
settings = {
listen-addr = "127.0.0.1:4747";
cache-path = "/var/cache/gonic";
music-path = [
"/srv/music"
];
podcast-path = "/var/cache/gonic/podcasts";
jukebox-enabled = true;
scan-interval = 1;
scan-at-start-enabled = true;
};
};
2023-07-05 03:38:58 +00:00
sops.secrets = lib.getSecrets ./secrets/secrets.yaml {
"ssh-key" = { };
2023-07-05 03:38:58 +00:00
};
2022-12-31 03:13:27 +00:00
2023-09-11 02:14:39 +00:00
# The keyfile required for the secrets to be decrypted.
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
2023-09-11 02:14:39 +00:00
# Get the latest kernel for the desktop experience.
boot.kernelPackages = pkgs.linuxPackages_latest;
2023-09-11 02:14:39 +00:00
# Adding a bunch of emulated systems for cross-system building.
2022-05-20 06:47:09 +00:00
boot.binfmt.emulatedSystems = [
"aarch64-linux"
"riscv64-linux"
];
2023-09-11 02:14:39 +00:00
# Wanna be a wannabe haxxor, kid?
2023-02-11 01:01:31 +00:00
programs.wireshark.package = pkgs.wireshark;
2023-09-11 02:14:39 +00:00
# We're using some better filesystems so we're using it.
2022-07-14 00:20:02 +00:00
boot.initrd.supportedFilesystems = [ "btrfs" ];
boot.supportedFilesystems = [ "btrfs" ];
services.btrfs.autoScrub = {
enable = true;
fileSystems = [
"/mnt/archives"
];
};
# My custom configuration with my custom modules starts here.
profiles = {
2022-07-14 00:20:02 +00:00
i18n.enable = true;
archiving.enable = true;
browsers = {
firefox.enable = true;
chromium.enable = true;
};
desktop = {
enable = true;
audio.enable = true;
fonts.enable = true;
2021-12-06 07:27:51 +00:00
hardware.enable = true;
cleanup.enable = true;
wine.enable = true;
};
dev = {
enable = true;
shell.enable = true;
virtualization.enable = true;
neovim.enable = true;
};
2023-06-06 05:50:17 +00:00
gaming = {
enable = true;
emulators.enable = true;
retro-computing.enable = true;
};
2023-07-24 07:24:49 +00:00
filesystem = {
tools.enable = true;
setups.personal-webstorage.enable = true;
};
2023-06-06 05:50:17 +00:00
vpn.personal.enable = true;
};
2023-09-17 05:57:44 +00:00
# This is somewhat used for streaming games from it.
programs.steam.remotePlay.openFirewall = true;
2023-09-27 06:22:39 +00:00
programs.blender = {
enable = true;
package = pkgs.blender-with-packages {
name = "foodogsquared-wrapped";
packages = with pkgs.python3Packages; [ pandas ];
};
addons = with pkgs; [
blender-blendergis
blender-machin3tools
];
};
2023-09-17 05:58:59 +00:00
# Backup for the almighty archive, pls.
tasks.backup-archive.enable = true;
2023-09-17 05:58:59 +00:00
# The most extensible desktop environment with the greatest toolset of all
# time (arguably but it is great).
workflows.workflows.a-happy-gnome.enable = true;
2022-08-10 04:14:11 +00:00
programs.wezterm.enable = true;
programs.adb.enable = true;
2023-09-17 05:58:59 +00:00
# Basically, the most basic nixpkgs configuration.
2023-09-24 11:20:05 +00:00
environment.variables.NIXPKGS_CONFIG = lib.mkForce ./config/nixpkgs/config.nix;
2022-02-02 04:25:03 +00:00
environment.systemPackages = with pkgs; [
# Some sysadmin thingamajigs.
openldap
wireguard-tools
(swh.swh-core.overrideAttrs (attrs: {
pythonPath = with pkgs.swh; [
swh-model
2023-05-09 08:17:09 +00:00
swh-fuse
];
}))
# For debugging build environments in Nix packages.
cntr
# Searchsploit.
exploitdb
2022-02-02 04:25:03 +00:00
];
# Enable Guix service.
services.guix.enable = true;
# Set your time zone.
time.timeZone = "Asia/Manila";
# Doxxing myself.
location = {
latitude = 15.0;
longitude = 121.0;
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
programs.mtr.enable = true;
2021-12-19 09:39:18 +00:00
services.auto-cpufreq.enable = true;
services.thermald.enable = true;
2021-12-26 10:43:49 +00:00
services.avahi.enable = true;
2021-12-19 09:39:18 +00:00
# We'll go with a software firewall. We're mostly configuring it as if we're
# using a server even though the chances of that is pretty slim.
networking = {
nftables.enable = true;
firewall = {
enable = true;
allowedTCPPorts = [
22 # Secure Shells.
];
};
};
2023-06-19 04:28:33 +00:00
services.resolved.domains = [
"~plover.foodogsquared.one"
"~0.27.172.in-addr.arpa"
"~0.28.172.in-addr.arpa"
];
system.stateVersion = "23.11"; # Yes! I read the comment!
}