Compare commits
No commits in common. "415e9862b6e6a8e92b346d2ff3bfa14c2e9f4a78" and "bf34c66f544fa28a3ea8464d82809fb47b3e5712" have entirely different histories.
415e9862b6
...
bf34c66f54
9 changed files with 45 additions and 224 deletions
|
|
@ -59,29 +59,11 @@ in {
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
stylix.targets.noctalia-shell.enable = false;
|
stylix.targets.noctalia-shell.enable = false;
|
||||||
home.packages = [pkgs.app2unit pkgs.gpu-screen-recorder];
|
home.packages = [pkgs.app2unit];
|
||||||
programs.noctalia-shell = {
|
programs.noctalia-shell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemd.enable = true;
|
systemd.enable = true;
|
||||||
plugins = builtins.fromJSON (builtins.readFile ./plugins.json);
|
plugins = builtins.fromJSON (builtins.readFile ./plugins.json);
|
||||||
pluginSettings = let
|
|
||||||
enabledPlugins = with lib;
|
|
||||||
flip pipe [
|
|
||||||
(filterAttrs (_name: settings: settings.enabled or false))
|
|
||||||
builtins.attrNames
|
|
||||||
]
|
|
||||||
config.programs.noctalia-shell.plugins.states;
|
|
||||||
staticSettings = lib.genAttrs enabledPlugins (name: let
|
|
||||||
pluginSettingPath = ./plugin + "/${name}.json";
|
|
||||||
in
|
|
||||||
if lib.pathIsRegularFile pluginSettingPath
|
|
||||||
then builtins.fromJSON (builtins.readFile pluginSettingPath)
|
|
||||||
else {});
|
|
||||||
in
|
|
||||||
lib.recursiveUpdate
|
|
||||||
staticSettings {
|
|
||||||
screen-recorder.directory = "${config.xdg.userDirs.videos}/records";
|
|
||||||
};
|
|
||||||
settings =
|
settings =
|
||||||
lib.recursiveUpdate
|
lib.recursiveUpdate
|
||||||
(builtins.fromJSON (builtins.readFile ./settings.json))
|
(builtins.fromJSON (builtins.readFile ./settings.json))
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
"hideInactive": false,
|
|
||||||
"iconColor": "none",
|
|
||||||
"filenamePattern": "recording_yyyy-MM-dd_HH:mm:ss",
|
|
||||||
"frameRate": "165",
|
|
||||||
"audioCodec": "opus",
|
|
||||||
"videoCodec": "hevc",
|
|
||||||
"quality": "ultra",
|
|
||||||
"colorRange": "full",
|
|
||||||
"showCursor": true,
|
|
||||||
"copyToClipboard": false,
|
|
||||||
"audioSource": "default_output",
|
|
||||||
"videoSource": "portal",
|
|
||||||
"resolution": "2560x1440"
|
|
||||||
}
|
|
||||||
|
|
@ -2,19 +2,15 @@
|
||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"name": "Noctalia Plugins",
|
"name": "Official Noctalia Plugins",
|
||||||
"url": "https://github.com/noctalia-dev/noctalia-plugins"
|
"url": "https://github.com/noctalia-dev/noctalia-plugins"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"states": {
|
"states": {
|
||||||
"screen-recorder": {
|
|
||||||
"enabled": true,
|
|
||||||
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
|
|
||||||
},
|
|
||||||
"timer": {
|
"timer": {
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
|
"sourceUrl": "https://github.com/noctalia-dev/noctalia-plugins"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"version": 2
|
"version": 1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -95,9 +95,6 @@
|
||||||
},
|
},
|
||||||
"id": "plugin:timer"
|
"id": "plugin:timer"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "plugin:screen-recorder"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"displayMode": "onhover",
|
"displayMode": "onhover",
|
||||||
"iconColor": "none",
|
"iconColor": "none",
|
||||||
|
|
@ -493,7 +490,7 @@
|
||||||
"visualizerType": "mirrored",
|
"visualizerType": "mirrored",
|
||||||
"mprisBlacklist": [],
|
"mprisBlacklist": [],
|
||||||
"preferredPlayer": "spotify, mpv",
|
"preferredPlayer": "spotify, mpv",
|
||||||
"volumeFeedback": true
|
"volumeFeedback": false
|
||||||
},
|
},
|
||||||
"brightness": {
|
"brightness": {
|
||||||
"brightnessStep": 1,
|
"brightnessStep": 1,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
outputs,
|
outputs,
|
||||||
config,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports =
|
imports =
|
||||||
|
|
@ -40,19 +39,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
miniserve = {
|
|
||||||
enable = true;
|
|
||||||
apps = let
|
|
||||||
cinny-template = config.youthlic.programs.miniserve.templates.cinny;
|
|
||||||
in {
|
|
||||||
cinny-1 = cinny-template {
|
|
||||||
port = 9093;
|
|
||||||
};
|
|
||||||
cinny-2 = cinny-template {
|
|
||||||
port = 9094;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
guix.enable = true;
|
guix.enable = true;
|
||||||
dae.enable = true;
|
dae.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.youthlic.programs.caddy.cinny;
|
|
||||||
caddy-cfg = config.youthlic.programs.caddy;
|
|
||||||
in {
|
|
||||||
options = {
|
|
||||||
youthlic.programs.caddy.cinny = {
|
|
||||||
enable = lib.mkEnableOption "caddy.cinny";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf (cfg.enable && caddy-cfg.enable) {
|
|
||||||
services.caddy.virtualHosts = {
|
|
||||||
"cinny.${caddy-cfg.baseDomain}" = {
|
|
||||||
extraConfig = ''
|
|
||||||
root * ${pkgs.cinny}
|
|
||||||
encode gzip zstd
|
|
||||||
try_files {path} /index.html
|
|
||||||
file_server
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config.youthlic.programs.miniserve.templates.cinny = {port, ...} @ args:
|
|
||||||
{
|
|
||||||
inherit port;
|
|
||||||
directory = args.cinny or (toString pkgs.cinny);
|
|
||||||
defaultIndex = "index.html";
|
|
||||||
isSpa = true;
|
|
||||||
}
|
|
||||||
// (lib.optionalAttrs (args ? interface) {
|
|
||||||
inherit (args) interface;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
@ -1,84 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.youthlic.programs.miniserve;
|
|
||||||
in {
|
|
||||||
imports = lib.youthlic.loadImports ./.;
|
|
||||||
options = {
|
|
||||||
youthlic.programs.miniserve = {
|
|
||||||
enable = lib.mkEnableOption "miniserve";
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.miniserve;
|
|
||||||
};
|
|
||||||
templates = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf lib.types.anything;
|
|
||||||
default = {};
|
|
||||||
};
|
|
||||||
apps = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({...}: {
|
|
||||||
options = {
|
|
||||||
port = lib.mkOption {
|
|
||||||
type = lib.types.port;
|
|
||||||
};
|
|
||||||
interface = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "127.0.0.1";
|
|
||||||
};
|
|
||||||
isSpa = lib.mkEnableOption "is spa";
|
|
||||||
directory = lib.mkOption {
|
|
||||||
type = lib.types.either lib.types.package lib.types.path;
|
|
||||||
};
|
|
||||||
defaultIndex = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "index.html";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
default = {};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf (cfg.enable && (cfg.apps != {})) {
|
|
||||||
systemd.services =
|
|
||||||
lib.concatMapAttrs (name: value: {
|
|
||||||
"miniserve-${name}" = {
|
|
||||||
description = ''
|
|
||||||
miniserve for ${name}
|
|
||||||
'';
|
|
||||||
after = ["network-online.target"];
|
|
||||||
wants = ["network-online.target"];
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = ''
|
|
||||||
${lib.getExe cfg.package} ${lib.optionalString value.isSpa "--spa"} --index ${value.directory}/${value.defaultIndex} --port ${toString value.port} --interfaces ${value.interface} ${value.directory}
|
|
||||||
'';
|
|
||||||
IPAccounting = "yes";
|
|
||||||
IPAddressAllow = value.interface;
|
|
||||||
IPAddressDeny = "any";
|
|
||||||
DynamicUser = "yes";
|
|
||||||
PrivateTmp = "yes";
|
|
||||||
PrivateUsers = "yes";
|
|
||||||
PrivateDevices = "yes";
|
|
||||||
NoNewPrivileges = true;
|
|
||||||
ProtectSystem = "strict";
|
|
||||||
ProtectHome = "yes";
|
|
||||||
ProtectClock = "yes";
|
|
||||||
ProtectControlGroups = "yes";
|
|
||||||
ProtectKernelLogs = "yes";
|
|
||||||
ProtectKernelModules = "yes";
|
|
||||||
ProtectKernelTunables = "yes";
|
|
||||||
ProtectProc = "invisible";
|
|
||||||
CapabilityBoundingSet = [
|
|
||||||
"CAP_NET_BIND_SERVICE"
|
|
||||||
"CAP_DAC_READ_SEARCH"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
})
|
|
||||||
cfg.apps;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
80
treefmt.nix
80
treefmt.nix
|
|
@ -1,44 +1,46 @@
|
||||||
{
|
{
|
||||||
perSystem = {lib, ...}: {
|
perSystem = {lib, ...}: {
|
||||||
treefmt.programs = {
|
treefmt = {
|
||||||
alejandra = {
|
programs = {
|
||||||
enable = true;
|
alejandra = {
|
||||||
excludes = ["_sources/*.nix"];
|
enable = true;
|
||||||
};
|
excludes = ["_sources/*.nix"];
|
||||||
oxfmt = let
|
};
|
||||||
oxfmtConfig = with lib;
|
oxfmt = let
|
||||||
pipe ./.oxfmtrc.json [builtins.readFile builtins.fromJSON];
|
oxfmtConfig = with lib;
|
||||||
in {
|
pipe ./.oxfmtrc.json [builtins.readFile builtins.fromJSON];
|
||||||
enable = true;
|
in {
|
||||||
includes = ["*.json" "*.md" "*.toml" "*.yaml"];
|
enable = true;
|
||||||
excludes = oxfmtConfig.ignorePatterns;
|
includes = ["*.json" "*.md" "*.toml" "*.yaml"];
|
||||||
};
|
excludes = oxfmtConfig.ignorePatterns;
|
||||||
just = {
|
};
|
||||||
enable = true;
|
just = {
|
||||||
includes = [".justfile"];
|
enable = true;
|
||||||
};
|
includes = [".justfile"];
|
||||||
typos = let
|
};
|
||||||
config = with lib;
|
typos = let
|
||||||
pipe ./.typos.toml [builtins.readFile fromTOML];
|
config = with lib;
|
||||||
in {
|
pipe ./.typos.toml [builtins.readFile fromTOML];
|
||||||
enable = true;
|
in {
|
||||||
includes = ["*"];
|
enable = true;
|
||||||
excludes = ["assets/*"] ++ config.files.extend-exclude;
|
includes = ["*"];
|
||||||
configFile = toString ./.typos.toml;
|
excludes = ["assets/*"] ++ config.files.extend-exclude;
|
||||||
# Disable all extra option in treefmt module.
|
configFile = toString ./.typos.toml;
|
||||||
# Use config file.
|
# Disable all extra option in treefmt module.
|
||||||
sort = false;
|
# Use config file.
|
||||||
isolated = false;
|
sort = false;
|
||||||
hidden = false;
|
isolated = false;
|
||||||
noIgnore = false;
|
hidden = false;
|
||||||
noIgnoreDot = false;
|
noIgnore = false;
|
||||||
noIgnoreGlobal = false;
|
noIgnoreDot = false;
|
||||||
noIgnoreParent = false;
|
noIgnoreGlobal = false;
|
||||||
noIgnoreVCS = false;
|
noIgnoreParent = false;
|
||||||
binary = false;
|
noIgnoreVCS = false;
|
||||||
noCheckFilenames = false;
|
binary = false;
|
||||||
noCheckFiles = false;
|
noCheckFilenames = false;
|
||||||
noUnicode = false;
|
noCheckFiles = false;
|
||||||
|
noUnicode = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue