add den pattern
This commit is contained in:
12
modules/hardware/arduino-ide.nix
Normal file
12
modules/hardware/arduino-ide.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.hardware or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.arduino-ide.enable or true)) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
arduino-ide
|
||||
];
|
||||
};
|
||||
}
|
||||
14
modules/hardware/bambu-studio-flatpak.nix
Normal file
14
modules/hardware/bambu-studio-flatpak.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.hardware or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.bambu-studio-flatpak.enable or true)) {
|
||||
services.flatpak.update.onActivation = true;
|
||||
services.flatpak.enable = true;
|
||||
services.flatpak.packages = [
|
||||
"com.bambulab.BambuStudio"
|
||||
];
|
||||
};
|
||||
}
|
||||
6
modules/hardware/default.nix
Normal file
6
modules/hardware/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ lib, ... }: {
|
||||
imports = lib.mapAttrsToList
|
||||
(file: _: ./. + "/${file}")
|
||||
(lib.filterAttrs (file: _: lib.hasSuffix ".nix" file && file != "default.nix")
|
||||
(builtins.readDir ./.));
|
||||
}
|
||||
12
modules/hardware/openscad.nix
Normal file
12
modules/hardware/openscad.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.hardware or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.openscad.enable or true)) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
openscad
|
||||
];
|
||||
};
|
||||
}
|
||||
47
modules/hardware/printing.nix
Normal file
47
modules/hardware/printing.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.hardware or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.printing.enable or true)) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
cnijfilter2
|
||||
];
|
||||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.cnijfilter2 ];
|
||||
};
|
||||
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
hardware.printers = {
|
||||
ensurePrinters = [
|
||||
{
|
||||
name = "CanonTS3100";
|
||||
location = "Home";
|
||||
deviceUri = "dnssd://Canon%20TS3100%20series._ipp._tcp.local/?uuid=00000000-0000-1000-8000-0018271a7e44";
|
||||
model = "canonts3100.ppd";
|
||||
ppdOptions = {
|
||||
PageSize = "A4";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
ensureDefaultPrinter = "CanonTS3100";
|
||||
};
|
||||
|
||||
# for samba
|
||||
networking.hosts = {
|
||||
"192.168.68.60" = [
|
||||
"2C2919000000.local"
|
||||
"2C2919000000"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user