my nix configs for my servers and desktop

add morax

+1 -1
common/services.nix
···
gnumake
parted
zfs
-
+
nixos-generators
sqlite
];
+7
common/users.nix
···
];
};
+
users.users.root = {
+
openssh.authorizedKeys.keys = [
+
"ssh-ed25519 AAAAC3NzaC1lZDI1NTESAAAAIJ0pUS@lV9dSjkgYbdh9utZ5CDM2dPN70S5fBqN1m3Pb"
+
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCS9VBRE13jojnqVjuUZWTcOK8GokDDlk2U0i61vEJizVzNowGnIAbwq0cOaFEBX4JBkOa4I8Ku2Pw7fODuoehSK/t7FrfXExk2PBT3k0mfzqQYxfq5bzae7AWr7n/sKUBTtvHSACfidxzQpV7VSgW68jqdOt6h7FHSeS2jac7wUNPobL0uCkFB4FiEQOnIqlRGSSabVemL7bC9H9lUyOODSTthiq9S3pPYknyHDRKUtSCSw4pfpasr4bxDVSW99h3GBcW0hZbpw5bwlxQlwbclxQDnn7XJhWpq6zL/2ScVGJgd94z7FshKoF5IFTk6e7a/Ouv4Ato4hRLxEe5u70CH ssh-key-2023-07-11"
+
];
+
};
+
programs.git = {
enable = true;
config = {
+17
flake.lock
···
"url": "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz"
}
},
+
"nixos-hardware": {
+
"locked": {
+
"lastModified": 1748942041,
+
"narHash": "sha256-HEu2gTct7nY0tAPRgBtqYepallryBKR1U8B4v2zEEqA=",
+
"owner": "nixos",
+
"repo": "nixos-hardware",
+
"rev": "fc7c4714125cfaa19b048e8aaf86b9c53e04d853",
+
"type": "github"
+
},
+
"original": {
+
"owner": "nixos",
+
"ref": "master",
+
"repo": "nixos-hardware",
+
"type": "github"
+
}
+
},
"nixpkgs": {
"locked": {
"lastModified": 1745391562,
···
"catppuccin": "catppuccin",
"home-manager": "home-manager_2",
"lix-module": "lix-module",
+
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_3",
"vscode-server": "vscode-server",
"zen-browser": "zen-browser"
+17
flake.nix
···
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
+
nixos-hardware.url = "github:nixos/nixos-hardware/master";
+
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.93.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
···
agenix.nixosModules.default
];
};
+
+
morax = nixpkgs.lib.nixosSystem {
+
system = "aarch64-linux";
+
specialArgs = {
+
inherit inputs;
+
system = "aarch64-linux";
+
};
+
modules = [
+
./hosts/morax
+
nixos-hardware.nixosModules.raspberry-pi-4
+
+
agenix.nixosModules.default
+
];
+
};
+
# Easy to add more hosts
/*
+2 -2
hosts/focalor/default.nix
···
# pin host platform & microcode
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
-
hardware.cpu.intel.updateMicrocode = lib.mkDefault
-
config.hardware.enableRedistributableFirmware;
+
+
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
networking.hostName = "focalor";
networking.hostId = "84bdc587";
+45
hosts/morax/default.nix
···
+
{ config, lib, pkgs, modulesPath, inputs, ... }:
+
+
{
+
imports = [
+
./hardware.nix
+
./secrets.nix
+
+
../../common/system.nix
+
../../common/users.nix
+
../../common/services.nix
+
../../host-secrets.nix
+
];
+
+
system.stateVersion = "25.05";
+
+
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
+
hardware.enableRedistributableFirmware = true;
+
hardware.enableAllHardware = lib.mkForce false; #https://github.com/NixOS/nixpkgs/issues/154163#issuecomment-2868994145
+
+
networking = {
+
hostName = "morax";
+
hostId = "2631a44a";
+
firewall.enable = false;
+
defaultGateway = {
+
address = "10.0.0.1";
+
interface = "eth0";
+
};
+
nameservers = [ "1.1.1.1" ];
+
interfaces.eth0 = {
+
ipv4.addresses = [{
+
address = "10.0.0.210";
+
prefixLength = 24;
+
}];
+
};
+
};
+
+
environment.systemPackages = with pkgs; [
+
inputs.agenix.packages.aarch64-linux.default
+
];
+
+
virtualisation.docker = {
+
enable = true;
+
enableOnBoot = true;
+
};
+
}
+3
hosts/morax/hardware.nix
···
+
{
+
+
}
+3
hosts/morax/secrets.nix
···
+
{
+
+
}