add fmt to flake, reduce abstraction layers
This commit is contained in:
parent
06b37c6d92
commit
ceda4f1791
10 changed files with 24 additions and 17 deletions
|
@ -23,7 +23,7 @@ let
|
||||||
sway
|
sway
|
||||||
;
|
;
|
||||||
inherit (config.boot.kernelPackages) x86_energy_perf_policy cpupower;
|
inherit (config.boot.kernelPackages) x86_energy_perf_policy cpupower;
|
||||||
enable_perf_policy = (elem system x86_energy_perf_policy.meta.platforms);
|
enable_perf_policy = false; # (elem system x86_energy_perf_policy.meta.platforms);
|
||||||
|
|
||||||
powersave = writeShellScriptBin "powersave-mode" (
|
powersave = writeShellScriptBin "powersave-mode" (
|
||||||
concatLines (
|
concatLines (
|
||||||
|
|
|
@ -5,12 +5,10 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
inherit (config.grimmShared) enable printing graphical;
|
inherit (config.grimmShared) enable graphical;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf (enable && printing) {
|
config = lib.mkIf (enable && config.services.printing.enable) {
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing.enable = true;
|
|
||||||
services.printing.drivers = with pkgs; [
|
services.printing.drivers = with pkgs; [
|
||||||
brgenml1lpr
|
brgenml1lpr
|
||||||
brgenml1cupswrapper
|
brgenml1cupswrapper
|
||||||
|
@ -20,7 +18,7 @@ in
|
||||||
nssmdns4 = true;
|
nssmdns4 = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
services.printing.cups-pdf.enable = true;
|
# services.printing.cups-pdf.enable = true;
|
||||||
hardware.sane.brscan4.enable = true; # enables support for SANE scanners
|
hardware.sane.brscan4.enable = true; # enables support for SANE scanners
|
||||||
|
|
||||||
environment.systemPackages = (
|
environment.systemPackages = (
|
||||||
|
@ -30,6 +28,4 @@ in
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
options.grimmShared.printing = lib.mkEnableOption "Enables print and scan related options";
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,11 +11,10 @@ in
|
||||||
{
|
{
|
||||||
imports = [ ./apparmor-d-module.nix ]; # ./aa-alias-module.nix ];
|
imports = [ ./apparmor-d-module.nix ]; # ./aa-alias-module.nix ];
|
||||||
|
|
||||||
config = mkIf (enable && tooling.enable) {
|
config = mkIf (enable && tooling.enable && config.security.apparmor.enable) {
|
||||||
services.dbus.apparmor = "enabled";
|
services.dbus.apparmor = "enabled";
|
||||||
security.auditd.enable = true;
|
security.auditd.enable = true;
|
||||||
|
|
||||||
security.apparmor.enable = true;
|
|
||||||
security.apparmor.enableCache = true;
|
security.apparmor.enableCache = true;
|
||||||
|
|
||||||
security.apparmor.includes."tunables/alias.d/programs" = ''
|
security.apparmor.includes."tunables/alias.d/programs" = ''
|
||||||
|
|
|
@ -18,8 +18,6 @@
|
||||||
nix.package = pkgs.lix;
|
nix.package = pkgs.lix;
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
|
|
||||||
grimmShared = {
|
grimmShared = {
|
||||||
enable = true;
|
enable = true;
|
||||||
locale = true;
|
locale = true;
|
||||||
|
|
|
@ -75,8 +75,17 @@
|
||||||
}
|
}
|
||||||
// definitions
|
// definitions
|
||||||
);
|
);
|
||||||
|
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
|
|
||||||
|
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
grimmauld-nixos = customNixosSystem "x86_64-linux" {
|
grimmauld-nixos = customNixosSystem "x86_64-linux" {
|
||||||
modules = [
|
modules = [
|
||||||
|
|
|
@ -47,7 +47,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
https = true;
|
https = true;
|
||||||
hostName = vhosts.nextcloud_host.host;
|
hostName = vhosts.nextcloud_host.host;
|
||||||
package = pkgs.nextcloud29;
|
package = pkgs.nextcloud30;
|
||||||
caching.redis = true;
|
caching.redis = true;
|
||||||
|
|
||||||
extraApps = {
|
extraApps = {
|
||||||
|
|
|
@ -5,7 +5,7 @@ in
|
||||||
{
|
{
|
||||||
services.harmonia = {
|
services.harmonia = {
|
||||||
enable = true;
|
enable = true;
|
||||||
signKeyPath = "/var/cache-priv-key.pem";
|
signKeyPaths = [ "/var/cache-priv-key.pem" ];
|
||||||
settings.bind = "[::]:${builtins.toString vhosts.nix_cache_host.port}";
|
settings.bind = "[::]:${builtins.toString vhosts.nix_cache_host.port}";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ in
|
||||||
in
|
in
|
||||||
map (v: "127.0.0.1:${builtins.toString v.port}") (
|
map (v: "127.0.0.1:${builtins.toString v.port}") (
|
||||||
filter (v: (isAttrs v) && v.enable) (
|
filter (v: (isAttrs v) && v.enable) (
|
||||||
attrValues (filterAttrs (n: v: n != "minio") config.services.prometheus.exporters)
|
attrValues (filterAttrs (n: v: n != "minio" && n != "tor") config.services.prometheus.exporters)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,12 +14,14 @@
|
||||||
networking.hostId = "2ea79333";
|
networking.hostId = "2ea79333";
|
||||||
boot.kernelPackages = lib.mkForce config.boot.zfs.package.latestCompatibleLinuxPackages;
|
boot.kernelPackages = lib.mkForce config.boot.zfs.package.latestCompatibleLinuxPackages;
|
||||||
|
|
||||||
|
services.printing.cups-pdf.enable = true; # implies printing enable
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
grimmShared = {
|
grimmShared = {
|
||||||
tooling = {
|
tooling = {
|
||||||
pass = true;
|
pass = true;
|
||||||
};
|
};
|
||||||
gaming = true;
|
gaming = true;
|
||||||
printing = true;
|
|
||||||
portals = true;
|
portals = true;
|
||||||
sound = {
|
sound = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -42,6 +42,10 @@
|
||||||
RUN+="${lib.getExe exitSway}"
|
RUN+="${lib.getExe exitSway}"
|
||||||
# '';
|
# '';
|
||||||
|
|
||||||
|
services.printing.cups-pdf.enable = true; # implies printing enable
|
||||||
|
# services.printing.enable = true;
|
||||||
|
security.apparmor.enable = true;
|
||||||
|
|
||||||
# RUN+="${lib.getExe' pkgs.systemd "loginctl"} lock-sessions"
|
# RUN+="${lib.getExe' pkgs.systemd "loginctl"} lock-sessions"
|
||||||
|
|
||||||
# networking.hostId = "2ea79333";
|
# networking.hostId = "2ea79333";
|
||||||
|
@ -52,7 +56,6 @@
|
||||||
pass = true;
|
pass = true;
|
||||||
};
|
};
|
||||||
gaming = true;
|
gaming = true;
|
||||||
printing = true;
|
|
||||||
portals = true;
|
portals = true;
|
||||||
sound = {
|
sound = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue