clean up 'scope' decl
This commit is contained in:
parent
453d780695
commit
cb72b47661
28 changed files with 261 additions and 195 deletions
|
|
@ -1 +1 @@
|
|||
{ inputs, scope, ... }: scope "imports" <| [ inputs.qstn.nixosModules.default ]
|
||||
{ inputs, ... }: scope "imports" <| [ inputs.qstn.nixosModules.default ]
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
config,
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
with config.rice.palette.hex;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
scope "user.programs.helix" {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
scope "nixpkgs" {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
scope "nix.settings" {
|
||||
|
|
|
|||
|
|
@ -1,19 +1,15 @@
|
|||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
getPkgs,
|
||||
getFlakePkg,
|
||||
...
|
||||
}:
|
||||
{
|
||||
environment.systemPackages =
|
||||
getPkgs {
|
||||
inherit (pkgs)
|
||||
nixfmt
|
||||
nil
|
||||
;
|
||||
}
|
||||
++ [ (getFlakePkg inputs.yoke) ];
|
||||
environment.systemPackages = [
|
||||
pkgs.nixfmt
|
||||
(getFlakePkg inputs.yoke)
|
||||
(getFlakePkg inputs.nil)
|
||||
];
|
||||
imports = [
|
||||
inputs.nix-index-database.nixosModules.nix-index
|
||||
];
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ scope, ... }:
|
||||
{ ... }:
|
||||
scope "systemd" {
|
||||
services."user@".serviceConfig.Delegate = "memory pids cpu cpuset";
|
||||
user.extraConfig = "LogLevel=debug";
|
||||
|
|
|
|||
111
flake.lock
generated
111
flake.lock
generated
|
|
@ -414,11 +414,11 @@
|
|||
"rev": "588ff16cb8855e02c84fdbe32b577c6421f704d1",
|
||||
"revCount": 2,
|
||||
"type": "git",
|
||||
"url": "https://git.lobotomise.me/atagen/hudcore-plymouth.git"
|
||||
"url": "https://git.lobotomise.me/atagen/hudcore-plymouth"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.lobotomise.me/atagen/hudcore-plymouth.git"
|
||||
"url": "https://git.lobotomise.me/atagen/hudcore-plymouth"
|
||||
}
|
||||
},
|
||||
"kitty-themes-src": {
|
||||
|
|
@ -437,21 +437,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"madness": {
|
||||
"locked": {
|
||||
"lastModified": 1771986427,
|
||||
"narHash": "sha256-xxNj8NWE/Y89yKGq/mmyAVVx5ru6JVaHUoegJuSP2Y0=",
|
||||
"owner": "amaanq",
|
||||
"repo": "madness",
|
||||
"rev": "469f0babe98e15a19f9d1910ffab68ddc3c6da1b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "amaanq",
|
||||
"repo": "madness",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"meat": {
|
||||
"inputs": {
|
||||
"nix-systems": "nix-systems_2",
|
||||
|
|
@ -530,6 +515,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nil": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1772014815,
|
||||
"narHash": "sha256-er96DK9KxsSU2RE3jCvZNquvby8YzMBEygPuznZvnn8=",
|
||||
"owner": "atagen",
|
||||
"repo": "nil",
|
||||
"rev": "f5dc3f3239f64904d901a537bd88bafe5735aa0a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "atagen",
|
||||
"repo": "nil",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"niri": {
|
||||
"inputs": {
|
||||
"niri-stable": "niri-stable",
|
||||
|
|
@ -593,11 +598,11 @@
|
|||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769059921,
|
||||
"narHash": "sha256-/crneSsO81LVDzRMRDezpxu55a9Wxjl2HUlofB9HzKs=",
|
||||
"lastModified": 1772007793,
|
||||
"narHash": "sha256-XqOZiW/xf15xPV/kuA+FK1lNVGqwWITjPkH5t67y2eg=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "30662edfe8bac80b356324e642a188f505429d80",
|
||||
"revCount": 41,
|
||||
"rev": "db66162b3f3b59c833dcbc853c65db2d47881795",
|
||||
"revCount": 43,
|
||||
"type": "git",
|
||||
"url": "https://git.lobotomise.me/atagen/niri-tag"
|
||||
},
|
||||
|
|
@ -744,13 +749,15 @@
|
|||
},
|
||||
"nix-scope-plugin": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_15"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771982298,
|
||||
"narHash": "sha256-SAkUPZEbxBLggrQLp8B86r2pVhMgP9A4NiQwGJMcG2o=",
|
||||
"lastModified": 1772011628,
|
||||
"narHash": "sha256-rhpsfs+/9zVr3HVqniwHyRSr92ga4J4mczFdHr1PN4s=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "866bf279aad012b2b3d02cdc9ec47ff76285371c",
|
||||
"rev": "0e5218513ec92ee751e7a0dc854082106b77473c",
|
||||
"revCount": 1,
|
||||
"type": "git",
|
||||
"url": "https://git.lobotomise.me/atagen/nix-scope-plugin"
|
||||
|
|
@ -762,7 +769,9 @@
|
|||
},
|
||||
"nix-shorturl-plugin": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_16"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771986085,
|
||||
|
|
@ -981,38 +990,6 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_15": {
|
||||
"locked": {
|
||||
"lastModified": 1771923393,
|
||||
"narHash": "sha256-Fy0+UXELv9hOE8WjYhJt8fMDLYTU2Dqn3cX4BwoGBos=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ea7f1f06811ce7fcc81d6c6fd4213150c23edcf2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_16": {
|
||||
"locked": {
|
||||
"lastModified": 1771848320,
|
||||
"narHash": "sha256-0MAd+0mun3K/Ns8JATeHT1sX28faLII5hVLq0L3BdZU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2fc6539b481e1d2569f25f8799236694180c0993",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_17": {
|
||||
"locked": {
|
||||
"lastModified": 1771008912,
|
||||
"narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
|
||||
|
|
@ -1028,7 +1005,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_18": {
|
||||
"nixpkgs_16": {
|
||||
"locked": {
|
||||
"lastModified": 1769018530,
|
||||
"narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=",
|
||||
|
|
@ -1044,7 +1021,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_19": {
|
||||
"nixpkgs_17": {
|
||||
"locked": {
|
||||
"lastModified": 1761656231,
|
||||
"narHash": "sha256-EiED5k6gXTWoAIS8yQqi5mAX6ojnzpHwAQTS3ykeYMg=",
|
||||
|
|
@ -1220,8 +1197,8 @@
|
|||
"hjem": "hjem",
|
||||
"hjem-rum": "hjem-rum",
|
||||
"hudcore": "hudcore",
|
||||
"madness": "madness",
|
||||
"meat": "meat",
|
||||
"nil": "nil",
|
||||
"niri": "niri",
|
||||
"niri-s76": "niri-s76",
|
||||
"niri-tag": "niri-tag",
|
||||
|
|
@ -1229,7 +1206,7 @@
|
|||
"nix-rice": "nix-rice",
|
||||
"nix-scope-plugin": "nix-scope-plugin",
|
||||
"nix-shorturl-plugin": "nix-shorturl-plugin",
|
||||
"nixpkgs": "nixpkgs_17",
|
||||
"nixpkgs": "nixpkgs_15",
|
||||
"nixpkgs-stable": "nixpkgs-stable_2",
|
||||
"qstn": "qstn",
|
||||
"run0-shim": "run0-shim",
|
||||
|
|
@ -1415,14 +1392,14 @@
|
|||
"stasis": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_4",
|
||||
"nixpkgs": "nixpkgs_18"
|
||||
"nixpkgs": "nixpkgs_16"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1771888610,
|
||||
"narHash": "sha256-voL/6XnosTSEUMovarrBhRbYXXY+B7nVW29i8rO40L0=",
|
||||
"lastModified": 1771992007,
|
||||
"narHash": "sha256-8EmxW16fext1vjZavb5GfeOCIbytRZ4/qc5VzFZfd3w=",
|
||||
"owner": "saltnpepper97",
|
||||
"repo": "stasis",
|
||||
"rev": "3582124d8d216bff8206bb922eda28e8438e72f3",
|
||||
"rev": "ebaa70f5f4773ea2dbd2535897447e643777a247",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1653,7 +1630,7 @@
|
|||
},
|
||||
"yoke": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_19",
|
||||
"nixpkgs": "nixpkgs_17",
|
||||
"systems": "systems_7"
|
||||
},
|
||||
"locked": {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
config,
|
||||
scope,
|
||||
machineName,
|
||||
mainUser,
|
||||
...
|
||||
|
|
|
|||
|
|
@ -1,98 +1,60 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
scope,
|
||||
inputs,
|
||||
getFlakePkg,
|
||||
...
|
||||
}:
|
||||
scope "apps.browser" <| getFlakePkg inputs.helium
|
||||
# let
|
||||
# officialAddon = name: {
|
||||
# install_url = lib.strings.concatStrings [
|
||||
# "https://addons.mozilla.org/firefox/downloads/latest/"
|
||||
# name
|
||||
# "/latest.xpi"
|
||||
# ];
|
||||
# installation_mode = "force_installed";
|
||||
# };
|
||||
# lock-false = {
|
||||
# Value = false;
|
||||
# Status = "locked";
|
||||
# };
|
||||
# lock-true = {
|
||||
# Value = true;
|
||||
# Status = "locked";
|
||||
# };
|
||||
# in
|
||||
# scope "programs.firefox" {
|
||||
# enable = true;
|
||||
|
||||
# policies = {
|
||||
# DisableTelemetry = true;
|
||||
# DisableFirefoxStudies = true;
|
||||
# EnableTrackingProtection = {
|
||||
# Value = true;
|
||||
# Locked = true;
|
||||
# Cryptomining = true;
|
||||
# Fingerprinting = true;
|
||||
# };
|
||||
# DisablePocket = true;
|
||||
# DisableFirefoxAccounts = true;
|
||||
# DisableAccounts = true;
|
||||
# DisableFirefoxScreenshots = true;
|
||||
# DisableAppUpdate = true;
|
||||
# DisablePrivateBrowsing = true;
|
||||
# DontCheckDefaultBrowser = true;
|
||||
|
||||
# OverrideFirstRunPage = "";
|
||||
# OverridePostUpdatePage = "";
|
||||
# DisplayBookmarksToolbar = "newtab"; # alternatives: "always" or "newtab"
|
||||
# DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
|
||||
# SearchBar = "unified"; # alternative: "separate"
|
||||
|
||||
# ExtensionSettings = {
|
||||
# "*".installation_mode = "blocked"; # blocks all addons except the ones specified below
|
||||
# "uBlock0@raymondhill.net" = officialAddon "ublock-origin";
|
||||
# "addon@darkreader.org" = officialAddon "darkreader";
|
||||
# "vimium-c@gdh1995.cn" = officialAddon "vimium-c";
|
||||
# "{b86e4813-687a-43e6-ab65-0bde4ab75758}" = officialAddon "localcdn-fork-of-decentraleyes";
|
||||
# "jid1-5Fs7iTLscUaZBgwr@jetpack" = officialAddon "happy-bonobo-disable-webrtc";
|
||||
# "{446900e4-71c2-419f-a6a7-df9c091e268b}" = officialAddon "bitwarden-password-mananger";
|
||||
# };
|
||||
|
||||
# Preferences = {
|
||||
# "extensions.pocket.enabled" = lock-false;
|
||||
# "extensions.screenshots.disabled" = lock-true;
|
||||
# "browser.topsites.contile.enabled" = lock-false;
|
||||
# "browser.formfill.enable" = lock-false;
|
||||
# "browser.search.suggest.enabled" = lock-false;
|
||||
# "browser.search.suggest.enabled.private" = lock-false;
|
||||
# "browser.urlbar.suggest.searches" = lock-false;
|
||||
# "browser.urlbar.showSearchSuggestionsFirst" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.feeds.section.topstories" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.feeds.snippets" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.section.highlights.includePocket" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.section.highlights.includeBookmarks" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.section.highlights.includeDownloads" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.section.highlights.includeVisited" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.showSponsored" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.system.showSponsored" = lock-false;
|
||||
# "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock-false;
|
||||
# };
|
||||
# };
|
||||
|
||||
# # profiles.default = {
|
||||
# # id = 0;
|
||||
# # name = "Default";
|
||||
# # settings = {
|
||||
# # "browser.startup.homepage" = "about:blank";
|
||||
# # "browser.shell.didSkipDefaultBrowserCheckOnFirstRun" = true;
|
||||
# # "browser.policies.applied" = true;
|
||||
# # "widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||
# # "widget.use-xdg-desktop-portal.mime-handler" = 1;
|
||||
# # };
|
||||
# # };
|
||||
# }
|
||||
# // (scope "apps.browser" <| pkgs.firefox)
|
||||
# TODO switch to helium
|
||||
let
|
||||
extensions = {
|
||||
adnauseam = {
|
||||
id = "dlkmkipjfgcmnfckfdflcemkhlfbeiak";
|
||||
updateUrl = "https://gist.githubusercontent.com/amaanq/791db15b547cf00d27c99e784bbe0459/raw/adnauseam-updates.xml";
|
||||
};
|
||||
bypass-paywalls = {
|
||||
id = "lkbebcjgcmobigpeffafkodonchffocl";
|
||||
updateUrl = "https://gitflic.ru/project/magnolia1234/bpc_updates/blob/raw?file=updates.xml";
|
||||
};
|
||||
vencord = {
|
||||
id = "jfcaohdhgnfchhifdffmldmodkmndfjp";
|
||||
updateUrl = "https://github.com/amaanq/Vencord/releases/latest/download/updates.xml";
|
||||
};
|
||||
bitwarden.id = "nngceckbapebfimnlniiiahkandclblb";
|
||||
clearurls.id = "lckanjgmijmafbedllaakclkaicjfmnk";
|
||||
dark-reader.id = "eimadpbcbfnmbkopoojfekhnkhdbieeh";
|
||||
i-still-dont-care-about-cookies.id = "edibdbjcniadpccecjdfdjjppcpchdlm";
|
||||
fastforward.id = "icallnadddjmdinamnolclfjanhfoafe";
|
||||
refined-github.id = "hlepfoohegkhhmjieoechaddaejaokhf";
|
||||
sponsorblock.id = "mnjggcdmjocbbbhaepdhchncahnbgone";
|
||||
vimium-c.id = "hfjbmagddngcpeloejdejnfgbamkjaeg";
|
||||
web-archives.id = "hkligngkgcpcolhcnkgccglchdafcnao";
|
||||
# webrtc-leak-shield.id = "bppamachkoflopbagkdoflbgfjflfnfl";
|
||||
};
|
||||
extensionStrings = map (
|
||||
key:
|
||||
let
|
||||
ext = extensions.${key};
|
||||
url = ext.updateUrl or "https://services.helium.imput.net/ext";
|
||||
in
|
||||
"${ext.id};${url}"
|
||||
) (builtins.attrNames extensions);
|
||||
in
|
||||
(scope "apps.browser" <| getFlakePkg inputs.helium)
|
||||
// scope "programs.chromium" {
|
||||
enable = true;
|
||||
extensions = extensionStrings;
|
||||
extraOpts = {
|
||||
PrivacySandboxFingerprintingProtectionEnabled = true;
|
||||
PrivacySandboxIpProtectionEnabled = true;
|
||||
# Explicitly allow our extensions
|
||||
ExtensionInstallAllowlist = map (entry: entry.value.id) (lib.attrsToList extensions);
|
||||
# Allow extensions from Helium proxy and self-hosted sources
|
||||
ExtensionInstallSources = [
|
||||
"https://services.helium.imput.net/*" # Helium proxy
|
||||
"https://rednoise.org/*" # AdNauseam manifest
|
||||
"https://github.com/*" # AdNauseam CRX host
|
||||
"https://*.githubusercontent.com/*" # GitHub release assets
|
||||
"https://gitflic.ru/*" # Bypass Paywalls
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,3 +54,13 @@ window-rule {
|
|||
}
|
||||
xwayland-satellite { path "%SATELLITE%"; }
|
||||
spawn-at-startup "systemctl" "--user" "start" "startup-sound.service"
|
||||
window-rule {
|
||||
match app-id="Bitwarden"
|
||||
open-floating true
|
||||
default-column-width { proportion 0.16667; }
|
||||
}
|
||||
window-rule {
|
||||
match app-id="feishin"
|
||||
open-floating true
|
||||
default-column-width { proportion 0.16667; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,10 +78,11 @@ in
|
|||
|
||||
services.niri-tag = {
|
||||
enable = true;
|
||||
# scratchpads = {
|
||||
# "${config.apps.streamPlayer}" = 99;
|
||||
# "${config.apps.passwordManager}" = 101;
|
||||
# };
|
||||
scratchpads = {
|
||||
# TODO FIXME these could use the getExe ?
|
||||
"feishin" = 99;
|
||||
"Bitwarden" = 101;
|
||||
};
|
||||
};
|
||||
|
||||
services.niri-s76-bridge.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
inputs,
|
||||
localPkgs,
|
||||
scope,
|
||||
getFlakePkg',
|
||||
...
|
||||
}:
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
with pkgs;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
with pkgs.mate;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ scope, ... }:
|
||||
{ ... }:
|
||||
scope "environment.sessionVariables" {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ scope, ... }:
|
||||
{ ... }:
|
||||
scope "hardware" {
|
||||
enableRedistributableFirmware = true;
|
||||
enableAllFirmware = true;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
let
|
||||
|
|
@ -137,5 +136,8 @@ in
|
|||
(scope "apps.slopcode" <| claude-code)
|
||||
// {
|
||||
# required for loaderslop
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = [ pkgs.stdenv.cc.cc.lib ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
pkgs,
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
with pkgs;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@
|
|||
config,
|
||||
lib,
|
||||
mainUser,
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
scope "options.quick" {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
scope "user.systemd.services.startup-sound"
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{ scope, ... }: scope "services.syncthing.enable" <| true
|
||||
{ ... }: scope "services.syncthing.enable" <| true
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
(scope "apps.terminal" <| pkgs.foot)
|
||||
|
|
|
|||
132
graphical/webapps.nix
Normal file
132
graphical/webapps.nix
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
browser = lib.getExe config.apps.browser;
|
||||
webAppLauncher = pkgs.writeShellScript "web-app-launcher" ''
|
||||
browser="${browser}"
|
||||
|
||||
browser_exec=""
|
||||
for path in ~/.local ~/.nix-profile /usr; do
|
||||
if [ -f "$path/share/applications/$browser.desktop" ]; then
|
||||
browser_exec=$(sed -n 's/^Exec=\([^ ]*\).*/\1/p' "$path/share/applications/$browser.desktop" 2>/dev/null | head -1)
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$browser_exec" ]; then
|
||||
browser_exec="${browser}"
|
||||
fi
|
||||
|
||||
url="$1"
|
||||
app_name="''${2:-$(basename "$0")}"
|
||||
shift 2
|
||||
|
||||
exec setsid "$browser_exec" \
|
||||
--app="$url" \
|
||||
--user-data-dir="$HOME/.local/share/web-apps/$app_name" \
|
||||
--no-first-run \
|
||||
--no-default-browser-check \
|
||||
--disable-background-timer-throttling \
|
||||
--disable-backgrounding-occluded-windows \
|
||||
--disable-renderer-backgrounding \
|
||||
--enable-quic \
|
||||
--quic-version=h3-29 \
|
||||
--enable-features=UseOzonePlatform,WaylandWindowDecorations,WaylandPerWindowScaling,WaylandTextInputV3,WebRTCPipeWireCapturer \
|
||||
--disable-features=WebRtcAllowInputVolumeAdjustment \
|
||||
--ozone-platform=wayland \
|
||||
--gtk-version=4 \
|
||||
--enable-experimental-web-platform-features \
|
||||
"$@"
|
||||
'';
|
||||
|
||||
# Create web app package
|
||||
createWebApp =
|
||||
{
|
||||
name,
|
||||
url,
|
||||
icon,
|
||||
description ? "",
|
||||
categories ? [
|
||||
"Network"
|
||||
"Chat"
|
||||
"InstantMessaging"
|
||||
],
|
||||
}:
|
||||
let
|
||||
pkgName = "${lib.replaceStrings [ " " ] [ "-" ] (lib.toLower name)}-web-app";
|
||||
in
|
||||
{
|
||||
name = pkgName;
|
||||
value = pkgs.stdenv.mkDerivation {
|
||||
pname = pkgName;
|
||||
version = "1.0";
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [
|
||||
pkgs.copyDesktopItems
|
||||
pkgs.makeWrapper
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
makeWrapper ${webAppLauncher} $out/bin/${pkgName} \
|
||||
--add-flags "${url}" \
|
||||
--add-flags "${pkgName}"
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
desktopItems = [
|
||||
(pkgs.makeDesktopItem {
|
||||
inherit icon categories;
|
||||
name = pkgName;
|
||||
exec = "${pkgName} %U";
|
||||
desktopName = name;
|
||||
comment = description;
|
||||
startupNotify = true;
|
||||
startupWMClass = pkgName;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
apps = builtins.listToAttrs (
|
||||
map createWebApp [
|
||||
{
|
||||
name = "Cinny";
|
||||
url = "https://chat.lobotomise.me";
|
||||
icon = "cinny";
|
||||
description = "Cinny, a Matrix client";
|
||||
}
|
||||
{
|
||||
name = "Discord";
|
||||
url = "https://discord.com/app";
|
||||
icon = "discord";
|
||||
description = "Discord Web";
|
||||
}
|
||||
{
|
||||
name = "FB Messenger";
|
||||
url = "https://m.me";
|
||||
icon = "facebook";
|
||||
description = "Facebook Messenger";
|
||||
}
|
||||
]
|
||||
);
|
||||
in
|
||||
{
|
||||
config = {
|
||||
environment.systemPackages = builtins.attrValues apps;
|
||||
|
||||
xdg.mime.defaultApplications = {
|
||||
"x-scheme-handler/matrix" = "cinny-web-app.desktop";
|
||||
};
|
||||
|
||||
environment.etc."web-apps-setup".text = ''
|
||||
mkdir -p /home/*/.local/share/web-apps
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ scope, ... }:
|
||||
{ ... }:
|
||||
scope "boot" {
|
||||
kernelParams = [
|
||||
"mitigations=off"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
scope,
|
||||
...
|
||||
}:
|
||||
scope "boot" {
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ in
|
|||
inherit (inputs.nixpkgs.legacyPackages.${info.system}) callPackage;
|
||||
directory = ../pkgs;
|
||||
};
|
||||
scope = import ./scope.nix { inherit lib; };
|
||||
# scope = import ./scope.nix { inherit lib; };
|
||||
mainUser = info.username;
|
||||
machineName = name;
|
||||
getPkgs = builtins.attrValues;
|
||||
|
|
@ -29,7 +29,7 @@ in
|
|||
inputs.arbys.nixosModules.arbys
|
||||
inputs.hjem.nixosModules.hjem
|
||||
(
|
||||
{ scope, ... }:
|
||||
{ ... }:
|
||||
scope "hjem" {
|
||||
users.${info.username}.enable = true;
|
||||
extraModules = [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue