add bambu!

This commit is contained in:
2026-04-20 14:28:12 +09:00
parent e20fd1dd81
commit ff46f6b509
8 changed files with 177 additions and 31 deletions

View File

@@ -1,18 +1,32 @@
# Edit this configuration file to define what should be installed on your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, inputs, ... }:
{
config,
lib,
pkgs,
inputs,
...
}:
let
myRizin = pkgs.rizin.passthru.withPlugins
(plugins: [ plugins.jsdec plugins.rz-ghidra ]);
in {
myRizin = pkgs.rizin.passthru.withPlugins (plugins: [
plugins.jsdec
plugins.rz-ghidra
]);
in
{
imports = [
./hardware-configuration.nix
./services/virtual.nix
./services/x.nix
./services/timer.nix
./services/sound.nix
./services/ollama.nix
];
nixpkgs.overlays = [
(import ./overlays/bambu-studio.nix)
];
nixpkgs.config.allowUnfree = true;
@@ -24,11 +38,31 @@ in {
'';
};
networking.bridges."lxcbr0".interfaces = [ ];
networking.interfaces."lxcbr0".ipv4.addresses = [
{
address = "10.0.3.1";
prefixLength = 24;
}
];
services.netbird.enable = true;
# Enable NAT so the container can reach the Debian repos
networking.nat = {
enable = true;
internalInterfaces = [ "lxcbr0" ];
externalInterface = "enp5s0"; # Check 'ip link' for your actual interface name
};
services.resolved = {
enable = true;
dnssec = "true";
};
networking.nameservers = [ "1.1.1.1" "8.8.8.8" ];
networking.nameservers = [
"1.1.1.1"
"8.8.8.8"
];
boot.loader = {
systemd-boot.enable = false;
@@ -50,21 +84,25 @@ in {
security.sudo = {
enable = true;
extraRules = [
{
users = ["allen"];
commands = [{
command = "/run/current-system/sw/bin/systemctl reboot --force";
options = [ "NOPASSWD" ];
}];
}
{
users = [ "allen" ];
commands = [
{
command = "/run/current-system/sw/bin/systemctl reboot --force";
options = [ "NOPASSWD" ];
}
];
}
{
commands = [{
{
commands = [
{
command = "${pkgs.grub2}/bin/grub-reboot";
options = [ "NOPASSWD" ];
}];
groups = [ "wheel" ];
}
}
];
groups = [ "wheel" ];
}
];
};
@@ -97,10 +135,18 @@ in {
time.timeZone = "Asia/Seoul";
i18n.defaultLocale = "en_US.UTF-8";
i18n.supportedLocales = [
"en_US.UTF-8/UTF-8"
];
i18n.inputMethod = {
type = "fcitx5";
enable = true;
fcitx5.addons = with pkgs; [ fcitx5-gtk fcitx5-hangul ];
fcitx5.addons = with pkgs; [
fcitx5-gtk
fcitx5-hangul
];
};
# console = {
# font = "Lat2-Terminus16";
@@ -108,7 +154,13 @@ in {
# useXkbConfig = true; # use xkb.options in tty.
# };
services.udev.packages = with pkgs; [ libwacom rtl-sdr platformio-core.udev ];
services.udev.packages = with pkgs; [
libwacom
rtl-sdr
platformio-core.udev
];
services.flatpak.enable = true;
services.usbmuxd = {
enable = false;
@@ -123,8 +175,13 @@ in {
# Define a user account. Don't forget to set a password with passwd.
users.users.allen = {
isNormalUser = true;
extraGroups =
[ "wheel" "wireshark" "podman" "dialout" ]; # Enable sudo for the user.
extraGroups = [
"wheel"
"incus-admin"
"wireshark"
"podman"
"dialout"
]; # Enable sudo for the user.
shell = pkgs.nushell;
home = "/home/allen";
packages = with pkgs; [ tree ];
@@ -164,15 +221,27 @@ in {
libgit2
ntfs3g
inputs.helix.packages."${pkgs.system}".helix
bambu-studio
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
programs.hyprland.enable = true;
environment.variables = {
LD_LIBRARY_PATH = lib.makeLibraryPath
(with pkgs; [ libglvnd libGL glfw pulseaudio libgit2 ]);
LD_LIBRARY_PATH = lib.makeLibraryPath (
with pkgs;
[
libglvnd
libGL
glfw
pulseaudio
libgit2
]
);
};
environment.variables.EDITOR = "vim";
@@ -184,5 +253,3 @@ in {
system.stateVersion = "25.05"; # Did you read the comment?
}