Initial commit

This commit is contained in:
2025-09-01 14:21:12 +03:00
commit 5787dcd528
47 changed files with 3079 additions and 0 deletions

109
hosts/fenixpc/default.nix Normal file
View File

@@ -0,0 +1,109 @@
{
config,
lib,
pkgs,
pkgsStable,
...
}:
let
users = [
"fenix"
];
in
{
imports = (
import ../../quirks {
quirks = [
"development"
"steam"
"32bit"
];
}
);
home-manager = {
users = lib.genAttrs users (user: import ./${user}.nix);
};
networking = {
hostName = "fenixpc";
networkmanager = {
plugins =
with pkgs;
lib.mkForce [
networkmanager-openvpn
];
};
};
systemd.oomd.extraConfig.DefaultMemoryPressureLimit = "15%";
programs = {
zsh.enable = true;
};
services = {
printing.ricoh.enable = true;
calibre-web = {
enable = true;
listen.port = 8091;
listen.ip = "0.0.0.0";
package = pkgsStable.calibre-web;
options = {
enableBookUploading = true;
enableBookConversion = true;
};
user = "fenix";
};
};
environment.systemPackages = with pkgs; [
microcode-amd
openvpn
];
users = {
mutableUsers = true;
users = lib.genAttrs users (user: {
shell = pkgs.zsh;
createHome = true;
isNormalUser = true;
initialPassword = "password";
group = "fenix";
extraGroups = [
"networkmanager"
"ssh"
"docker"
"video"
"pipewire"
"wheel"
];
});
groups = {
i2c = {
members = users;
};
}
// lib.genAttrs users (user: {
members = [
user
];
gid = config.users.users.${user}.uid;
});
};
virtualisation.vmVariant = {
virtualisation = {
memorySize = 16096;
cores = 8;
};
};
security.pam = {
services = lib.genAttrs users (user: {
gnupg.enable = true;
kwallet.enable = true;
});
};
}

62
hosts/fenixpc/fenix.nix Normal file
View File

@@ -0,0 +1,62 @@
{
pkgs,
lib,
config,
...
}:
let
userName = "fenix";
in
{
pt.enable = true;
home = {
username = userName;
homeDirectory = lib.mkForce "/home/${userName}";
packages = with pkgs; [
# Games
steam
prismlauncher
(bottles.override { removeWarningPopup = true; })
warzone2100
sauerbraten
#Development
devenv
direnv
yaml-language-server
plantuml
jetbrains.goland
gnumake
protobuf
];
};
programs = {
zsh.enable = true;
git.enable = true;
vscode.enable = true;
gpg.enable = true;
neovim.enable = true;
vivaldi = {
enable = true;
};
direnv = {
enableZshIntegration = config.programs.zsh.enable;
};
};
services = {
syncthing = {
enable = true;
settings.folders.Documents.enabled = true;
settings.folders.Music.enabled = true;
settings.folders.Obsidian.enabled = true;
settings.folders."Camera S25".enabled = true;
settings.folders.PhotoArchive.enabled = true;
settings.folders.books.enabled = true;
};
};
}

View File

@@ -0,0 +1,153 @@
{ ... }:
{
swappiness = 10;
boot = {
binfmt.emulatedSystems = [ "aarch64-linux" ];
resumeDevice = "/dev/disk/by-uuid/56ad966f-3268-4b59-999a-48a082bb8052";
initrd = {
verbose = true;
systemd = {
emergencyAccess = "$y$j9T$yu1NICt8J9IFQ3wmgViop1$8rCHUrMNN2dCQeSt8f4h73Wrw5oUKoojuhetYyV7yN";
enable = true;
};
availableKernelModules = [
"thunderbolt"
"nvme"
"usbhid"
"usb_storage"
];
kernelModules = [
"kvm-amd"
"amdgpu"
];
};
kernelModules = [
"kvm-amd"
"amdgpu"
"i2c-dev"
];
kernelParams = [
"usbcore.autosuspend=-1"
"quiet"
"modeset"
];
};
fileSystems = {
"/boot" = {
device = "/dev/disk/by-uuid/71AB-29E0";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
"/" = {
device = "/dev/disk/by-uuid/57df3204-a8c7-4842-957c-9752f996bc0f";
fsType = "btrfs";
options = [
"compress=zstd"
"subvol=/root"
"noatime"
];
};
"/home" = {
device = "/dev/disk/by-uuid/57df3204-a8c7-4842-957c-9752f996bc0f";
fsType = "btrfs";
options = [
"compress=zstd"
"subvol=/home"
"noatime"
];
};
"/nix" = {
device = "/dev/disk/by-uuid/57df3204-a8c7-4842-957c-9752f996bc0f";
fsType = "btrfs";
options = [
"compress=zstd"
"subvol=/nix"
"noatime"
];
};
"/mnt/steamapps" = {
device = "LABEL=garage";
fsType = "btrfs";
options = [
"subvol=steam"
"compress=zstd"
"noatime"
];
};
"/home/fenix/Downloads" = {
device = "LABEL=hddstorage";
fsType = "btrfs";
options = [
"subvol=downloads"
"compress=zstd"
"noatime"
];
};
"/home/fenix/Photos" = {
device = "LABEL=hddstorage";
fsType = "btrfs";
options = [
"subvol=photo"
"compress=zstd"
"noatime"
];
};
"/home/fenix/Music" = {
device = "LABEL=hddstorage";
fsType = "btrfs";
options = [
"subvol=music"
"compress=zstd"
"noatime"
];
};
"/mnt/hdd" = {
device = "LABEL=hddstorage";
fsType = "btrfs";
options = [
"compress=zstd"
"noatime"
];
};
"/home/fenix/Videos" = {
device = "nas.fxnet:/mnt/raid/video";
fsType = "nfs";
options = [
"rw"
"soft"
"noauto"
"_netdev"
"x-systemd.automount"
];
};
"/mnt/nas/torrents" = {
device = "nas.fxnet:/mnt/raid/torrents";
fsType = "nfs";
options = [
"rw"
"soft"
"noauto"
"_netdev"
"x-systemd.automount"
];
};
};
swapDevices = [
{
device = "/dev/disk/by-uuid/56ad966f-3268-4b59-999a-48a082bb8052";
priority = 100;
}
];
}