Compare commits
16 Commits
home-wayla
...
main
|
@ -3,6 +3,7 @@ keys:
|
|||
- &host_tsuki age1c92j4w0gqh32hwssl5m2mfrggssxax9pge8qxwytv9lmrnfttcvqdrgsst
|
||||
- &host_kasei age1eu2a6m3adakfzelfa9pqpl74a5dz0wkyr0v7gegm5ajnx7aqmqcqsp2ftc
|
||||
- &host_dosei age179y7apa80p9unvyjtsphpzyhve90ex986vlxkx43xt9n6m7en3csqnug7c
|
||||
- &home age10f4a5acpar8vwz3v298r3nv7gggfpmyh4wxpkc2hwq9paq0scf8qee8lau
|
||||
|
||||
creation_rules:
|
||||
- path_regex: secrets/common.yaml
|
||||
|
@ -13,6 +14,14 @@ creation_rules:
|
|||
- *host_tsuki
|
||||
- *host_kasei
|
||||
- *host_dosei
|
||||
- *home
|
||||
|
||||
- path_regex: secrets/home.yaml
|
||||
key_groups:
|
||||
- pgp:
|
||||
- *gpg_h7x4
|
||||
age:
|
||||
- *home
|
||||
|
||||
- path_regex: secrets/kasei.yaml
|
||||
key_groups:
|
||||
|
|
26
flake.nix
26
flake.nix
|
@ -8,21 +8,11 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager-local = {
|
||||
url = "git+file:///home/h7x4/git/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||
};
|
||||
|
||||
dotfiles = {
|
||||
url = "git+https://git.pvv.ntnu.no/oysteikt/dotfiles?ref=master";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
fonts = {
|
||||
url = "path:/home/h7x4/git/fonts";
|
||||
flake = false;
|
||||
};
|
||||
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -76,10 +66,8 @@
|
|||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
home-manager-local,
|
||||
|
||||
dotfiles,
|
||||
fonts,
|
||||
matrix-synapse-next,
|
||||
maunium-stickerpicker,
|
||||
minecraft,
|
||||
|
@ -112,6 +100,13 @@
|
|||
(self: super: {
|
||||
inherit (nonrecursive-unstable-pkgs) atuin wstunnel;
|
||||
})
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/251706
|
||||
(self: super: {
|
||||
mozc = self.qt6Packages.callPackage ./package-overrides/mozc.nix { };
|
||||
fcitx5-mozc = self.callPackage ./package-overrides/fcitx5-mozc.nix { };
|
||||
})
|
||||
|
||||
(self: super: {
|
||||
mpv-unwrapped = super.mpv-unwrapped.override {
|
||||
ffmpeg = super.ffmpeg_6-full;
|
||||
|
@ -195,7 +190,6 @@
|
|||
inherit inputs;
|
||||
inherit (self) extendedLib;
|
||||
inherit (config) machineVars;
|
||||
hostname = name;
|
||||
secrets = secrets.outputs.settings;
|
||||
};
|
||||
|
||||
|
@ -203,7 +197,10 @@
|
|||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
|
||||
users.h7x4.imports = [ ./home/home.nix ];
|
||||
users.h7x4.imports = [
|
||||
./home/home.nix
|
||||
./hosts/${name}/home
|
||||
];
|
||||
};
|
||||
})
|
||||
] ++ (extraConfig.modules or [ ]);
|
||||
|
@ -220,7 +217,6 @@
|
|||
modules = [
|
||||
matrix-synapse-next.nixosModules.default
|
||||
osuchan.outputs.nixosModules.default
|
||||
sops-nix.nixosModules.sops
|
||||
vscode-server.nixosModules.default
|
||||
maunium-stickerpicker.nixosModules.default
|
||||
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
./pvv.nix
|
||||
];
|
||||
|
||||
sops.secrets."ssh/secret-config/home" = {
|
||||
sopsFile = ../../../secrets/common.yaml;
|
||||
sops.secrets."ssh/secret-config" = {
|
||||
mode = "0444";
|
||||
};
|
||||
|
||||
programs.ssh.includes = [ config.sops.secrets."ssh/secret-config/home".path ];
|
||||
programs.ssh.includes = [ config.sops.secrets."ssh/secret-config".path ];
|
||||
}
|
||||
|
|
|
@ -9,6 +9,18 @@
|
|||
"github" = {
|
||||
user = "git";
|
||||
hostname = "github.com";
|
||||
identityFile = [ "~/.ssh/id_ed25519" ];
|
||||
};
|
||||
"github-nordicsemi" = {
|
||||
user = "git";
|
||||
hostname = "github.com";
|
||||
identityFile = [ "~/.ssh/id_ed25519_nordicsemi" ];
|
||||
};
|
||||
"bitbucket-nordicsemi" = {
|
||||
user = "git";
|
||||
hostname = "bitbucket.nordicsemi.no";
|
||||
port = 7999;
|
||||
identityFile = [ "~/.ssh/id_ed25519_nordicsemi" ];
|
||||
};
|
||||
"gitlab.stud.idi.ntnu.no" = {
|
||||
user = "git";
|
||||
|
|
|
@ -88,8 +88,14 @@ let
|
|||
machines: pipe machines pipeline;
|
||||
in
|
||||
{
|
||||
programs.ssh.matchBlocks = extendedLib.attrsets.concatAttrs [
|
||||
programs.ssh.matchBlocks = (extendedLib.attrsets.concatAttrs [
|
||||
(convertMachinesWith convertNormalMachine normalMachines)
|
||||
(convertMachinesWith convertAdminMachine rootMachines)
|
||||
];
|
||||
]) // {
|
||||
"pvv-git git.pvv.ntnu.no" = {
|
||||
hostname = "git.pvv.ntnu.no";
|
||||
user = "gitea";
|
||||
port = 2222;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, lib, extendedLib, inputs, machineVars, hostname, ... } @ args: let
|
||||
{ config, pkgs, lib, extendedLib, inputs, machineVars, ... } @ args: let
|
||||
inherit (lib) mkForce mkIf optionals;
|
||||
graphics = !machineVars.headless;
|
||||
in {
|
||||
|
@ -14,13 +14,15 @@ in {
|
|||
./programs/direnv.nix
|
||||
./programs/gdb.nix
|
||||
./programs/gh.nix
|
||||
./programs/git.nix
|
||||
./programs/git
|
||||
./programs/gpg.nix
|
||||
./programs/less.nix
|
||||
./programs/neovim.nix
|
||||
./programs/tmux.nix
|
||||
./programs/zsh
|
||||
|
||||
./services/git-maintenance.nix
|
||||
|
||||
./modules/colors.nix
|
||||
./modules/shellAliases.nix
|
||||
] ++ optionals graphics [
|
||||
|
@ -51,8 +53,8 @@ in {
|
|||
./services/copyq.nix
|
||||
];
|
||||
|
||||
sops.defaultSopsFile = ./secrets/${hostname}.yaml;
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
sops.defaultSopsFile = ../secrets/home.yaml;
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519_home_sops" ];
|
||||
|
||||
sops.secrets."nix/access-tokens" = {
|
||||
sopsFile = ../secrets/common.yaml;
|
||||
|
@ -66,7 +68,6 @@ in {
|
|||
};
|
||||
|
||||
home = {
|
||||
stateVersion = "22.05";
|
||||
username = "h7x4";
|
||||
homeDirectory = "/home/h7x4";
|
||||
|
||||
|
|
|
@ -90,12 +90,12 @@
|
|||
gnome.seahorse
|
||||
google-chrome
|
||||
inkscape
|
||||
# insomnia
|
||||
insomnia
|
||||
iwgtk
|
||||
# keybase-gui
|
||||
kid3
|
||||
koreader
|
||||
# krita
|
||||
krita
|
||||
ktouch
|
||||
libnotify
|
||||
libreoffice
|
||||
|
@ -107,7 +107,7 @@
|
|||
mopidy-youtube
|
||||
mpc_cli
|
||||
nyxt
|
||||
# obsidian
|
||||
obsidian
|
||||
# pcloud
|
||||
pwvucontrol
|
||||
# scrcpy
|
||||
|
@ -116,7 +116,7 @@
|
|||
# sublime3
|
||||
# swiPrologWithGui
|
||||
sxiv
|
||||
# tagainijisho
|
||||
tagainijisho
|
||||
|
||||
tenacity
|
||||
thunderbird
|
||||
|
|
|
@ -1,106 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
|
||||
userName = "h7x4";
|
||||
userEmail = "h7x4@nani.wtf";
|
||||
|
||||
signing = {
|
||||
key = "46B9228E814A2AAC";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
lfs.enable = true;
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
line-numbers = true;
|
||||
side-by-side = true;
|
||||
theme = "Monokai Extended Origin";
|
||||
};
|
||||
};
|
||||
|
||||
aliases = {
|
||||
aliases = "!git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'";
|
||||
delete-merged = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d";
|
||||
graph = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||
graphv = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
|
||||
forcepush = "push --force-with-lease --force-if-includes";
|
||||
authors = "shortlog --summary --numbered --email";
|
||||
switch-interactive = "!cat <(git branch) <(git branch -r) | grep -v '^\\*\\|HEAD ->' | ${pkgs.fzf}/bin/fzf --reverse --info=inline --preview 'echo {} | xargs git show --color' | sed 's|\\s*.*/||' | xargs git switch";
|
||||
si = "switch-interactive";
|
||||
rebase-author = "rebase -i -x \"git commit --amend --reset-author -CHEAD\"";
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
core = {
|
||||
whitespace = "space-before-tab,-indent-with-non-tab,trailing-space";
|
||||
untrackedCache = true;
|
||||
editor = "nvim";
|
||||
};
|
||||
|
||||
rerere.enabled = true;
|
||||
|
||||
branch.sort = "-committerdate";
|
||||
|
||||
"color \"branch\"".upstream = "cyan";
|
||||
color.ui = "auto";
|
||||
|
||||
init.defaultBranch = "main";
|
||||
fetch.prune = true;
|
||||
pull.rebase = true;
|
||||
|
||||
push = {
|
||||
default = "current";
|
||||
autoSetupRemote = true;
|
||||
followTags = true;
|
||||
};
|
||||
|
||||
merge = {
|
||||
tool = "nvimdiff";
|
||||
conflictstyle = "diff3";
|
||||
colorMoved = "zebra";
|
||||
};
|
||||
|
||||
mergetool.keepBackup = false;
|
||||
"mergetool \"nvimdiff\"".cmd = "nvim -d $BASE $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'";
|
||||
|
||||
diff = {
|
||||
mnemonicPrefix = true;
|
||||
renames = true;
|
||||
tool = "nvimdiff";
|
||||
};
|
||||
|
||||
grep = {
|
||||
break = true;
|
||||
heading= true;
|
||||
lineNumber = true;
|
||||
extendedRegexp = true;
|
||||
};
|
||||
|
||||
github.user = "h7x4";
|
||||
|
||||
"url \"github:\"".insteadOf = "https://github.com/";
|
||||
|
||||
|
||||
web.browser = "google-chrome-stable";
|
||||
|
||||
"filter \"lfs\"" = {
|
||||
required = true;
|
||||
smudge = "git-lfs smudge -- %f";
|
||||
process = "git-lfs filter-process";
|
||||
clean = "git-lfs clean -- %f";
|
||||
};
|
||||
};
|
||||
|
||||
ignores = [
|
||||
".vscode"
|
||||
".direnv"
|
||||
".envrc"
|
||||
"shell.nix"
|
||||
];
|
||||
};
|
||||
}
|
|
@ -0,0 +1,240 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.programs.git;
|
||||
|
||||
github-uri-prefixes = [
|
||||
# Preferred
|
||||
"github:"
|
||||
|
||||
# Alternative
|
||||
"https://github.com/"
|
||||
"ssh://git@github.com:"
|
||||
"git@github.com:"
|
||||
"github.com:"
|
||||
];
|
||||
in
|
||||
{
|
||||
# TODO: convert to template once nix-sops supports it in hm module
|
||||
sops.secrets."git/nordicsemi-config" = { };
|
||||
|
||||
programs.git = lib.mkMerge [
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.gitFull;
|
||||
|
||||
userName = "h7x4";
|
||||
userEmail = "h7x4@nani.wtf";
|
||||
|
||||
signing = {
|
||||
key = "46B9228E814A2AAC";
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
lfs.enable = true;
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
line-numbers = true;
|
||||
side-by-side = true;
|
||||
theme = "Monokai Extended Origin";
|
||||
};
|
||||
};
|
||||
|
||||
aliases = {
|
||||
aliases = "!git config --get-regexp alias | sed -re 's/alias\\.(\\S*)\\s(.*)$/\\1 = \\2/g'";
|
||||
delete-merged = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d";
|
||||
graph = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
|
||||
graphv = "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all";
|
||||
forcepush = "push --force-with-lease --force-if-includes";
|
||||
authors = "shortlog --summary --numbered --email";
|
||||
si = "switch-interactive";
|
||||
rebase-author = "rebase -i -x \"git commit --amend --reset-author -CHEAD\"";
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
core = {
|
||||
whitespace = "space-before-tab,-indent-with-non-tab,trailing-space";
|
||||
untrackedCache = true;
|
||||
editor = "nvim";
|
||||
};
|
||||
|
||||
safe.directory = "*";
|
||||
|
||||
rerere.enabled = true;
|
||||
|
||||
branch.sort = "-committerdate";
|
||||
|
||||
"color \"branch\"".upstream = "cyan";
|
||||
color.ui = "auto";
|
||||
|
||||
init.defaultBranch = "main";
|
||||
|
||||
fetch = {
|
||||
prune = true;
|
||||
fsckObjects = true;
|
||||
};
|
||||
|
||||
transfer.fsckObjects = true;
|
||||
|
||||
receive.fsckObjects = true;
|
||||
|
||||
pull.rebase = true;
|
||||
|
||||
rebase = {
|
||||
autoStash = true;
|
||||
autoSquash = true;
|
||||
abbreviateCommands = true;
|
||||
updateRefs = true;
|
||||
};
|
||||
|
||||
push = {
|
||||
default = "current";
|
||||
autoSetupRemote = true;
|
||||
followTags = true;
|
||||
};
|
||||
|
||||
merge = {
|
||||
tool = "nvimdiff";
|
||||
conflictstyle = "diff3";
|
||||
colorMoved = "zebra";
|
||||
};
|
||||
|
||||
mergetool.keepBackup = false;
|
||||
"mergetool \"nvimdiff\"".cmd = "nvim -d $BASE $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'";
|
||||
|
||||
diff = {
|
||||
mnemonicPrefix = true;
|
||||
renames = true;
|
||||
tool = "nvimdiff";
|
||||
submodule = "log";
|
||||
};
|
||||
|
||||
status = {
|
||||
showUntrackedFiles = "all";
|
||||
relativePaths = true;
|
||||
submoduleSummary = true;
|
||||
};
|
||||
|
||||
log.date = "iso";
|
||||
|
||||
submodule.recurse = true;
|
||||
|
||||
grep = {
|
||||
break = true;
|
||||
heading= true;
|
||||
lineNumber = true;
|
||||
extendedRegexp = true;
|
||||
};
|
||||
|
||||
# Run autocorrected command after 3 seconds
|
||||
help.autocorrect = "30";
|
||||
|
||||
github.user = "h7x4";
|
||||
|
||||
"url \"${lib.head github-uri-prefixes}\"".insteadOf = lib.tail github-uri-prefixes;
|
||||
|
||||
web.browser = "google-chrome-stable";
|
||||
|
||||
"filter \"lfs\"" = {
|
||||
required = true;
|
||||
smudge = "git-lfs smudge -- %f";
|
||||
process = "git-lfs filter-process";
|
||||
clean = "git-lfs clean -- %f";
|
||||
};
|
||||
};
|
||||
|
||||
ignores = [
|
||||
".vscode"
|
||||
".direnv"
|
||||
".envrc"
|
||||
"shell.nix"
|
||||
];
|
||||
}
|
||||
|
||||
(let
|
||||
uri-prefixes = [
|
||||
# Preferred
|
||||
"pvv-git:"
|
||||
|
||||
# Alternative
|
||||
"https://git.pvv.org/"
|
||||
"ssh://gitea@git.pvv.ntnu.no:2222/"
|
||||
"gitea@git.pvv.ntnu.no:2222/"
|
||||
"gitea@git.pvv.ntnu.no:"
|
||||
"git.pvv.ntnu.no:"
|
||||
];
|
||||
|
||||
prefixes-per-org = let
|
||||
organizations = [
|
||||
"Drift"
|
||||
"Projects"
|
||||
];
|
||||
in lib.genAttrs organizations (org: map (uri-prefix: "${uri-prefix}${org}") uri-prefixes);
|
||||
in {
|
||||
extraConfig."url \"${lib.head uri-prefixes}\"".insteadOf = lib.tail uri-prefixes;
|
||||
|
||||
includes = map (x: {
|
||||
contentSuffix = "pvv.gitconfig";
|
||||
condition = "hasconfig:remote.*.url:${x}**";
|
||||
contents = {
|
||||
user = {
|
||||
email = "oysteikt@pvv.ntnu.no";
|
||||
name = "Øystein Tveit";
|
||||
};
|
||||
};
|
||||
}) (lib.flatten (lib.attrValues prefixes-per-org));
|
||||
})
|
||||
|
||||
(let
|
||||
bitbucket-uri-prefixes = [
|
||||
# Preferred
|
||||
"bitbucket-nordicsemi:"
|
||||
|
||||
# Alternative
|
||||
"ssh://git@bitbucket.nordicsemi.no:7999"
|
||||
"https://projecttools.nordicsemi.no/bitbucket/scm"
|
||||
];
|
||||
|
||||
prefixes-per-org = let
|
||||
organizations = [
|
||||
"NordicSemiconductor"
|
||||
"NordicPlayground"
|
||||
"nrfconnect"
|
||||
];
|
||||
in lib.genAttrs organizations (org: map (uri-prefix: "${uri-prefix}${org}") github-uri-prefixes);
|
||||
in {
|
||||
extraConfig = lib.mergeAttrs
|
||||
{
|
||||
"url \"${lib.head bitbucket-uri-prefixes}\"".insteadOf = lib.tail bitbucket-uri-prefixes;
|
||||
}
|
||||
(lib.mapAttrs' (org: uri-prefixes: {
|
||||
name = "url \"github-nordicsemi:${org}\"";
|
||||
value.insteadOf = uri-prefixes;
|
||||
}) prefixes-per-org)
|
||||
;
|
||||
|
||||
includes = map (x: {
|
||||
contentSuffix = "nordicsemi.gitconfig";
|
||||
condition = "hasconfig:remote.*.url:${x}/**";
|
||||
path = config.sops.secrets."git/nordicsemi-config".path;
|
||||
}) (bitbucket-uri-prefixes ++ (lib.flatten (lib.attrValues prefixes-per-org)));
|
||||
})
|
||||
];
|
||||
|
||||
home.packages = [
|
||||
(pkgs.writeShellApplication {
|
||||
name = "git-tcommit";
|
||||
runtimeInputs = with pkgs; [ cfg.package coreutils ];
|
||||
text = lib.fileContents ./scripts/git-tcommit.sh;
|
||||
})
|
||||
(pkgs.writeShellApplication {
|
||||
name = "git-switch-interactive";
|
||||
runtimeInputs = with pkgs; [ cfg.package fzf gnused coreutils ];
|
||||
text = lib.fileContents ./scripts/git-switch-interactive.sh;
|
||||
excludeShellChecks = [
|
||||
"SC2001" # (style): See if you can use ${variable//search/replace} instead. (sed invocation)
|
||||
];
|
||||
})
|
||||
];
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
set -euo pipefail
|
||||
|
||||
if [ -n "${1:-}" ]; then
|
||||
git switch "$1"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
BRANCHES=$(cat <(git branch) <(git branch --remotes) | grep --invert-match '^\*\|HEAD ->' | sed 's|^\s*||')
|
||||
CHOSEN_BRANCH=$(fzf --reverse --info=inline --preview 'git show --color {}' <<<"$BRANCHES")
|
||||
CLEAN_BRANCH_NAME=$(sed 's|^\s*.*/||' <<<"$CHOSEN_BRANCH")
|
||||
git switch "$CLEAN_BRANCH_NAME"
|
|
@ -0,0 +1,31 @@
|
|||
set -euo pipefail
|
||||
|
||||
HOUR_SHIFT="$1"
|
||||
shift
|
||||
|
||||
if [[ $HOUR_SHIFT == -* ]]; then
|
||||
HOUR_SHIFT="${HOUR_SHIFT#*-}"
|
||||
OPERATOR="-"
|
||||
else
|
||||
OPERATOR="+"
|
||||
fi
|
||||
|
||||
DATE=$(date -d "now ${OPERATOR} ${HOUR_SHIFT} hours")
|
||||
|
||||
while true; do
|
||||
echo "Commiting with date: ${DATE} (${OPERATOR}${HOUR_SHIFT}h)"
|
||||
read -rp "Do you want to proceed? (y/n) " yn
|
||||
|
||||
case $yn in
|
||||
[yY] )
|
||||
break;;
|
||||
[nN] )
|
||||
exit;;
|
||||
* ) echo invalid response;;
|
||||
esac
|
||||
done
|
||||
|
||||
export GIT_COMMITTER_DATE="${DATE}"
|
||||
export GIT_AUTHOR_DATE="${DATE}"
|
||||
|
||||
git commit "$@"
|
|
@ -1,5 +1,21 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
cfg = config.programs.zsh;
|
||||
in
|
||||
{
|
||||
home.file."${cfg.dotDir}/.zshrc".onChange = ''
|
||||
${lib.getExe (pkgs.writeTextFile {
|
||||
name = "zsh-compinit-oneshot.zsh";
|
||||
executable = true;
|
||||
destination = "/bin/zsh-compinit-oneshot.zsh";
|
||||
text = ''
|
||||
#!${lib.getExe cfg.package}
|
||||
|
||||
autoload -Uz compinit && compinit -C -d "${config.xdg.cacheHome}/zsh/zcompdump-$ZSH_VERSION"
|
||||
'';
|
||||
})}
|
||||
'';
|
||||
|
||||
programs.zsh = {
|
||||
|
||||
enable = true;
|
||||
|
@ -12,10 +28,7 @@
|
|||
fpath+=(${pkgs.zsh-completions}/share/zsh/site-functions)
|
||||
'';
|
||||
|
||||
# TODO: Regenerate zcompdump with a systemd timer
|
||||
completionInit = ''
|
||||
autoload -Uz compinit && compinit -C -d "${config.xdg.cacheHome}/zsh/zcompdump-$ZSH_VERSION"
|
||||
'';
|
||||
completionInit = "";
|
||||
|
||||
history = {
|
||||
extended = true;
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
systemd.user.services."git-maintenance@" = {
|
||||
Unit = {
|
||||
Description = "Optimize Git repositories data";
|
||||
Documentation = [ "man:git-maintenance(1)" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = "${lib.getExe pkgs.git} for-each-repo --config=maintenance.repo maintenance run --schedule=%i";
|
||||
|
||||
LockPersonality = "yes";
|
||||
MemoryDenyWriteExecute = "yes";
|
||||
NoNewPrivileges = "yes";
|
||||
RestrictAddressFamilies = [
|
||||
"AF_UNIX"
|
||||
"AF_INET"
|
||||
"AF_INET6"
|
||||
"AF_VSOCK"
|
||||
];
|
||||
RestrictNamespaces = "yes";
|
||||
RestrictRealtime = "yes";
|
||||
RestrictSUIDSGID = "yes";
|
||||
SystemCallArchitectures = "native";
|
||||
SystemCallFilter = "@system-service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers."git-maintenance@hourly" = {
|
||||
Unit = {
|
||||
Description = "Optimize Git repositories data";
|
||||
Documentation = [ "man:git-maintenance(1)" ];
|
||||
};
|
||||
|
||||
Timer = {
|
||||
OnCalendar = "*-*-* 1..23:05:00";
|
||||
Persistent = true;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers."git-maintenance@daily" = {
|
||||
Unit = {
|
||||
Description = "Optimize Git repositories data";
|
||||
Documentation = [ "man:git-maintenance(1)" ];
|
||||
};
|
||||
|
||||
Timer = {
|
||||
OnCalendar = "Tue..Sun *-*-* 0:05:00";
|
||||
Persistent = true;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.timers."git-maintenance@weekly" = {
|
||||
Unit = {
|
||||
Description = "Optimize Git repositories data";
|
||||
Documentation = [ "man:git-maintenance(1)" ];
|
||||
};
|
||||
|
||||
Timer = {
|
||||
OnCalendar = "Mon 0:05:00";
|
||||
Persistent = true;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -13,7 +13,7 @@ in {
|
|||
sops.secrets = {
|
||||
"nix/access-tokens" = { sopsFile = ./../../secrets/common.yaml; };
|
||||
|
||||
"ssh/secret-config/global" = {
|
||||
"ssh/secret-config" = {
|
||||
sopsFile = ./../../secrets/common.yaml;
|
||||
mode = "0444";
|
||||
};
|
||||
|
@ -64,7 +64,7 @@ in {
|
|||
|
||||
programs.ssh = {
|
||||
extraConfig = ''
|
||||
Include ${config.sops.secrets."ssh/secret-config/global".path}
|
||||
Include ${config.sops.secrets."ssh/secret-config".path}
|
||||
'';
|
||||
|
||||
knownHosts = {
|
||||
|
@ -167,14 +167,13 @@ in {
|
|||
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
ark-pixel-font
|
||||
cm_unicode
|
||||
corefonts
|
||||
dejavu_fonts
|
||||
fira-code
|
||||
fira-code-symbols
|
||||
powerline-fonts
|
||||
iosevka
|
||||
symbola
|
||||
corefonts
|
||||
ipaexfont
|
||||
ipafont
|
||||
liberation_ttf
|
||||
|
@ -185,12 +184,15 @@ in {
|
|||
noto-fonts-emoji
|
||||
ocr-a
|
||||
open-sans
|
||||
powerline-fonts
|
||||
source-han-sans
|
||||
source-sans
|
||||
symbola
|
||||
texlivePackages.asana-math
|
||||
ubuntu_font_family
|
||||
victor-mono
|
||||
yasashisa-gothic
|
||||
(nerdfonts.override { fonts = [ "FiraCode" "DroidSansMono" ]; })
|
||||
inputs.fonts
|
||||
];
|
||||
|
||||
fontconfig = {
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
home.stateVersion = "24.05";
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
home.stateVersion = "24.05";
|
||||
|
||||
programs.git.extraConfig.maintenance.repo = let
|
||||
home = config.home.homeDirectory;
|
||||
in [
|
||||
"${home}/nix"
|
||||
"${home}/nixpkgs"
|
||||
"${home}/pvv/nix"
|
||||
];
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
home.stateVersion = "24.05";
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
{ pkgs, config, secrets, ... }:
|
||||
|
||||
# TODO: This kinda sucks, but nextcloud refuses to use the NFS mounted
|
||||
# drive, as it is not able to lock it properly.
|
||||
# I'll wait for a while with enabling this service, until I have gotten
|
||||
# Some proper disks into the server.
|
||||
{
|
||||
sops.secrets."nextcloud/initialPassword" = {
|
||||
restartUnits = [ "nextcloud.service" ];
|
||||
owner = "nextcloud";
|
||||
group = "nextcloud";
|
||||
};
|
||||
sops.secrets."postgres/nextcloud" = {
|
||||
restartUnits = [ "nextcloud.service" ];
|
||||
owner = "nextcloud";
|
||||
group = "nextcloud";
|
||||
};
|
||||
|
||||
services.nextcloud = {
|
||||
enable = false;
|
||||
hostName = "cloud.nani.wtf";
|
||||
https = true;
|
||||
maxUploadSize = "10G";
|
||||
package = pkgs.nextcloud25;
|
||||
|
||||
datadir = "${config.machineVars.dataDrives.default}/var/nextcloud";
|
||||
|
||||
home = "${config.machineVars.dataDrives.default}/var/nextcloud";
|
||||
|
||||
enableBrokenCiphersForSSE = false;
|
||||
|
||||
caching.redis = true;
|
||||
extraOptions = {
|
||||
redis = {
|
||||
host = config.services.redis.servers.nextcloud.unixSocket;
|
||||
port = 0;
|
||||
dbindex = 0;
|
||||
timeout = 1.5;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
defaultPhoneRegion = "NO";
|
||||
|
||||
dbtype = "pgsql";
|
||||
dbport = secrets.ports.postgres;
|
||||
dbpassFile = config.sops.secrets."postgres/nextcloud".path;
|
||||
|
||||
adminuser = "h7x4";
|
||||
adminpassFile = config.sops.secrets."nextcloud/initialPassword".path;
|
||||
};
|
||||
};
|
||||
|
||||
services.redis.servers.nextcloud = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
ensureDatabases = [ "nextcloud" ];
|
||||
ensureUsers = [{
|
||||
name = "nextcloud";
|
||||
ensureDBOwnership = true;
|
||||
}];
|
||||
};
|
||||
}
|
|
@ -152,9 +152,6 @@
|
|||
locations."/_synapse".proxyPass = "http://$synapse_backend";
|
||||
})
|
||||
(host ["madmin"] { root = "${pkgs.synapse-admin}/"; })
|
||||
# This one gets properly configured by the nextcloud module itself.
|
||||
# It just needs the cloudflare and SSL settings.
|
||||
(host ["cloud"] {})
|
||||
# (host ["cache"] { root = "/var/lib/nix-cache"; })
|
||||
# (proxy ["slack-bot"] "http://localhost:9898" {})
|
||||
(proxy ["atuin"] "http://atuin" {})
|
||||
|
|
|
@ -0,0 +1,131 @@
|
|||
{ bazel
|
||||
, buildBazelPackage
|
||||
, fcitx5
|
||||
, fetchFromGitHub
|
||||
, gettext
|
||||
, lib
|
||||
, mozc
|
||||
, nixosTests
|
||||
, pkg-config
|
||||
, python3
|
||||
, unzip
|
||||
}:
|
||||
|
||||
buildBazelPackage {
|
||||
pname = "fcitx5-mozc";
|
||||
version = "unstable-2024-02-09";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "fcitx";
|
||||
repo = "mozc";
|
||||
fetchSubmodules = true;
|
||||
rev = "c687b82fccd443917359a5c2a7b9b1c5fd3737c9";
|
||||
hash = "sha256-lXEW7F7ctI7kNdKEjdeYHbyeF8hf6C5AohoWVIfDbjM=";
|
||||
};
|
||||
|
||||
sourceRoot = "source/src";
|
||||
|
||||
nativeBuildInputs = [
|
||||
gettext
|
||||
pkg-config
|
||||
python3
|
||||
unzip
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
mozc
|
||||
fcitx5
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
sed -i -e 's|^\(LINUX_MOZC_SERVER_DIR = \).\+|\1"${mozc}/lib/mozc"|' config.bzl
|
||||
'';
|
||||
|
||||
inherit bazel;
|
||||
removeRulesCC = false;
|
||||
dontAddBazelOpts = true;
|
||||
|
||||
bazelFlags = [
|
||||
"--config"
|
||||
"oss_linux"
|
||||
"--compilation_mode"
|
||||
"opt"
|
||||
];
|
||||
|
||||
bazelTargets = [
|
||||
"unix/fcitx5:fcitx5-mozc.so"
|
||||
"unix/icons"
|
||||
];
|
||||
|
||||
fetchAttrs = {
|
||||
preInstall = ''
|
||||
rm -rf $bazelOut/external/fcitx5
|
||||
'';
|
||||
|
||||
sha256 = "sha256-OrS5/3Zasd2WXsA+kg0pzvgaKZs7DG/aKfqekxCmAL8=";
|
||||
};
|
||||
|
||||
buildAttrs = {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm444 ../LICENSE $out/share/licenses/fcitx5-mozc/LICENSE
|
||||
install -Dm444 data/installer/credits_en.html $out/share/licenses/fcitx5-mozc/Submodules
|
||||
|
||||
install -Dm555 bazel-bin/unix/fcitx5/fcitx5-mozc.so $out/lib/fcitx5/fcitx5-mozc.so
|
||||
install -Dm444 unix/fcitx5/mozc-addon.conf $out/share/fcitx5/addon/mozc.conf
|
||||
install -Dm444 unix/fcitx5/mozc.conf $out/share/fcitx5/inputmethod/mozc.conf
|
||||
|
||||
for pofile in unix/fcitx5/po/*.po; do
|
||||
filename=$(basename $pofile)
|
||||
lang=''${filename/.po/}
|
||||
mofile=''${pofile/.po/.mo}
|
||||
msgfmt $pofile -o $mofile
|
||||
install -Dm444 $mofile $out/share/locale/$lang/LC_MESSAGES/fcitx5-mozc.mo
|
||||
done
|
||||
|
||||
msgfmt --xml -d unix/fcitx5/po/ --template unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml.in -o unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml
|
||||
install -Dm444 unix/fcitx5/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml $out/share/metainfo/org.fcitx.Fcitx5.Addon.Mozc.metainfo.xml
|
||||
|
||||
cd bazel-bin/unix
|
||||
|
||||
unzip -o icons.zip
|
||||
|
||||
# These are relative symlinks, they will always resolve to files within $out
|
||||
|
||||
install -Dm444 mozc.png $out/share/icons/hicolor/128x128/apps/org.fcitx.Fcitx5.fcitx-mozc.png
|
||||
ln -s org.fcitx.Fcitx5.fcitx-mozc.png $out/share/icons/hicolor/128x128/apps/fcitx-mozc.png
|
||||
|
||||
rm {mozc,dictionary,properties,tool}.svg
|
||||
for svg in *.svg outlined/*.svg; do
|
||||
name=$(basename -- ''${svg//_/-})
|
||||
path=$out/share/icons/hicolor/scalable/apps
|
||||
prefix=org.fcitx.Fcitx5.fcitx-mozc
|
||||
|
||||
install -Dm444 $svg $path/$prefix-$name
|
||||
ln -s $prefix-$name $path/fcitx-mozc-$name
|
||||
done
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
passthru.tests = {
|
||||
inherit (nixosTests) fcitx5;
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mozc - a Japanese Input Method Editor designed for multi-platform";
|
||||
homepage = "https://github.com/fcitx/mozc";
|
||||
license = with licenses; [
|
||||
asl20 # abseil-cpp
|
||||
bsd3 # mozc, breakpad, gtest, gyp, japanese-usage-dictionary, protobuf
|
||||
mit # wil
|
||||
# naist-2003 # IPAdic
|
||||
publicDomain # src/data/test/stress_test, Okinawa dictionary
|
||||
# unicode-30 # src/data/unicode, breakpad
|
||||
];
|
||||
maintainers = with maintainers; [ berberman govanify ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,241 @@
|
|||
{ bazel
|
||||
, buildBazelPackage
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, glibcLocales
|
||||
, lib
|
||||
, pkg-config
|
||||
, python3
|
||||
, qtbase
|
||||
, qtwayland
|
||||
, ruby
|
||||
, wrapQtAppsHook
|
||||
, dictionaries ? [
|
||||
"alt-cannadic"
|
||||
"edict2"
|
||||
"jawiki"
|
||||
"neologd"
|
||||
"personal-names"
|
||||
"place-names"
|
||||
"skk-jisyo"
|
||||
"sudachidict"
|
||||
]
|
||||
}:
|
||||
|
||||
buildBazelPackage {
|
||||
pname = "mozc";
|
||||
version = "unstable-2024-02-09";
|
||||
|
||||
srcs = [
|
||||
(fetchFromGitHub rec {
|
||||
owner = "google";
|
||||
repo = "mozc";
|
||||
name = repo;
|
||||
fetchSubmodules = true;
|
||||
rev = "c2fcbf6515c5884437977de46187c16a8cb7bb50";
|
||||
hash = "sha256-AcIN5sWPBe4JotAUYv1fytgQw+mJzdFhKuVPLR48soA=";
|
||||
})
|
||||
(fetchFromGitHub rec {
|
||||
owner = "utuhiro78";
|
||||
repo = "merge-ut-dictionaries";
|
||||
name = repo;
|
||||
rev = "a3d6fc4005aff2092657ebca98b9de226e1c617f";
|
||||
hash = "sha256-UK29ACZUK9zGfzW7C85uMw2aF5Gk+0aDeUdNV71PY+0=";
|
||||
})
|
||||
(fetchFromGitHub rec {
|
||||
owner = "utuhiro78";
|
||||
repo = "mozcdic-ut-alt-cannadic";
|
||||
name = repo;
|
||||
rev = "4e548e6356b874c76e8db438bf4d8a0b452f2435";
|
||||
hash = "sha256-4gzqVoCIhC0k3mh0qbEr8yYttz9YR0fItkFNlu7cYOY=";
|
||||
})
|
||||
(fetchFromGitHub rec {
|
||||
owner = "utuhiro78";
|
||||
repo = "mozcdic-ut-edict2";
|
||||
name = repo;
|
||||
rev = "b2eec665b81214082d61acee1c5a1b5b115baf1a";
|
||||
hash = "sha256-LIpGt6xB8dLUnazbJHZk6EH1/ZyAHMIn1m6Qpr2dsHs=";
|
||||
})
|
||||
(fetchFromGitHub rec {
|
||||
owner = "utuhiro78";
|
||||
repo = "mozcdic-ut-jawiki";
|
||||
name = repo;
|
||||
rev = "6e08b8c823f3d2d09064ad2080e7a16552a7b473";
|
||||
hash = "sha256-0YwAinlcI6yojCdW1MpLgMZfyYV7gk9Q+Wlu4lR3Hrg=";
|
||||
})
|
||||
(fetchFromGitHub rec {
|
||||
owner = "utuhiro78";
|
||||
repo = "mozcdic-ut-neologd";
|
||||
name = repo;
|
||||
rev = "bf9d0d217107f2fb2e7d1a26648ef429d9fdcd27";
|
||||
hash = "sha256-e0iM5fohwpNNhPl9CjkD753/Rgatg7GdwN0NSvlN94c=";
|
||||
})
|
||||
(fetchFromGitHub rec {
|
||||
owner = "utuhiro78";
|
||||
repo = "mozcdic-ut-personal-names";
|
||||
name = repo;
|
||||
rev = "8a500f82c553936cbdd33b85955120e731069d44";
|
||||
hash = "sha256-pMyYvl5S0+U++MO5m9rmbtxDzAmO4Xs8sFewOUGqgUA=";
|
||||
})
|
||||
(fetchFromGitHub rec {
|
||||
owner = "utuhiro78";
|
||||
repo = "mozcdic-ut-place-names";
|
||||
name = repo;
|
||||
rev = "a847a02e0137ab9e2fdbbaaf120826f870408ca6";
|
||||
hash = "sha256-B0kW8Wa/nCT4KEYl2Rz6gQcj0Po3GxU6i42unHhgZeU=";
|
||||
})
|
||||
(fetchFromGitHub rec {
|
||||
owner = "utuhiro78";
|
||||
repo = "mozcdic-ut-skk-jisyo";
|
||||
name = repo;
|
||||
rev = "ee94f6546ce52edfeec0fd203030f52d4d99656f";
|
||||
hash = "sha256-RXxO878ZBkxenrdo7cFom5NjM0m7CdYQk0dFu/HPp/Y=";
|
||||
})
|
||||
(fetchFromGitHub rec {
|
||||
owner = "utuhiro78";
|
||||
repo = "mozcdic-ut-sudachidict";
|
||||
name = repo;
|
||||
rev = "55f61c3fca81dec661c36c73eb29b2631c8ed618";
|
||||
hash = "sha256-gNnBcuVU1M7rllfZXIrLg7WYUhKqPJsUjR8Scnq3Fw8=";
|
||||
})
|
||||
(fetchurl rec {
|
||||
name = "jawiki";
|
||||
url = "https://dumps.wikimedia.org/${name}/20240620/${name}-20240620-all-titles-in-ns0.gz";
|
||||
recursiveHash = true;
|
||||
hash = "sha256-p1LP8mHYknUPEB9u9CLCP1/uUjCVfb/mdpnOPawGcqQ=";
|
||||
downloadToTemp = true;
|
||||
postFetch = ''
|
||||
mkdir -p "$out"
|
||||
install -Dm444 "$downloadedFile" "$out/${name}.gz"
|
||||
'';
|
||||
})
|
||||
(fetchFromGitHub rec {
|
||||
owner = "musjj";
|
||||
repo = "jp-zip-codes";
|
||||
name = repo;
|
||||
rev = "cfbb54655223d8e2cea6fedbaef202919d8d62fe";
|
||||
hash = "sha256-ZvZL/6yTE6JrBu4ja7HvyBUKWUAIL0jULii5Im+zmLQ=";
|
||||
})
|
||||
];
|
||||
|
||||
sourceRoot = ".";
|
||||
|
||||
nativeBuildInputs = [
|
||||
glibcLocales
|
||||
pkg-config
|
||||
python3
|
||||
ruby
|
||||
wrapQtAppsHook
|
||||
];
|
||||
|
||||
buildInputs = [ qtbase qtwayland ];
|
||||
|
||||
preBuild = ''
|
||||
cd mozc/src
|
||||
'';
|
||||
|
||||
# Required so that the ruby scripts can work
|
||||
env.LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";
|
||||
env.LC_ALL = "en_US.UTF-8";
|
||||
|
||||
inherit bazel;
|
||||
removeRulesCC = false;
|
||||
dontAddBazelOpts = true;
|
||||
|
||||
bazelFlags = [
|
||||
"--config"
|
||||
"oss_linux"
|
||||
"--compilation_mode"
|
||||
"opt"
|
||||
];
|
||||
|
||||
bazelTargets = [
|
||||
"server:mozc_server"
|
||||
"gui/tool:mozc_tool"
|
||||
];
|
||||
|
||||
fetchAttrs = {
|
||||
postPatch = ''
|
||||
substituteInPlace mozc/src/WORKSPACE.bazel \
|
||||
--replace \
|
||||
'url = "https://www.post.japanpost.jp/zipcode/dl/kogaki/zip/ken_all.zip"' \
|
||||
"url = \"file://$PWD/jp-zip-codes/ken_all.zip\"" \
|
||||
--replace \
|
||||
'url = "https://www.post.japanpost.jp/zipcode/dl/jigyosyo/zip/jigyosyo.zip"' \
|
||||
"url = \"file://$PWD/jp-zip-codes/jigyosyo.zip\""
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
rm -rf $bazelOut/external/qt_linux
|
||||
'';
|
||||
|
||||
sha256 = "sha256-KTBdQte6eokKBnVlLWUOzGzwgwTVEq4qyICJhl8czJs=";
|
||||
};
|
||||
|
||||
buildAttrs = {
|
||||
postPatch = ''
|
||||
sed -ri -e "s|^(LINUX_MOZC_SERVER_DIR = ).+|\1\"$out/lib/mozc\"|" mozc/src/config.bzl
|
||||
|
||||
(
|
||||
cd merge-ut-dictionaries/src
|
||||
|
||||
sed -i -e "s|https://raw.githubusercontent.com/google/mozc/master|../../mozc|" remove_duplicate_ut_entries.rb
|
||||
|
||||
sed -i -e '/wget/d' count_word_hits.rb
|
||||
sed -i -e "s|^filename = \"jawiki-.*|filename = \"../../jawiki/jawiki.gz\"|" count_word_hits.rb
|
||||
|
||||
[[ -e mozcdic-ut.txt ]] && rm mozcdic-ut.txt
|
||||
|
||||
dictionaries=(
|
||||
${lib.escapeShellArgs dictionaries}
|
||||
)
|
||||
for name in "''${dictionaries[@]}"; do
|
||||
tar -xf ../../mozcdic-ut-$name/mozcdic-ut-$name.txt.tar.bz2
|
||||
cat mozcdic-ut-$name.txt >>mozcdic-ut.txt
|
||||
done
|
||||
|
||||
ruby remove_duplicate_ut_entries.rb mozcdic-ut.txt
|
||||
ruby count_word_hits.rb
|
||||
ruby apply_word_hits.rb mozcdic-ut.txt
|
||||
|
||||
cat mozcdic-ut.txt >>../../mozc/src/data/dictionary_oss/dictionary00.txt
|
||||
)
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm444 -t $out/share/licenses/mozc ../LICENSE
|
||||
install -Dm444 -t $out/share/licenses/mozc/Submodules data/installer/credits_en.html
|
||||
|
||||
install -Dm555 -t $out/lib/mozc bazel-bin/server/mozc_server
|
||||
install -Dm555 -t $out/lib/mozc bazel-bin/gui/tool/mozc_tool
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "The Open Source edition of Google Japanese Input bundled with the UT dictionary";
|
||||
homepage = "https://github.com/google/mozc";
|
||||
license = with licenses; [
|
||||
asl20 # abseil-cpp, merge-ut-dictionaries, mozcdic-ut-alt-cannadic,
|
||||
# mozcdic-ut-edict2, mozcdic-ut-jawiki, mozcdic-ut-neologd,
|
||||
# mecab-ipadic-neologd, mozcdic-ut-personal-names,
|
||||
# mozcdic-ut-place-names, mozcdic-ut-skk-jisyo,
|
||||
# mozcdic-ut-sudachidict
|
||||
bsd2 # japanese-usage-dictionary
|
||||
bsd3 # mozc, breakpad, gtest, gyp, japanese-usage-dictionary, protobuf, id.def
|
||||
cc-by-sa-30 # jawiki-latest-all-titles, mozcdic-ut-jawiki.txt, jawiki
|
||||
cc-by-sa-40 # mozcdic-ut-edict2.txt
|
||||
gpl2Only # mozcdic-ut-alt-cannadic.txt
|
||||
gpl2Plus # mozcdic-ut-skk-jisyo.txt
|
||||
mit # wil
|
||||
# naist-2003 # IPAdic
|
||||
publicDomain # src/data/test/stress_test, mozcdic-ut-place-names.txt, jp-zip-codes, Okinawa dictionary
|
||||
# unicode-30 # src/data/unicode, breakpad
|
||||
];
|
||||
maintainers = with maintainers; [ musjj ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -3,9 +3,7 @@ nix:
|
|||
wstunnel:
|
||||
http-upgrade-path-prefix-envvars: ENC[AES256_GCM,data:aS7Kvpj9aHtaiKZiakDuvdiDcVYFMkYv9FIH060Dbkahk6v+2bbxzgKcRtnDnLlphtGlZD7yWRcbvlYiG7Y5mRNS1X5PkspQwFKKnwGGHiWgfun9yxB6VHvPdb4W4SNA8QfRmqH4XmJUfDSPmZfh5Ggzhy7/74avC0vfqKBvQ+ml4fjqTmdS6EkFGrrUwIXFrjiCqdxnNYmp8I/L1b22R5YoY/JTsc4mG6N9s3B75GvsYI2EDG4vQ7EMyktd2CHsXJgNFRQUM+GzBbkO4VvG,iv:EbuV/2L+p4A+aloC6uQYiFFF7Lsz5A5RTGMuHMqtTpI=,tag:DThZOERbXuUdDJso7ertbg==,type:str]
|
||||
ssh:
|
||||
secret-config:
|
||||
home: ENC[AES256_GCM,data:eUfhQb6yYYV3951sdwZpA1f8k+79mm1bMYY4EP+tn1g7DEHXG9XHYKPL3FLJMkaaXSWv5jbBZ3zrGodJPMH9VbcFOjvSdz9u56DnmyeR3S7Pwgj1YbELDn9akeVRpjcB1w2k8hn2vNIY1MV4vg==,iv:LQpS168sxPVegrlPJNZrVZE+GsZAMxRSl4EaHO6FFxg=,tag:w5SNj7LkYd+22SbLVbtsDQ==,type:str]
|
||||
global: ""
|
||||
secret-config: ""
|
||||
nix-builders:
|
||||
bob:
|
||||
key: ENC[AES256_GCM,data:CfzF32ELxePyls+JgxLRN3HeIyRGnH5G5MRuL23YGZ5DqBqjIjgoL64zzHB2tIn9D8RjUzmYxU7y70mwoej0V/Vr3qHtUkv2tC+XXw0uN4Be9n5iMo52Ovi+ZE4BVkKE94Y98YZtr0IbbjmgYAj+FS30lfld1KydKfmQUhzijIX8zUchL3spFwdxZSFQv2skXetEu9eIGMYeSTd7CSNk72zVONaW5s0cdKH0iLcO27CyzB3qArdn27gBbgn0rHvoaEvEMJGz4h4RHjk+JIU9+PKEqU8LMZOSYmD2wumX9W4s2L+YC5b5CDUvHaP0+n2bilpYCRuBlWMIzrNgkKyszVeNL+UnDM2nl1pF+ymapyrfyOGALuBoFd61uqE94/cCX21DAEB6E7SZtkQI/inKk1Wm7rvKEmTCjpHRNLf2J5i1IeePeHp1/ODHTfWZogtxh/SjpsR/ioGbt2X5yUvX+Xb6Ks35YwNyxVyXYV5azD60oQF/FSFwqNqRiNX/UE7a+FDwFgDoPleDOvJcv/35QZM6c9xYfWtUioKc,iv:LPQ+eJNeuL0SQRr1crRR2t4nZSanOihNrUK0mtdI3so=,tag:GjTZ+VbxYAqNDVg9m3IDVw==,type:str]
|
||||
|
@ -25,51 +23,60 @@ sops:
|
|||
- recipient: age1c92j4w0gqh32hwssl5m2mfrggssxax9pge8qxwytv9lmrnfttcvqdrgsst
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRTis4dldlaGJmVjN3dUU0
|
||||
UHZHaXRHWU9wRWo5OVlVRitnV1NrKzBxb1RzCjhhMWxzbGczdDNmSTUvZis5SWp5
|
||||
b2lTNC9MTFRDSnl2UGVoTjRoRFFSaEUKLS0tIFZkNEk2aGIwZm1XR1BJYUNkZE8z
|
||||
U0RoMVNmUGwrV0J0UlJTK2ppdzNDMlUKaUuklGVibBHi4OAowm5vwZHTVapcCgfN
|
||||
y7r2/9aDZ5BGsLu2syTnEaRvbvTwABUUbwLlVR0a27xdvn81m0G5sA==
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSAweE1kMlFnZVZxZ0dhblVn
|
||||
SjBrU3lUSlFtL2lCWm1VRUtocTdCWVg2aUJFCmc5dEJNdlpGSnFJSjhCNEZmQVc2
|
||||
VVplaldBUlV6TSt1V0lJdTNGWEJpL0kKLS0tIGVhVng4c28wVTdpVXdrdll6N3dj
|
||||
S0N3UldMUWl3VTBBajZkbTFQSzJVNzQKkjgkwjVL3tTJGL4raaRRAflyen6lrCjf
|
||||
qIDU6yVaRPoeg4PMQyjT8B7Lvw/MAAir+v4dO+Wq+026YwEqasWmRg==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age1eu2a6m3adakfzelfa9pqpl74a5dz0wkyr0v7gegm5ajnx7aqmqcqsp2ftc
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBRMFFZbk14YnJvcWNLNGV3
|
||||
NUhhMXpRWEhoRXZqaDNEMnF0YjYrMWxQTlV3CjBNUEpUeHpiWEVwMHFSMHlNVXNC
|
||||
V1JxTDhhSWtIcjc2c2NwTWxLS1gxVk0KLS0tIDZFb2hzdEdNbkNkYmxieVVUdmV4
|
||||
WDdGRUtDWmxIRkNDM0FjMWdFdXFDSDAKPbMyMqNDmpA92Gzpafd3Z+H85Gn/OSz+
|
||||
GZ1IpfWSdF9RWRmuHxGIqiNXK53Us+YR7GVhqduwY0ueAh3wMCYyGw==
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB4RStsMFU2VkJzelpSMnZr
|
||||
VEd0ZTYvMG9rbGtTellidnhBU3ZqSXJyOGl3ClJEOXdlVXBIZStIZkF1aHVqM1Jr
|
||||
RVI1WXhCWVo4ODZRR3dXdDBSWE4xckUKLS0tIGtjNXJmYSszTVRQcDlmWnlwZ0pL
|
||||
MXlQczBBZVpYdzhoRmowZHdiUWN0WWsKTf3WPqKO68UkgJiaN2WpiKqzRhlrfZB2
|
||||
XX1g3GzOXBubWsbJXM7ibxSWhZj2XRIZF3i4kkLpaIF/wB+df0iagQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
- recipient: age179y7apa80p9unvyjtsphpzyhve90ex986vlxkx43xt9n6m7en3csqnug7c
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA3eml4UFJ1dVdmUjROZGxv
|
||||
akRzWmV2ZWlNak9IV2hVUnI1YW5Nazk5RzJVCm5ab0YwQTdUWlU5OW9nTlI4N2pK
|
||||
RXBrQWhYN29OSEVCL21MZ25ZRXN4VjAKLS0tIE5WM2xkaVY0bEVwVUNsUXdnU0ta
|
||||
UllPc1JCTXoxUERMM05abjhnR0g0d2sK/wyBVH6Dxris4TF05POtYQbWj4DWOeID
|
||||
RAdf30dDVtmg4qPwsHiIQ8f10gA1DrgIrcae0JS5VZcRLRw5/4+g9Q==
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB3RVIzVFlVVDdqU2tFZ3lD
|
||||
T2NtdjBabmU1cVc3QlRkWnU5ZldodmlHZkJRCjZIcFllSGVoSEVtUkFFVXI1eXd6
|
||||
cjhRbVhLM25HQjlobnNOK0ZiNGE3R1EKLS0tIGdES2I4Y3ZCWWtOVkNyZDZ3V0d3
|
||||
V3NFU3ZuUjFxeHNyUGZXdW9aUElKM1UKutap6vQBYUAuDrnFKBa1J6PcjeTV03a1
|
||||
G6+jlJsBhMlUkiavWiqZ4JuGtSF3tCPZwf+NzuOZfGfjD3YOVHqY/w==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-06-28T13:06:09Z"
|
||||
mac: ENC[AES256_GCM,data:H19kxVh+pcjGhD78WHQYMGQ/0HY/F4NF6sYCvjn4hqPfFTJDDcVJ7QFxm2LL4Zz/+KNcI3qvnXO/g/MyaVxyJMyKC9LFwHT/0TwMRW1uHSBahPASFYvN0/h+6hp6TI9/DPeWjKEGk+1j1tU665YpnqYdOtRUfQEB02fmLf2jSiw=,iv:b0b4m/SlGNXBQ3ulLhbSHngSLZiFipPV+yAD6MG8vAo=,tag:B3oHJkWlFpY+g6dVkApDMw==,type:str]
|
||||
- recipient: age10f4a5acpar8vwz3v298r3nv7gggfpmyh4wxpkc2hwq9paq0scf8qee8lau
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBJelFCVGo4L0QrUnNqdWRm
|
||||
cTR4TnJNdGx5SE82cEYzMk9ybmVzeUQ1MHlJCmFEbXZCVFBQUmVFMXFlVnQ1OFdI
|
||||
R0RDNU5XYVNUbmRZSUJUU1VQQk1SdlEKLS0tIG02Q0dIdlJiRWt2cFJTN1VSbTVW
|
||||
MGo3NEZyVlVWUDlVdGZyT2dVV3lxeUEKZGLbJ/PAmHdzfUfDvAQD/Nq179ooElth
|
||||
mfF8FLeFoydSYAxXCDAw/JgjUPXckyjPXEjo3dnSBVec1Q6qHhPBpQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-07-08T12:29:09Z"
|
||||
mac: ENC[AES256_GCM,data:z7J2kMlnqp6RJJj//O8j8W6O7HJkTGAbW0LW4Z6F4m0Fj18bylMQJ7kbNmf7mK5PHnItdHFnWJ/kY1vaXN7gD1SJccZ+jJcWI+nR3i5nr5GpQKoVlB1zYvBir5+CY6C7jJHpJim8WhfXG/hagSZrJ8Hz3hQon8j377g4XSTaHm0=,iv:2kg8iBuv3FWbWs3E5l5XTXzZ8i3tGCAK/PhJI4zWnNI=,tag:a/gNiM7zDqdf/arYNGeAIQ==,type:str]
|
||||
pgp:
|
||||
- created_at: "2024-06-26T07:42:59Z"
|
||||
- created_at: "2024-07-08T12:38:34Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA0av/duuklWYAQ//UQlQMjOkq53Ic8HTVTF+1594HNJKq75t6ewgSNVJy0yd
|
||||
spwqbnmZooQRvhK0ewnFQMldmsD/7NwnLJmV/ARUaJJRXGTltWnh5oxvPKB7b4Qw
|
||||
9oxk8gOPyiBHq/oBMsrS1F5uYRd+/HliHcKR37PdXchEpy1CzuASjJ8fv+pUCy/1
|
||||
jiuHiZEK5yLhjAMb7UsXVZXit1jP+VMBZJk3qzTXTRqewF+Rea2P6BXo5RQAyF9M
|
||||
xv6q+SItFPHglmyzkHvO1gg7lisohTY9fv51M9tcmPtUWnAeGywik8xT2RA5l5w2
|
||||
WPf7g0QIqWC6FmybsWdcBAWJCGKvsfCveEtY5J+29BYfCkPlhuKmou8CZwzIB66p
|
||||
AsQMmu8JwbGSEYe78r/zy379ybQ/H7j/8uGDsJmAJqKvJfG1o6QsAlpj+fSoSU/5
|
||||
k9E5OyEdRyws4W1CoaAvyTML8gSXBXpA9oIZx5WYYh6mJ+ETNfDlaIAGXY2Sbdr+
|
||||
IGkLhvGETQGbCW4EZB0hDEE3QmzNolYR6YybL74HtGQT2XOWg0+UkTZZ1ZRw+jHk
|
||||
bY6XQbloTQpSI6tFCGq5hQeVQDH17lTb/sEh0qAZkdAguvUgPlO6PHV5cS3SXAS7
|
||||
Ga7vllL8VOq/dbJ5ll7xbnxwBxkDrVqu2fCnS9L3P/biteafB/d0gRhjhFEhaUHS
|
||||
XAGVZdphiKbcydow/ucviT2TlZVmi7yWLcfk+uEPxf0mb5FMFRSasSmAvp4b7Wcz
|
||||
lNBuJPjOnYrkootAaLSUAdMukfAin1HGWxmINsybPzuPFlTxR3RSgjBQn/2w
|
||||
=kNmC
|
||||
hQIMA0av/duuklWYARAAvyl5qLP6x5yEGccj6rvoDwvY4G28bFKu5J+xS9UnKp5O
|
||||
/ANlKgglGGJ3Sym2Mya4g9Lr49GmZDXSSWcWyktTbn8m1zL4bNdwVyRLLzCthYuG
|
||||
piZeFgzzlAve2rUT38QvTjeLqPgmAtoUGgkLzjl7kWJ3a28Fdx4BaGqKdFgd3u/J
|
||||
ZjTudSRj6xOUv/9qyh/bs6eT4vJYZxMf31n3Y+v5njnWPWTxYb2EgtBdH/KM/uuB
|
||||
gcFQRtBWHKhaNNDQpHZ8nKivFhyyzmkW98FkGX53+RjdkxtS1PznbpkQDR/HDfBJ
|
||||
R+a09EAc0ac/0A++KGLR2UQ5szpGsiYrTrcGFrd8diCBOUMeszRxPgTWQK0PdRli
|
||||
UP12HHHwESmzeZCji/gjsa31c+4fCdyEoHm924/Z+OhVoC2R+oGU+sVDBpLrPSKa
|
||||
Y9EPRmjF63oUm9QIELomke61ylswET372RQyBOOHw2dsPq8AK02wmMKkyHnMN/wG
|
||||
Dhjv+rti97h42xe5X6q/UC2yis5YWB17Zhf51zo1XujB40TFAwQfhfh3F1s1+dKj
|
||||
aVoyvEp5Fk7ryY4YN/D7Eq1qJfwE73ycwoLcZvkeNzIf3839vQJ5ferWkATeQ3qm
|
||||
f8mb/uhQzxMYJsUcBz9UzMVzX5t7WNo3zAWddnHg1/WypbPi2ettn4C9lXYLV27S
|
||||
XAHSfXSeC2ylzWVQeWESFd2U+/8kkYNsv0g5f97ktF7e4PV+F/4Xz2Mc30iAJ4AE
|
||||
3jbC0rVpmBmQeo4OkiyuPT5LEwdEzNQXXBTqdUTuF+LEK6ORUyAY72jRWRkX
|
||||
=n0Ia
|
||||
-----END PGP MESSAGE-----
|
||||
fp: F7D37890228A907440E1FD4846B9228E814A2AAC
|
||||
unencrypted_suffix: _unencrypted
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
git:
|
||||
nordicsemi-config: ENC[AES256_GCM,data:ziuM41RTsxkiutxjj8Pl5YuoETkxQNWEbGKd2Y99E0kTV9fL67g+YeGjeVFXErraeB/+jBVpjitK3lSHxlpxZLWckZ0G6A7NAFNagY9cORCFlLb+egyKb44xu8vBt4V5eA==,iv:yG06oluENc038cm5A9tpmSQtaGjd6nYDi/FnBd3A8Rk=,tag:ky6bCsYLOZmWObHnJ816Zw==,type:str]
|
||||
ssh:
|
||||
secret-config: ""
|
||||
sops:
|
||||
kms: []
|
||||
gcp_kms: []
|
||||
azure_kv: []
|
||||
hc_vault: []
|
||||
age:
|
||||
- recipient: age10f4a5acpar8vwz3v298r3nv7gggfpmyh4wxpkc2hwq9paq0scf8qee8lau
|
||||
enc: |
|
||||
-----BEGIN AGE ENCRYPTED FILE-----
|
||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBEN09QV2FpRUFzQW5oSnUx
|
||||
V1FTa0RZK0Juek1aNWNzZm1TR255YzJOWlFjCmNDSXhLbkxNZGMyOGxNaWxoUkxp
|
||||
c2RON3RCNGV1ZnM4SEVHaHluOFNidUkKLS0tIDdJTlhsVWpLMXJ0UkNRNVlQUnd0
|
||||
QllyaVlIVEVrSlJDZzlwdFpoRlg3bmsKYBGLYmsfFu6GuRUPGsS0+vkUv1QzJXZl
|
||||
D9CFcRQw0Xzti0DvDj7cWrCJ32F1eYRp/9LWyG1CEjfoNEKyUJZ2qQ==
|
||||
-----END AGE ENCRYPTED FILE-----
|
||||
lastmodified: "2024-07-08T13:25:35Z"
|
||||
mac: ENC[AES256_GCM,data:JUYECqv5+wtAhDWr+2pNSh/EXhh/gjjUFCjC6oH+3cXpZHacg23S/D5ol6nIXKH1+XUFaIX10YQOC0WaciZUcfgCP4t01MJRB3OE1iYcGllyeP+9gEIKfoeEajHVQdYWZHUql7T4EnQWs74uHiF7nt6jALnp98Wc4Pny6xvvZds=,iv:gDr7O566etB9oYAJB1RIK1PQJIc1NVcIlhZISidVmlA=,tag:bQ1iC1Xi5A+VbBgunHt02w==,type:str]
|
||||
pgp:
|
||||
- created_at: "2024-07-08T12:27:24Z"
|
||||
enc: |-
|
||||
-----BEGIN PGP MESSAGE-----
|
||||
|
||||
hQIMA0av/duuklWYARAAvygqGcBQohvHxwGMjDqwaYxVOLHUCY+EWdQYCGlhvJ9o
|
||||
kdmrwJs8coePs2CBGq98Yo6LuplI9ArTjAsSSG8dYXC8LR51ts++XHkqoSMsEQdO
|
||||
CF4DonDNy1+goHgScM2JBgVij+zUd1SumJHiuXdCu9MsNMoo1pIjE9xTTQiYutx7
|
||||
gz6Q4AITBmjqZgfxjNWLXq7iuIFiu5YEiluc7TP+FUfabOljQCzbmYHg7f/7ZpCM
|
||||
pEko4fdRRwqCrdzjHAmoUXbqy0yU67yoK0fBFu6wnrZOFk/nSzgEelnSb0kx9z88
|
||||
aET6NuLbZa0I72Z9xEcpECdRNSGRt/UXFIKBR0JyNmBLhZcERq3Tm7zG72Cmmi8g
|
||||
jL6oPTfi0B0nv7nLWXCj8kHFFDI0Ck5H6ZlQ5y7Tu/VTuNnrdoHwn/hCh0b25Y9s
|
||||
uJZuVpO2l/W6sb3Db6u/eeMvy8by1vvvFDEj75zKyImPP4bbn4nlJyu4qJ8scefX
|
||||
5y97DbXmsssEgOgogojf6JKfyJ53Xy4/ROEnje9S+nrNlgQJKUrP2JVkppq357os
|
||||
R6z5mZJAR5LkQ7nC0hkxvbGDyRys8qEIXgyzzPcx/imepH4H92v3X5xTcWmue3QO
|
||||
GPGXty45HVNXQM05q7UrAXOf50a0IZFnYeVD1f0swVd/Fc1WDeDxXWmhgcgxPXzS
|
||||
XgETKOrQh/7hefJqaeDNT4KTZ/Bnkz1gul1n+BsMSkd8sa9sXQNB2JMwhNQFSdcP
|
||||
C011agjjx0BkUHArCFbGbCaXnFlB8nuC1xJDZ9US/IEUF5hy4Ozu1LJHJuF20dw=
|
||||
=H2VJ
|
||||
-----END PGP MESSAGE-----
|
||||
fp: F7D37890228A907440E1FD4846B9228E814A2AAC
|
||||
unencrypted_suffix: _unencrypted
|
||||
version: 3.8.1
|
Loading…
Reference in New Issue