This commit is contained in:
Grisha Shipunov 2025-03-20 18:20:20 +01:00
parent 671d719788
commit 67364a0156
4 changed files with 87 additions and 194 deletions

130
flake.lock generated
View file

@ -224,26 +224,6 @@
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1742326330,
"narHash": "sha256-Tumt3tcMXJniSh7tw2gW+WAnVLeB3WWm+E+yYFnLBXo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "22a36aa709de7dd42b562a433b9cefecf104a6ee",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"lanzaboote": {
"inputs": {
"crane": "crane",
@ -358,65 +338,6 @@
"type": "github"
}
},
"niri": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": [
"nixpkgs-unstable"
],
"nixpkgs-stable": "nixpkgs-stable_2",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1742355568,
"narHash": "sha256-cHW060+beSciKdCK4SZ9vYPOFy/otAq+t9MiO54zKYY=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "10b56ff2ecc915ec26505526125b4f3a3006d5b3",
"type": "github"
},
"original": {
"owner": "sodiboo",
"ref": "main",
"repo": "niri-flake",
"type": "github"
}
},
"niri-stable": {
"flake": false,
"locked": {
"lastModified": 1740117926,
"narHash": "sha256-mTTHA0RAaQcdYe+9A3Jx77cmmyLFHmRoZdd8RpWa+m8=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "b94a5db8790339cf9134873d8b490be69e02ac71",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"ref": "v25.02",
"repo": "niri",
"type": "github"
}
},
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1742276600,
"narHash": "sha256-muceB5DW++WPqrGKpX3Hkii/DNSMmFs2oQrYRYHmPiU=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "e251ca7340bc71870c3a81a7ffc3d9bde58e685a",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
@ -499,22 +420,6 @@
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1742268799,
"narHash": "sha256-IhnK4LhkBlf14/F8THvUy3xi/TxSQkp9hikfDZRD4Ic=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "da044451c6a70518db5b730fe277b70f494188f1",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1742288794,
@ -593,12 +498,10 @@
"inputs": {
"authentik-nix": "authentik-nix",
"flake-utils": "flake-utils_2",
"home-manager": "home-manager",
"lanzaboote": "lanzaboote",
"lix": "lix",
"lix-module": "lix-module",
"microvm": "microvm",
"niri": "niri",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
@ -770,39 +673,6 @@
"type": "git",
"url": "https://git.oxapentane.com/0xa/website.git"
}
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {
"lastModified": 1739246919,
"narHash": "sha256-/hBM43/Gd0/tW+egrhlWgOIISeJxEs2uAOIYVpfDKeU=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "44590a416d4a3e8220e19e29e0b6efe64a80315d",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"ref": "v0.5.1",
"repo": "xwayland-satellite",
"type": "github"
}
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1742249030,
"narHash": "sha256-YZ+axsuNsgIKWfnRkt6Qa9UoKfUOIWf42vNUonXxmxM=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "cca74a5f6b23742d77dc5db4312dfc40fd4a0fcc",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
}
},
"root": "root",

View file

@ -47,16 +47,6 @@
inputs.flake-utils.follows = "flake-utils";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
niri = {
url = "github:sodiboo/niri-flake/main";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
tmux-yank = {
url = "github:tmux-plugins/tmux-yank";
flake = false;
@ -66,11 +56,9 @@
outputs =
inputs@{
authentik-nix,
home-manager,
lanzaboote,
lix-module,
microvm,
niri,
nixos-hardware,
nixpkgs,
nixpkgs-unstable,
@ -118,20 +106,13 @@
lanzaboote.nixosModules.lanzaboote
nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen3
lix-module.nixosModules.default
home-manager.nixosModules.home-manager
niri.nixosModules.niri
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users."0xa" = import ./hosts/toaster/0xa-home.nix;
}
./hosts/toaster
./modules/basic-tools
./modules/binary-caches.nix
./modules/devtools.nix
./modules/niri.nix
./modules/gnome.nix
./modules/gnupg.nix
./modules/radio.nix
./modules/science.nix

View file

@ -1,4 +1,4 @@
{ lib, pkgs, ... }:
{ lib, config, ... }:
{
imports = [
./mullvad.nix
@ -6,21 +6,26 @@
./zw.nix
];
environment.systemPackages = with pkgs; [
iwgtk
impala
];
# Networkmanager shouldn't interfere with systemd managed interfaces
networking.networkmanager.unmanaged =
let
systemd_netdevs = lib.attrsets.attrValues (
lib.attrsets.mapAttrs (_name: value: value.netdevConfig.Name) config.systemd.network.netdevs
);
in
systemd_netdevs;
# kick out networkmanager
networking.networkmanager.enable = lib.mkForce false;
networking.useNetworkd = true;
systemd.network.enable = true;
systemd.network = {
enable = true;
wait-online.enable = false; # uplink is managed by networkmanager
};
users.users."0xa".extraGroups = [ "networkmanager" ];
networking = {
hostName = "toaster";
firewall.enable = true;
wireguard.enable = true;
wireless.iwd.enable = true;
};
services.resolved = {
@ -34,38 +39,4 @@
];
};
# we might have no interwebs at all
systemd.network.wait-online.enable = false;
# uplinks
systemd.network.networks = {
"10-ether-uplink" = {
matchConfig.Name = "enp1s0f0";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
};
"10-dock-uplink" = {
matchConfig.Name = "enp5s0f4u1u1";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
dhcpV4Config = {
RouteMetric = 666;
};
dhcpV6Config = {
RouteMetric = 666;
};
};
"wlan-uplink" = {
matchConfig.Name = "wlan0";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
};
};
}

View file

@ -0,0 +1,71 @@
{ lib, pkgs, ... }:
{
imports = [
./mullvad.nix
./dumpdvb.nix
./zw.nix
];
environment.systemPackages = with pkgs; [
iwgtk
impala
];
# kick out networkmanager
networking.networkmanager.enable = lib.mkForce false;
networking.useNetworkd = true;
systemd.network.enable = true;
networking = {
hostName = "toaster";
firewall.enable = true;
wireguard.enable = true;
wireless.iwd.enable = true;
};
services.resolved = {
enable = true;
dnssec = "false";
fallbackDns = [
"9.9.9.9"
"2620:fe::fe"
"149.112.112.112"
"2620:fe::9"
];
};
# we might have no interwebs at all
systemd.network.wait-online.enable = false;
# uplinks
systemd.network.networks = {
"10-ether-uplink" = {
matchConfig.Name = "enp1s0f0";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
};
"10-dock-uplink" = {
matchConfig.Name = "enp5s0f4u1u1";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
dhcpV4Config = {
RouteMetric = 666;
};
dhcpV6Config = {
RouteMetric = 666;
};
};
"wlan-uplink" = {
matchConfig.Name = "wlan0";
networkConfig = {
DHCP = "yes";
IPv6AcceptRA = true;
};
};
};
}