347 current 1970-01-01 01:00:00 23.11.20240522.4639777 6.6.30-rt30 *

This commit is contained in:
Max Känner 2024-05-26 18:10:08 +02:00
parent 71fa64ccfa
commit 0be300aa7b
4 changed files with 52 additions and 31 deletions

View File

@ -34,39 +34,9 @@
networking.hostName = "MaxNixosLaptop"; # Define your hostname.
# Set your time zone.
time.timeZone = "Europe/Berlin";
# NIXOS
nix.settings.experimental-features = ["nix-command" "flakes"];
# Enable CUPS to print documents.
services.printing = {
enable = true;
drivers = [pkgs.samsung-unified-linux-driver];
};
services.avahi = {
enable = true;
nssmdns = true;
openFirewall = true;
};
hardware.printers = {
ensurePrinters = [
{
name = "Samsung_ML-1630W_Series";
location = "luhbots";
deviceUri = "dnssd://Samsung%20ML-1630W%20Series%20(SEC00159937E684)._pdl-datastream._tcp.local/";
model = "samsung/ML-1630W.ppd";
ppdOptions = {
PageSize = "A4";
};
}
];
};
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.max = {
isNormalUser = true;

47
modules/nixos/cups.nix Normal file
View File

@ -0,0 +1,47 @@
{
lib,
config,
pkgs,
...
}: let
cfg = config.myConfig.cups;
in {
options.myConfig.cups = {
enable = lib.mkEnableOption "printing";
};
config = {
# Enable CUPS to print documents.
services.printing = {
enable = true;
drivers = [pkgs.samsung-unified-linux-driver];
};
services.avahi = {
enable = true;
nssmdns = true;
openFirewall = true;
};
hardware.printers = {
ensurePrinters = [
{
name = "Samsung_ML-1630W_Series";
location = "luhbots";
deviceUri = "dnssd://Samsung%20ML-1630W%20Series%20(SEC00159937E684)._pdl-datastream._tcp.local/";
model = "samsung/ML-1630W.ppd";
ppdOptions = {
PageSize = "A4";
};
}
{
name = "Brother_HL-L3210CW_series";
location = "Max Zimmer";
deviceUri = "dnssd://Brother%20HL-L3210CW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-900f0c617136";
model = "drv:///sample.drv/generic.ppd";
ppdOptions = {
PageSize = "A4";
};
}
];
};
};
}

View File

@ -5,7 +5,7 @@
}: let
cfg = config.myConfig;
in {
imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix];
imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix];
options.myConfig = {
enable = lib.mkEnableOption "my custom config";
@ -21,6 +21,7 @@ in {
greetd.enable = lib.mkIf cfg.desktop true;
sway.enable = lib.mkIf cfg.desktop true;
music.enable = lib.mkIf cfg.desktop true;
cups.enable = lib.mkIf cfg.desktop true;
wifi.tray = lib.mkIf cfg.desktop true;
sway.laptop = lib.mkIf cfg.laptop true;

View File

@ -10,6 +10,9 @@ in {
};
config = lib.mkIf cfg.enable {
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";