1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: add odroid-h3 host "ward"

This commit is contained in:
oddlama 2023-01-05 02:42:46 +01:00
parent 7a8ffd9a2e
commit c5a5cf14ba
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
9 changed files with 150 additions and 59 deletions

54
flake.lock generated
View file

@ -34,11 +34,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1668797197, "lastModified": 1672327199,
"narHash": "sha256-0w6iD3GSSQbIeSFVDzAAQZB+hDq670ZTms3d9XI+BtM=", "narHash": "sha256-pFlngSHXKBhAmbaKZ4FYtu57LLunG+vWdL7a5vw1RvQ=",
"owner": "serokell", "owner": "serokell",
"repo": "deploy-rs", "repo": "deploy-rs",
"rev": "2a3c5f70eee04a465aa534d8bd4fcc9bb3c4a8ce", "rev": "a5619f5660a00f58c2b7c16d89058e92327ac9b8",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -109,11 +109,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1670970889, "lastModified": 1672780900,
"narHash": "sha256-TWJo3/X3Q3r+HeX16QN4FE6ddBpGtAboymSEF+4Nnc0=", "narHash": "sha256-DxuSn6BdkZapIbg76xzYx1KhVPEZeBexMkt1q/sMVPA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "e412025fffdcd6219ddd21c65d9a1b90005ce508", "rev": "54245e1820caabd8a0b53ce4d47e4d0fefe04cd4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -139,11 +139,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1670959777, "lastModified": 1672644464,
"narHash": "sha256-9nQJWL7S77YZERxairPLFO6TUuF1RgQmdZO6dKRCHz4=", "narHash": "sha256-RYlvRMcQNT7FDoDkViijQBHg9g+blsB+U6AvL/gAsPI=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "0fbf27af51a7c9bc68a168fdcd63513c4f100b15", "rev": "ca29e25c39b8e117d4d76a81f1e229824a9b3a26",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -154,11 +154,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1670929434, "lastModified": 1672617983,
"narHash": "sha256-n5UBO6XBV4h3TB7FYu2yAuNQMEYOrQyKeODUwKe06ow=", "narHash": "sha256-68WDiCBs631mbDDk4UAKdGURKcsfW6hjb7wgudTAe5o=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "1710ed1f6f8ceb75cf7d1cf55ee0cc21760e1c7a", "rev": "0fc9fca9c8d43edd79d33fea0dd8409d7c4580f4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -170,11 +170,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1668984258, "lastModified": 1671271954,
"narHash": "sha256-0gDMJ2T3qf58xgcSbYoXiRGUkPWmKyr5C3vcathWhKs=", "narHash": "sha256-cSvu+bnvN08sOlTBWbBrKaBHQZq8mvk8bgpt0ZJ2Snc=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "cf63ade6f74bbc9d2a017290f1b2e33e8fbfa70a", "rev": "d513b448cc2a6da2c8803e3c197c9fc7e67b19e3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -199,11 +199,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1671014608, "lastModified": 1672734157,
"narHash": "sha256-YLb4l6K6sD9xXBJ9GKQ98fBMrpENAadm2RQCfpC3794=", "narHash": "sha256-uwUBnv0bN1SO4QVIo8KUx/jxRYCy7cW8kzZa+Qsrw9k=",
"owner": "cachix", "owner": "cachix",
"repo": "pre-commit-hooks.nix", "repo": "pre-commit-hooks.nix",
"rev": "047f96a4e11f58e17be51e57f431cf88bcb28a29", "rev": "d0ce0a861260493c6c21f16f59d25076f73cb931",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -224,11 +224,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1667808611, "lastModified": 1672569413,
"narHash": "sha256-HHxTosiswFFS5PHLalpa3OKKl3R9BdgMk7pY4tjX2HU=", "narHash": "sha256-WedPMfZ3rPTkxMrvvpMjYaZntlbfilJly9Vaf2fGuAI=",
"owner": "yaxitech", "owner": "yaxitech",
"repo": "ragenix", "repo": "ragenix",
"rev": "f34618bd9e93edab1f0d62fc3619af7d2d8e5a0c", "rev": "2cc694606c3eec2ce073892f8ea13d5f3def8217",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -263,11 +263,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1667271616, "lastModified": 1672453260,
"narHash": "sha256-qR43NUFFoKfDRro3M1SarTYVfTn8WvWznGJX5eNCNZw=", "narHash": "sha256-ruR2xo30Vn7kY2hAgg2Z2xrCvNePxck6mgR5a8u+zow=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "3cbe6891588e1efad2491f87a54be26aeed1fac0", "rev": "176b6fd3dd3d7cea8d22ab1131364a050228d94c",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -278,11 +278,11 @@
}, },
"templates": { "templates": {
"locked": { "locked": {
"lastModified": 1669413554, "lastModified": 1671651249,
"narHash": "sha256-ljlMaTVs/aiygN0MtVWmLL8cJ0btX6GxST6D8klCb6o=", "narHash": "sha256-IUXfgNkYxISUWqdWtJ0sGjSmpv9d5EVho7HCEElgBAM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "templates", "repo": "templates",
"rev": "dfd2a90b1507f2eaedb2f9f4798f728f0006ad30", "rev": "2d6dcce2f3898090c8eda16a16abdff8a80e8ebf",
"type": "github" "type": "github"
}, },
"original": { "original": {

46
hosts/ward/default.nix Normal file
View file

@ -0,0 +1,46 @@
{
nixos-hardware,
pkgs,
...
}: {
imports = [
nixos-hardware.common-cpu-intel
nixos-hardware.common-pc-ssd
../../modules/core
../../modules/efi.nix
../../modules/zfs.nix
../../users/root
./fs.nix
./net.nix
];
boot = {
initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
kernelModules = ["kvm-intel"];
tmpOnTmpfs = true;
};
console = {
font = "ter-v28n";
keyMap = "de-latin1-nodeadkeys";
packages = with pkgs; [terminus_font];
};
environment.systemPackages = with pkgs; [wireguard-tools powertop];
hardware = {
enableRedistributableFirmware = true;
enableAllFirmware = true;
};
powerManagement.cpuFreqGovernor = "powersave";
services = {
fwupd.enable = true;
smartd.enable = true;
};
}

16
hosts/ward/fs.nix Normal file
View file

@ -0,0 +1,16 @@
{
fileSystems = {
"/" = {
device = "rpool/root/nixos";
fsType = "zfs";
options = ["zfsutil" "X-mount.mkdir"];
};
"/boot" = {
device = "/dev/disk/by-uuid/10E6-553F";
fsType = "vfat";
};
};
swapDevices = [];
}

22
hosts/ward/net.nix Normal file
View file

@ -0,0 +1,22 @@
{
networking = {
hostId = "49ce3b71";
hostName = "ward";
wireless.iwd.enable = true;
};
systemd.network.networks = {
enp1s0 = {
DHCP = "yes";
matchConfig.MACAddress = "00:00:00:00:00:00";
dhcpV4Config.RouteMetric = 10;
dhcpV6Config.RouteMetric = 10;
};
enp2s0 = {
DHCP = "yes";
matchConfig.MACAddress = "00:00:00:00:00:00";
dhcpV4Config.RouteMetric = 10;
dhcpV6Config.RouteMetric = 10;
};
};
}

View file

@ -39,7 +39,8 @@ in {
useNetworkd = true; useNetworkd = true;
wireguard.enable = true; wireguard.enable = true;
dhcpcd.enable = false; dhcpcd.enable = false;
firewall.enable = false; nftables.enable = true;
firewall.enable = true;
}; };
nix.nixPath = [ nix.nixPath = [

View file

@ -12,33 +12,33 @@ with self.pkgs.${system};
hooks = { hooks = {
actionlint.enable = true; actionlint.enable = true;
luacheck.enable = true; luacheck.enable = true;
nix-linter.enable = true; #nix-linter.enable = true;
alejandra.enable = true; alejandra.enable = true;
statix.enable = true; statix.enable = true;
stylua.enable = true; stylua.enable = true;
}; };
settings.nix-linter.checks = [ #settings.nix-linter.checks = [
"DIYInherit" # "DIYInherit"
"EmptyInherit" # "EmptyInherit"
"EmptyLet" # "EmptyLet"
"EtaReduce" # "EtaReduce"
"LetInInheritRecset" # "LetInInheritRecset"
"ListLiteralConcat" # "ListLiteralConcat"
"NegateAtom" # "NegateAtom"
"SequentialLet" # "SequentialLet"
"SetLiteralUpdate" # "SetLiteralUpdate"
"UnfortunateArgName" # "UnfortunateArgName"
"UnneededRec" # "UnneededRec"
"UnusedArg" # "UnusedArg"
"UnusedLetBind" # "UnusedLetBind"
"UpdateEmptySet" # "UpdateEmptySet"
"BetaReduction" # "BetaReduction"
"EmptyVariadicParamSet" # "EmptyVariadicParamSet"
"UnneededAntiquote" # "UnneededAntiquote"
"no-FreeLetInFunc" # "no-FreeLetInFunc"
"no-AlphabeticalArgs" # "no-AlphabeticalArgs"
"no-AlphabeticalBindings" # "no-AlphabeticalBindings"
]; #];
}; };
} }
// (deploy-rs.lib.deployChecks self.deploy) // (deploy-rs.lib.deployChecks self.deploy)

View file

@ -8,7 +8,7 @@ with self.pkgs.${system};
cachix cachix
deploy-rs.deploy-rs deploy-rs.deploy-rs
nix-build-uncached nix-build-uncached
nix-linter #nix-linter
alejandra alejandra
ragenix ragenix
rnix-lsp rnix-lsp

View file

@ -6,6 +6,12 @@ let
hostPlatform = "x86_64-linux"; hostPlatform = "x86_64-linux";
remoteBuild = true; remoteBuild = true;
}; };
ward = {
type = "nixos";
hostname = "ward";
hostPlatform = "x86_64-linux";
remoteBuild = true;
};
}; };
inherit (builtins) attrNames concatMap listToAttrs; inherit (builtins) attrNames concatMap listToAttrs;

View file

@ -31,12 +31,12 @@ with lib; {
# ./graphical/i3 # ./graphical/i3
]; ];
home = { home = {
username = config.users.users.myuser.name; username = config.users.users.myuser.name;
uid = config.users.users.myuser.uid; inherit (config.users.users.myuser) uid;
shellAliases = { shellAliases = {
p = "cd ~/projects"; p = "cd ~/projects";
}; };
}; };
}; };
} }