mirror of
https://github.com/tuxdotrs/nixos-config.git
synced 2025-07-06 17:56:35 +05:30
Compare commits
5 Commits
f6fcb02dde
...
caa191c4ec
Author | SHA1 | Date | |
---|---|---|---|
caa191c4ec
|
|||
5d9d5f3345
|
|||
c414576b00
|
|||
fb5e3c0140
|
|||
60893ab742
|
@ -28,8 +28,8 @@
|
|||||||
| ☁️ | VPS | arcturus | 4 Core - 8 GB RAM | Primary server responsible for exposing my homelab applications to the internet. |
|
| ☁️ | VPS | arcturus | 4 Core - 8 GB RAM | Primary server responsible for exposing my homelab applications to the internet. |
|
||||||
| 🥔 | VPS | alpha | 2 Core - 4 GB RAM | Monitors uptime and health status of all services across the infrastructure. |
|
| 🥔 | VPS | alpha | 2 Core - 4 GB RAM | Monitors uptime and health status of all services across the infrastructure. |
|
||||||
| 🥔 | Server | vega | Cortex A53 - 1 GB RAM | Running AdGuard Home for network-wide ad blocking. |
|
| 🥔 | Server | vega | Cortex A53 - 1 GB RAM | Running AdGuard Home for network-wide ad blocking. |
|
||||||
| ☁️ | VPS | capella | 4 Core - 6 GB RAM | For running Minecraft, CS 2, Rust game servers. |
|
| 📱 | Phone | capella | S25 Ultra - 12 GB RAM | Yes, I run nix on my android device. lol |
|
||||||
| 📱 | VPS | rigel | S21 Ultra - 12 GB RAM | Yes, I run nix on my android device. lol |
|
| 📱 | Phone | rigel | Edge 30 - 8 GB RAM (Rooted) | Yes, I run nix on my android device. lol |
|
||||||
| ☁️ | VPS | node | i9-13900 - 64 GB RAM | Running Ethereum and BSC nodes. Currently in the process of migrating from Ubuntu. |
|
| ☁️ | VPS | node | i9-13900 - 64 GB RAM | Running Ethereum and BSC nodes. Currently in the process of migrating from Ubuntu. |
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
84
flake.lock
generated
84
flake.lock
generated
@ -47,11 +47,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746411114,
|
"lastModified": 1746729224,
|
||||||
"narHash": "sha256-mLlkVX1kKbAa/Ns5u26wDYw4YW4ziMFM21fhtRmfirU=",
|
"narHash": "sha256-9R4sOLAK1w3Bq54H3XOJogdc7a6C2bLLmatOQ+5pf5w=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "b5d1320ebc2f34dbea4655f95167f55e2130cdb3",
|
"rev": "85555d27ded84604ad6657ecca255a03fd878607",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -66,11 +66,11 @@
|
|||||||
"nixpkgs-stable": "nixpkgs-stable_2"
|
"nixpkgs-stable": "nixpkgs-stable_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746494697,
|
"lastModified": 1746759225,
|
||||||
"narHash": "sha256-n+7nWt/JKD6/2I9Hfb5H4D7R8lF1xn5OgGtQTlpqfrc=",
|
"narHash": "sha256-X/cnWh53o6g4Ton5KgFptzvn5WSHNJvB3tSK9w48gV4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "emacs-overlay",
|
"repo": "emacs-overlay",
|
||||||
"rev": "e682d607901aea7084c1834d6e19b81c555976b3",
|
"rev": "be5aec380e041a8b8d5aee9ebf89d9b3f1006c29",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -267,11 +267,11 @@
|
|||||||
"zon2nix": "zon2nix"
|
"zon2nix": "zon2nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746553814,
|
"lastModified": 1746649518,
|
||||||
"narHash": "sha256-RTwom24eoEoPO7nCWoQuUtrQLXdeLecQPnx48eO7zWE=",
|
"narHash": "sha256-ogOT0WwOy8rY5vhJ5JfVOa3qc6sbDxRAMQAQIjCz1gk=",
|
||||||
"owner": "ghostty-org",
|
"owner": "ghostty-org",
|
||||||
"repo": "ghostty",
|
"repo": "ghostty",
|
||||||
"rev": "d0a8cb671b73cd4e3393c41bb5aaf5900444fc47",
|
"rev": "bcff488095cab023f26bb7bbfaf674cb0086ef87",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -304,11 +304,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746413188,
|
"lastModified": 1746727295,
|
||||||
"narHash": "sha256-i6BoiQP0PasExESQHszC0reQHfO6D4aI2GzOwZMOI20=",
|
"narHash": "sha256-0364XVBdfEA8rWfqEPvsgBqGFfq5r9LAo9CS9tvT7tg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "8a318641ac13d3bc0a53651feaee9560f9b2d89a",
|
"rev": "a51598236f23c89e59ee77eb8e0614358b0e896c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -449,11 +449,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746496684,
|
"lastModified": 1746755975,
|
||||||
"narHash": "sha256-LwlZHnH65CZQUF9xAtKan4gHvZDVFf8qYfm7EmuVEHw=",
|
"narHash": "sha256-4YQ/jq1vZrjngu0DDJmYaJW7Jh4IEPiHvrLvlBkvWmk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nix-vscode-extensions",
|
"repo": "nix-vscode-extensions",
|
||||||
"rev": "4511026b2fd29242372ea3936e2193062bf18705",
|
"rev": "6e320439558ef494b83d6407b0c6f2218e47522a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -464,11 +464,11 @@
|
|||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746468201,
|
"lastModified": 1746621361,
|
||||||
"narHash": "sha256-hSOSlrvMJwGr8hX/gc0mnhUf5UIClMDUAadfXlSXzfc=",
|
"narHash": "sha256-T9vOxEqI1j1RYugV0b9dgy0AreiZ9yBDKZJYyclF0og=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "6aabf68429c0a414221d1790945babfb6a0bd068",
|
"rev": "2ea3ad8a1f26a76f8a8e23fc4f7757c46ef30ee5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -538,11 +538,11 @@
|
|||||||
"parts": "parts"
|
"parts": "parts"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746501057,
|
"lastModified": 1746760368,
|
||||||
"narHash": "sha256-Uqas/lPiyybNEUjTAj953gnLCaEO5WXlYXkwH8iY9e0=",
|
"narHash": "sha256-0G9acmKHmrIAQvHjAa//rjREPiRIYxUeDn/ImSOYWxI=",
|
||||||
"owner": "moni-dz",
|
"owner": "moni-dz",
|
||||||
"repo": "nixpkgs-f2k",
|
"repo": "nixpkgs-f2k",
|
||||||
"rev": "715fb3e068f87bbd993ce4cf85a2db3f81a3ca41",
|
"rev": "2d192137c75b37dac339287e1b51936856bd6cad",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -623,11 +623,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746422338,
|
"lastModified": 1746557022,
|
||||||
"narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=",
|
"narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa",
|
"rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -639,11 +639,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable_3": {
|
"nixpkgs-stable_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746557022,
|
"lastModified": 1746776106,
|
||||||
"narHash": "sha256-QkNoyEf6TbaTW5UZYX0OkwIJ/ZMeKSSoOMnSDPQuol0=",
|
"narHash": "sha256-wOP7VPc3L48K9i2AdustsCkUAsA2o239M7kaXTkK0Wg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1d3aeb5a193b9ff13f63f4d9cc169fb88129f860",
|
"rev": "0a0247466796f16cf9e16e74f72a272356527700",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -671,11 +671,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746461020,
|
"lastModified": 1746663147,
|
||||||
"narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=",
|
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae",
|
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -687,11 +687,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746328495,
|
"lastModified": 1746663147,
|
||||||
"narHash": "sha256-uKCfuDs7ZM3QpCE/jnfubTg459CnKnJG/LwqEVEdEiw=",
|
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "979daf34c8cacebcd917d540070b52a3c2b9b16e",
|
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -703,11 +703,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746500063,
|
"lastModified": 1746760209,
|
||||||
"narHash": "sha256-w0TZkrQPDZ4mxmNpQMnifu6YUieI8wrMejEq1ZF18mE=",
|
"narHash": "sha256-mFSTj3xZBentYNIUz8YBvjirjsAK4ffl/UWq2LPG3AQ=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "72ec443599a06c2230df53986758ee67276c1f29",
|
"rev": "f7ff8c60f4b8e411fe192f90bed4abd0bf2f4ee5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -719,11 +719,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_5": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746461020,
|
"lastModified": 1746663147,
|
||||||
"narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=",
|
"narHash": "sha256-Ua0drDHawlzNqJnclTJGf87dBmaO/tn7iZ+TCkTRpRc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae",
|
"rev": "dda3dcd3fe03e991015e9a74b22d35950f264a54",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -810,11 +810,11 @@
|
|||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1746555298,
|
"lastModified": 1746770521,
|
||||||
"narHash": "sha256-739IM4fGQ2Z4wZod7kcaV7nvRDQE+kg1a2XcKqut5g0=",
|
"narHash": "sha256-zP0UqlcKhmIFasNBcxZPLuxKOBoEffrHsrNmMp0h+V8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nur",
|
"repo": "nur",
|
||||||
"rev": "39bf6a2b3e09aafbc63fcbe54efb53e957aeb5c7",
|
"rev": "94807c56542e960a57146772a66dfd7247f56e5c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -66,7 +66,6 @@
|
|||||||
alpha = nixosSystem (mkNixOSConfig "alpha");
|
alpha = nixosSystem (mkNixOSConfig "alpha");
|
||||||
sirius = nixosSystem (mkNixOSConfig "sirius");
|
sirius = nixosSystem (mkNixOSConfig "sirius");
|
||||||
vega = nixosSystem (mkNixOSConfig "vega");
|
vega = nixosSystem (mkNixOSConfig "vega");
|
||||||
capella = nixosSystem (mkNixOSConfig "capella");
|
|
||||||
vps = nixosSystem (mkNixOSConfig "vps");
|
vps = nixosSystem (mkNixOSConfig "vps");
|
||||||
isoImage = nixosSystem (mkNixOSConfig "isoImage");
|
isoImage = nixosSystem (mkNixOSConfig "isoImage");
|
||||||
homelab = nixosSystem (mkNixOSConfig "homelab");
|
homelab = nixosSystem (mkNixOSConfig "homelab");
|
||||||
@ -75,6 +74,7 @@
|
|||||||
# NixOnDroid configuration entrypoint
|
# NixOnDroid configuration entrypoint
|
||||||
# 'nix-on-droid switch --flake .#your-hostname'
|
# 'nix-on-droid switch --flake .#your-hostname'
|
||||||
nixOnDroidConfigurations = {
|
nixOnDroidConfigurations = {
|
||||||
|
capella = nixOnDroidConfiguration (mkDroidConfig "capella");
|
||||||
rigel = nixOnDroidConfiguration (mkDroidConfig "rigel");
|
rigel = nixOnDroidConfiguration (mkDroidConfig "rigel");
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -85,8 +85,8 @@
|
|||||||
alpha = mkNixOSNode "alpha";
|
alpha = mkNixOSNode "alpha";
|
||||||
sirius = mkNixOSNode "sirius";
|
sirius = mkNixOSNode "sirius";
|
||||||
vega = mkNixOSNode "vega";
|
vega = mkNixOSNode "vega";
|
||||||
capella = mkNixOSNode "capella";
|
|
||||||
homelab = mkNixOSNode "homelab";
|
homelab = mkNixOSNode "homelab";
|
||||||
|
capella = mkDroidNode "capella";
|
||||||
rigel = mkDroidNode "rigel";
|
rigel = mkDroidNode "rigel";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,104 +1,63 @@
|
|||||||
{
|
{
|
||||||
modulesPath,
|
pkgs,
|
||||||
inputs,
|
|
||||||
username,
|
username,
|
||||||
lib,
|
outputs,
|
||||||
|
inputs,
|
||||||
|
email,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
../../modules/droid/sshd.nix
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
|
||||||
inputs.disko.nixosModules.default
|
|
||||||
(import ./disko.nix {device = "/dev/vda";})
|
|
||||||
|
|
||||||
../common
|
|
||||||
];
|
];
|
||||||
|
|
||||||
tux.services.openssh.enable = true;
|
android-integration.am.enable = true;
|
||||||
|
android-integration.termux-open-url.enable = true;
|
||||||
|
android-integration.xdg-open.enable = true;
|
||||||
|
android-integration.termux-setup-storage.enable = true;
|
||||||
|
android-integration.termux-reload-settings.enable = true;
|
||||||
|
|
||||||
nixpkgs = {
|
terminal.font = let
|
||||||
hostPlatform = "x86_64-linux";
|
firacode = pkgs.nerd-fonts.fira-code;
|
||||||
};
|
fontPath = "share/fonts/truetype/NerdFonts/FiraCode/FiraCodeNerdFont-Regular.ttf";
|
||||||
|
in "${firacode}/${fontPath}";
|
||||||
|
|
||||||
boot = {
|
time.timeZone = "Asia/Kolkata";
|
||||||
initrd.systemd = {
|
|
||||||
enable = lib.mkForce true;
|
|
||||||
|
|
||||||
services.wipe-my-fs = {
|
tux.services.openssh = {
|
||||||
wantedBy = ["initrd.target"];
|
enable = true;
|
||||||
after = ["initrd-root-device.target"];
|
ports = [8022];
|
||||||
before = ["sysroot.mount"];
|
authorizedKeys = [
|
||||||
unitConfig.DefaultDependencies = "no";
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL+OzPUe2ECPC929DqpkM39tl/vdNAXfsRnmrGfR+X3D ${email}"
|
||||||
serviceConfig.Type = "oneshot";
|
|
||||||
script = ''
|
|
||||||
mkdir /btrfs_tmp
|
|
||||||
mount /dev/disk/by-partlabel/disk-primary-root /btrfs_tmp
|
|
||||||
|
|
||||||
if [[ -e /btrfs_tmp/root ]]; then
|
|
||||||
mkdir -p /btrfs_tmp/old_roots
|
|
||||||
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
|
|
||||||
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
|
|
||||||
fi
|
|
||||||
|
|
||||||
delete_subvolume_recursively() {
|
|
||||||
IFS=$'\n'
|
|
||||||
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
|
|
||||||
delete_subvolume_recursively "/btrfs_tmp/$i"
|
|
||||||
done
|
|
||||||
btrfs subvolume delete "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
|
|
||||||
delete_subvolume_recursively "$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
btrfs subvolume create /btrfs_tmp/root
|
|
||||||
umount /btrfs_tmp
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
loader = {
|
|
||||||
grub = {
|
|
||||||
efiSupport = true;
|
|
||||||
efiInstallAsRemovable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "capella";
|
|
||||||
firewall.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
users = {
|
|
||||||
users.${username} = {
|
|
||||||
password = "${username}";
|
|
||||||
hashedPasswordFile = lib.mkForce null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.fuse.userAllowOther = true;
|
|
||||||
fileSystems."/persist".neededForBoot = true;
|
|
||||||
environment.persistence."/persist" = {
|
|
||||||
hideMounts = true;
|
|
||||||
directories = [
|
|
||||||
"/var/log"
|
|
||||||
"/var/lib/nixos"
|
|
||||||
];
|
|
||||||
files = [
|
|
||||||
"/etc/ssh/ssh_host_ed25519_key"
|
|
||||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
|
||||||
"/etc/ssh/ssh_host_rsa_key"
|
|
||||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${username} = {
|
user = {
|
||||||
imports = [
|
uid = 10479;
|
||||||
./home.nix
|
gid = 10479;
|
||||||
];
|
shell = "${pkgs.zsh}/bin/zsh";
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
environment.etcBackupExtension = ".backup";
|
||||||
|
environment.motd = '''';
|
||||||
|
environment.packages = with pkgs; [
|
||||||
|
nano
|
||||||
|
git
|
||||||
|
neovim
|
||||||
|
openssh
|
||||||
|
inputs.trok.packages."aarch64-linux".default
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
config = ./home.nix;
|
||||||
|
backupFileExtension = "backup";
|
||||||
|
extraSpecialArgs = {inherit inputs outputs username email;};
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Set up nix for flakes
|
||||||
|
nix.extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
|
||||||
|
system.stateVersion = "24.05";
|
||||||
}
|
}
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
{device ? throw "Set this to the disk device, e.g. /dev/nvme0n1", ...}: {
|
|
||||||
disko.devices.disk.primary = {
|
|
||||||
inherit device;
|
|
||||||
type = "disk";
|
|
||||||
content = {
|
|
||||||
type = "gpt"; # GPT partitioning scheme
|
|
||||||
partitions = {
|
|
||||||
boot = {
|
|
||||||
name = "boot";
|
|
||||||
size = "1M";
|
|
||||||
type = "EF02";
|
|
||||||
};
|
|
||||||
# EFI Partition
|
|
||||||
ESP = {
|
|
||||||
size = "512M";
|
|
||||||
type = "EF00";
|
|
||||||
content = {
|
|
||||||
type = "filesystem";
|
|
||||||
format = "vfat";
|
|
||||||
mountpoint = "/boot";
|
|
||||||
mountOptions = ["defaults" "umask=0077"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# Btrfs Root Partition
|
|
||||||
root = {
|
|
||||||
size = "100%"; # Use remaining space
|
|
||||||
type = "8300"; # Linux filesystem type
|
|
||||||
content = {
|
|
||||||
type = "btrfs";
|
|
||||||
subvolumes = {
|
|
||||||
"/root" = {
|
|
||||||
mountOptions = ["compress=zstd"]; # Compression for better performance
|
|
||||||
mountpoint = "/"; # Root subvolume
|
|
||||||
};
|
|
||||||
"/persist" = {
|
|
||||||
mountOptions = ["compress=zstd"]; # Compression for persistent data
|
|
||||||
mountpoint = "/persist"; # Persistent subvolume
|
|
||||||
};
|
|
||||||
"/nix" = {
|
|
||||||
mountOptions = [
|
|
||||||
"compress=zstd"
|
|
||||||
"noatime"
|
|
||||||
"noacl"
|
|
||||||
]; # Optimize for Nix store
|
|
||||||
mountpoint = "/nix"; # Nix subvolume
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -1,14 +1,34 @@
|
|||||||
{username, ...}: {
|
{pkgs, ...}: {
|
||||||
home.persistence."/persist/home/${username}" = {
|
imports = [
|
||||||
directories = [
|
../../modules/home/git
|
||||||
"Projects"
|
../../modules/home/starship
|
||||||
".ssh"
|
];
|
||||||
];
|
|
||||||
files = [
|
programs = {
|
||||||
".zsh_history"
|
bat.enable = true;
|
||||||
];
|
zoxide = {
|
||||||
allowOther = true;
|
enable = true;
|
||||||
|
options = ["--cmd cd"];
|
||||||
|
};
|
||||||
|
zsh = {
|
||||||
|
enable = true;
|
||||||
|
shellAliases = {
|
||||||
|
ls = "lsd";
|
||||||
|
};
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
initContent = ''
|
||||||
|
fastfetch
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.stateVersion = "24.11";
|
home.packages = with pkgs; [
|
||||||
|
neovim
|
||||||
|
busybox
|
||||||
|
lsd
|
||||||
|
fastfetch
|
||||||
|
];
|
||||||
|
|
||||||
|
home.stateVersion = "24.05";
|
||||||
}
|
}
|
||||||
|
@ -32,8 +32,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
user = {
|
user = {
|
||||||
uid = 10395;
|
uid = 10225;
|
||||||
gid = 10395;
|
gid = 10225;
|
||||||
shell = "${pkgs.zsh}/bin/zsh";
|
shell = "${pkgs.zsh}/bin/zsh";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
nextcloud = {
|
nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hostName = "cloud.tux.rs";
|
hostName = "cloud.tux.rs";
|
||||||
package = pkgs.nextcloud30;
|
package = pkgs.nextcloud31;
|
||||||
database.createLocally = true;
|
database.createLocally = true;
|
||||||
configureRedis = true;
|
configureRedis = true;
|
||||||
maxUploadSize = "16G";
|
maxUploadSize = "16G";
|
||||||
@ -44,5 +44,5 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [nextcloud30];
|
environment.systemPackages = with pkgs; [nextcloud31];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user