Fix pre-commit-checks
This commit is contained in:
parent
e0c046d5cd
commit
f2b0ff5abb
|
@ -157,13 +157,13 @@ in {
|
||||||
(import ./roles/state.nix "default")
|
(import ./roles/state.nix "default")
|
||||||
];
|
];
|
||||||
hera.default = makeConfig "hera" (on-my-machines
|
hera.default = makeConfig "hera" (on-my-machines
|
||||||
++ [
|
++ [
|
||||||
./roles/fetch-banking-timer.nix
|
./roles/fetch-banking-timer.nix
|
||||||
./roles/weechat
|
./roles/weechat
|
||||||
./roles/mail-sort.nix
|
./roles/mail-sort.nix
|
||||||
./roles/mail2rss.nix
|
./roles/mail2rss.nix
|
||||||
./roles/headless-mpd.nix
|
./roles/headless-mpd.nix
|
||||||
./roles/headless.nix
|
./roles/headless.nix
|
||||||
./roles/create-plans.nix
|
./roles/create-plans.nix
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,14 +20,12 @@
|
||||||
inherit
|
inherit
|
||||||
(pkgs)
|
(pkgs)
|
||||||
# web
|
# web
|
||||||
|
|
||||||
chromium
|
chromium
|
||||||
mumble
|
mumble
|
||||||
upower
|
upower
|
||||||
speedtest-cli
|
speedtest-cli
|
||||||
acpi
|
acpi
|
||||||
# tools & office
|
# tools & office
|
||||||
|
|
||||||
feh
|
feh
|
||||||
gimp
|
gimp
|
||||||
imagemagick
|
imagemagick
|
||||||
|
@ -40,7 +38,6 @@
|
||||||
beets
|
beets
|
||||||
zbar
|
zbar
|
||||||
# media
|
# media
|
||||||
|
|
||||||
ncpamixer
|
ncpamixer
|
||||||
pavucontrol
|
pavucontrol
|
||||||
playerctl
|
playerctl
|
||||||
|
|
|
@ -33,9 +33,12 @@
|
||||||
inherit
|
inherit
|
||||||
(pkgs)
|
(pkgs)
|
||||||
rust-analyzer
|
rust-analyzer
|
||||||
taplo # toml
|
taplo
|
||||||
nil # nix
|
# toml
|
||||||
texlab # latex
|
nil
|
||||||
|
# nix
|
||||||
|
texlab
|
||||||
|
# latex
|
||||||
lean
|
lean
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
;
|
;
|
||||||
|
@ -97,88 +100,61 @@ in {
|
||||||
inherit
|
inherit
|
||||||
(pkgs.vimPlugins)
|
(pkgs.vimPlugins)
|
||||||
# coc-tabnine (TODO: Why doesn‘t it work?)
|
# coc-tabnine (TODO: Why doesn‘t it work?)
|
||||||
|
|
||||||
# TODO: tabnine config in home-manager
|
# TODO: tabnine config in home-manager
|
||||||
|
|
||||||
# TODO: tabnine lsp: nix, rust, pandoc/latex lsp? was noch?
|
# TODO: tabnine lsp: nix, rust, pandoc/latex lsp? was noch?
|
||||||
|
|
||||||
# ===
|
# ===
|
||||||
|
|
||||||
# Basic IDE plugins
|
# Basic IDE plugins
|
||||||
|
|
||||||
coc-nvim
|
coc-nvim
|
||||||
airline
|
airline
|
||||||
# same word highlighting when not supported by language
|
# same word highlighting when not supported by language
|
||||||
|
|
||||||
coc-highlight
|
coc-highlight
|
||||||
coc-explorer
|
coc-explorer
|
||||||
# searches
|
# searches
|
||||||
|
|
||||||
coc-fzf
|
coc-fzf
|
||||||
fzf-vim
|
fzf-vim
|
||||||
# general whitespace
|
# general whitespace
|
||||||
|
|
||||||
vim-trailing-whitespace
|
vim-trailing-whitespace
|
||||||
vim-autoformat
|
vim-autoformat
|
||||||
# Git
|
# Git
|
||||||
|
|
||||||
coc-git
|
coc-git
|
||||||
# statusline, numberline and explorer infos
|
# statusline, numberline and explorer infos
|
||||||
|
|
||||||
fugitive
|
fugitive
|
||||||
# various git commands
|
# various git commands
|
||||||
|
|
||||||
# Commenting and Uncommenting
|
# Commenting and Uncommenting
|
||||||
|
|
||||||
nerdcommenter
|
nerdcommenter
|
||||||
# Theme
|
# Theme
|
||||||
|
|
||||||
papercolor-theme
|
papercolor-theme
|
||||||
vim-airline-themes
|
vim-airline-themes
|
||||||
LanguageTool-nvim
|
LanguageTool-nvim
|
||||||
vim-css-color
|
vim-css-color
|
||||||
vista-vim
|
vista-vim
|
||||||
# ===
|
# ===
|
||||||
|
|
||||||
# Languages
|
# Languages
|
||||||
|
|
||||||
# haskell syntax highlighting
|
# haskell syntax highlighting
|
||||||
|
|
||||||
haskell-vim
|
haskell-vim
|
||||||
vim-hoogle
|
vim-hoogle
|
||||||
# nix syntax highlighting
|
# nix syntax highlighting
|
||||||
|
|
||||||
vim-nix
|
vim-nix
|
||||||
vim-markdown
|
vim-markdown
|
||||||
# latex
|
# latex
|
||||||
|
|
||||||
vimtex
|
vimtex
|
||||||
coc-vimtex
|
coc-vimtex
|
||||||
# not sure if I need two
|
# not sure if I need two
|
||||||
|
|
||||||
# ledger
|
# ledger
|
||||||
|
|
||||||
vim-ledger
|
vim-ledger
|
||||||
# rust
|
# rust
|
||||||
|
|
||||||
coc-rls
|
coc-rls
|
||||||
# python
|
# python
|
||||||
|
|
||||||
coc-python
|
coc-python
|
||||||
# css
|
# css
|
||||||
|
|
||||||
coc-css
|
coc-css
|
||||||
# yaml
|
# yaml
|
||||||
|
|
||||||
coc-yaml
|
coc-yaml
|
||||||
# json
|
# json
|
||||||
|
|
||||||
coc-json
|
coc-json
|
||||||
# html
|
# html
|
||||||
|
|
||||||
coc-html
|
coc-html
|
||||||
# dhall
|
# dhall
|
||||||
|
|
||||||
dhall-vim
|
dhall-vim
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,11 +8,11 @@ with lib; let
|
||||||
weechat = pkgs.wrapWeechat pkgs.weechat-unwrapped {
|
weechat = pkgs.wrapWeechat pkgs.weechat-unwrapped {
|
||||||
configure = {availablePlugins, ...}: {
|
configure = {availablePlugins, ...}: {
|
||||||
plugins = builtins.attrValues (availablePlugins
|
plugins = builtins.attrValues (availablePlugins
|
||||||
// {
|
// {
|
||||||
python =
|
python =
|
||||||
availablePlugins.python.withPackages
|
availablePlugins.python.withPackages
|
||||||
(_: [pkgs.weechatScripts.weechat-matrix]);
|
(_: [pkgs.weechatScripts.weechat-matrix]);
|
||||||
});
|
});
|
||||||
scripts = [pkgs.weechatScripts.weechat-matrix];
|
scripts = [pkgs.weechatScripts.weechat-matrix];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -74,12 +74,12 @@ in {
|
||||||
[server]
|
[server]
|
||||||
${
|
${
|
||||||
lib.concatStringsSep "\n" (lib.mapAttrsToList
|
lib.concatStringsSep "\n" (lib.mapAttrsToList
|
||||||
(server: serverConfig: ''
|
(server: serverConfig: ''
|
||||||
${server}.address = "${serverConfig.address}"
|
${server}.address = "${serverConfig.address}"
|
||||||
${server}.autoconnect = on
|
${server}.autoconnect = on
|
||||||
${server}.username = "${serverConfig.user}"
|
${server}.username = "${serverConfig.user}"
|
||||||
${server}.password = "${serverConfig.password}"
|
${server}.password = "${serverConfig.password}"
|
||||||
'') (pkgs.privateValue {} "weechat/matrix"))
|
'') (pkgs.privateValue {} "weechat/matrix"))
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,10 +2,7 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
emanote_commit = (builtins.fromJSON (builtins.readFile ../../nix/sources.json)).emanote.rev;
|
|
||||||
emanote = builtins.getFlake "github:srid/emanote/${emanote_commit}";
|
|
||||||
in {
|
|
||||||
imports = [emanote.homeManagerModule];
|
imports = [emanote.homeManagerModule];
|
||||||
services.emanote = {
|
services.emanote = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -14,6 +11,6 @@ in {
|
||||||
notes = [
|
notes = [
|
||||||
"${config.home.homeDirectory}/git/notes" # add as many layers as you like
|
"${config.home.homeDirectory}/git/notes" # add as many layers as you like
|
||||||
];
|
];
|
||||||
package = emanote.packages."${builtins.currentSystem}".default;
|
package = pkgs.emanote;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
18
home.nix
18
home.nix
|
@ -3,12 +3,12 @@ let
|
||||||
modes = import home-manager/machines.nix;
|
modes = import home-manager/machines.nix;
|
||||||
in
|
in
|
||||||
lib.listToAttrs (lib.flatten (lib.mapAttrsToList
|
lib.listToAttrs (lib.flatten (lib.mapAttrsToList
|
||||||
(
|
(
|
||||||
host:
|
host:
|
||||||
lib.mapAttrsToList
|
lib.mapAttrsToList
|
||||||
(mode: config: {
|
(mode: config: {
|
||||||
name = "${host}-${mode}";
|
name = "${host}-${mode}";
|
||||||
value = config;
|
value = config;
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
modes))
|
modes))
|
||||||
|
|
|
@ -1,4 +1,16 @@
|
||||||
{
|
{
|
||||||
|
"emanote": {
|
||||||
|
"branch": "master",
|
||||||
|
"description": "Spiritual successor to neuron, based on Ema.",
|
||||||
|
"homepage": "https://emanote.srid.ca",
|
||||||
|
"owner": "srid",
|
||||||
|
"repo": "emanote",
|
||||||
|
"rev": "3300092d40c9092e33a6b22e53a30a2a82796138",
|
||||||
|
"sha256": "0zfr6lcab9cy5qrympyrqga2z1v2fs7dqcfb2jfr5vmm3mlfywdj",
|
||||||
|
"type": "tarball",
|
||||||
|
"url": "https://github.com/srid/emanote/archive/3300092d40c9092e33a6b22e53a30a2a82796138.tar.gz",
|
||||||
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
|
},
|
||||||
"hexa-nur-packages": {
|
"hexa-nur-packages": {
|
||||||
"branch": "master",
|
"branch": "master",
|
||||||
"description": "My personal NUR repository: [maintainer=@mweinelt] ",
|
"description": "My personal NUR repository: [maintainer=@mweinelt] ",
|
||||||
|
|
|
@ -96,10 +96,10 @@ in {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// lib.listToAttrs (map (name: {
|
// lib.listToAttrs (map (name: {
|
||||||
inherit name;
|
inherit name;
|
||||||
value = {serviceConfig.Type = "oneshot";};
|
value = {serviceConfig.Type = "oneshot";};
|
||||||
})
|
})
|
||||||
backupJobNames);
|
backupJobNames);
|
||||||
services = {
|
services = {
|
||||||
postgresql = {
|
postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -45,7 +45,7 @@ in {
|
||||||
cert = "${key_dir}/fullchain.pem";
|
cert = "${key_dir}/fullchain.pem";
|
||||||
static-auth-secret =
|
static-auth-secret =
|
||||||
(pkgs.privateValue {turn_shared_secret = "";}
|
(pkgs.privateValue {turn_shared_secret = "";}
|
||||||
"matrix/server-secrets")
|
"matrix/server-secrets")
|
||||||
.turn_shared_secret;
|
.turn_shared_secret;
|
||||||
realm = fqdn;
|
realm = fqdn;
|
||||||
listening-ips = [config.m-0.hosts.hera config.m-0.hosts.hera-v4];
|
listening-ips = [config.m-0.hosts.hera config.m-0.hosts.hera-v4];
|
||||||
|
|
|
@ -20,21 +20,21 @@
|
||||||
Matrix = {
|
Matrix = {
|
||||||
Mappings = [
|
Mappings = [
|
||||||
(default_mailbox
|
(default_mailbox
|
||||||
// {
|
// {
|
||||||
MailboxName = "notify";
|
MailboxName = "notify";
|
||||||
MatrixRoomId = "!kTKVQjRwxjaoMQmcve:maralorn.de";
|
MatrixRoomId = "!kTKVQjRwxjaoMQmcve:maralorn.de";
|
||||||
})
|
})
|
||||||
(default_mailbox
|
(default_mailbox
|
||||||
// {
|
// {
|
||||||
MailboxName = "subjects";
|
MailboxName = "subjects";
|
||||||
MatrixRoomId = "!kTKVQjRwxjaoMQmcve:maralorn.de";
|
MatrixRoomId = "!kTKVQjRwxjaoMQmcve:maralorn.de";
|
||||||
IgnoreBody = true;
|
IgnoreBody = true;
|
||||||
})
|
})
|
||||||
(default_mailbox
|
(default_mailbox
|
||||||
// {
|
// {
|
||||||
MailboxName = "weather";
|
MailboxName = "weather";
|
||||||
MatrixRoomId = "!ELeFcSrHXgMqOmwnxg:maralorn.de";
|
MatrixRoomId = "!ELeFcSrHXgMqOmwnxg:maralorn.de";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
Misc = {Debug = true;};
|
Misc = {Debug = true;};
|
||||||
|
|
|
@ -19,15 +19,16 @@
|
||||||
fonts = builtins.attrValues {
|
fonts = builtins.attrValues {
|
||||||
inherit
|
inherit
|
||||||
(pkgs)
|
(pkgs)
|
||||||
nerdfonts # For all my terminal needs.
|
nerdfonts
|
||||||
|
# For all my terminal needs.
|
||||||
libertinus # nice text font
|
libertinus
|
||||||
|
# nice text font
|
||||||
material-icons # icons in my app
|
material-icons
|
||||||
|
# icons in my app
|
||||||
b612 # sans font, very good for displays
|
b612
|
||||||
|
# sans font, very good for displays
|
||||||
noto-fonts # for unicode fallback
|
noto-fonts
|
||||||
|
# for unicode fallback
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -39,9 +40,9 @@
|
||||||
font_sources = map (v: v.src) (lib.filter (v: v ? src) config.fonts.fonts);
|
font_sources = map (v: v.src) (lib.filter (v: v ? src) config.fonts.fonts);
|
||||||
in
|
in
|
||||||
builtins.listToAttrs (lib.imap0
|
builtins.listToAttrs (lib.imap0
|
||||||
(n: source:
|
(n: source:
|
||||||
lib.nameValuePair "src-cache/fonts/${toString n}" {
|
lib.nameValuePair "src-cache/fonts/${toString n}" {
|
||||||
inherit source;
|
inherit source;
|
||||||
})
|
})
|
||||||
font_sources);
|
font_sources);
|
||||||
}
|
}
|
||||||
|
|
|
@ -378,26 +378,26 @@ in {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
++ (map
|
++ (map
|
||||||
(minutes: {
|
(minutes: {
|
||||||
alias = "Warnung bei ${minutes} Minuten offenem Fenster oder offener Tür";
|
alias = "Warnung bei ${minutes} Minuten offenem Fenster oder offener Tür";
|
||||||
trigger =
|
trigger =
|
||||||
map
|
map
|
||||||
(name:
|
(name:
|
||||||
triggers.stateTrigger name
|
triggers.stateTrigger name
|
||||||
// {
|
// {
|
||||||
to = "on";
|
to = "on";
|
||||||
for = "00:${minutes}:00";
|
for = "00:${minutes}:00";
|
||||||
})
|
})
|
||||||
fenster;
|
fenster;
|
||||||
#condition = {
|
#condition = {
|
||||||
# condition = "numeric_state";
|
# condition = "numeric_state";
|
||||||
# entity_id = "weather.dwd_darmstadt";
|
# entity_id = "weather.dwd_darmstadt";
|
||||||
# attribute = "temperature";
|
# attribute = "temperature";
|
||||||
# below = 15;
|
# below = 15;
|
||||||
#};
|
#};
|
||||||
action = [(actions.notify "{{ trigger.to_state.name }} ist seit mehr als ${minutes} Minuten offen.")];
|
action = [(actions.notify "{{ trigger.to_state.name }} ist seit mehr als ${minutes} Minuten offen.")];
|
||||||
})
|
})
|
||||||
(map toString [10 20 30 40 50 60]));
|
(map toString [10 20 30 40 50 60]));
|
||||||
history = {};
|
history = {};
|
||||||
image = {};
|
image = {};
|
||||||
sun = {};
|
sun = {};
|
||||||
|
|
|
@ -30,15 +30,15 @@
|
||||||
environment = {
|
environment = {
|
||||||
# Put these into an extra file so the essential packages can also be included on non selfadminstrated systems from home-manager
|
# Put these into an extra file so the essential packages can also be included on non selfadminstrated systems from home-manager
|
||||||
systemPackages = builtins.attrValues ({
|
systemPackages = builtins.attrValues ({
|
||||||
inherit
|
inherit
|
||||||
(import ../../../lib/update-system.nix {
|
(import ../../../lib/update-system.nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit (config.system.build) nixos-rebuild;
|
inherit (config.system.build) nixos-rebuild;
|
||||||
})
|
})
|
||||||
update-system
|
update-system
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
// pkgs.system-pkgs);
|
// pkgs.system-pkgs);
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|
|
@ -1,17 +1,11 @@
|
||||||
self: super: let
|
self: super: let
|
||||||
unstable = import super.sources.nixos-unstable {};
|
unstable = import super.sources.nixos-unstable {};
|
||||||
nom_commit = (builtins.fromJSON (builtins.readFile ../nix/sources.json)).nix-output-monitor.rev;
|
|
||||||
hx_commit = (builtins.fromJSON (builtins.readFile ../nix/sources.json)).helix.rev;
|
|
||||||
bot_commit = (builtins.fromJSON (builtins.readFile ../nix/sources.json)).nixpkgs-bot.rev;
|
bot_commit = (builtins.fromJSON (builtins.readFile ../nix/sources.json)).nixpkgs-bot.rev;
|
||||||
hx = builtins.getFlake "github:helix-editor/helix/${hx_commit}";
|
|
||||||
nom = builtins.getFlake "git+ssh://git@hera.m-0.eu/nix-output-monitor?rev=${nom_commit}&ref=main";
|
|
||||||
bot = builtins.getFlake "git+ssh://git@hera.m-0.eu/nixpkgs-bot?rev=${bot_commit}&ref=main";
|
bot = builtins.getFlake "git+ssh://git@hera.m-0.eu/nixpkgs-bot?rev=${bot_commit}&ref=main";
|
||||||
in {
|
in {
|
||||||
inherit unstable;
|
inherit unstable;
|
||||||
unstableHaskellPackages = unstable.haskellPackages;
|
unstableHaskellPackages = unstable.haskellPackages;
|
||||||
unstableGhc = unstable.ghc;
|
unstableGhc = unstable.ghc;
|
||||||
inherit (unstable) nix home-assistant vscode-extensions vscodium cachix cabal2nix chrysalis nil taplo tut;
|
inherit (unstable) nix home-assistant vscode-extensions vscodium cachix cabal2nix chrysalis nil taplo tut;
|
||||||
nix-output-monitor = nom.packages.x86_64-linux.default;
|
|
||||||
helix = hx.packages.x86_64-linux.default;
|
|
||||||
nixpkgs-bot = bot.packages.x86_64-linux.default;
|
nixpkgs-bot = bot.packages.x86_64-linux.default;
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,8 +93,10 @@ self: super: {
|
||||||
desktop-pkgs = {
|
desktop-pkgs = {
|
||||||
inherit
|
inherit
|
||||||
(self)
|
(self)
|
||||||
esphome # To flash devices
|
esphome
|
||||||
esptool # provides esptool.py
|
# To flash devices
|
||||||
|
esptool
|
||||||
|
# provides esptool.py
|
||||||
dconf
|
dconf
|
||||||
lm_sensors
|
lm_sensors
|
||||||
xwayland
|
xwayland
|
||||||
|
|
6
test.nix
6
test.nix
|
@ -1,8 +1,8 @@
|
||||||
let
|
let
|
||||||
sources = import ./nix/sources.nix;
|
commit = (builtins.fromJSON (builtins.readFile ./nix/sources.json))."pre-commit-hooks.nix".rev;
|
||||||
nix-pre-commit-hooks = import "${sources."pre-commit-hooks.nix"}/nix" {nixpkgs = sources.nixos-unstable;};
|
nix-pre-commit-hooks = builtins.getFlake "github:cachix/pre-commit-hooks.nix/${commit}";
|
||||||
in {
|
in {
|
||||||
pre-commit-check = nix-pre-commit-hooks.run {
|
pre-commit-check = nix-pre-commit-hooks.lib.x86_64-linux.run {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
hooks = {
|
hooks = {
|
||||||
hlint.enable = true;
|
hlint.enable = true;
|
||||||
|
|
Loading…
Reference in a new issue