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