WIP: x13s: install to nvme, refactor into module
This commit is contained in:
parent
40416bd4de
commit
a083c05b27
28 changed files with 1361 additions and 737 deletions
|
@ -1,15 +1,16 @@
|
|||
{
|
||||
name,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{ name
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
extensions =
|
||||
[
|
||||
#undetectable adblocker
|
||||
{id = "gcfcpohokifjldeandkfjoboemihipmb";}
|
||||
{ id = "gcfcpohokifjldeandkfjoboemihipmb"; }
|
||||
|
||||
# ublock origin
|
||||
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";}
|
||||
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; }
|
||||
|
||||
# # YT ad block
|
||||
# {id = "cmedhionkhpnakcndndgjdbohmhepckk";}
|
||||
|
@ -18,15 +19,15 @@
|
|||
# {id = "cfhdojbkjhnklbpkdaibdccddilifddb";}
|
||||
|
||||
# Cookie Notice Blocker
|
||||
{id = "odhmfmnoejhihkmfebnolljiibpnednn";}
|
||||
{ id = "odhmfmnoejhihkmfebnolljiibpnednn"; }
|
||||
# i don't care about cookies
|
||||
{id = "fihnjjcciajhdojfnbdddfaoknhalnja";}
|
||||
{ id = "fihnjjcciajhdojfnbdddfaoknhalnja"; }
|
||||
|
||||
# NopeCHA
|
||||
{id = "dknlfmjaanfblgfdfebhijalfmhmjjjo";}
|
||||
{ id = "dknlfmjaanfblgfdfebhijalfmhmjjjo"; }
|
||||
|
||||
# h264ify
|
||||
{id = "aleakchihdccplidncghkekgioiakgal";}
|
||||
{ id = "aleakchihdccplidncghkekgioiakgal"; }
|
||||
|
||||
# clippy
|
||||
# {id = "honbeilkanbghjimjoniipnnehlmhggk"}
|
||||
|
@ -37,25 +38,27 @@
|
|||
}
|
||||
|
||||
# cookie autodelete
|
||||
{id = "fhcgjolkccmbidfldomjliifgaodjagh";}
|
||||
{ id = "fhcgjolkccmbidfldomjliifgaodjagh"; }
|
||||
|
||||
# unhook
|
||||
{ id = "khncfooichmfjbepaaaebmommgaepoid";}
|
||||
{ id = "khncfooichmfjbepaaaebmommgaepoid"; }
|
||||
]
|
||||
++ (lib.lists.optionals ((builtins.match "^steveej.*" name) != null) [
|
||||
# Vimium C
|
||||
{id = "hfjbmagddngcpeloejdejnfgbamkjaeg";}
|
||||
{ id = "hfjbmagddngcpeloejdejnfgbamkjaeg"; }
|
||||
]);
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
inherit extensions;
|
||||
};
|
||||
|
||||
programs.brave = {
|
||||
enable = true;
|
||||
# TODO: enable this on aarch64-linux
|
||||
enable = true && !pkgs.stdenv.targetPlatform.isAarch64;
|
||||
inherit extensions;
|
||||
};
|
||||
|
||||
programs.browserpass = {browsers = ["chromium" "brave"];};
|
||||
programs.browserpass = { browsers = [ "chromium" "brave" ]; };
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, osConfig
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
libdecsync = pkgs.python3Packages.buildPythonPackage rec {
|
||||
pname = "libdecsync";
|
||||
version = "2.2.1";
|
||||
|
@ -38,50 +38,53 @@
|
|||
# pkgs.libxcrypt
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [libdecsync pkgs.python3Packages.setuptools];
|
||||
propagatedBuildInputs = [ libdecsync pkgs.python3Packages.setuptools ];
|
||||
};
|
||||
radicale-decsync = pkgs.radicale.overrideAttrs (old: {
|
||||
propagatedBuildInputs =
|
||||
old.propagatedBuildInputs
|
||||
++ [radicale-storage-decsync];
|
||||
++ [ radicale-storage-decsync ];
|
||||
});
|
||||
|
||||
mkRadicaleService = {
|
||||
suffix,
|
||||
port,
|
||||
}: let
|
||||
radicale-config = pkgs.writeText "radicale-config-${suffix}" ''
|
||||
[server]
|
||||
hosts = localhost:${builtins.toString port}
|
||||
mkRadicaleService =
|
||||
{ suffix
|
||||
, port
|
||||
,
|
||||
}:
|
||||
let
|
||||
radicale-config = pkgs.writeText "radicale-config-${suffix}" ''
|
||||
[server]
|
||||
hosts = localhost:${builtins.toString port}
|
||||
|
||||
[auth]
|
||||
type = htpasswd
|
||||
htpasswd_filename = ${osConfig.sops.secrets.radicale_htpasswd.path}
|
||||
htpasswd_encryption = bcrypt
|
||||
[auth]
|
||||
type = htpasswd
|
||||
htpasswd_filename = ${osConfig.sops.secrets.radicale_htpasswd.path}
|
||||
htpasswd_encryption = bcrypt
|
||||
|
||||
[storage]
|
||||
type = radicale_storage_decsync
|
||||
filesystem_folder = ${config.xdg.dataHome}/radicale-${suffix}
|
||||
decsync_dir = ${config.xdg.dataHome}/decsync-${suffix}
|
||||
'';
|
||||
in {
|
||||
systemd.user.services."radicale-${suffix}" = {
|
||||
Unit.Description = "Radicale with DecSync (${suffix})";
|
||||
Service = {
|
||||
ExecStart = "${radicale-decsync}/bin/radicale -C ${radicale-config}";
|
||||
Restart = "on-failure";
|
||||
[storage]
|
||||
type = radicale_storage_decsync
|
||||
filesystem_folder = ${config.xdg.dataHome}/radicale-${suffix}
|
||||
decsync_dir = ${config.xdg.dataHome}/decsync-${suffix}
|
||||
'';
|
||||
in
|
||||
{
|
||||
systemd.user.services."radicale-${suffix}" = {
|
||||
Unit.Description = "Radicale with DecSync (${suffix})";
|
||||
Service = {
|
||||
ExecStart = "${radicale-decsync}/bin/radicale -C ${radicale-config}";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
};
|
||||
Install.WantedBy = ["default.target"];
|
||||
};
|
||||
};
|
||||
in
|
||||
builtins.foldl' (sum: cur: lib.recursiveUpdate sum (mkRadicaleService cur)) {} [
|
||||
{
|
||||
suffix = "personal";
|
||||
port = 5232;
|
||||
}
|
||||
{
|
||||
suffix = "family";
|
||||
port = 5233;
|
||||
}
|
||||
]
|
||||
builtins.foldl' (sum: cur: lib.recursiveUpdate sum (mkRadicaleService cur)) { } [
|
||||
{
|
||||
suffix = "personal";
|
||||
port = 5232;
|
||||
}
|
||||
{
|
||||
suffix = "family";
|
||||
port = 5233;
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,29 +1,30 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
just-plugin = let
|
||||
plugin_file = pkgs.writeText "_just" ''
|
||||
#compdef just
|
||||
#autload
|
||||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
just-plugin =
|
||||
let
|
||||
plugin_file = pkgs.writeText "_just" ''
|
||||
#compdef just
|
||||
#autload
|
||||
|
||||
alias justl="\just --list"
|
||||
alias juste="\just --evaluate"
|
||||
alias justl="\just --list"
|
||||
alias juste="\just --evaluate"
|
||||
|
||||
local subcmds=()
|
||||
local subcmds=()
|
||||
|
||||
while read -r line ; do
|
||||
if [[ ! $line == Available* ]] ;
|
||||
then
|
||||
subcmds+=(''${line/[[:space:]]*\#/:})
|
||||
fi
|
||||
done < <(just --list)
|
||||
while read -r line ; do
|
||||
if [[ ! $line == Available* ]] ;
|
||||
then
|
||||
subcmds+=(''${line/[[:space:]]*\#/:})
|
||||
fi
|
||||
done < <(just --list)
|
||||
|
||||
_describe 'command' subcmds
|
||||
'';
|
||||
in
|
||||
_describe 'command' subcmds
|
||||
'';
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "just-completions";
|
||||
version = "0.1.0";
|
||||
|
@ -35,7 +36,8 @@
|
|||
chmod --recursive a-w $out
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
|
@ -46,47 +48,49 @@ in {
|
|||
# will be called again by oh-my-zsh
|
||||
enableCompletion = false;
|
||||
enableAutosuggestions = true;
|
||||
initExtra = let
|
||||
inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
|
||||
in ''
|
||||
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f${inNixShell}%F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
|
||||
RPROMPT=""
|
||||
initExtra =
|
||||
let
|
||||
inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
|
||||
in
|
||||
''
|
||||
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f${inNixShell}%F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
|
||||
RPROMPT=""
|
||||
|
||||
# Automatic rehash
|
||||
zstyle ':completion:*' rehash true
|
||||
# Automatic rehash
|
||||
zstyle ':completion:*' rehash true
|
||||
|
||||
if [ -f $HOME/.shrc.d/sh_aliases ]; then
|
||||
. $HOME/.shrc.d/sh_aliases
|
||||
fi
|
||||
if [ -f $HOME/.shrc.d/sh_aliases ]; then
|
||||
. $HOME/.shrc.d/sh_aliases
|
||||
fi
|
||||
|
||||
${
|
||||
if builtins.hasAttr "homeshick" pkgs
|
||||
then ''
|
||||
source ${pkgs.homeshick}/homeshick.sh
|
||||
fpath=(${pkgs.homeshick}/completions $fpath)
|
||||
''
|
||||
else ""
|
||||
}
|
||||
${
|
||||
if builtins.hasAttr "homeshick" pkgs
|
||||
then ''
|
||||
source ${pkgs.homeshick}/homeshick.sh
|
||||
fpath=(${pkgs.homeshick}/completions $fpath)
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
# Disable intercepting of ctrl-s and ctrl-q as flow control.
|
||||
stty stop ''' -ixoff -ixon
|
||||
# Disable intercepting of ctrl-s and ctrl-q as flow control.
|
||||
stty stop ''' -ixoff -ixon
|
||||
|
||||
# don't cd into directories when executed
|
||||
unsetopt AUTO_CD
|
||||
# don't cd into directories when executed
|
||||
unsetopt AUTO_CD
|
||||
|
||||
# print lines without termination
|
||||
setopt PROMPT_CR
|
||||
setopt PROMPT_SP
|
||||
export PROMPT_EOL_MARK=""
|
||||
# print lines without termination
|
||||
setopt PROMPT_CR
|
||||
setopt PROMPT_SP
|
||||
export PROMPT_EOL_MARK=""
|
||||
|
||||
${lib.optionalString config.services.gpg-agent.enable ''
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh"
|
||||
''}
|
||||
${lib.optionalString config.services.gpg-agent.enable ''
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh"
|
||||
''}
|
||||
|
||||
${lib.optionalString config.programs.neovim.enable ''
|
||||
export EDITOR="nvim"
|
||||
''}
|
||||
'';
|
||||
${lib.optionalString config.programs.neovim.enable ''
|
||||
export EDITOR="nvim"
|
||||
''}
|
||||
'';
|
||||
|
||||
plugins = [
|
||||
{
|
||||
|
@ -119,7 +123,7 @@ in {
|
|||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "tjkirch";
|
||||
plugins = ["git" "sudo"];
|
||||
plugins = [ "git" "sudo" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue