Compare commits
14 Commits
sanoid
...
printer-mo
| Author | SHA1 | Date | |
|---|---|---|---|
|
80fc4cc528
|
|||
|
8b37082844
|
|||
|
6c3a7be483
|
|||
|
568cce0d48
|
|||
|
46e9bae193
|
|||
| 4949719307 | |||
|
e8c188debf
|
|||
|
1f559d93ba
|
|||
|
a03b7506c5
|
|||
|
3b2a7cedc5
|
|||
|
a48e271853
|
|||
|
d202a3d0cb
|
|||
| ef33833910 | |||
| d73031e7f1 |
@@ -21,18 +21,3 @@ Testing disko partitioning is working quite well. Just run the following and che
|
||||
```bash
|
||||
nix run -L .\#nixosConfigurations.fanny.config.system.build.vmWithDisko
|
||||
```
|
||||
|
||||
Only problem is that encryption is not working, so it needs to be commented out. For testing host fanny the following parts in ```./machines/modules/disko/fanny.nix``` need to be commented out(for both pools!):
|
||||
```nix
|
||||
datasets = {
|
||||
encrypted = {
|
||||
options = {
|
||||
encryption = "aes-256-gcm"; #THIS ONE
|
||||
keyformat = "passphrase"; #THIS ONE
|
||||
keylocation = "file:///tmp/root.key"; #THIS ONE
|
||||
};
|
||||
# use this to read the key during boot
|
||||
postCreateHook = '' #THIS ONE
|
||||
zfs set keylocation="prompt" "zroot/$name"; #THIS ONE
|
||||
''; #THIS ONE
|
||||
```
|
||||
|
||||
8
flake.lock
generated
8
flake.lock
generated
@@ -341,11 +341,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737548421,
|
||||
"narHash": "sha256-gmlqJdC+v86vXc2yMhiza1mvsqh3vMfrEsiw+tV5MXg=",
|
||||
"lastModified": 1743458889,
|
||||
"narHash": "sha256-eVTtsCPio3Wj/g/gvKTsyjh90vrNsmgjzXK9jMfcboM=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "c5fff78c83959841ac724980a13597dcfa6dc26d",
|
||||
"revCount": 29,
|
||||
"rev": "b61466549e2687628516aa1f9ba73f251935773a",
|
||||
"revCount": 30,
|
||||
"type": "git",
|
||||
"url": "https://git.dynamicdiscord.de/kalipso/tasklist"
|
||||
},
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
@@ -9,6 +9,7 @@
|
||||
../modules/sshd.nix
|
||||
../modules/minimal_tools.nix
|
||||
../modules/autoupdate.nix
|
||||
inputs.self.nixosModules.malobeo.printing
|
||||
];
|
||||
|
||||
malobeo.autoUpdate = {
|
||||
@@ -50,6 +51,8 @@
|
||||
};
|
||||
|
||||
services.printing.enable = true;
|
||||
services.malobeo.printing.enable = true;
|
||||
|
||||
services.printing.drivers = [
|
||||
(pkgs.writeTextDir "share/cups/model/brother5350.ppd" (builtins.readFile ../modules/BR5350_2_GPL.ppd))
|
||||
pkgs.gutenprint
|
||||
|
||||
4777
machines/modules/KOC658UX.ppd
Normal file
4777
machines/modules/KOC658UX.ppd
Normal file
File diff suppressed because it is too large
Load Diff
@@ -195,8 +195,7 @@ rec {
|
||||
|
||||
vmNestedMicroVMOverwrites = host: sopsDummy: {
|
||||
|
||||
services.malobeo.microvm.deployHosts = pkgs.lib.mkForce [];
|
||||
microvm.vms =
|
||||
microvm.vms = pkgs.lib.mkForce (
|
||||
let
|
||||
# Map the values to each hostname to then generate an Attrset using listToAttrs
|
||||
mapperFunc = name: { inherit name; value = {
|
||||
@@ -216,7 +215,7 @@ rec {
|
||||
};
|
||||
}; };
|
||||
in
|
||||
builtins.listToAttrs (map mapperFunc self.nixosConfigurations.${host}.config.services.malobeo.microvm.deployHosts);
|
||||
builtins.listToAttrs (map mapperFunc self.nixosConfigurations.${host}.config.services.malobeo.microvm.deployHosts));
|
||||
};
|
||||
|
||||
buildVM = host: networking: sopsDummy: disableDisko: varPath: writableStore: fwdPort: (self.nixosConfigurations.${host}.extendModules {
|
||||
|
||||
@@ -65,7 +65,7 @@ in
|
||||
enable = true;
|
||||
|
||||
templates."default" = {
|
||||
hourly = 0;
|
||||
hourly = 24;
|
||||
daily = 30; #keep 30 daily snapshots
|
||||
monthly = 6; #keep 6 monthly backups
|
||||
yearly = 0;
|
||||
|
||||
@@ -102,6 +102,22 @@ in
|
||||
/run/current-system/sw/bin/microvm -Ru ${name}
|
||||
'';
|
||||
};
|
||||
|
||||
"microvm-init-dirs@${name}" = {
|
||||
description = "Initialize microvm directories";
|
||||
after = [ "zfs-mount.service" ];
|
||||
wantedBy = [ "microvm@${name}.service" ];
|
||||
unitConfig.ConditionPathExists = "!/var/lib/microvms/${name}/.is_initialized";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
script = ''
|
||||
mkdir -p /var/lib/microvms/${name}/var
|
||||
mkdir -p /var/lib/microvms/${name}/etc
|
||||
mkdir -p /var/lib/microvms/data/${name}
|
||||
touch /var/lib/microvms/${name}/.is_initialized
|
||||
'';
|
||||
};
|
||||
}) {} (cfg.deployHosts);
|
||||
|
||||
systemd.timers = builtins.foldl' (timers: name: timers // {
|
||||
|
||||
@@ -43,4 +43,11 @@
|
||||
allowedIPs = [ "10.100.0.101/32" ];
|
||||
publicKey = "3U59F6T1s/1LaZBIa6wB0qsVuO6pRR9jfYZJIH2piAU=";
|
||||
};
|
||||
|
||||
"backup0" = {
|
||||
role = "client";
|
||||
address = "10.100.0.20";
|
||||
allowedIPs = [ "10.100.0.20/32" ];
|
||||
publicKey = "Pp55Jg//jREzHdbbIqTXc9N7rnLZIFw904qh6NLrACE=";
|
||||
};
|
||||
}
|
||||
|
||||
51
machines/modules/malobeo/printing.nix
Normal file
51
machines/modules/malobeo/printing.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.services.malobeo.printing;
|
||||
driverFile = pkgs.writeTextDir "share/cups/model/konicaminoltac258.ppd" (builtins.readFile ../KOC658UX.ppd);
|
||||
|
||||
defaultPpdOptions = {
|
||||
PageSize = "A4";
|
||||
SelectColor = "Grayscale";
|
||||
Finisher = "FS534";
|
||||
SaddleUnit = "SD511";
|
||||
Model = "C258";
|
||||
InputSlot = "Tray1";
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
options.services.malobeo.printing = {
|
||||
enable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Setup malobeo printers";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf (cfg.enable) {
|
||||
services.printing.enable = true;
|
||||
services.printing.drivers = [
|
||||
driverFile
|
||||
];
|
||||
|
||||
hardware.printers.ensurePrinters = [ {
|
||||
name = "KonicaDefault";
|
||||
model = "konicaminoltac258.ppd";
|
||||
location = "Zine Workshop";
|
||||
deviceUri = "ipp://192.168.1.42/ipp";
|
||||
ppdOptions = defaultPpdOptions;
|
||||
}
|
||||
{
|
||||
name = "KonicaBooklet";
|
||||
model = "konicaminoltac258.ppd";
|
||||
location = "Zine Workshop";
|
||||
deviceUri = "ipp://192.168.1.42/ipp";
|
||||
ppdOptions = defaultPpdOptions // {
|
||||
Fold = "Stitch";
|
||||
Staple = "None";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -68,7 +68,11 @@ in
|
||||
users = [ "backup" ];
|
||||
commands = [
|
||||
{
|
||||
command = "${pkgs.zfs}/bin/zfs";
|
||||
command = "/run/current-system/sw/bin/zfs";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
{
|
||||
command = "/run/current-system/sw/bin/zpool";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
|
||||
@@ -117,6 +117,7 @@ in (utils.lib.eachSystem (builtins.filter filter_system utils.lib.defaultSystems
|
||||
disko.imports = [ ./machines/modules/disko ];
|
||||
users.imports = [ ./machines/modules/malobeo/users.nix ];
|
||||
backup.imports = [ ./machines/modules/malobeo/backup.nix ];
|
||||
printing.imports = [ ./machines/modules/malobeo/printing.nix ];
|
||||
};
|
||||
|
||||
hydraJobs = nixpkgs.lib.mapAttrs (_: nixpkgs.lib.hydraJob) (
|
||||
|
||||
Reference in New Issue
Block a user