diff --git a/flake.nix b/flake.nix index e246a86..b0126ab 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,7 @@ imports = [ inputs.git-hooks-nix.flakeModule ./hosts + ./pkgs ]; perSystem = { diff --git a/home/programs/other.nix b/home/programs/other.nix index ded8233..15404d7 100644 --- a/home/programs/other.nix +++ b/home/programs/other.nix @@ -2,14 +2,17 @@ pkgs, lib, osConfig, + self, ... }: { - home.packages = lib.mkIf osConfig.niksos.desktop.apps [ - pkgs.spotify - pkgs.signal-desktop - pkgs.bambu-studio - pkgs.gimp - pkgs.inkscape - pkgs.thunderbird - ]; + home.packages = + lib.optionals osConfig.niksos.desktop.apps [ + pkgs.spotify + pkgs.signal-desktop + pkgs.bambu-studio + pkgs.gimp + pkgs.inkscape + pkgs.thunderbird + ] + ++ lib.optional osConfig.niksos.hardware.portable.enable self.packages.${pkgs.system}.visicut; } diff --git a/home/wayland/mako.nix b/home/wayland/mako.nix index 7ccbfd9..c35e59b 100644 --- a/home/wayland/mako.nix +++ b/home/wayland/mako.nix @@ -3,6 +3,6 @@ in { services.mako = { inherit (osConfig.programs.hyprland) enable; - settings.defaultTimeout = 5000; + settings.default-timeout = 5000; }; } diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index e417d54..072ace5 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -2,7 +2,6 @@ imports = [ ./hardware-configuration.nix ./virt.nix - ./wluma.nix ]; programs.appimage.enable = true; diff --git a/hosts/laptop/wluma.nix b/hosts/laptop/wluma.nix deleted file mode 100644 index 593c1c1..0000000 --- a/hosts/laptop/wluma.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - hardware.sensor.iio.enable = true; # brightness sensor - home-manager.users.jsw.services.wluma = { - enable = true; - settings = { - als.iio = { - path = "/sys/bus/iio/devices"; - thresholds = { - "0" = "night"; - "10" = "dark"; - "100" = "normal"; - "20" = "dim"; - "200" = "bright"; - "500" = "outdoors"; - }; - }; - output.backlight = [ - { - capturer = "none"; - name = "eDP-1"; - path = "/sys/class/backlight/amdgpu_bl1"; - } - { - capturer = "none"; - name = "keyboard"; - path = "/sys/bus/platform/devices/cros-keyboard-leds.5.auto/leds/chromeos::kbd_backlight"; - } - ]; - }; - }; -} diff --git a/pkgs/default.nix b/pkgs/default.nix new file mode 100644 index 0000000..888892c --- /dev/null +++ b/pkgs/default.nix @@ -0,0 +1,8 @@ +{ + systems = ["x86_64-linux"]; + perSystem = {pkgs, ...}: { + packages = { + visicut = pkgs.callPackage ./visicut {}; + }; + }; +} diff --git a/pkgs/visicut/default.nix b/pkgs/visicut/default.nix new file mode 100644 index 0000000..ef92913 --- /dev/null +++ b/pkgs/visicut/default.nix @@ -0,0 +1,43 @@ +{ + appimageTools, + fetchurl, + lib, +}: let + pname = "VisiCut"; + version = "2.1"; + + src = fetchurl { + url = "https://github.com/t-oster/VisiCut/releases/download/${version}/VisiCut-${version}+devel-x86_64.AppImage"; + hash = "sha256-Mq6Rjozshwk8asY+5egScQ5TkoxzRnWlZ9p0WeEOoiE="; + }; + + appimageContents = appimageTools.extract { + inherit pname version src; + postExtract = '' + substituteInPlace $out/${desktopFile} --replace-fail 'Exec=visicut' 'Exec=${pname}' + ''; + }; + + desktopFile = "VisiCut.desktop"; + iconFile = "visicut.png"; +in + appimageTools.wrapType2 { + inherit pname version src; + + extraInstallCommands = '' + install -m 444 -D ${appimageContents}/${desktopFile} $out/share/applications/${desktopFile} + install -m 444 -D ${appimageContents}/usr/share/icons/hicolor/128x128/apps/${iconFile} \ + $out/share/icons/hicolor/128x128/apps/${iconFile} + ''; + + meta = { + description = "A userfriendly tool to prepare, save and send Jobs to Lasercutters."; + homepage = "https://visicut.org/"; + downloadPage = "https://github.com/t-oster/VisiCut/releases/"; + license = lib.licenses.lgpl3; + sourceProvenance = with lib.sourceTypes; [binaryNativeCode]; + # maintainers = with lib.maintainers; [onny]; + mainProgram = "VisiCut"; + platforms = ["x86_64-linux"]; + }; + } diff --git a/system/server/nextcloud.nix b/system/server/nextcloud.nix index 4bfa5bf..3831684 100644 --- a/system/server/nextcloud.nix +++ b/system/server/nextcloud.nix @@ -27,9 +27,17 @@ in { autoUpdateApps.enable = true; extraAppsEnable = true; - extraApps = with config.services.nextcloud.package.packages.apps; { + extraApps = { # https://github.com/NixOS/nixpkgs/blob/master/pkgs/servers/nextcloud/packages/nextcloud-apps.json - inherit calendar contacts mail notes tasks; + inherit + (config.services.nextcloud.package.packages.apps) + calendar + contacts + mail + notes + tasks + user_oidc + ; }; settings = { @@ -56,6 +64,12 @@ in { }; nginx.enable = lib.mkForce false; + phpfpm.pools.nextcloud.settings = let + inherit (config.services.caddy) user group; + in { + "listen.owner" = user; + "listen.group" = group; + }; caddy.virtualHosts."${host}".extraConfig = '' encode zstd gzip