62 lines
1.7 KiB
Nix
62 lines
1.7 KiB
Nix
{ lib, pkgs, config, nixosModulesPath, inputs, system, ... }:
|
|
|
|
{
|
|
|
|
imports =
|
|
[
|
|
/* ./modules/udev.nix */
|
|
/* ../../../secrets */
|
|
/* ../../../profiles/lix.nix */
|
|
/* ../../../profiles/auto-upgrade.nix */
|
|
/* ../../../profiles/known-hosts */
|
|
]
|
|
# import modules from nixos
|
|
# based on https://github.com/numtide/system-manager/blob/e09166d9d4eab2bf010c1589fbf4542a54b022e3/nix/modules/upstream/nixpkgs/default.nix#L9
|
|
++ map (path: nixosModulesPath + path) [
|
|
/* "/config/nix.nix" */
|
|
/* "/config/nix-remote-build.nix" */
|
|
"/services/networking/tailscale.nix"
|
|
];
|
|
|
|
# stub nixos shit
|
|
options =
|
|
let
|
|
stub = lib.mkOption { type = lib.types.raw; };
|
|
in {
|
|
networking.firewall = stub;
|
|
networking.dhcpcd = stub;
|
|
systemd.network = stub;
|
|
};
|
|
|
|
config = {
|
|
|
|
nixpkgs.overlays = [
|
|
/* inputs.system-manager-edge.overlays.packages */
|
|
];
|
|
environment.systemPackages = [
|
|
/* pkgs.system-manager */
|
|
inputs.system-manager-edge.packages.${system}.system-manager # ewww
|
|
|
|
/* pkgs.superTuxKart */
|
|
];
|
|
|
|
# https://github.com/soupglasses/nix-system-graphics
|
|
system-graphics.enable = true;
|
|
|
|
/** /
|
|
nix.registry.nixpkgs.flake = inputs.nixpkgs;
|
|
nix.registry.nixpkgs-unstable.flake = inputs.unstable;
|
|
nix.nixPath = [
|
|
"nixpkgs=${inputs.nixpkgs}"
|
|
"nixpkgs-unstable=${inputs.unstable}"
|
|
];
|
|
/**/
|
|
|
|
# from https://wiki.archlinux.org/title/Power_management#Using_a_script_and_an_udev_rule
|
|
# in /etc/udev/rules.d/powersave.rules
|
|
# SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="${lib.getExe tailscale} up"
|
|
# SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="${lib.getExe tailscale} down"
|
|
|
|
};
|
|
}
|