Compare commits
30 commits
xdg-mime-a
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 7202fa1911 | |||
| 88024f16e5 | |||
| bf428aaeca | |||
| ddc6cd37ad | |||
| 5cd9155a58 | |||
| f546f85037 | |||
| 3020c6433b | |||
| 29fb7c5066 | |||
| b37bde6eaf | |||
| 127e26b259 | |||
| ad6a0bf4d3 | |||
| 6124d07c1b | |||
| 1b4111e28f | |||
| 6e73c936b0 | |||
| bbdbc1e55c | |||
| 0ac983a71f | |||
| fe681d3f16 | |||
| 44246b4ea1 | |||
| 41c506749e | |||
| 983bf0f764 | |||
| c536ee0136 | |||
| a20c8f820d | |||
| 4000a848ef | |||
| 9ddc77958a | |||
| 2df05aaa1a | |||
| 6b1b5300cd | |||
| 62533d435b | |||
| 5b47fc6365 | |||
| 9f9c1e571b | |||
| 445b3d1422 |
29 changed files with 141 additions and 558 deletions
68
flake.lock
generated
68
flake.lock
generated
|
|
@ -14,11 +14,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1754433428,
|
"lastModified": 1762618334,
|
||||||
"narHash": "sha256-NA/FT2hVhKDftbHSwVnoRTFhes62+7dxZbxj5Gxvghs=",
|
"narHash": "sha256-wyT7Pl6tMFbFrs8Lk/TlEs81N6L+VSybPfiIgzU8lbQ=",
|
||||||
"owner": "ryantm",
|
"owner": "ryantm",
|
||||||
"repo": "agenix",
|
"repo": "agenix",
|
||||||
"rev": "9edb1787864c4f59ae5074ad498b6272b3ec308d",
|
"rev": "fcdea223397448d35d9b31f798479227e80183f6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -53,11 +53,11 @@
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1747046372,
|
"lastModified": 1761588595,
|
||||||
"narHash": "sha256-CIVLLkVgvHYbgI2UpXvIIBJ12HWgX+fjA8Xf8PUmqCY=",
|
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
|
||||||
"owner": "edolstra",
|
"owner": "edolstra",
|
||||||
"repo": "flake-compat",
|
"repo": "flake-compat",
|
||||||
"rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885",
|
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -73,11 +73,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1756770412,
|
"lastModified": 1765835352,
|
||||||
"narHash": "sha256-+uWLQZccFHwqpGqr2Yt5VsW/PbeJVTn9Dk6SHWhNRPw=",
|
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "4524271976b625a4a605beefd893f270620fd751",
|
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -117,11 +117,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1757588530,
|
"lastModified": 1765911976,
|
||||||
"narHash": "sha256-tJ7A8mID3ct69n9WCvZ3PzIIl3rXTdptn/lZmqSS95U=",
|
"narHash": "sha256-t3T/xm8zstHRLx+pIHxVpQTiySbKqcQbK+r+01XVKc0=",
|
||||||
"owner": "cachix",
|
"owner": "cachix",
|
||||||
"repo": "git-hooks.nix",
|
"repo": "git-hooks.nix",
|
||||||
"rev": "b084b2c2b6bc23e83bbfe583b03664eb0b18c411",
|
"rev": "b68b780b69702a090c8bb1b973bab13756cc7a27",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -159,11 +159,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1757578556,
|
"lastModified": 1766171975,
|
||||||
"narHash": "sha256-w1PGkTGow5XzsjccV364No46rkuGxTqo7m/4cfhnkIk=",
|
"narHash": "sha256-47Ee0bTidhF/3/sHuYnWRuxcCrrm0mBNDxBkOTd3wWQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "b7112b12ea5b8c3aa6af344498ed9ca27dd03ba3",
|
"rev": "bb35f07cc95a73aacbaf1f7f46bb8a3f40f265b5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -175,11 +175,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1757487488,
|
"lastModified": 1766070988,
|
||||||
"narHash": "sha256-zwE/e7CuPJUWKdvvTCB7iunV4E/+G0lKfv4kk/5Izdg=",
|
"narHash": "sha256-G/WVghka6c4bAzMhTwT2vjLccg/awmHkdKSd2JrycLc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "ab0f3607a6c7486ea22229b92ed2d355f1482ee0",
|
"rev": "c6245e83d836d0433170a16eb185cefe0572f8b8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -196,20 +196,19 @@
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
]
|
||||||
"treefmt-nix": "treefmt-nix"
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753980880,
|
"lastModified": 1766242030,
|
||||||
"narHash": "sha256-aj1pbYxL6N+XFqBHjB4B1QP0bnKRcg1AfpgT5zUFsW8=",
|
"narHash": "sha256-GdaKIZrzm4fbFf9jBVmeQFZTwYPxUlSTZrSId/JNMAU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "16db3e61da7606984a05b4dfc33cd1d26d22fb22",
|
"rev": "30006228925f07c5c2a270bb95dc8da35d9942dc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "master",
|
"ref": "main",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
@ -241,27 +240,6 @@
|
||||||
"repo": "default",
|
"repo": "default",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"treefmt-nix": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nur",
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1733222881,
|
|
||||||
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "treefmt-nix",
|
|
||||||
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "treefmt-nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@
|
||||||
type = "github";
|
type = "github";
|
||||||
owner = "nix-community";
|
owner = "nix-community";
|
||||||
repo = "NUR";
|
repo = "NUR";
|
||||||
ref = "master";
|
ref = "main";
|
||||||
inputs = {
|
inputs = {
|
||||||
flake-parts.follows = "flake-parts";
|
flake-parts.follows = "flake-parts";
|
||||||
nixpkgs.follows = "nixpkgs";
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ self, ... }:
|
{ self, lib, ... }:
|
||||||
let
|
let
|
||||||
default-overlays = import "${self}/overlays";
|
default-overlays = import "${self}/overlays";
|
||||||
|
|
||||||
|
|
@ -8,7 +8,7 @@ let
|
||||||
|
|
||||||
# Expose my custom packages
|
# Expose my custom packages
|
||||||
pkgs = _final: prev: {
|
pkgs = _final: prev: {
|
||||||
ambroisie = prev.recurseIntoAttrs (import "${self}/pkgs" { pkgs = prev; });
|
ambroisie = lib.recurseIntoAttrs (import "${self}/pkgs" { pkgs = prev; });
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -38,14 +38,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg = {
|
|
||||||
mime-apps = {
|
|
||||||
applications = {
|
|
||||||
browser = "garcon_host_browser.desktop";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
zsh = {
|
zsh = {
|
||||||
notify = {
|
notify = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -83,18 +83,9 @@ in
|
||||||
"servarr/autobrr/session-secret.age".publicKeys = all;
|
"servarr/autobrr/session-secret.age".publicKeys = all;
|
||||||
"servarr/cross-seed/configuration.json.age".publicKeys = all;
|
"servarr/cross-seed/configuration.json.age".publicKeys = all;
|
||||||
|
|
||||||
"sso/auth-key.age" = {
|
"sso/auth-key.age".publicKeys = all;
|
||||||
owner = "nginx-sso";
|
"sso/ambroisie/password-hash.age".publicKeys = all;
|
||||||
publicKeys = all;
|
"sso/ambroisie/totp-secret.age".publicKeys = all;
|
||||||
};
|
|
||||||
"sso/ambroisie/password-hash.age" = {
|
|
||||||
owner = "nginx-sso";
|
|
||||||
publicKeys = all;
|
|
||||||
};
|
|
||||||
"sso/ambroisie/totp-secret.age" = {
|
|
||||||
owner = "nginx-sso";
|
|
||||||
publicKeys = all;
|
|
||||||
};
|
|
||||||
|
|
||||||
"tandoor-recipes/secret-key.age".publicKeys = all;
|
"tandoor-recipes/secret-key.age".publicKeys = all;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.home.delta;
|
cfg = config.my.home.delta;
|
||||||
|
|
||||||
configFormat = pkgs.formats.gitIni { };
|
|
||||||
configPath = "${config.xdg.configHome}/delta/config";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.home.delta = with lib; {
|
options.my.home.delta = with lib; {
|
||||||
|
|
@ -17,28 +14,14 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
assertions = [
|
programs.delta = {
|
||||||
{
|
enable = true;
|
||||||
# For its configuration
|
|
||||||
assertion = cfg.enable -> cfg.git.enable;
|
|
||||||
message = ''
|
|
||||||
`config.my.home.delta` must enable `config.my.home.delta.git` to be
|
|
||||||
properly configured.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
{
|
|
||||||
assertion = cfg.enable -> config.programs.git.enable;
|
|
||||||
message = ''
|
|
||||||
`config.my.home.delta` relies on `config.programs.git` to be
|
|
||||||
enabled.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
home.packages = [ cfg.package ];
|
inherit (cfg) package;
|
||||||
|
|
||||||
xdg.configFile."delta/config".source = configFormat.generate "delta-config" {
|
enableGitIntegration = cfg.git.enable;
|
||||||
delta = {
|
|
||||||
|
options = {
|
||||||
features = "diff-highlight decorations";
|
features = "diff-highlight decorations";
|
||||||
|
|
||||||
# Less jarring style for `diff-highlight` emulation
|
# Less jarring style for `diff-highlight` emulation
|
||||||
|
|
@ -62,18 +45,5 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.git = lib.mkIf cfg.git.enable {
|
|
||||||
delta = {
|
|
||||||
enable = true;
|
|
||||||
inherit (cfg) package;
|
|
||||||
};
|
|
||||||
|
|
||||||
includes = [
|
|
||||||
{
|
|
||||||
path = configPath;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
cfg = config.my.home.discord;
|
cfg = config.my.home.discord;
|
||||||
|
|
||||||
jsonFormat = pkgs.formats.json { };
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.home.discord = with lib; {
|
options.my.home.discord = with lib; {
|
||||||
|
|
@ -12,14 +10,15 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
programs.discord = {
|
||||||
cfg.package
|
enable = true;
|
||||||
];
|
|
||||||
|
|
||||||
xdg.configFile."discord/settings.json".source =
|
inherit (cfg) package;
|
||||||
jsonFormat.generate "discord.json" {
|
|
||||||
|
settings = {
|
||||||
# Do not keep me from using the app just to force an update
|
# Do not keep me from using the app just to force an update
|
||||||
SKIP_HOST_UPDATE = true;
|
SKIP_HOST_UPDATE = true;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,11 +10,4 @@ in
|
||||||
config.programs.feh = lib.mkIf cfg.enable {
|
config.programs.feh = lib.mkIf cfg.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
config.my.home.xdg.mime-apps = lib.mkIf cfg.enable {
|
|
||||||
applications.media.image = {
|
|
||||||
bitmap = [ "feh.desktop" ];
|
|
||||||
vector = [ "feh.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ in
|
||||||
"browser.newtabpage.activity-stream.feeds.sections" = false;
|
"browser.newtabpage.activity-stream.feeds.sections" = false;
|
||||||
"browser.newtabpage.activity-stream.feeds.system.topstories" = false; # Disable top stories
|
"browser.newtabpage.activity-stream.feeds.system.topstories" = false; # Disable top stories
|
||||||
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false; # Disable pocket
|
"browser.newtabpage.activity-stream.section.highlights.includePocket" = false; # Disable pocket
|
||||||
|
"browser.urlbar.trimURLs" = false; # Always show the `http://` prefix
|
||||||
"extensions.pocket.enabled" = false; # Disable pocket
|
"extensions.pocket.enabled" = false; # Disable pocket
|
||||||
"media.eme.enabled" = true; # Enable DRM
|
"media.eme.enabled" = true; # Enable DRM
|
||||||
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
|
"media.gmp-widevinecdm.enabled" = true; # Enable DRM
|
||||||
|
|
@ -79,8 +80,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.my.home.xdg.mime-apps = lib.mkIf cfg.enable {
|
|
||||||
applications.editor = [ "firefox.desktop" ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,29 +21,31 @@ in
|
||||||
config.programs.git = lib.mkIf cfg.enable {
|
config.programs.git = lib.mkIf cfg.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# Who am I?
|
|
||||||
userEmail = mkMailAddress "bruno" "belanyi.fr";
|
|
||||||
userName = "Bruno BELANYI";
|
|
||||||
|
|
||||||
inherit (cfg) package;
|
inherit (cfg) package;
|
||||||
|
|
||||||
aliases = {
|
|
||||||
git = "!git";
|
|
||||||
lol = "log --graph --decorate --pretty=oneline --abbrev-commit --topo-order";
|
|
||||||
lola = "lol --all";
|
|
||||||
assume = "update-index --assume-unchanged";
|
|
||||||
unassume = "update-index --no-assume-unchanged";
|
|
||||||
assumed = "!git ls-files -v | grep ^h | cut -c 3-";
|
|
||||||
pick = "log -p -G";
|
|
||||||
push-new = "!git push -u origin "
|
|
||||||
+ ''"$(git branch | grep '^* ' | cut -f2- -d' ')"'';
|
|
||||||
root = "git rev-parse --show-toplevel";
|
|
||||||
};
|
|
||||||
|
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
|
|
||||||
# There's more
|
# There's more
|
||||||
extraConfig = {
|
settings = {
|
||||||
|
# Who am I?
|
||||||
|
user = {
|
||||||
|
email = mkMailAddress "bruno" "belanyi.fr";
|
||||||
|
name = "Bruno BELANYI";
|
||||||
|
};
|
||||||
|
|
||||||
|
alias = {
|
||||||
|
git = "!git";
|
||||||
|
lol = "log --graph --decorate --pretty=oneline --abbrev-commit --topo-order";
|
||||||
|
lola = "lol --all";
|
||||||
|
assume = "update-index --assume-unchanged";
|
||||||
|
unassume = "update-index --no-assume-unchanged";
|
||||||
|
assumed = "!git ls-files -v | grep ^h | cut -c 3-";
|
||||||
|
pick = "log -p -G";
|
||||||
|
push-new = "!git push -u origin "
|
||||||
|
+ ''"$(git branch | grep '^* ' | cut -f2- -d' ')"'';
|
||||||
|
root = "git rev-parse --show-toplevel";
|
||||||
|
};
|
||||||
|
|
||||||
# Makes it a bit more readable
|
# Makes it a bit more readable
|
||||||
blame = {
|
blame = {
|
||||||
coloring = "repeatedLines";
|
coloring = "repeatedLines";
|
||||||
|
|
|
||||||
|
|
@ -20,8 +20,4 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.my.home.xdg.mime-apps = lib.mkIf cfg.enable {
|
|
||||||
applications.editor = [ "himalaya.desktop" ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,12 +17,5 @@ in
|
||||||
pkgs.mpvScripts.uosc # Nicer UI
|
pkgs.mpvScripts.uosc # Nicer UI
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
my.home.xdg.mime-apps = {
|
|
||||||
applications.media = {
|
|
||||||
audio = [ "mpv.desktop" ];
|
|
||||||
video = [ "mpv.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -48,9 +48,5 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
my.home.xdg.mime-apps = {
|
|
||||||
applications.terminal = [ "Alacritty.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,5 @@ in
|
||||||
color15 = ${whiteBold}
|
color15 = ${whiteBold}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
my.home.xdg.mime-apps = {
|
|
||||||
applications.terminal = [ "termite.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,9 +13,5 @@ in
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
cfg.package
|
cfg.package
|
||||||
];
|
];
|
||||||
|
|
||||||
my.home.xdg.mime-apps = {
|
|
||||||
applications.torrent = "TrguiNG.desktop";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -104,8 +104,4 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config.xdg.configFile = lib.mkIf cfg.enable configFiles;
|
config.xdg.configFile = lib.mkIf cfg.enable configFiles;
|
||||||
|
|
||||||
config.my.home.xdg.mime-apps = lib.mkIf cfg.enable {
|
|
||||||
applications.editor = [ "nvim.desktop" ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
-- Use GLSL filetype for common shader file extensions
|
|
||||||
vim.filetype.add({
|
|
||||||
extension = {
|
|
||||||
frag = "glsl",
|
|
||||||
vert = "glsl",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
@ -81,9 +81,6 @@ set updatetime=250
|
||||||
" Disable all mouse integrations
|
" Disable all mouse integrations
|
||||||
set mouse=
|
set mouse=
|
||||||
|
|
||||||
" Set dark mode by default
|
|
||||||
set background=dark
|
|
||||||
|
|
||||||
" Setup some overrides for gruvbox
|
" Setup some overrides for gruvbox
|
||||||
lua << EOF
|
lua << EOF
|
||||||
local gruvbox = require("gruvbox")
|
local gruvbox = require("gruvbox")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
local lspconfig = require("lspconfig")
|
|
||||||
local lsp = require("ambroisie.lsp")
|
local lsp = require("ambroisie.lsp")
|
||||||
local utils = require("ambroisie.utils")
|
local utils = require("ambroisie.utils")
|
||||||
|
|
||||||
|
|
@ -25,59 +24,27 @@ vim.diagnostic.config({
|
||||||
-- Inform servers we are able to do completion, snippets, etc...
|
-- Inform servers we are able to do completion, snippets, etc...
|
||||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||||
|
|
||||||
-- C/C++
|
-- Shared configuration
|
||||||
if utils.is_executable("clangd") then
|
vim.lsp.config("*", {
|
||||||
lspconfig.clangd.setup({
|
capabilities = capabilities,
|
||||||
capabilities = capabilities,
|
on_attach = lsp.on_attach,
|
||||||
on_attach = lsp.on_attach,
|
})
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Haskell
|
local servers = {
|
||||||
if utils.is_executable("haskell-language-server-wrapper") then
|
-- C/C++
|
||||||
lspconfig.hls.setup({
|
clangd = {},
|
||||||
capabilities = capabilities,
|
-- Haskell
|
||||||
on_attach = lsp.on_attach,
|
hls = {},
|
||||||
})
|
-- Nix
|
||||||
end
|
nil_ls = {},
|
||||||
|
-- Python
|
||||||
-- Nix
|
pyright = {},
|
||||||
if utils.is_executable("nil") then
|
ruff = {},
|
||||||
lspconfig.nil_ls.setup({
|
-- Rust
|
||||||
capabilities = capabilities,
|
rust_analyzer = {},
|
||||||
on_attach = lsp.on_attach,
|
-- Shell
|
||||||
})
|
bashls = {
|
||||||
end
|
|
||||||
|
|
||||||
-- Python
|
|
||||||
if utils.is_executable("pyright") then
|
|
||||||
lspconfig.pyright.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = lsp.on_attach,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if utils.is_executable("ruff") then
|
|
||||||
lspconfig.ruff.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = lsp.on_attach,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Rust
|
|
||||||
if utils.is_executable("rust-analyzer") then
|
|
||||||
lspconfig.rust_analyzer.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = lsp.on_attach,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Shell
|
|
||||||
if utils.is_executable("bash-language-server") then
|
|
||||||
lspconfig.bashls.setup({
|
|
||||||
filetypes = { "bash", "sh", "zsh" },
|
filetypes = { "bash", "sh", "zsh" },
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = lsp.on_attach,
|
|
||||||
settings = {
|
settings = {
|
||||||
bashIde = {
|
bashIde = {
|
||||||
shfmt = {
|
shfmt = {
|
||||||
|
|
@ -88,28 +55,17 @@ if utils.is_executable("bash-language-server") then
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
},
|
||||||
end
|
-- Starlark
|
||||||
|
starpls = {},
|
||||||
|
-- Generic
|
||||||
|
harper_ls = {},
|
||||||
|
typos_lsp = {},
|
||||||
|
}
|
||||||
|
|
||||||
-- Starlark
|
for server, config in pairs(servers) do
|
||||||
if utils.is_executable("starpls") then
|
if not vim.tbl_isempty(config) then
|
||||||
lspconfig.starpls.setup({
|
vim.lsp.config(server, config)
|
||||||
capabilities = capabilities,
|
end
|
||||||
on_attach = lsp.on_attach,
|
vim.lsp.enable(server)
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Generic
|
|
||||||
if utils.is_executable("harper-ls") then
|
|
||||||
lspconfig.harper_ls.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = lsp.on_attach,
|
|
||||||
})
|
|
||||||
end
|
|
||||||
|
|
||||||
if utils.is_executable("typos-lsp") then
|
|
||||||
lspconfig.typos_lsp.setup({
|
|
||||||
capabilities = capabilities,
|
|
||||||
on_attach = lsp.on_attach,
|
|
||||||
})
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,6 @@ let
|
||||||
cfg = config.my.home.xdg;
|
cfg = config.my.home.xdg;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
./mime-apps.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options.my.home.xdg = with lib; {
|
options.my.home.xdg = with lib; {
|
||||||
enable = my.mkDisableOption "XDG configuration";
|
enable = my.mkDisableOption "XDG configuration";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,280 +0,0 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.my.home.xdg.mime-apps;
|
|
||||||
app = cfg.applications;
|
|
||||||
|
|
||||||
strOrStrList = with lib.types; coercedTo str lib.singleton (listOf str);
|
|
||||||
mkMimeAppOption = kind: lib.mkOption {
|
|
||||||
description = "Application to associate as ${kind}";
|
|
||||||
default = null;
|
|
||||||
type = lib.types.nullOr strOrStrList;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my.home.xdg.mime-apps = with lib; {
|
|
||||||
enable = my.mkDisableOption "XDG MIME Applications configuration";
|
|
||||||
|
|
||||||
applications = lib.mapAttrsRecursive (_: mkMimeAppOption) {
|
|
||||||
archive = "archive manager";
|
|
||||||
browser = "internet browser";
|
|
||||||
calendar = "calendar";
|
|
||||||
editor = "text editor";
|
|
||||||
fileManager = "file manager";
|
|
||||||
mail = "mail client";
|
|
||||||
media = {
|
|
||||||
audio = "audio player";
|
|
||||||
document = {
|
|
||||||
comic = "comic book reader";
|
|
||||||
ebook = "ebook reader";
|
|
||||||
pdf = "PDF reader";
|
|
||||||
};
|
|
||||||
image = {
|
|
||||||
bitmap = "bitmap image viewer";
|
|
||||||
vector = "vector image viewer";
|
|
||||||
editor = "image editor";
|
|
||||||
};
|
|
||||||
video = "video player";
|
|
||||||
};
|
|
||||||
office = {
|
|
||||||
database = "database management program";
|
|
||||||
formula = "formula editor";
|
|
||||||
graphics = "graphics editor";
|
|
||||||
presentation = "presentation editor";
|
|
||||||
spreadsheet = "spreadsheet editor";
|
|
||||||
text = "word processor";
|
|
||||||
};
|
|
||||||
terminal = "terminal";
|
|
||||||
torrent = "bittorrent client";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
xdg = {
|
|
||||||
mimeApps = {
|
|
||||||
enable = true;
|
|
||||||
defaultApplications = lib.filterAttrs (_: apps: apps != null) {
|
|
||||||
"application/epub+zip" = app.media.document.ebook;
|
|
||||||
"application/gzip" = app.archive;
|
|
||||||
"application/json" = app.editor;
|
|
||||||
"application/ld+json" = app.editor;
|
|
||||||
"application/mxf " = app.media.video;
|
|
||||||
"application/ogg" = app.media.audio;
|
|
||||||
"application/pdf" = app.media.document.pdf;
|
|
||||||
"application/rss+xml" = app.editor;
|
|
||||||
"application/smil+xml " = app.media.video;
|
|
||||||
"application/vnd.amazon.ebook" = app.media.document.ebook;
|
|
||||||
"application/vnd.apple.mpegurl " = app.media.video;
|
|
||||||
"application/vnd.comicbook+zip" = app.media.document.comic;
|
|
||||||
"application/vnd.comicbook-rar" = app.media.document.comic;
|
|
||||||
"application/vnd.mozilla.xul+xml" = app.browser;
|
|
||||||
"application/vnd.ms-excel" = app.office.spreadsheet;
|
|
||||||
"application/vnd.ms-powerpoint" = app.office.presentation;
|
|
||||||
"application/vnd.ms-word" = app.office.text;
|
|
||||||
"application/vnd.oasis.opendocument.database" = app.office.database;
|
|
||||||
"application/vnd.oasis.opendocument.formula" = app.office.formula;
|
|
||||||
"application/vnd.oasis.opendocument.graphics" = app.office.graphics;
|
|
||||||
"application/vnd.oasis.opendocument.graphics-template" = app.office.graphics;
|
|
||||||
"application/vnd.oasis.opendocument.presentation" = app.office.presentation;
|
|
||||||
"application/vnd.oasis.opendocument.presentation-template" = app.office.presentation;
|
|
||||||
"application/vnd.oasis.opendocument.spreadsheet" = app.office.spreadsheet;
|
|
||||||
"application/vnd.oasis.opendocument.spreadsheet-template" = app.office.spreadsheet;
|
|
||||||
"application/vnd.oasis.opendocument.text" = app.office.text;
|
|
||||||
"application/vnd.oasis.opendocument.text-master" = app.office.text;
|
|
||||||
"application/vnd.oasis.opendocument.text-template" = app.office.text;
|
|
||||||
"application/vnd.oasis.opendocument.text-web" = app.office.text;
|
|
||||||
"application/vnd.openxmlformats-officedocument.presentationml.presentation" = app.office.presentation;
|
|
||||||
"application/vnd.openxmlformats-officedocument.presentationml.template" = app.office.presentation;
|
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" = app.office.spreadsheet;
|
|
||||||
"application/vnd.openxmlformats-officedocument.spreadsheetml.template" = app.office.spreadsheet;
|
|
||||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = app.office.text;
|
|
||||||
"application/vnd.openxmlformats-officedocument.wordprocessingml.template" = app.office.text;
|
|
||||||
"application/vnd.rar" = app.archive;
|
|
||||||
"application/vnd.stardivision.calc" = app.office.spreadsheet;
|
|
||||||
"application/vnd.stardivision.draw" = app.office.graphics;
|
|
||||||
"application/vnd.stardivision.impress" = app.office.presentation;
|
|
||||||
"application/vnd.stardivision.math" = app.office.formula;
|
|
||||||
"application/vnd.stardivision.writer" = app.office.text;
|
|
||||||
"application/vnd.sun.xml.base" = app.office.database;
|
|
||||||
"application/vnd.sun.xml.calc" = app.office.spreadsheet;
|
|
||||||
"application/vnd.sun.xml.calc.template" = app.office.spreadsheet;
|
|
||||||
"application/vnd.sun.xml.draw" = app.office.graphics;
|
|
||||||
"application/vnd.sun.xml.draw.template" = app.office.graphics;
|
|
||||||
"application/vnd.sun.xml.impress" = app.office.presentation;
|
|
||||||
"application/vnd.sun.xml.impress.template" = app.office.presentation;
|
|
||||||
"application/vnd.sun.xml.math" = app.office.formula;
|
|
||||||
"application/vnd.sun.xml.writer" = app.office.text;
|
|
||||||
"application/vnd.sun.xml.writer.global" = app.office.text;
|
|
||||||
"application/vnd.sun.xml.writer.template" = app.office.text;
|
|
||||||
"application/vnd.wordperfect" = app.office.text;
|
|
||||||
"application/x-7z-compressed" = app.archive;
|
|
||||||
"application/x-arj" = app.archive;
|
|
||||||
"application/x-bittorrent" = app.torrent;
|
|
||||||
"application/x-bzip" = app.archive;
|
|
||||||
"application/x-bzip-compressed-tar" = app.archive;
|
|
||||||
"application/x-bzip2" = app.archive;
|
|
||||||
"application/x-cb7" = app.media.document.comic;
|
|
||||||
"application/x-cbr" = app.media.document.comic;
|
|
||||||
"application/x-cbt" = app.media.document.comic;
|
|
||||||
"application/x-cbz" = app.media.document.comic;
|
|
||||||
"application/x-compress" = app.archive;
|
|
||||||
"application/x-compressed-tar" = app.archive;
|
|
||||||
"application/x-csh" = app.editor;
|
|
||||||
"application/x-cue" = app.media.audio;
|
|
||||||
"application/x-directory" = app.fileManager;
|
|
||||||
"application/x-extension-htm" = app.browser;
|
|
||||||
"application/x-extension-html" = app.browser;
|
|
||||||
"application/x-extension-ics" = app.calendar;
|
|
||||||
"application/x-extension-m4a" = app.media.audio;
|
|
||||||
"application/x-extension-mp4" = app.media.video;
|
|
||||||
"application/x-extension-shtml" = app.browser;
|
|
||||||
"application/x-extension-xht" = app.browser;
|
|
||||||
"application/x-extension-xhtml" = app.browser;
|
|
||||||
"application/x-fictionbook" = app.media.document.ebook;
|
|
||||||
"application/x-fictionbook+xml" = app.media.document.ebook;
|
|
||||||
"application/x-flac" = app.media.audio;
|
|
||||||
"application/x-gzip" = app.archive;
|
|
||||||
"application/x-lha" = app.archive;
|
|
||||||
"application/x-lhz" = app.archive;
|
|
||||||
"application/x-lzop" = app.archive;
|
|
||||||
"application/x-matroska" = app.media.video;
|
|
||||||
"application/x-netshow-channel" = app.media.video;
|
|
||||||
"application/x-quicktime-media-link" = app.media.video;
|
|
||||||
"application/x-quicktimeplayer" = app.media.video;
|
|
||||||
"application/x-rar" = app.archive;
|
|
||||||
"application/x-sh" = app.editor;
|
|
||||||
"application/x-shellscript" = app.editor;
|
|
||||||
"application/x-shorten " = app.media.audio;
|
|
||||||
"application/x-smil" = app.media.video;
|
|
||||||
"application/x-tar" = app.archive;
|
|
||||||
"application/x-tarz" = app.archive;
|
|
||||||
"application/x-wine-extension-ini" = app.editor;
|
|
||||||
"application/x-zip-compressed" = app.archive;
|
|
||||||
"application/x-zoo" = app.archive;
|
|
||||||
"application/xhtml+xml" = app.browser;
|
|
||||||
"application/xml" = app.editor;
|
|
||||||
"application/zip" = app.archive;
|
|
||||||
"audio/*" = app.media.video;
|
|
||||||
"image/*" = app.media.image.bitmap;
|
|
||||||
"image/svg+xml" = app.media.image.vector;
|
|
||||||
"image/x-compressed-xcf" = app.media.image.editor;
|
|
||||||
"image/x-fits" = app.media.image.editor;
|
|
||||||
"image/x-psd" = app.media.image.editor;
|
|
||||||
"image/x-xcf" = app.media.image.editor;
|
|
||||||
"inode/directory" = app.fileManager;
|
|
||||||
"message/rfc822" = app.mail;
|
|
||||||
"text/*" = app.editor;
|
|
||||||
"text/calendar" = app.calendar;
|
|
||||||
"text/html" = app.browser;
|
|
||||||
"text/plain" = app.editor;
|
|
||||||
"video/*" = app.media.video;
|
|
||||||
"x-scheme-handler/about" = app.browser;
|
|
||||||
"x-scheme-handler/chrome" = app.browser;
|
|
||||||
"x-scheme-handler/file" = app.fileManager;
|
|
||||||
"x-scheme-handler/ftp" = app.browser;
|
|
||||||
"x-scheme-handler/http" = app.browser;
|
|
||||||
"x-scheme-handler/https" = app.browser;
|
|
||||||
"x-scheme-handler/mailto" = app.mail;
|
|
||||||
"x-scheme-handler/mid" = app.mail;
|
|
||||||
"x-scheme-handler/terminal" = app.terminal;
|
|
||||||
"x-scheme-handler/unknown" = app.browser;
|
|
||||||
"x-scheme-handler/webcal" = app.calendar;
|
|
||||||
"x-scheme-handler/webcals" = app.calendar;
|
|
||||||
"x-www-browser" = app.browser;
|
|
||||||
|
|
||||||
# FIXME: relevant? https://bbs.archlinux.org/viewtopic.php?id=243125
|
|
||||||
|
|
||||||
# FIXME: shouldn't be necessary then
|
|
||||||
# "audio/AMR" = app.media.audio;
|
|
||||||
# "audio/aac" = app.media.audio;
|
|
||||||
# "audio/ac3" = app.media.audio;
|
|
||||||
# "audio/flac" = app.media.audio;
|
|
||||||
# "audio/mp2" = app.media.audio;
|
|
||||||
# "audio/mp4" = app.media.audio;
|
|
||||||
# "audio/mpeg" = app.media.audio;
|
|
||||||
# "audio/ogg" = app.media.audio;
|
|
||||||
# "audio/vnd.dts" = app.media.audio;
|
|
||||||
# "audio/vnd.dts.hd" = app.media.audio;
|
|
||||||
# "audio/vnd.rn-realaudio" = app.media.audio;
|
|
||||||
# "audio/webm" = app.media.audio;
|
|
||||||
# "audio/x-adpcm" = app.media.audio;
|
|
||||||
# "audio/x-aiff" = app.media.audio;
|
|
||||||
# "audio/x-ape" = app.media.audio;
|
|
||||||
# "audio/x-matroska" = app.media.audio;
|
|
||||||
# "audio/x-mpegurl" = app.media.audio;
|
|
||||||
# "audio/x-ms-asx" = app.media.audio;
|
|
||||||
# "audio/x-ms-wma" = app.media.audio;
|
|
||||||
# "audio/x-musepack" = app.media.audio;
|
|
||||||
# "audio/x-scpls" = app.media.audio;
|
|
||||||
# "audio/x-tta" = app.media.audio;
|
|
||||||
# "audio/x-vorbis+ogg" = app.media.audio;
|
|
||||||
# "audio/x-wav" = app.media.audio;
|
|
||||||
# "audio/x-wavpack" = app.media.audio;
|
|
||||||
# "image/bmp" = app.media.image.bitmap;
|
|
||||||
# "image/gif" = app.media.image.bitmap;
|
|
||||||
# "image/heif" = app.media.image.bitmap;
|
|
||||||
# "image/jpeg" = app.media.image.bitmap;
|
|
||||||
# "image/jpg" = app.media.image.bitmap;
|
|
||||||
# "image/pjpeg" = app.media.image.bitmap;
|
|
||||||
# "image/png" = app.media.image.bitmap;
|
|
||||||
# "image/tiff" = app.media.image.bitmap;
|
|
||||||
# "image/vnd.zbrush.pcx" = app.media.image.bitmap;
|
|
||||||
# "image/webp" = app.media.image.bitmap;
|
|
||||||
# "image/x-icb" = app.media.image.bitmap;
|
|
||||||
# "image/x-ico" = app.media.image.bitmap;
|
|
||||||
# "image/x-pcx" = app.media.image.bitmap;
|
|
||||||
# "image/x-portable-anymap" = app.media.image.bitmap;
|
|
||||||
# "image/x-portable-bitmap" = app.media.image.bitmap;
|
|
||||||
# "image/x-portable-graymap" = app.media.image.bitmap;
|
|
||||||
# "image/x-portable-pixmap" = app.media.image.bitmap;
|
|
||||||
# "image/x-tga" = app.media.image.bitmap;
|
|
||||||
# "image/x-xbitmap" = app.media.image.bitmap;
|
|
||||||
# "image/x-xpixmap" = app.media.image.bitmap;
|
|
||||||
# "image/x-xwindowdump" = app.media.image.bitmap;
|
|
||||||
# "text/tcl" = app.editor;
|
|
||||||
# "text/x-c++hdr" = app.editor;
|
|
||||||
# "text/x-c++src" = app.editor;
|
|
||||||
# "text/x-chdr" = app.editor;
|
|
||||||
# "text/x-csrc" = app.editor;
|
|
||||||
# "text/x-java" = app.editor;
|
|
||||||
# "text/x-makefile" = app.editor;
|
|
||||||
# "text/x-moc" = app.editor;
|
|
||||||
# "text/x-pascal" = app.editor;
|
|
||||||
# "text/x-tex" = app.editor;
|
|
||||||
# "video/3gpp" = app.media.video;
|
|
||||||
# "video/3gpp2" = app.media.video;
|
|
||||||
# "video/dv" = app.media.video;
|
|
||||||
# "video/mp2t" = app.media.video;
|
|
||||||
# "video/mp4" = app.media.video;
|
|
||||||
# "video/mpeg" = app.media.video;
|
|
||||||
# "video/ogg" = app.media.video;
|
|
||||||
# "video/quicktime" = app.media.video;
|
|
||||||
# "video/vnd.mpegurl" = app.media.video;
|
|
||||||
# "video/vnd.rn-realvideo" = app.media.video;
|
|
||||||
# "video/webm" = app.media.video;
|
|
||||||
# "video/x-flic" = app.media.video;
|
|
||||||
# "video/x-flv" = app.media.video;
|
|
||||||
# "video/x-matroska" = app.media.video;
|
|
||||||
# "video/x-ms-wmv" = app.media.video;
|
|
||||||
# "video/x-msvideo" = app.media.video;
|
|
||||||
# "video/x-ogm+ogg" = app.media.video;
|
|
||||||
# "video/x-theora+ogg" = app.media.video;
|
|
||||||
|
|
||||||
# FIXME: kind of weird formats, not quite adapted to attribute name
|
|
||||||
# "application/eps" = app.media.document.pdf
|
|
||||||
# "application/oxps" = app.media.document.pdf
|
|
||||||
# "application/postscript" = app.media.document.pdf
|
|
||||||
# "application/x-eps" = app.media.document.pdf
|
|
||||||
# "image/eps" = app.media.document.pdf
|
|
||||||
# "image/vnd.djvu" = app.media.document.pdf
|
|
||||||
# "image/vnd.djvu+multipage" = app.media.document.pdf
|
|
||||||
# "image/x-eps" = app.media.document.pdf
|
|
||||||
|
|
||||||
# FIXME: additionally interesting, but not necessary
|
|
||||||
# "x-scheme-handler/discord" = [ "discord.desktop" ];
|
|
||||||
# "x-scheme-handler/msteams" = [ "teams.desktop" ];
|
|
||||||
# "x-scheme-handler/slack" = [ "slack.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -17,12 +17,4 @@ in
|
||||||
"statusbar-home-tilde" = true;
|
"statusbar-home-tilde" = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.my.home.xdg.mime-apps = lib.mkIf cfg.enable {
|
|
||||||
applications.media.document = {
|
|
||||||
comic = [ "org.pwmt.zathura.desktop" ];
|
|
||||||
ebook = [ "org.pwmt.zathura.desktop" ];
|
|
||||||
pdf = [ "org.pwmt.zathura.desktop" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,10 @@ in
|
||||||
|
|
||||||
launchTmux = mkEnableOption "auto launch tmux at shell start";
|
launchTmux = mkEnableOption "auto launch tmux at shell start";
|
||||||
|
|
||||||
|
completionSync = {
|
||||||
|
enable = mkEnableOption "zsh-completion-sync plugin";
|
||||||
|
};
|
||||||
|
|
||||||
notify = {
|
notify = {
|
||||||
enable = mkEnableOption "zsh-done notification";
|
enable = mkEnableOption "zsh-done notification";
|
||||||
|
|
||||||
|
|
@ -19,7 +23,7 @@ in
|
||||||
"direnv reload"
|
"direnv reload"
|
||||||
"fg"
|
"fg"
|
||||||
"git (?!push|pull|fetch)"
|
"git (?!push|pull|fetch)"
|
||||||
"home-manager (?!switch|build|news)"
|
"home-manager (?!switch|build)"
|
||||||
"htop"
|
"htop"
|
||||||
"less"
|
"less"
|
||||||
"man"
|
"man"
|
||||||
|
|
@ -68,7 +72,7 @@ in
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
name = "fast-syntax-highlighting";
|
name = "fast-syntax-highlighting";
|
||||||
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
|
file = "share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh";
|
||||||
src = pkgs.zsh-fast-syntax-highlighting;
|
src = pkgs.zsh-fast-syntax-highlighting;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -118,6 +122,18 @@ in
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(lib.mkIf cfg.completionSync.enable {
|
||||||
|
programs.zsh = {
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
name = "zsh-completion-sync";
|
||||||
|
file = "share/zsh-completion-sync/zsh-completion-sync.plugin.zsh";
|
||||||
|
src = pkgs.zsh-completion-sync;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
(lib.mkIf cfg.notify.enable {
|
(lib.mkIf cfg.notify.enable {
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
plugins = [
|
plugins = [
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,6 @@ in
|
||||||
|
|
||||||
amd = {
|
amd = {
|
||||||
enableKernelModule = lib.my.mkDisableOption "Kernel driver module";
|
enableKernelModule = lib.my.mkDisableOption "Kernel driver module";
|
||||||
|
|
||||||
amdvlk = lib.mkEnableOption "Use AMDVLK instead of Mesa RADV driver";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
intel = {
|
intel = {
|
||||||
|
|
@ -35,13 +33,6 @@ in
|
||||||
(lib.mkIf (cfg.gpuFlavor == "amd") {
|
(lib.mkIf (cfg.gpuFlavor == "amd") {
|
||||||
hardware.amdgpu = {
|
hardware.amdgpu = {
|
||||||
initrd.enable = cfg.amd.enableKernelModule;
|
initrd.enable = cfg.amd.enableKernelModule;
|
||||||
# Vulkan
|
|
||||||
amdvlk = lib.mkIf cfg.amd.amdvlk {
|
|
||||||
enable = true;
|
|
||||||
support32Bit = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ in
|
||||||
|
|
||||||
my.services.backup = {
|
my.services.backup = {
|
||||||
paths = [
|
paths = [
|
||||||
config.services.homebox.settings.HBOX_STORAGE_DATA
|
(lib.removePrefix "file://" config.services.homebox.settings.HBOX_STORAGE_CONN_STRING)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ in
|
||||||
BASE_URL = "https://mealie.${config.networking.domain}";
|
BASE_URL = "https://mealie.${config.networking.domain}";
|
||||||
TZ = config.time.timeZone;
|
TZ = config.time.timeZone;
|
||||||
ALLOw_SIGNUP = "false";
|
ALLOw_SIGNUP = "false";
|
||||||
|
TOKEN_TIME = 24 * 180; # 180 days
|
||||||
};
|
};
|
||||||
|
|
||||||
# Automatic PostgreSQL provisioning
|
# Automatic PostgreSQL provisioning
|
||||||
|
|
@ -53,6 +54,12 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
my.services.backup = {
|
||||||
|
paths = [
|
||||||
|
"/var/lib/mealie"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
services.fail2ban.jails = {
|
services.fail2ban.jails = {
|
||||||
mealie = ''
|
mealie = ''
|
||||||
enabled = true
|
enabled = true
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,12 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.nextcloud = {
|
||||||
|
extraApps = {
|
||||||
|
inherit (config.services.nextcloud.package.packages.apps) richdocuments;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.collabora-online = {
|
services.collabora-online = {
|
||||||
enable = true;
|
enable = true;
|
||||||
inherit (cfg) port;
|
inherit (cfg) port;
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud31;
|
package = pkgs.nextcloud32;
|
||||||
hostName = "nextcloud.${config.networking.domain}";
|
hostName = "nextcloud.${config.networking.domain}";
|
||||||
home = "/var/lib/nextcloud";
|
home = "/var/lib/nextcloud";
|
||||||
maxUploadSize = cfg.maxSize;
|
maxUploadSize = cfg.maxSize;
|
||||||
|
|
@ -62,6 +62,16 @@ in
|
||||||
# Allow using the push service without hard-coding my IP in the configuration
|
# Allow using the push service without hard-coding my IP in the configuration
|
||||||
bendDomainToLocalhost = true;
|
bendDomainToLocalhost = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraApps = {
|
||||||
|
inherit (config.services.nextcloud.package.packages.apps)
|
||||||
|
calendar
|
||||||
|
contacts
|
||||||
|
deck
|
||||||
|
tasks
|
||||||
|
;
|
||||||
|
# notify_push is automatically installed by the module
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# The service above configures the domain, no need for my wrapper
|
# The service above configures the domain, no need for my wrapper
|
||||||
|
|
|
||||||
|
|
@ -71,10 +71,14 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Transmission wants to eat *all* my RAM if left to its own devices
|
|
||||||
systemd.services.transmission = {
|
systemd.services.transmission = {
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
# Transmission wants to eat *all* my RAM if left to its own devices
|
||||||
MemoryMax = "33%";
|
MemoryMax = "33%";
|
||||||
|
# Avoid errors due to high number of open files.
|
||||||
|
LimitNOFILE = 1048576;
|
||||||
|
# Longer stop timeout to finish all torrents
|
||||||
|
TimeoutStopSec = "5m";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue