summaryrefslogtreecommitdiffstats
path: root/lass/2configs
diff options
context:
space:
mode:
Diffstat (limited to 'lass/2configs')
-rw-r--r--lass/2configs/baseX.nix1
-rw-r--r--lass/2configs/exim-smarthost.nix1
-rw-r--r--lass/2configs/git.nix4
-rw-r--r--lass/2configs/radio.nix86
-rw-r--r--lass/2configs/vim.nix10
5 files changed, 69 insertions, 33 deletions
diff --git a/lass/2configs/baseX.nix b/lass/2configs/baseX.nix
index 95aac2d18..e8a2539f3 100644
--- a/lass/2configs/baseX.nix
+++ b/lass/2configs/baseX.nix
@@ -71,7 +71,6 @@ in {
lm_sensors
ncdu
nix-index
- nix-repl
nmap
pavucontrol
powertop
diff --git a/lass/2configs/exim-smarthost.nix b/lass/2configs/exim-smarthost.nix
index 846000a3a..6ef3c8595 100644
--- a/lass/2configs/exim-smarthost.nix
+++ b/lass/2configs/exim-smarthost.nix
@@ -89,6 +89,7 @@ with import <stockholm/lib>;
{ from = "cis@lassul.us"; to = lass.mail; }
{ from = "afra@lassul.us"; to = lass.mail; }
{ from = "ksp@lassul.us"; to = lass.mail; }
+ { from = "ccc@lassul.us"; to = lass.mail; }
];
system-aliases = [
{ from = "mailer-daemon"; to = "postmaster"; }
diff --git a/lass/2configs/git.nix b/lass/2configs/git.nix
index 97def9df3..253c56e48 100644
--- a/lass/2configs/git.nix
+++ b/lass/2configs/git.nix
@@ -62,6 +62,10 @@ let
cgit.desc = "high level writers for nix";
cgit.section = "software";
};
+ nixos-generators = {
+ cgit.desc = "custom image builders";
+ cgit.section = "software";
+ };
nixpkgs = {
cgit.desc = "nixpkgs fork";
cgit.section = "configuration";
diff --git a/lass/2configs/radio.nix b/lass/2configs/radio.nix
index a83d51f1d..bf6855804 100644
--- a/lass/2configs/radio.nix
+++ b/lass/2configs/radio.nix
@@ -36,8 +36,9 @@ in {
home = "/home/${name}";
useDefaultShell = true;
createHome = true;
- openssh.authorizedKeys.keys = [
- config.krebs.users.lass.pubkey
+ openssh.authorizedKeys.keys = with config.krebs.users; [
+ lass.pubkey
+ lass-mors.pubkey
];
};
};
@@ -131,6 +132,30 @@ in {
};
};
+ systemd.services.radio-recent = let
+ recentlyPlayed = pkgs.writeDash "recentlyPlayed" ''
+ LIMIT=1000 #how many tracks to keep in the history
+ HISTORY_FILE=/tmp/played
+ while :; do
+ ${pkgs.mpc_cli}/bin/mpc idle player > /dev/null
+ ${pkgs.mpc_cli}/bin/mpc current -f %file%
+ done | while read track; do
+ echo "$(date -Is)" "$track" | tee -a "$HISTORY_FILE"
+ echo "$(tail -$LIMIT "$HISTORY_FILE")" > "$HISTORY_FILE"
+ done
+ '';
+ in {
+ description = "radio recently played";
+ after = [ "mpd.service" "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+
+ restartIfChanged = true;
+
+ serviceConfig = {
+ ExecStart = recentlyPlayed;
+ };
+ };
+
krebs.Reaktor.playlist = {
nickname = "the_playlist|r";
channels = [
@@ -157,27 +182,40 @@ in {
})
];
};
- services.nginx.virtualHosts."lassul.us".locations."/the_playlist".extraConfig = let
- html = pkgs.writeText "index.html" ''
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title>lassulus playlist</title>
- </head>
- <body>
- <div style="display:inline-block;margin:0px;padding:0px;overflow:hidden">
- <iframe src="https://kiwiirc.com/client/irc.freenode.org/?nick=kiwi_test|?&theme=cli#the_playlist" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:95%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="95%" width="100%"></iframe>
- </div>
- <div style="position:absolute;bottom:1px;display:inline-block;background-color:red;">
- <audio controls autoplay="autoplay"><source src="http://lassul.us:8000/radio.ogg" type="audio/ogg">Your browser does not support the audio element.</audio>
- </div>
- <!-- page content -->
- </body>
- </html>
+ services.nginx = {
+ enable = true;
+ virtualHosts."radio.lassul.us" = {
+ forceSSL = true;
+ enableACME = true;
+ locations."/".extraConfig = ''
+ proxy_pass http://localhost:8000;
+ '';
+ locations."/recent".extraConfig = ''
+ alias /tmp/played;
+ '';
+ };
+ virtualHosts."lassul.us".locations."/the_playlist".extraConfig = let
+ html = pkgs.writeText "index.html" ''
+ <!DOCTYPE html>
+ <html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <title>lassulus playlist</title>
+ </head>
+ <body>
+ <div style="display:inline-block;margin:0px;padding:0px;overflow:hidden">
+ <iframe src="https://kiwiirc.com/client/irc.freenode.org/?nick=kiwi_test|?&theme=cli#the_playlist" frameborder="0" style="overflow:hidden;overflow-x:hidden;overflow-y:hidden;height:95%;width:100%;position:absolute;top:0px;left:0px;right:0px;bottom:0px" height="95%" width="100%"></iframe>
+ </div>
+ <div style="position:absolute;bottom:1px;display:inline-block;background-color:red;">
+ <audio controls autoplay="autoplay"><source src="http://lassul.us:8000/radio.ogg" type="audio/ogg">Your browser does not support the audio element.</audio>
+ </div>
+ <!-- page content -->
+ </body>
+ </html>
+ '';
+ in ''
+ default_type "text/html";
+ alias ${html};
'';
- in ''
- default_type "text/html";
- alias ${html};
- '';
+ };
}
diff --git a/lass/2configs/vim.nix b/lass/2configs/vim.nix
index 823d9a8ca..f757e5044 100644
--- a/lass/2configs/vim.nix
+++ b/lass/2configs/vim.nix
@@ -2,12 +2,6 @@
with import <stockholm/lib>;
let
- unstable_nixpkgs = import (pkgs.fetchFromGitHub {
- owner = "NixOS";
- repo = "nixpkgs";
- rev = "a8c71037e041725d40fbf2f3047347b6833b1703";
- sha256 = "1z4cchcw7qgjhy0x6mnz7iqvpswc2nfjpdynxc54zpm66khfrjqw";
- }) {};
out = {
environment.systemPackages = [
(hiPrio vim)
@@ -15,7 +9,7 @@ let
(pkgs.writeDashBin "govet" ''
go vet "$@"
'')
- (hiPrio (unstable_nixpkgs.python3.withPackages (ps: [
+ (hiPrio (pkgs.python3.withPackages (ps: [
ps.python-language-server
ps.pyls-isort
])))
@@ -135,7 +129,7 @@ let
pkgs.vimPlugins.undotree
pkgs.vimPlugins.vim-go
pkgs.vimPlugins.fzf-vim
- unstable_nixpkgs.vimPlugins.LanguageClient-neovim
+ pkgs.vimPlugins.LanguageClient-neovim
(pkgs.vimUtils.buildVimPlugin {
name = "file-line-1.0";
src = pkgs.fetchFromGitHub {