Trying to upgrade router to NixOS
This commit is contained in:
parent
14fabcbe20
commit
27b94ccb51
5 changed files with 53 additions and 49 deletions
|
@ -477,11 +477,11 @@
|
||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717012475,
|
"lastModified": 1720625270,
|
||||||
"narHash": "sha256-XdcAf6+7IUBOw+jH66QqcXcMBaqw8vXmtiwQywqhcI4=",
|
"narHash": "sha256-7JGUXmp6LxPkinxy9kEnrdbZQPF8QGZwvRxWU/ZwJKY=",
|
||||||
"owner": "lytedev",
|
"owner": "lytedev",
|
||||||
"repo": "slippi-nix",
|
"repo": "slippi-nix",
|
||||||
"rev": "8c37b6cfc082e2d522544c68eefa2c3b58ca2515",
|
"rev": "e86b5e46d53a929303b9ad6539cb6e64e7a8c5b4",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
78
flake.nix
78
flake.nix
|
@ -83,6 +83,7 @@
|
||||||
in {
|
in {
|
||||||
# kind of a quirk, but package definitions are actually in the "additions"
|
# kind of a quirk, but package definitions are actually in the "additions"
|
||||||
# overlay I did this to work around some recursion problems
|
# overlay I did this to work around some recursion problems
|
||||||
|
# TODO: https://discourse.nixos.org/t/infinite-recursion-getting-started-with-overlays/48880
|
||||||
packages = genPkgs (pkgs: {inherit (pkgs) iosevkaLyteTerm iosevkaLyteTermSubset;});
|
packages = genPkgs (pkgs: {inherit (pkgs) iosevkaLyteTerm iosevkaLyteTermSubset;});
|
||||||
diskoConfigurations = import ./disko;
|
diskoConfigurations = import ./disko;
|
||||||
templates = import ./templates;
|
templates = import ./templates;
|
||||||
|
@ -158,16 +159,17 @@
|
||||||
beefcake = nixpkgs.lib.nixosSystem {
|
beefcake = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = with nixosModules; [
|
modules = with nixosModules; [
|
||||||
common
|
|
||||||
hardware.nixosModules.common-cpu-intel
|
hardware.nixosModules.common-cpu-intel
|
||||||
|
|
||||||
|
common
|
||||||
fonts
|
fonts
|
||||||
|
|
||||||
|
./nixos/beefcake.nix
|
||||||
|
|
||||||
{
|
{
|
||||||
time = {
|
time = {
|
||||||
timeZone = "America/Chicago";
|
timeZone = "America/Chicago";
|
||||||
};
|
};
|
||||||
}
|
|
||||||
./nixos/beefcake.nix
|
|
||||||
{
|
|
||||||
services.smartd.enable = true;
|
services.smartd.enable = true;
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -177,12 +179,11 @@
|
||||||
dragon = nixpkgs.lib.nixosSystem {
|
dragon = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = with nixosModules; [
|
modules = with nixosModules; [
|
||||||
common
|
|
||||||
|
|
||||||
outputs.diskoConfigurations.standard
|
outputs.diskoConfigurations.standard
|
||||||
hardware.nixosModules.common-cpu-amd
|
hardware.nixosModules.common-cpu-amd
|
||||||
hardware.nixosModules.common-pc-ssd
|
hardware.nixosModules.common-pc-ssd
|
||||||
|
|
||||||
|
common
|
||||||
password-manager
|
password-manager
|
||||||
wifi
|
wifi
|
||||||
graphical-workstation
|
graphical-workstation
|
||||||
|
@ -210,10 +211,9 @@
|
||||||
htpc = nixpkgs.lib.nixosSystem {
|
htpc = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = with nixosModules; [
|
modules = with nixosModules; [
|
||||||
common
|
|
||||||
|
|
||||||
hardware.nixosModules.common-pc-ssd
|
hardware.nixosModules.common-pc-ssd
|
||||||
|
|
||||||
|
common
|
||||||
graphical-workstation
|
graphical-workstation
|
||||||
|
|
||||||
./nixos/htpc.nix
|
./nixos/htpc.nix
|
||||||
|
@ -231,11 +231,10 @@
|
||||||
foxtrot = nixpkgs.lib.nixosSystem {
|
foxtrot = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = with nixosModules; [
|
modules = with nixosModules; [
|
||||||
common
|
|
||||||
|
|
||||||
outputs.diskoConfigurations.standard
|
outputs.diskoConfigurations.standard
|
||||||
hardware.nixosModules.framework-13-7040-amd
|
hardware.nixosModules.framework-13-7040-amd
|
||||||
|
|
||||||
|
common
|
||||||
graphical-workstation
|
graphical-workstation
|
||||||
laptop
|
laptop
|
||||||
gaming
|
gaming
|
||||||
|
@ -260,37 +259,10 @@
|
||||||
thablet = nixpkgs.lib.nixosSystem {
|
thablet = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = with nixosModules; [
|
modules = with nixosModules; [
|
||||||
common
|
|
||||||
|
|
||||||
outputs.diskoConfigurations.standard
|
outputs.diskoConfigurations.standard
|
||||||
hardware.nixosModules.lenovo-thinkpad-x1-yoga
|
hardware.nixosModules.lenovo-thinkpad-x1-yoga
|
||||||
|
|
||||||
graphical-workstation
|
|
||||||
laptop
|
|
||||||
gaming
|
|
||||||
|
|
||||||
./nixos/thablet.nix
|
|
||||||
|
|
||||||
{
|
|
||||||
home-manager.users.daniel = {
|
|
||||||
imports = with homeManagerModules; [
|
|
||||||
iex
|
|
||||||
cargo
|
|
||||||
linux-desktop-environment-config
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
grablet = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = with nixosModules; [
|
|
||||||
common
|
common
|
||||||
|
|
||||||
outputs.diskoConfigurations.standard
|
|
||||||
hardware.nixosModules.common-cpu-intel-kaby-lake
|
|
||||||
hardware.nixosModules.common-pc-laptopp-ssd
|
|
||||||
graphical-workstation
|
graphical-workstation
|
||||||
laptop
|
laptop
|
||||||
gaming
|
gaming
|
||||||
|
@ -305,12 +277,38 @@
|
||||||
linux-desktop-environment-config
|
linux-desktop-environment-config
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# grablet = nixpkgs.lib.nixosSystem {
|
||||||
|
# system = "x86_64-linux";
|
||||||
|
# modules = with nixosModules; [
|
||||||
|
# common
|
||||||
|
|
||||||
|
# outputs.diskoConfigurations.standard
|
||||||
|
# hardware.nixosModules.common-cpu-intel-kaby-lake
|
||||||
|
# hardware.nixosModules.common-pc-laptopp-ssd
|
||||||
|
# graphical-workstation
|
||||||
|
# laptop
|
||||||
|
# gaming
|
||||||
|
|
||||||
|
# ./nixos/thablet.nix
|
||||||
|
|
||||||
|
# {
|
||||||
|
# home-manager.users.daniel = {
|
||||||
|
# imports = with homeManagerModules; [
|
||||||
|
# iex
|
||||||
|
# cargo
|
||||||
|
# linux-desktop-environment-config
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
|
# powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
|
||||||
thinker = nixpkgs.lib.nixosSystem {
|
thinker = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = with nixosModules; [
|
modules = with nixosModules; [
|
||||||
|
@ -331,7 +329,7 @@
|
||||||
router = nixpkgs.lib.nixosSystem {
|
router = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = with nixosModules; [
|
modules = with nixosModules; [
|
||||||
outputs.diskoConfiguration.unencrypted
|
# outputs.diskoConfigurations.unencrypted
|
||||||
common
|
common
|
||||||
./nixos/router.nix
|
./nixos/router.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env -S deno run --allow-read --allow-run --allow-net
|
#!/usr/bin/env -S nix shell nixpkgs#deno --command deno run --allow-read --allow-run --allow-net
|
||||||
|
|
||||||
import * as path from "https://deno.land/std@0.181.0/path/mod.ts";
|
import * as path from "https://deno.land/std@0.181.0/path/mod.ts";
|
||||||
|
|
||||||
|
|
|
@ -206,7 +206,7 @@
|
||||||
"https://cache.nixos.org/"
|
"https://cache.nixos.org/"
|
||||||
"https://helix.cachix.org"
|
"https://helix.cachix.org"
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
"https://nix.h.lyte.dev"
|
# "https://nix.h.lyte.dev"
|
||||||
"https://hyprland.cachix.org"
|
"https://hyprland.cachix.org"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
|
|
|
@ -33,7 +33,13 @@ in {
|
||||||
networking.domain = "h.lyte.dev";
|
networking.domain = "h.lyte.dev";
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
|
|
||||||
# TODO: perform a hardware scan
|
boot.initrd.availableKernelModules = ["xhci_pci"];
|
||||||
|
boot.initrd.kernelModules = [];
|
||||||
|
boot.kernelModules = ["kvm-intel"];
|
||||||
|
boot.extraModulePackages = [];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = true;
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
|
@ -50,12 +56,12 @@ in {
|
||||||
"net.ipv6.conf.all.use_tempaddr" = 0;
|
"net.ipv6.conf.all.use_tempaddr" = 0;
|
||||||
|
|
||||||
"net.ipv6.conf.wan0.accept_ra" = 2;
|
"net.ipv6.conf.wan0.accept_ra" = 2;
|
||||||
# "net.ipv6.conf.wan0.autoconf" = 1;
|
"net.ipv6.conf.wan0.autoconf" = 1;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
||||||
|
|
||||||
services.fail2ban.enable = true;
|
services.fail2ban.enable = true;
|
||||||
services.radvd = {
|
services.radvd = {
|
||||||
|
@ -179,7 +185,6 @@ in {
|
||||||
::1 localhost ip6-localhost ip6-loopback
|
::1 localhost ip6-localhost ip6-loopback
|
||||||
ff02::1 ip6-allnodes
|
ff02::1 ip6-allnodes
|
||||||
ff02::2 ip6-allrouters
|
ff02::2 ip6-allrouters
|
||||||
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
networking.nat.enable = true; # TODO: maybe replace some of the nftables stuff with this?
|
networking.nat.enable = true; # TODO: maybe replace some of the nftables stuff with this?
|
||||||
|
@ -288,6 +293,7 @@ in {
|
||||||
# No way.... https://github.com/NetworkConfiguration/dhcpcd/issues/36#issuecomment-954777644
|
# No way.... https://github.com/NetworkConfiguration/dhcpcd/issues/36#issuecomment-954777644
|
||||||
# issues caused by guests with oneplus devices
|
# issues caused by guests with oneplus devices
|
||||||
noarp
|
noarp
|
||||||
|
|
||||||
persistent
|
persistent
|
||||||
vendorclassid
|
vendorclassid
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue