1
0
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:
Kierán Meinhardt
2019-04-22 22:40:41 +02:00
parent 9d28068dfe
commit 3139bebd0f
15 changed files with 89 additions and 41 deletions

View File

@@ -19,6 +19,7 @@
<configs/htop.nix>
<configs/dunst.nix>
# <configs/mopidy.nix>
<configs/nixpkgs-unstable.nix>
<configs/mail.nix>
<configs/default.nix>
<configs/python.nix>
@@ -89,10 +90,6 @@
acronym = pkgs.callPackage <stockholm/lass/5pkgs/acronym> {};
urban = pkgs.callPackage <stockholm/lass/5pkgs/urban> {};
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.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.shellAliases = {
@@ -153,7 +168,6 @@
ls = "${pkgs.exa}/bin/exa";
ll = "${pkgs.exa}/bin/exa -l";
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
haskellPackages.pandoc-citeproc
haskellPackages.patat
# haskellPackages.patat
asciidoctor
proselint
] ++ [ # programming

View File

@@ -6,10 +6,10 @@
: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 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 -Wall
'';
# :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
".stack/config.yaml".text = let user = config.niveum.user; in ''
templates:
params:
@@ -30,16 +30,16 @@
stack2nix
cabal-install
hlint
haskellPackages.brittany
# haskellPackages.brittany
(haskellPackages.ghcWithHoogle (import ./packages.nix))
] ++ map haskell.lib.justStaticExecutables [
haskellPackages.ghcid
haskellPackages.hakyll
haskellPackages.hfmt
# haskellPackages.hfmt
haskellPackages.hasktags
haskellPackages.hindent
haskellPackages.pointfree
haskellPackages.pointful
# haskellPackages.pointful
haskellPackages.hpack
];
}

View File

@@ -8,7 +8,7 @@ with haskellPackages; [
ad
adjunctions
aeson
algebra
# algebra
ansi-terminal
async
attoparsec

View File

@@ -133,9 +133,9 @@ in with config.niveum; {
"${modifier}+Shift+Left" = "move left";
"${modifier}+Shift+Right" = "move right";
"${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+b" = "move window to workspace prev";
"${modifier}+Shift+c" = "reload";
"${modifier}+Shift+n" = "move window to workspace next";
"${modifier}+Shift+b" = "move window to workspace prev";
"${modifier}+Shift+q" = "kill";
"${modifier}+Shift+r" = "restart";
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
@@ -143,12 +143,16 @@ in with config.niveum; {
"${modifier}+Shift+z" = "floating toggle";
"${modifier}+Up" = "focus up";
"${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}+e" = "layout toggle split";
"${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}+b" = "workspace prev";
"${modifier}+p" = "exec ${pkgs.rofi-pass}/bin/rofi-pass";
"${modifier}+r" = "mode resize";
"${modifier}+s" = "layout stacking";

View File

@@ -4,11 +4,13 @@ in {
services.mopidy = {
enable = true;
extensionPackages = [
pkgs.mopidy-spotify
pkgs.mopidy-iris
pkgs.mopidy-gmusic
pkgs.mopidy-iris
pkgs.mopidy-moped
pkgs.mopidy-mopify
pkgs.mopidy-soundcloud
pkgs.mopidy-spotify
pkgs.mopidy-spotify-tunigo
pkgs.mopidy-youtube
];
configuration = ''

View File

@@ -0,0 +1,8 @@
{ config, ... }:
{
nixpkgs.config.packageOverrides = pkgs: {
unstable = import <nixos-unstable> {
config = config.nixpkgs.config;
};
};
}

View File

@@ -1,17 +1,11 @@
{ pkgs, ... }:
let
secrets = import <dot/secrets.nix>;
todoist = pkgs.unstable.callPackage <packages/todoist.nix> {};
in {
environment.systemPackages = [
(pkgs.unstable.writers.writeDashBin "todoist" ''
${todoist}/bin/todoist --color $@
'')
];
imports = [ <modules/todoist.nix> ];
home-manager.users.me.home.file.".todoist.config.json".text = ''
{
"token": "${secrets.todoist.token}"
}
'';
niveum.todoist = {
enable = true;
token = secrets.todoist.token;
};
}

View File

@@ -39,13 +39,6 @@
mkdir $1
cd $1
}
niveum-deploy() {
for system in "$@"; do
eval $(nix-build --no-out-link ~niveum/deploy.nix -A "$system") &
done
wait
}
'';
promptInit = ''
autoload -Uz vcs_info

View File

@@ -8,7 +8,7 @@ let
startAt = bot.time;
serviceConfig.Type = "oneshot";
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" \
-d chat_id="${chatId}" \
-d text="$(${bot.command})" ${

32
modules/todoist.nix Normal file
View 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'';
};
};
}

View File

@@ -1,7 +1,7 @@
{
"url": "https://github.com/NixOS/nixpkgs-channels",
"rev": "05ef70a46fe22a0d4030dc92424b4ae72793abd2",
"date": "2019-04-13T16:30:47+02:00",
"sha256": "1hgsrday43nn6hsha5ggdw5f4lf60m0k45yfjf7d6l3w13vnpnk5",
"rev": "330b9fac6000ced90756d56fdbaab1ded58a13cb",
"date": "2019-04-21T19:35:46-04:00",
"sha256": "164g1qg2yp9w5a8klfxpw29xjslbxxz6q4v5d0zsxx6rsf04dzgy",
"fetchSubmodules": false
}

View File

@@ -1,6 +1,6 @@
{ writeShellScriptBin, curl, xsv, gnused }:
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' \

View File

@@ -10,6 +10,7 @@ in {
./hardware-configuration.nix
<system/containers.nix>
<configs/save-space.nix>
<configs/nixpkgs-unstable.nix>
<modules/retiolum.nix>
<modules/telegram-bot.nix>
<configs/distrobump.nix>

View File

@@ -12,7 +12,7 @@ in {
niveum.telegramBots.quotebot = {
enable = true;
time = "08:00";
time = "08/6:00";
token = lib.strings.removeSuffix "\n" (builtins.readFile <secrets/telegram-kmein.token>);
chatIds = [ "18980945" ];
command = "${pkgs.literature-quote}/bin/literature-quote";

View File

@@ -1,7 +1,7 @@
{ config, pkgs, ... }:
{
imports = [
<configs>
<configs/default.nix>
{
services.xserver.xrandrHeads = [ "LVDS1" { output = "HDMI1"; primary = true; } ];
}