flake: drop nixpak

This commit is contained in:
Guanran Wang 2024-02-14 04:36:41 +08:00
parent 4d38591c6e
commit 9fe34a4377
Signed by: nyancat
SSH key fingerprint: SHA256:8oWGKciPALWut/6WA27oFKofX+6Wtc0gQnsefXLQx/8
6 changed files with 105 additions and 198 deletions

View file

@ -138,29 +138,6 @@
"type": "github"
}
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1704029560,
"narHash": "sha256-a4Iu7x1OP+uSYpqadOu8VCPY+MPF3+f6KIi+MAxlgyw=",
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"rev": "d5cbf433a6ae9cae05400189a8dbc6412a03ba16",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "hercules-ci-effects",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -292,58 +269,6 @@
"type": "github"
}
},
"nixpak": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"hercules-ci-effects": [
"hercules-ci-effects"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1707358904,
"narHash": "sha256-WYP9+8nHYWmBh3tsQhos7GJ+SozP9/jv0dZsQLYlwo0=",
"owner": "nixpak",
"repo": "nixpak",
"rev": "903020fdc3e77e896404a2888f4b896638400854",
"type": "github"
},
"original": {
"owner": "nixpak",
"repo": "nixpak",
"type": "github"
}
},
"nixpak-pkgs": {
"inputs": {
"flake-parts": [
"flake-parts"
],
"hercules-ci-effects": [
"hercules-ci-effects"
],
"nixpak": [
"nixpak"
]
},
"locked": {
"lastModified": 1707374866,
"narHash": "sha256-aivOcd9Qw1HeU+Fs/3EF3jmFSOAcl86DEfnC1zd+lsQ=",
"owner": "nixpak",
"repo": "pkgs",
"rev": "b45f46c1cd7f151c71b61294df7394a7deb3698b",
"type": "github"
},
"original": {
"owner": "nixpak",
"repo": "pkgs",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1707546158,
@ -443,15 +368,12 @@
"flake-parts": "flake-parts",
"flake-utils": "flake-utils",
"gitignore": "gitignore",
"hercules-ci-effects": "hercules-ci-effects",
"home-manager": "home-manager",
"impermanence": "impermanence",
"lanzaboote": "lanzaboote",
"nix-darwin": "nix-darwin",
"nix-gaming": "nix-gaming",
"nixos-hardware": "nixos-hardware",
"nixpak": "nixpak",
"nixpak-pkgs": "nixpak-pkgs",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable",
"nvfetcher": "nvfetcher",

View file

@ -50,18 +50,6 @@
nixos-hardware = {
url = "github:NixOS/nixos-hardware";
};
nixpak = {
url = "github:nixpak/nixpak";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
inputs.hercules-ci-effects.follows = "hercules-ci-effects";
};
nixpak-pkgs = {
url = "github:nixpak/pkgs";
inputs.nixpak.follows = "nixpak";
inputs.flake-parts.follows = "flake-parts";
inputs.hercules-ci-effects.follows = "hercules-ci-effects";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
@ -91,11 +79,6 @@
url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
hercules-ci-effects = {
url = "github:hercules-ci/hercules-ci-effects";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-parts.follows = "flake-parts";
};
nvfetcher = {
url = "github:berberman/nvfetcher";
inputs.nixpkgs.follows = "nixpkgs";

View file

@ -0,0 +1,52 @@
{
inputs,
pkgs,
...
}: let
mkNixPak = inputs.nixpak.lib.nixpak {
inherit (pkgs) lib;
inherit pkgs;
};
firefox = mkNixPak {
config = {
config,
sloth,
...
}: {
app.package = pkgs.firefox;
flatpak.appId = "org.mozilla.firefox";
imports = [
(inputs.nixpak-pkgs + "/pkgs/modules/gui-base.nix")
(inputs.nixpak-pkgs + "/pkgs/modules/network.nix")
];
# Specified in https://github.com/schizofox/schizofox/blob/main/modules/hm/default.nix
# I really don't have any idea what am I doing, it just works™
dbus.policies = {
"org.mozilla.firefox.*" = "own";
#"org.mozilla.firefox_beta.*" = "own";
};
bubblewrap = let
envSuffix = envKey: sloth.concat' (sloth.env envKey);
in {
bind.rw = [
"/tmp/.X11-unix"
(sloth.envOr "XAUTHORITY" "/no-xauth")
(envSuffix "XDG_RUNTIME_DIR" "/dconf")
(sloth.concat' sloth.homeDir "/.mozilla")
(sloth.concat' sloth.homeDir "/Downloads")
];
bind.ro = [
"/etc/localtime"
"/sys/bus/pci"
["${config.app.package}/lib/firefox" "/app/etc/firefox"]
(sloth.concat' sloth.xdgConfigHome "/dconf")
];
};
};
};
in [firefox]

View file

@ -1,56 +1,6 @@
{pkgs, ...}:
#let
#mkNixPak = inputs.nixpak.lib.nixpak {
# inherit (pkgs) lib;
# inherit pkgs;
#};
#
#firefox = mkNixPak {
# config = {
# config,
# sloth,
# ...
# }: {
# app.package = pkgs.firefox;
# flatpak.appId = "org.mozilla.firefox";
#
# imports = [
# (inputs.nixpak-pkgs + "/pkgs/modules/gui-base.nix")
# (inputs.nixpak-pkgs + "/pkgs/modules/network.nix")
# ];
#
# # Specified in https://github.com/schizofox/schizofox/blob/main/modules/hm/default.nix
# # I really don't have any idea what am I doing, it just works™
# dbus.policies = {
# "org.mozilla.firefox.*" = "own";
# #"org.mozilla.firefox_beta.*" = "own";
# };
#
# bubblewrap = let
# envSuffix = envKey: sloth.concat' (sloth.env envKey);
# in {
# bind.rw = [
# "/tmp/.X11-unix"
# (sloth.envOr "XAUTHORITY" "/no-xauth")
# (envSuffix "XDG_RUNTIME_DIR" "/dconf")
# (sloth.concat' sloth.homeDir "/.mozilla")
# (sloth.concat' sloth.homeDir "/Downloads")
# ];
# bind.ro = [
# "/etc/localtime"
# "/sys/bus/pci"
#
# ["${config.app.package}/lib/firefox" "/app/etc/firefox"]
# (sloth.concat' sloth.xdgConfigHome "/dconf")
# ];
# };
# };
#};
#in
{
{pkgs, ...}: {
programs.firefox = {
enable = true;
#package = firefox.config.env; # it didnt work
profiles."default" = {
extraConfig = ''
${builtins.readFile (pkgs.fetchurl {

View file

@ -0,0 +1,51 @@
{
inputs,
pkgs,
...
}: let
mkNixPak = inputs.nixpak.lib.nixpak {
inherit (pkgs) lib;
inherit pkgs;
};
librewolf = mkNixPak {
config = {
config,
sloth,
...
}: {
app.package = pkgs.librewolf;
flatpak.appId = "io.gitlab.librewolf-community";
imports = [
(inputs.nixpak-pkgs + "/pkgs/modules/gui-base.nix")
(inputs.nixpak-pkgs + "/pkgs/modules/network.nix")
];
# Specified in https://github.com/schizofox/schizofox/blob/main/modules/hm/default.nix
# I really don't have any idea what am I doing, it just works™
dbus.policies = {
"io.gitlab.librewolf.*" = "own";
};
bubblewrap = let
envSuffix = envKey: sloth.concat' (sloth.env envKey);
in {
bind.rw = [
"/tmp/.X11-unix"
(sloth.envOr "XAUTHORITY" "/no-xauth")
(envSuffix "XDG_RUNTIME_DIR" "/dconf")
(sloth.concat' sloth.homeDir "/.librewolf")
(sloth.concat' sloth.homeDir "/Downloads")
];
bind.ro = [
"/etc/localtime"
"/sys/bus/pci"
["${config.app.package}/lib/librewolf" "/app/etc/librewolf"]
(sloth.concat' sloth.xdgConfigHome "/dconf")
];
};
};
};
in [librewolf]

View file

@ -1,57 +1,6 @@
{
inputs,
pkgs,
...
}: let
mkNixPak = inputs.nixpak.lib.nixpak {
inherit (pkgs) lib;
inherit pkgs;
};
librewolf = mkNixPak {
config = {
config,
sloth,
...
}: {
app.package = pkgs.librewolf;
flatpak.appId = "io.gitlab.librewolf-community";
imports = [
(inputs.nixpak-pkgs + "/pkgs/modules/gui-base.nix")
(inputs.nixpak-pkgs + "/pkgs/modules/network.nix")
];
# Specified in https://github.com/schizofox/schizofox/blob/main/modules/hm/default.nix
# I really don't have any idea what am I doing, it just works™
dbus.policies = {
"io.gitlab.librewolf.*" = "own";
};
bubblewrap = let
envSuffix = envKey: sloth.concat' (sloth.env envKey);
in {
bind.rw = [
"/tmp/.X11-unix"
(sloth.envOr "XAUTHORITY" "/no-xauth")
(envSuffix "XDG_RUNTIME_DIR" "/dconf")
(sloth.concat' sloth.homeDir "/.librewolf")
(sloth.concat' sloth.homeDir "/Downloads")
];
bind.ro = [
"/etc/localtime"
"/sys/bus/pci"
["${config.app.package}/lib/librewolf" "/app/etc/librewolf"]
(sloth.concat' sloth.xdgConfigHome "/dconf")
];
};
};
};
in {
_: {
programs.librewolf = {
enable = true;
package = librewolf.config.env;
settings = {
# https://codeberg.org/librewolf/settings/src/branch/master/librewolf.cfg
# https://github.com/yokoffing/Betterfox/blob/main/librewolf.overrides.cfg