mirror of
https://github.com/kmein/niveum
synced 2026-03-19 19:41:08 +01:00
merge
This commit is contained in:
@@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
niveum.seafile.enable = true;
|
niveum.seafile.enable = true;
|
||||||
|
|
||||||
niveum.google-drive = {
|
niveum.google-drive = rec {
|
||||||
enable = true;
|
enable = true;
|
||||||
directory = "${config.users.users.me.home}/cloud/gdrive";
|
directory = "${user.home}/cloud/gdrive";
|
||||||
user = config.users.users.me;
|
user = config.users.users.me;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,11 @@
|
|||||||
<configs/vscode.nix>
|
<configs/vscode.nix>
|
||||||
<configs/htop.nix>
|
<configs/htop.nix>
|
||||||
<configs/dunst.nix>
|
<configs/dunst.nix>
|
||||||
|
# <configs/mopidy.nix>
|
||||||
<configs/mail.nix>
|
<configs/mail.nix>
|
||||||
|
<configs/default.nix>
|
||||||
<configs/python.nix>
|
<configs/python.nix>
|
||||||
<configs/haskell.nix>
|
<configs/haskell>
|
||||||
<configs/hu-berlin.nix>
|
<configs/hu-berlin.nix>
|
||||||
<configs/i3.nix>
|
<configs/i3.nix>
|
||||||
<configs/mpv.nix>
|
<configs/mpv.nix>
|
||||||
@@ -43,9 +45,9 @@
|
|||||||
<configs/zsh.nix>
|
<configs/zsh.nix>
|
||||||
<configs/bluetooth.nix>
|
<configs/bluetooth.nix>
|
||||||
<configs/theming.nix>
|
<configs/theming.nix>
|
||||||
|
<configs/distrobump.nix>
|
||||||
<configs/tmux.nix>
|
<configs/tmux.nix>
|
||||||
<configs/themes/owickstrom-dark.nix>
|
<configs/themes/owickstrom-dark.nix>
|
||||||
<configs/distrobump.nix>
|
|
||||||
{
|
{
|
||||||
niveum.user = {
|
niveum.user = {
|
||||||
github = "kmein";
|
github = "kmein";
|
||||||
|
|||||||
5
configs/gollum.nix
Normal file
5
configs/gollum.nix
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
services.gollum = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -20,13 +20,18 @@
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.hoogle = {
|
||||||
|
enable = true;
|
||||||
|
packages = import ./packages.nix;
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
cabal2nix
|
cabal2nix
|
||||||
stack2nix
|
stack2nix
|
||||||
cabal-install
|
cabal-install
|
||||||
hlint
|
hlint
|
||||||
haskellPackages.brittany
|
haskellPackages.brittany
|
||||||
(haskellPackages.ghcWithHoogle (import <dot/haskells.nix>))
|
(haskellPackages.ghcWithHoogle (import ./packages.nix))
|
||||||
] ++ map haskell.lib.justStaticExecutables [
|
] ++ map haskell.lib.justStaticExecutables [
|
||||||
haskellPackages.ghcid
|
haskellPackages.ghcid
|
||||||
haskellPackages.hakyll
|
haskellPackages.hakyll
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [ <modules/hledger.nix> ];
|
imports = [ <modules/hledger.nix> ];
|
||||||
|
|
||||||
@@ -7,6 +7,8 @@
|
|||||||
server = {
|
server = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = config.users.users.me;
|
user = config.users.users.me;
|
||||||
|
package = pkgs.unstable.hledger-web;
|
||||||
};
|
};
|
||||||
|
package = pkgs.unstable.hledger;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ if has("autocmd")
|
|||||||
autocmd bufnewfile,bufread config set filetype=conf
|
autocmd bufnewfile,bufread config set filetype=conf
|
||||||
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4
|
autocmd bufnewfile,bufread *.elm packadd elm-vim | set filetype=elm shiftwidth=4
|
||||||
autocmd bufnewfile,bufread *.dhall packadd dhall-vim | set filetype=dhall
|
autocmd bufnewfile,bufread *.dhall packadd dhall-vim | set filetype=dhall
|
||||||
autocmd filetype haskell packadd haskell-vim
|
autocmd filetype haskell packadd haskell-vim | set keywordprg=hoogle\ -i
|
||||||
autocmd filetype javascript packadd vim-javascript
|
autocmd filetype javascript packadd vim-javascript
|
||||||
autocmd filetype make setlocal noexpandtab
|
autocmd filetype make setlocal noexpandtab
|
||||||
autocmd filetype html packadd emmet-vim
|
autocmd filetype html packadd emmet-vim
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ let
|
|||||||
in {
|
in {
|
||||||
options.niveum.hledger = {
|
options.niveum.hledger = {
|
||||||
enable = mkEnableOption "hledger";
|
enable = mkEnableOption "hledger";
|
||||||
|
package = mkOption { type = types.package; default = pkgs.hledger; };
|
||||||
server = {
|
server = {
|
||||||
enable = mkEnableOption "hledger server";
|
enable = mkEnableOption "hledger server";
|
||||||
port = mkOption { type = pkgs.unstable.lib.types.port; default = 5000; };
|
port = mkOption { type = pkgs.unstable.lib.types.port; default = 5000; };
|
||||||
@@ -15,11 +16,12 @@ in {
|
|||||||
};
|
};
|
||||||
flags = mkOption { type = types.listOf types.str; default = []; };
|
flags = mkOption { type = types.listOf types.str; default = []; };
|
||||||
user = mkOption { type = types.attrs; };
|
user = mkOption { type = types.attrs; };
|
||||||
|
package = mkOption { type = types.package; default = pkgs.hledger-web; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ pkgs.unstable.hledger ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
systemd.services.hledger-web = mkIf cfg.server.enable {
|
systemd.services.hledger-web = mkIf cfg.server.enable {
|
||||||
description = "hledger server";
|
description = "hledger server";
|
||||||
@@ -28,7 +30,7 @@ in {
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.unstable.hledger-web}/bin/hledger-web \
|
${cfg.server.package}/bin/hledger-web \
|
||||||
--port=${toString cfg.server.port} \
|
--port=${toString cfg.server.port} \
|
||||||
--host=${cfg.server.host} \
|
--host=${cfg.server.host} \
|
||||||
--capabilities=${concatStringsSep "," cfg.server.capabilities} \
|
--capabilities=${concatStringsSep "," cfg.server.capabilities} \
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ let
|
|||||||
startAt = bot.time;
|
startAt = bot.time;
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
wants = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
script = ''
|
script = lists.concatStringsSep "\n" (map (chatId: ''
|
||||||
${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \
|
${pkgs.curl}/bin/curl -s -X POST "https://api.telegram.org/bot${bot.token}/sendMessage" \
|
||||||
-d chat_id="${bot.chatId}" \
|
-d chat_id="${chatId}" \
|
||||||
-d text="$(${bot.command})" ${
|
-d text="$(${bot.command})" ${
|
||||||
if bot.parseMode == null then ""
|
if bot.parseMode == null then ""
|
||||||
else "-d parse_mode=${bot.parseMode}"
|
else "-d parse_mode=${bot.parseMode}"
|
||||||
}
|
}
|
||||||
'';
|
'') bot.chatIds);
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
options.niveum.telegramBots = mkOption {
|
options.niveum.telegramBots = mkOption {
|
||||||
@@ -24,7 +24,7 @@ in {
|
|||||||
enable = mkEnableOption "Telegram bot";
|
enable = mkEnableOption "Telegram bot";
|
||||||
time = mkOption { type = types.str; };
|
time = mkOption { type = types.str; };
|
||||||
token = mkOption { type = types.strMatching "[0-9A-Za-z:-]+"; };
|
token = mkOption { type = types.strMatching "[0-9A-Za-z:-]+"; };
|
||||||
chatId = mkOption { type = types.strMatching "[0-9]+|@[A-Za-z0-9]+"; };
|
chatIds = mkOption { type = types.listOf (types.strMatching "[0-9]+|@[A-Za-z0-9]+"); };
|
||||||
command = mkOption { type = types.str; };
|
command = mkOption { type = types.str; };
|
||||||
parseMode = mkOption {
|
parseMode = mkOption {
|
||||||
type = types.nullOr (types.enum ["HTML" "Markdown"]);
|
type = types.nullOr (types.enum ["HTML" "Markdown"]);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
time = "08:00";
|
time = "08:00";
|
||||||
token = lib.strings.removeSuffix "\n" (builtins.readFile <secrets/telegram-kmein.token>);
|
token = lib.strings.removeSuffix "\n" (builtins.readFile <secrets/telegram-kmein.token>);
|
||||||
chatId = "18980945";
|
chatIds = [ "18980945" ];
|
||||||
command = "${pkgs.literature-quote}/bin/literature-quote";
|
command = "${pkgs.literature-quote}/bin/literature-quote";
|
||||||
parseMode = "Markdown";
|
parseMode = "Markdown";
|
||||||
};
|
};
|
||||||
@@ -23,7 +23,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
time = "07:00";
|
time = "07:00";
|
||||||
token = lib.strings.removeSuffix "\n" (builtins.readFile <secrets/telegram-kmein.token>);
|
token = lib.strings.removeSuffix "\n" (builtins.readFile <secrets/telegram-kmein.token>);
|
||||||
chatId = "@autorenkalender";
|
chatIds = [ "@autorenkalender" ];
|
||||||
command = "${pkgs.autorenkalender}/bin/autorenkalender";
|
command = "${pkgs.autorenkalender}/bin/autorenkalender";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
<configs>
|
<configs/default.nix>
|
||||||
{
|
{
|
||||||
services.xserver.xrandrHeads = [ "eDP1" ];
|
services.xserver.xrandrHeads = [ "eDP1" ];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user