mirror of
https://github.com/kmein/niveum
synced 2026-03-16 10:11:08 +01:00
update to 19.03
This commit is contained in:
@@ -19,6 +19,7 @@
|
|||||||
<configs/htop.nix>
|
<configs/htop.nix>
|
||||||
<configs/dunst.nix>
|
<configs/dunst.nix>
|
||||||
# <configs/mopidy.nix>
|
# <configs/mopidy.nix>
|
||||||
|
<configs/nixpkgs-unstable.nix>
|
||||||
<configs/mail.nix>
|
<configs/mail.nix>
|
||||||
<configs/default.nix>
|
<configs/default.nix>
|
||||||
<configs/python.nix>
|
<configs/python.nix>
|
||||||
@@ -89,10 +90,6 @@
|
|||||||
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> {};
|
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> {};
|
||||||
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> {};
|
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> {};
|
||||||
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> {};
|
mpv-poll = pkgs.callPackage <stockholm/lass/5pkgs/mpv-poll> {};
|
||||||
|
|
||||||
unstable = import <nixos-unstable> {
|
|
||||||
config = config.nixpkgs.config;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -137,6 +134,24 @@
|
|||||||
|
|
||||||
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer ];
|
environment.systemPackages = [ pkgs.pavucontrol pkgs.pamixer ];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.unstable.writers.writeDashBin "niveum-deploy" ''
|
||||||
|
NIVEUM_DIR=/home/kfm/prog/git/niveum
|
||||||
|
|
||||||
|
for system in "$@"; do
|
||||||
|
eval $(nix-build --no-out-link "$NIVEUM_DIR/deploy.nix" -A "$system") &
|
||||||
|
done
|
||||||
|
|
||||||
|
wait
|
||||||
|
'')
|
||||||
|
(pkgs.unstable.writers.writeDashBin "niveum-update" ''
|
||||||
|
NIVEUM_DIR=/home/kfm/prog/git/niveum
|
||||||
|
|
||||||
|
nix-prefetch-git --url https://github.com/NixOS/nixpkgs-channels --rev refs/heads/nixos-18.09 > "$NIVEUM_DIR/nixpkgs.json"
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
}
|
||||||
{
|
{
|
||||||
environment.interactiveShellInit = "export PATH=$PATH:$HOME/.local/bin:$HOME/.cargo/bin";
|
environment.interactiveShellInit = "export PATH=$PATH:$HOME/.local/bin:$HOME/.cargo/bin";
|
||||||
environment.shellAliases = {
|
environment.shellAliases = {
|
||||||
@@ -153,7 +168,6 @@
|
|||||||
ls = "${pkgs.exa}/bin/exa";
|
ls = "${pkgs.exa}/bin/exa";
|
||||||
ll = "${pkgs.exa}/bin/exa -l";
|
ll = "${pkgs.exa}/bin/exa -l";
|
||||||
la = "${pkgs.exa}/bin/exa -la";
|
la = "${pkgs.exa}/bin/exa -la";
|
||||||
niveum-update = "nix-prefetch-git --url https://github.com/NixOS/nixpkgs-channels --rev refs/heads/nixos-18.09 > ~niveum/nixpkgs.json";
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@@ -271,7 +285,7 @@
|
|||||||
})
|
})
|
||||||
pandoc
|
pandoc
|
||||||
haskellPackages.pandoc-citeproc
|
haskellPackages.pandoc-citeproc
|
||||||
haskellPackages.patat
|
# haskellPackages.patat
|
||||||
asciidoctor
|
asciidoctor
|
||||||
proselint
|
proselint
|
||||||
] ++ [ # programming
|
] ++ [ # programming
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
:def hoogle \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --count=15 \"" ++ s ++ "\""
|
:def hoogle \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --count=15 \"" ++ s ++ "\""
|
||||||
:def doc \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --info \"" ++ s ++ "\""
|
:def doc \s -> return $ ":!${pkgs.haskellPackages.hoogle}/bin/hoogle search --color -l --info \"" ++ s ++ "\""
|
||||||
:def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
|
:def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
|
||||||
:def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
|
|
||||||
:set prompt "\o033[1m%s\o033[1;34m λ\o033[0m "
|
:set prompt "\o033[1m%s\o033[1;34m λ\o033[0m "
|
||||||
:set -Wall
|
:set -Wall
|
||||||
'';
|
'';
|
||||||
|
# :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
|
||||||
".stack/config.yaml".text = let user = config.niveum.user; in ''
|
".stack/config.yaml".text = let user = config.niveum.user; in ''
|
||||||
templates:
|
templates:
|
||||||
params:
|
params:
|
||||||
@@ -30,16 +30,16 @@
|
|||||||
stack2nix
|
stack2nix
|
||||||
cabal-install
|
cabal-install
|
||||||
hlint
|
hlint
|
||||||
haskellPackages.brittany
|
# haskellPackages.brittany
|
||||||
(haskellPackages.ghcWithHoogle (import ./packages.nix))
|
(haskellPackages.ghcWithHoogle (import ./packages.nix))
|
||||||
] ++ map haskell.lib.justStaticExecutables [
|
] ++ map haskell.lib.justStaticExecutables [
|
||||||
haskellPackages.ghcid
|
haskellPackages.ghcid
|
||||||
haskellPackages.hakyll
|
haskellPackages.hakyll
|
||||||
haskellPackages.hfmt
|
# haskellPackages.hfmt
|
||||||
haskellPackages.hasktags
|
haskellPackages.hasktags
|
||||||
haskellPackages.hindent
|
haskellPackages.hindent
|
||||||
haskellPackages.pointfree
|
haskellPackages.pointfree
|
||||||
haskellPackages.pointful
|
# haskellPackages.pointful
|
||||||
haskellPackages.hpack
|
haskellPackages.hpack
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ with haskellPackages; [
|
|||||||
ad
|
ad
|
||||||
adjunctions
|
adjunctions
|
||||||
aeson
|
aeson
|
||||||
algebra
|
# algebra
|
||||||
ansi-terminal
|
ansi-terminal
|
||||||
async
|
async
|
||||||
attoparsec
|
attoparsec
|
||||||
|
|||||||
@@ -133,9 +133,9 @@ in with config.niveum; {
|
|||||||
"${modifier}+Shift+Left" = "move left";
|
"${modifier}+Shift+Left" = "move left";
|
||||||
"${modifier}+Shift+Right" = "move right";
|
"${modifier}+Shift+Right" = "move right";
|
||||||
"${modifier}+Shift+Up" = "move up";
|
"${modifier}+Shift+Up" = "move up";
|
||||||
|
"${modifier}+Shift+b" = "move window to workspace prev";
|
||||||
"${modifier}+Shift+c" = "reload";
|
"${modifier}+Shift+c" = "reload";
|
||||||
"${modifier}+Shift+n" = "move window to workspace next";
|
"${modifier}+Shift+n" = "move window to workspace next";
|
||||||
"${modifier}+Shift+b" = "move window to workspace prev";
|
|
||||||
"${modifier}+Shift+q" = "kill";
|
"${modifier}+Shift+q" = "kill";
|
||||||
"${modifier}+Shift+r" = "restart";
|
"${modifier}+Shift+r" = "restart";
|
||||||
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
|
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
|
||||||
@@ -143,12 +143,16 @@ in with config.niveum; {
|
|||||||
"${modifier}+Shift+z" = "floating toggle";
|
"${modifier}+Shift+z" = "floating toggle";
|
||||||
"${modifier}+Up" = "focus up";
|
"${modifier}+Up" = "focus up";
|
||||||
"${modifier}+a" = "exec ${pkgs.rofi}/bin/rofi -display-window — -show window";
|
"${modifier}+a" = "exec ${pkgs.rofi}/bin/rofi -display-window — -show window";
|
||||||
|
"${modifier}+b" = "workspace prev";
|
||||||
|
"${modifier}+c" = "split h";
|
||||||
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -display-run — -show run";
|
"${modifier}+d" = "exec ${pkgs.rofi}/bin/rofi -display-run — -show run";
|
||||||
"${modifier}+e" = "layout toggle split";
|
"${modifier}+e" = "layout toggle split";
|
||||||
"${modifier}+f" = "fullscreen toggle";
|
"${modifier}+f" = "fullscreen toggle";
|
||||||
"${modifier}+h" = "split h";
|
"${modifier}+h" = "focus left";
|
||||||
|
"${modifier}+j" = "focus down";
|
||||||
|
"${modifier}+k" = "focus up";
|
||||||
|
"${modifier}+l" = "focus right";
|
||||||
"${modifier}+n" = "workspace next";
|
"${modifier}+n" = "workspace next";
|
||||||
"${modifier}+b" = "workspace prev";
|
|
||||||
"${modifier}+p" = "exec ${pkgs.rofi-pass}/bin/rofi-pass";
|
"${modifier}+p" = "exec ${pkgs.rofi-pass}/bin/rofi-pass";
|
||||||
"${modifier}+r" = "mode resize";
|
"${modifier}+r" = "mode resize";
|
||||||
"${modifier}+s" = "layout stacking";
|
"${modifier}+s" = "layout stacking";
|
||||||
|
|||||||
@@ -4,11 +4,13 @@ in {
|
|||||||
services.mopidy = {
|
services.mopidy = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extensionPackages = [
|
extensionPackages = [
|
||||||
pkgs.mopidy-spotify
|
|
||||||
pkgs.mopidy-iris
|
|
||||||
pkgs.mopidy-gmusic
|
pkgs.mopidy-gmusic
|
||||||
|
pkgs.mopidy-iris
|
||||||
pkgs.mopidy-moped
|
pkgs.mopidy-moped
|
||||||
|
pkgs.mopidy-mopify
|
||||||
pkgs.mopidy-soundcloud
|
pkgs.mopidy-soundcloud
|
||||||
|
pkgs.mopidy-spotify
|
||||||
|
pkgs.mopidy-spotify-tunigo
|
||||||
pkgs.mopidy-youtube
|
pkgs.mopidy-youtube
|
||||||
];
|
];
|
||||||
configuration = ''
|
configuration = ''
|
||||||
|
|||||||
8
configs/nixpkgs-unstable.nix
Normal file
8
configs/nixpkgs-unstable.nix
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs.config.packageOverrides = pkgs: {
|
||||||
|
unstable = import <nixos-unstable> {
|
||||||
|
config = config.nixpkgs.config;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,17 +1,11 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
secrets = import <dot/secrets.nix>;
|
secrets = import <dot/secrets.nix>;
|
||||||
todoist = pkgs.unstable.callPackage <packages/todoist.nix> {};
|
|
||||||
in {
|
in {
|
||||||
environment.systemPackages = [
|
imports = [ <modules/todoist.nix> ];
|
||||||
(pkgs.unstable.writers.writeDashBin "todoist" ''
|
|
||||||
${todoist}/bin/todoist --color $@
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.me.home.file.".todoist.config.json".text = ''
|
niveum.todoist = {
|
||||||
{
|
enable = true;
|
||||||
"token": "${secrets.todoist.token}"
|
token = secrets.todoist.token;
|
||||||
}
|
};
|
||||||
'';
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,13 +39,6 @@
|
|||||||
mkdir $1
|
mkdir $1
|
||||||
cd $1
|
cd $1
|
||||||
}
|
}
|
||||||
|
|
||||||
niveum-deploy() {
|
|
||||||
for system in "$@"; do
|
|
||||||
eval $(nix-build --no-out-link ~niveum/deploy.nix -A "$system") &
|
|
||||||
done
|
|
||||||
wait
|
|
||||||
}
|
|
||||||
'';
|
'';
|
||||||
promptInit = ''
|
promptInit = ''
|
||||||
autoload -Uz vcs_info
|
autoload -Uz vcs_info
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ let
|
|||||||
startAt = bot.time;
|
startAt = bot.time;
|
||||||
serviceConfig.Type = "oneshot";
|
serviceConfig.Type = "oneshot";
|
||||||
wants = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
script = lists.concatStringsSep "\n" (map (chatId: ''
|
script = strings.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="${chatId}" \
|
-d chat_id="${chatId}" \
|
||||||
-d text="$(${bot.command})" ${
|
-d text="$(${bot.command})" ${
|
||||||
|
|||||||
32
modules/todoist.nix
Normal file
32
modules/todoist.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.niveum.todoist;
|
||||||
|
todoist = pkgs.unstable.callPackage <packages/todoist.nix> {};
|
||||||
|
in {
|
||||||
|
options.niveum.todoist = {
|
||||||
|
enable = mkEnableOption "todoist CLI";
|
||||||
|
token = mkOption { type = types.strMatching "[0-9a-f]+"; };
|
||||||
|
color = mkOption { type = types.bool; default = true; };
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
environment.systemPackages = mkIf cfg.enable [
|
||||||
|
(pkgs.unstable.writers.writeDashBin "todoist" ''
|
||||||
|
${todoist}/bin/todoist $@
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.me.home.file.".todoist.config.json".text = mkIf cfg.enable (builtins.toJSON {
|
||||||
|
token = cfg.token;
|
||||||
|
color = cfg.color;
|
||||||
|
});
|
||||||
|
|
||||||
|
systemd.user.services.todoist-sync = {
|
||||||
|
enable = cfg.enable;
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
startAt = "*:0/5";
|
||||||
|
script = ''${todoist}/bin/todoist sync'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"url": "https://github.com/NixOS/nixpkgs-channels",
|
"url": "https://github.com/NixOS/nixpkgs-channels",
|
||||||
"rev": "05ef70a46fe22a0d4030dc92424b4ae72793abd2",
|
"rev": "330b9fac6000ced90756d56fdbaab1ded58a13cb",
|
||||||
"date": "2019-04-13T16:30:47+02:00",
|
"date": "2019-04-21T19:35:46-04:00",
|
||||||
"sha256": "1hgsrday43nn6hsha5ggdw5f4lf60m0k45yfjf7d6l3w13vnpnk5",
|
"sha256": "164g1qg2yp9w5a8klfxpw29xjslbxxz6q4v5d0zsxx6rsf04dzgy",
|
||||||
"fetchSubmodules": false
|
"fetchSubmodules": false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ writeShellScriptBin, curl, xsv, gnused }:
|
{ writeShellScriptBin, curl, xsv, gnused }:
|
||||||
writeShellScriptBin "literature-quote" ''
|
writeShellScriptBin "literature-quote" ''
|
||||||
ROW=$(${curl}/bin/curl -s https://raw.githubusercontent.com/kmein/quotes/master/quotes.csv?token=ACO7O6523EG3TDCYTT2K4224XTW5W | shuf -n1)
|
ROW=$(${curl}/bin/curl -Ls http://kmein.github.io/quotes/quotes.csv | shuf -n1)
|
||||||
|
|
||||||
(
|
(
|
||||||
printf '%s\n(%s: _%s_, %s)\n' \
|
printf '%s\n(%s: _%s_, %s)\n' \
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ in {
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
<system/containers.nix>
|
<system/containers.nix>
|
||||||
<configs/save-space.nix>
|
<configs/save-space.nix>
|
||||||
|
<configs/nixpkgs-unstable.nix>
|
||||||
<modules/retiolum.nix>
|
<modules/retiolum.nix>
|
||||||
<modules/telegram-bot.nix>
|
<modules/telegram-bot.nix>
|
||||||
<configs/distrobump.nix>
|
<configs/distrobump.nix>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ in {
|
|||||||
|
|
||||||
niveum.telegramBots.quotebot = {
|
niveum.telegramBots.quotebot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
time = "08:00";
|
time = "08/6:00";
|
||||||
token = lib.strings.removeSuffix "\n" (builtins.readFile <secrets/telegram-kmein.token>);
|
token = lib.strings.removeSuffix "\n" (builtins.readFile <secrets/telegram-kmein.token>);
|
||||||
chatIds = [ "18980945" ];
|
chatIds = [ "18980945" ];
|
||||||
command = "${pkgs.literature-quote}/bin/literature-quote";
|
command = "${pkgs.literature-quote}/bin/literature-quote";
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
<configs>
|
<configs/default.nix>
|
||||||
{
|
{
|
||||||
services.xserver.xrandrHeads = [ "LVDS1" { output = "HDMI1"; primary = true; } ];
|
services.xserver.xrandrHeads = [ "LVDS1" { output = "HDMI1"; primary = true; } ];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user