forked from aylac.top/nixcfg
this repo has no description

red laptop is kill

Changed files
+39 -199
hosts
modules
flake
hardware
lenovo
ideapad
+3 -1
hosts/nanpi/README.md
···
-
my server that is actually an old weak laptop
+
nanpi is my lenovo ideapad 320-14IKB, it has replaced the red hp one for it's got better specs reasons
+
+
it might have a curse that makes it kill all hard drives it touches so maybe i'm gonna get into some trouble
+3 -3
hosts/nanpi/default.nix
···
./secrets.nix
./services.nix
self.nixosModules.locale-en-gb
-
self.diskoConfigurations.lvm-ext4
+
self.diskoConfigurations.luks-btrfs-subvolumes
];
networking.hostName = "nanpi";
system.stateVersion = "25.05";
time.timeZone = "America/Sao_Paulo";
-
myHardware.hp.theRedOne.enable = true;
+
myHardware.lenovo.ideapad."320-14IKB".enable = true;
myNixOS = {
programs = {
-
systemd-boot.enable = true;
+
lanzaboote.enable = true;
nix.enable = true;
};
profiles = {
-1
hosts/nanpi2/README.md
···
-
my server that is actually an old weak laptop
-75
hosts/nanpi2/default.nix
···
-
{
-
self,
-
config,
-
...
-
}: {
-
imports = [
-
./home.nix
-
./secrets.nix
-
./services.nix
-
self.nixosModules.locale-en-gb
-
self.diskoConfigurations.luks-btrfs-subvolumes
-
];
-
-
networking.hostName = "nanpi2";
-
system.stateVersion = "25.05";
-
time.timeZone = "America/Sao_Paulo";
-
myHardware.hp.theRedOne.enable = true;
-
-
myNixOS = {
-
programs = {
-
lanzaboote.enable = true;
-
nix.enable = true;
-
};
-
profiles = {
-
base.enable = true;
-
server.enable = true;
-
autoUpgrade = {
-
enable = true;
-
operation = "boot";
-
};
-
backups.enable = true;
-
};
-
services = {
-
caddy.enable = true;
-
tailscale = {
-
enable = true;
-
enableCaddy = false;
-
operator = "ayla";
-
};
-
syncthing = {
-
enable = true;
-
certFile = config.age.secrets.syncthingCert.path;
-
keyFile = config.age.secrets.syncthingKey.path;
-
user = "ayla";
-
};
-
qbittorrent = {
-
inherit (config.mySnippets.tailnet.networkMap.qbittorrent) port;
-
enable = true;
-
};
-
};
-
};
-
-
myUsers = {
-
ayla = {
-
enable = true;
-
password = "REDACTED";
-
};
-
};
-
-
boot = {
-
initrd = {
-
availableKernelModules = [
-
"xhci_pci"
-
"ahci"
-
"usb_storage"
-
"sd_mod"
-
"rtsx_pci_sdmmc"
-
];
-
};
-
-
kernelParams = [
-
"consoleblank=30"
-
];
-
};
-
}
-46
hosts/nanpi2/home.nix
···
-
{self, ...}: {
-
home-manager.users.ayla = {pkgs, ...}: {
-
imports = [
-
self.homeModules.default
-
self.inputs.agenix.homeManagerModules.default
-
];
-
-
age.secrets.rclone.file = "${self.inputs.secrets}/rclone.age";
-
-
home = {
-
homeDirectory = "/home/ayla";
-
-
packages = with pkgs; [
-
curl
-
rclone
-
restic
-
];
-
-
stateVersion = "25.05";
-
username = "ayla";
-
};
-
-
programs = {
-
helix = {
-
enable = true;
-
defaultEditor = true;
-
};
-
-
micro = {
-
enable = true;
-
};
-
-
home-manager.enable = true;
-
};
-
-
myHome = {
-
programs = {
-
git.enable = true;
-
ssh.enable = true;
-
fastfetch.enable = true;
-
};
-
-
profiles.shell.enable = true;
-
};
-
};
-
}
-12
hosts/nanpi2/secrets.nix
···
-
{self, ...}: {
-
age.secrets = {
-
cloudflareCertificate.file = "${self.inputs.secrets}/cloudflare/certificate.age";
-
cloudflareCredentials.file = "${self.inputs.secrets}/cloudflare/credentials.age";
-
pds.file = "${self.inputs.secrets}/pds.age";
-
rclone.file = "${self.inputs.secrets}/rclone.age";
-
tailscaleAuthKey.file = "${self.inputs.secrets}/tailscale/auth.age";
-
syncthingCert.file = "${self.inputs.secrets}/ayla/syncthing/nanpi/cert.age";
-
syncthingKey.file = "${self.inputs.secrets}/ayla/syncthing/nanpi/key.age";
-
resticPassword.file = "${self.inputs.secrets}/restic-passwd.age";
-
};
-
}
-60
hosts/nanpi2/services.nix
···
-
{config, ...}: let
-
dataDirectory = "/home/Data";
-
in {
-
services = {
-
pds = {
-
enable = true;
-
environmentFiles = [config.age.secrets.pds.path];
-
pdsadmin.enable = true;
-
settings = {
-
PDS_HOSTNAME = "pds.aylac.top";
-
};
-
};
-
-
cloudflared = {
-
enable = true;
-
certificateFile = config.age.secrets.cloudflareCertificate.path;
-
tunnels = {
-
"3c012d05-cc92-4598-a726-909088e6588c" = {
-
certificateFile = config.age.secrets.cloudflareCertificate.path;
-
credentialsFile = config.age.secrets.cloudflareCredentials.path;
-
default = "http_status:404";
-
ingress = {
-
"pds.aylac.top" = "http://localhost:3000";
-
};
-
};
-
};
-
};
-
-
caddy.virtualHosts = {
-
"pds.aylac.top" = {
-
extraConfig = ''
-
reverse_proxy http://localhost:3000
-
'';
-
};
-
"${config.mySnippets.tailnet.networkMap.jellyfin.vHost}" = {
-
extraConfig = ''
-
bind tailscale/jellyfin
-
encode zstd gzip
-
reverse_proxy ${config.mySnippets.tailnet.networkMap.jellyfin.hostName}:${toString config.mySnippets.tailnet.networkMap.jellyfin.port} {
-
flush_interval -1
-
}
-
'';
-
};
-
-
"${config.mySnippets.tailnet.networkMap.qbittorrent.vHost}" = {
-
extraConfig = ''
-
bind tailscale/qbittorrent
-
encode zstd gzip
-
reverse_proxy ${config.mySnippets.tailnet.networkMap.qbittorrent.hostName}:${toString config.mySnippets.tailnet.networkMap.qbittorrent.port}
-
'';
-
};
-
};
-
-
jellyfin = {
-
enable = true;
-
openFirewall = true;
-
dataDir = "${dataDirectory}/jellyfin";
-
};
-
};
-
}
-1
modules/flake/nixos.nix
···
inputs.nixpkgs.lib.genAttrs [
"morgana"
"nanpi"
-
"nanpi2"
] (
host:
inputs.nixpkgs.lib.nixosSystem {
+1
modules/hardware/default.nix
···
./intel
./acer
./hp
+
./lenovo
./profiles
];
}
+5
modules/hardware/lenovo/default.nix
···
+
{...}: {
+
imports = [
+
./ideapad
+
];
+
}
+22
modules/hardware/lenovo/ideapad/320-14IKB/default.nix
···
+
{
+
config,
+
lib,
+
...
+
}: {
+
options.myHardware.lenovo.ideapad."320-14IKB".enable =
+
lib.mkEnableOption "Configuration for the Lenovo ideapad 320-14IKB.";
+
+
config = lib.mkIf config.myHardware.lenovo.ideapad."320-14IKB".enable {
+
myHardware = {
+
intel = {
+
cpu.enable = true;
+
gpu.enable = true;
+
};
+
+
profiles = {
+
base.enable = true;
+
laptop.enable = true;
+
};
+
};
+
};
+
}
+5
modules/hardware/lenovo/ideapad/default.nix
···
+
{...}: {
+
imports = [
+
./320-14IKB
+
];
+
}