tangled
alpha
login
or
join now
da157.id
/
potatofox
1
fork
atom
this repo has no description
1
fork
atom
overview
issues
pulls
pipelines
feat: add nix flake + homeModule
awwpotato
8 months ago
fe4fd5a9
89dc6264
+179
-1
5 changed files
expand all
collapse all
unified
split
.editorconfig
.forgejo
workflows
check.yml
flake.lock
flake.nix
homeModule.nix
+1
-1
.editorconfig
···
6
indent_style = space
7
indent_size = 4
8
9
-
[*.{md,yaml,yml,css}]
10
indent_size = 2
···
6
indent_style = space
7
indent_size = 4
8
9
+
[*.{md,yaml,yml,css,nix}]
10
indent_size = 2
+20
.forgejo/workflows/check.yml
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
---
2
+
name: Checks
3
+
4
+
on:
5
+
push:
6
+
pull_request:
7
+
8
+
jobs:
9
+
check:
10
+
runs-on: codeberg-small
11
+
12
+
steps:
13
+
- name: Checkout
14
+
uses: actions/checkout@v4
15
+
- name: Install Nix
16
+
uses: https://github.com/DeterminateSystems/nix-installer-action@v16
17
+
- name: Check Formatting
18
+
run: nix fmt -- --ci
19
+
- name: Flake Check
20
+
run: nix flake check -L
+64
flake.lock
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{
2
+
"nodes": {
3
+
"flake-parts": {
4
+
"inputs": {
5
+
"nixpkgs-lib": [
6
+
"nixpkgs"
7
+
]
8
+
},
9
+
"locked": {
10
+
"lastModified": 1751413152,
11
+
"narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
12
+
"owner": "hercules-ci",
13
+
"repo": "flake-parts",
14
+
"rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
15
+
"type": "github"
16
+
},
17
+
"original": {
18
+
"owner": "hercules-ci",
19
+
"repo": "flake-parts",
20
+
"type": "github"
21
+
}
22
+
},
23
+
"nixpkgs": {
24
+
"locked": {
25
+
"lastModified": 1751271578,
26
+
"narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
27
+
"owner": "nixos",
28
+
"repo": "nixpkgs",
29
+
"rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
30
+
"type": "github"
31
+
},
32
+
"original": {
33
+
"owner": "nixos",
34
+
"ref": "nixos-unstable",
35
+
"repo": "nixpkgs",
36
+
"type": "github"
37
+
}
38
+
},
39
+
"root": {
40
+
"inputs": {
41
+
"flake-parts": "flake-parts",
42
+
"nixpkgs": "nixpkgs",
43
+
"systems": "systems"
44
+
}
45
+
},
46
+
"systems": {
47
+
"locked": {
48
+
"lastModified": 1681028828,
49
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
50
+
"owner": "nix-systems",
51
+
"repo": "default",
52
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
53
+
"type": "github"
54
+
},
55
+
"original": {
56
+
"owner": "nix-systems",
57
+
"repo": "default",
58
+
"type": "github"
59
+
}
60
+
}
61
+
},
62
+
"root": "root",
63
+
"version": 7
64
+
}
+57
flake.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{
2
+
description = "potatofox";
3
+
4
+
inputs = {
5
+
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6
+
7
+
flake-parts = {
8
+
url = "github:hercules-ci/flake-parts";
9
+
inputs.nixpkgs-lib.follows = "nixpkgs";
10
+
};
11
+
12
+
systems.url = "github:nix-systems/default";
13
+
};
14
+
15
+
outputs =
16
+
inputs:
17
+
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
18
+
systems = import inputs.systems;
19
+
20
+
perSystem =
21
+
{ pkgs, ... }:
22
+
{
23
+
formatter = pkgs.treefmt.withConfig {
24
+
runtimeInputs = with pkgs; [
25
+
nixfmt-rfc-style
26
+
deadnix
27
+
prettier
28
+
];
29
+
30
+
settings = {
31
+
on-unmatched = "info";
32
+
tree-root-file = "flake.nix";
33
+
34
+
formatter = {
35
+
nixfmt = {
36
+
command = "nixfmt";
37
+
includes = [ "*.nix" ];
38
+
};
39
+
deadnix = {
40
+
command = "deadnix";
41
+
includes = [ "*.nix" ];
42
+
};
43
+
prettier = {
44
+
command = "prettier";
45
+
includes = [ "*.css" ];
46
+
};
47
+
};
48
+
};
49
+
};
50
+
};
51
+
52
+
flake.homeModules = rec {
53
+
default = potatofox;
54
+
potatofox = import ./homeModule.nix;
55
+
};
56
+
};
57
+
}
+37
homeModule.nix
···
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
···
1
+
{
2
+
lib,
3
+
config,
4
+
...
5
+
}:
6
+
let
7
+
browsers = [
8
+
"firefox"
9
+
"librewolf"
10
+
];
11
+
in
12
+
{
13
+
options.programs = lib.genAttrs browsers (_name: {
14
+
potatofox = {
15
+
enable = lib.mkEnableOption "potatofox";
16
+
profiles = lib.mkOption {
17
+
type = lib.types.listOf lib.types.str;
18
+
default = [ ];
19
+
example = [ "default" ];
20
+
};
21
+
};
22
+
});
23
+
24
+
config.home.file = lib.mkMerge (
25
+
map (
26
+
name:
27
+
lib.mkIf config.programs.${name}.potatofox.enable (
28
+
map (n: {
29
+
".${if name == "librewolf" then name else ".mozzila/${name}"}/${n}/chrome" = {
30
+
source = ./chrome;
31
+
recursive = true;
32
+
};
33
+
}) config.options.programs.${name}.potatofox.profiles
34
+
)
35
+
) browsers
36
+
);
37
+
}