WIP refactor

This commit is contained in:
RingOfStorms (Joshua Bell) 2025-03-17 22:44:10 -05:00
parent c10446db21
commit 2087ee1015
16 changed files with 342 additions and 144 deletions

View file

@ -1,12 +0,0 @@
{ pkgs, ... }:
{
hardware.flipperzero.enable = true;
environment.systemPackages = with pkgs; [ qFlipper ];
services.udev.extraRules = ''
#Flipper Zero serial port
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", ATTRS{manufacturer}=="Flipper Devices Inc.", GROUP="users", TAG+="uaccess"
#Flipper Zero DFU
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", ATTRS{manufacturer}=="STMicroelectronics", GROUP="users", TAG+="uaccess"
'';
}

View file

@ -1,50 +0,0 @@
{
config,
lib,
pkgs,
...
}:
with lib;
let
rustChannel = config.programs.rust.channel;
rustVersion = config.programs.rust.version;
in
{
options.components.rust = {
enable = mkOption {
type = types.bool;
default = true;
description = "Enable Rust programming language support.";
};
repl = mkOption {
type = types.bool;
default = true;
description = "Enable the evcxr repl for `rust` command.";
};
channel = mkOption {
type = types.str;
default = "stable";
description = "The Rust release channel to use (e.g., stable, beta, nightly).";
};
version = mkOption {
type = types.str;
default = "latest";
description = "The specific version of Rust to use. Use 'latest' for the latest stable release.";
};
};
config = mkIf config.components.rust.enable {
environment.systemPackages = with pkgs; [
rustup gcc
] ++ (if config.components.rust.repl then [ pkgs.evcxr ] else [ ]);
environment.shellAliases = mkIf config.components.rust.repl {
rust = "evcxr";
};
};
}

View file

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ evcxr rustc ];
environment.shellAliases = {
rust = "evcxr";
};
}

View file

@ -1,4 +0,0 @@
{ ... }:
{
programs.steam.enable = true;
}

View file

@ -1,37 +0,0 @@
{
lib,
pkgs,
config,
...
}:
{
options.components.tailscale = {
useSecretsAuth = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether to use secrets authentication for Tailscale";
};
useHeadscale = lib.mkOption {
type = lib.types.bool;
default = true;
description = "Whether to use headscale login server.";
};
};
config = {
environment.systemPackages = with pkgs; [ tailscale ];
services.tailscale = {
enable = true;
openFirewall = true;
useRoutingFeatures = "client";
authKeyFile = lib.mkIf config.components.tailscale.useSecretsAuth config.age.secrets.headscale_auth.path;
# https://tailscale.com/kb/1241/tailscale-up
extraUpFlags = lib.mkIf config.components.tailscale.useHeadscale [
"--login-server=https://headscale.joshuabell.xyz"
"--no-logs-support"
];
};
networking.firewall.trustedInterfaces = [ config.services.tailscale.interfaceName ];
networking.firewall.checkReversePath = "loose";
};
}

View file

@ -1,6 +0,0 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [ uhk-agent uhk-udev-rules ];
services.udev.packages = [ pkgs.uhk-udev-rules ];
}