From cf93499e96188e40a36bcef79be9c72ad5fb6fa1 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 10 Oct 2015 20:21:11 +0200 Subject: m 2 sources: 15.09 is new nixpkgs head for all my hosts --- makefu/2configs/base-sources.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefu/2configs/base-sources.nix b/makefu/2configs/base-sources.nix index a2715ba4c..826cd6fef 100644 --- a/makefu/2configs/base-sources.nix +++ b/makefu/2configs/base-sources.nix @@ -5,8 +5,9 @@ git.nixpkgs = { url = https://github.com/NixOS/nixpkgs; #url = https://github.com/makefu/nixpkgs; - rev = "68bd8e4a9dc247726ae89cc8739574261718e328"; + rev = "dc18f39bfb2f9d1ba62c7e8ad98544bb15cb26b2"; # nixos-15.09 }; + dir.secrets = { host = config.krebs.hosts.pornocauster; path = "/home/makefu/secrets/${config.krebs.build.host.name}/"; -- cgit v1.2.3 From f295ac8f970ac9a2c95c33f58a057950b88c4504 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 10 Oct 2015 20:21:52 +0200 Subject: m 2 git/brain: optional -> singleton --- makefu/2configs/git/brain-retiolum.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefu/2configs/git/brain-retiolum.nix b/makefu/2configs/git/brain-retiolum.nix index 0ab64773f..793373859 100644 --- a/makefu/2configs/git/brain-retiolum.nix +++ b/makefu/2configs/git/brain-retiolum.nix @@ -43,7 +43,7 @@ let }; set-ro-access = with git; repo: user: - optional repo.public { + singleton { inherit user; repo = [ repo ]; perm = fetch; -- cgit v1.2.3 From a176ee1f2fbc289a630fd643d97e764ff337461e Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 10 Oct 2015 20:23:43 +0200 Subject: m 2 vim: edit bin via xxd --- makefu/2configs/vim.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/makefu/2configs/vim.nix b/makefu/2configs/vim.nix index b71d95148..02a46d22a 100644 --- a/makefu/2configs/vim.nix +++ b/makefu/2configs/vim.nix @@ -103,6 +103,19 @@ in { endfunction call InitBackupDir() + augroup Binary + " edit binaries in xxd-output, xxd is part of vim + au! + au BufReadPre *.bin let &bin=1 + au BufReadPost *.bin if &bin | %!xxd + au BufReadPost *.bin set ft=xxd | endif + au BufWritePre *.bin if &bin | %!xxd -r + au BufWritePre *.bin endif + au BufWritePost *.bin if &bin | %!xxd + au BufWritePost *.bin set nomod | endif + augroup END + + ''; -- cgit v1.2.3 From cb4d37d3eedef974bc16e68c601c479a2ed503d9 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 14 Oct 2015 00:10:15 +0200 Subject: m 2 base-gui: also install pavuctl --- makefu/2configs/base-gui.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/makefu/2configs/base-gui.nix b/makefu/2configs/base-gui.nix index 30e4c735e..28a03b8ff 100644 --- a/makefu/2configs/base-gui.nix +++ b/makefu/2configs/base-gui.nix @@ -51,6 +51,7 @@ in }; environment.systemPackages = with pkgs;[ + pavucontrol xlockmore rxvt_unicode-with-plugins firefox -- cgit v1.2.3 From f73fe104d84b2f0d2fc3b4f0342c36735b3fb220 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 14 Oct 2015 00:10:56 +0200 Subject: m 1 pornocauster: ignore lidswitch, configure additional sink for pulse --- makefu/1systems/pornocauster.nix | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/makefu/1systems/pornocauster.nix b/makefu/1systems/pornocauster.nix index d208e5112..8f7f5ea7c 100644 --- a/makefu/1systems/pornocauster.nix +++ b/makefu/1systems/pornocauster.nix @@ -42,7 +42,13 @@ krebs.build.user = config.krebs.users.makefu; krebs.build.target = "root@pornocauster"; - environment.systemPackages = with pkgs;[ get]; + environment.systemPackages = with pkgs;[ get ]; + + services.logind.extraConfig = "HandleLidSwitch=ignore"; + # configure pulseAudio to provide a HDMI sink as well + hardware.pulseaudio.configFile = pkgs.writeText "pulse-default-pa" '' + ${builtins.readFile "${config.hardware.pulseaudio.package}/etc/pulse/default.pa"} + load-module module-alsa-sink device=hw:0,3 sink_properties=device.description="HDMIOutput" sink_name="HDMI"''; networking.firewall.allowedTCPPorts = [ 25 ]; -- cgit v1.2.3 From 6a899722c23d7a0d2585f485be11cb9bda3ea0be Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 14 Oct 2015 00:31:24 +0200 Subject: m 2 user: fix accidental inclusion of awesome config --- makefu/2configs/user/.config/awesome/rc.lua | 479 ---------------------------- 1 file changed, 479 deletions(-) delete mode 100644 makefu/2configs/user/.config/awesome/rc.lua diff --git a/makefu/2configs/user/.config/awesome/rc.lua b/makefu/2configs/user/.config/awesome/rc.lua deleted file mode 100644 index 10126ab0a..000000000 --- a/makefu/2configs/user/.config/awesome/rc.lua +++ /dev/null @@ -1,479 +0,0 @@ --- Standard awesome library -local gears = require("gears") -local awful = require("awful") -local vicious = require("vicious") -awful.rules = require("awful.rules") -require("awful.autofocus") --- Widget and layout library -local wibox = require("wibox") --- Theme handling library -local beautiful = require("beautiful") --- Notification library -local naughty = require("naughty") -local menubar = require("menubar") - --- {{{ Error handling --- Check if awesome encountered an error during startup and fell back to --- another config (This code will only ever execute for the fallback config) -if awesome.startup_errors then - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, there were errors during startup!", - text = awesome.startup_errors }) -end - --- Handle runtime errors after startup -do - local in_error = false - awesome.connect_signal("debug::error", function (err) - -- Make sure we don't go into an endless error loop - if in_error then return end - in_error = true - - naughty.notify({ preset = naughty.config.presets.critical, - title = "Oops, an error happened!", - text = err }) - in_error = false - end) -end --- }}} -volwidget = wibox.widget.textbox() -vicious.register(volwidget, vicious.widgets.volume, " $1% ", 2, "Master") - ---mdirwidget = wibox.widget.textbox() ---vicious.register(mdirwidget, vicious.widgets.mdir, ) - -cpuwidget = awful.widget.graph() --- Graph properties -cpuwidget:set_width(50) -cpuwidget:set_background_color("#494B4F") -cpuwidget:set_color({ type = "linear", from = { 0, 0 }, to = { 10,0 }, stops = { {0, "#FF5656"}, {0.5, "#88A175"}, - {1, "#AECF96" }}}) -vicious.register(cpuwidget, vicious.widgets.cpu, "$1") - --- Register widget -batwidget = wibox.widget.textbox() -vicious.register(batwidget, vicious.widgets.bat, "$2%", 61, "BAT0") - --- {{{ Variable definitions --- Themes define colours, icons, and wallpapers --- beautiful.init("/usr/share/awesome/themes/default/theme.lua") --- ./qbx8r72yzaxpz41zq00902zwajl31b5h-awesome-3.5.6/share/awesome/lib/beautiful.lua --- --- Find the default theme - --- --- beautiful.init("/nix/store/qbx8r72yzaxpz41zq00902zwajl31b5h-awesome-3.5.6/share/awesome/themes/default/theme.lua") - --- This is used later as the default terminal and editor to run. -terminal = "urxvt" -editor = os.getenv("EDITOR") or "vim" -editor_cmd = terminal .. " -e " .. editor -browser = "firefox" - --- Default modkey. --- Usually, Mod4 is the key with a logo between Control and Alt. --- If you do not like this or do not have such a key, --- I suggest you to remap Mod4 to another key using xmodmap or other tools. --- However, you can use another modifier like Mod1, but it may interact with others. -modkey = "Mod4" - --- Table of layouts to cover with awful.layout.inc, order matters. -local layouts = -{ - awful.layout.suit.tile, --- awful.layout.suit.tile.left, - awful.layout.suit.tile.bottom, - awful.layout.suit.floating, --- awful.layout.suit.tile.top, - awful.layout.suit.fair, --- awful.layout.suit.fair.horizontal, --- awful.layout.suit.spiral, --- awful.layout.suit.spiral.dwindle, - awful.layout.suit.max, - awful.layout.suit.max.fullscreen --- awful.layout.suit.magnifier -} --- }}} - --- {{{ Wallpaper -if beautiful.wallpaper then - for s = 1, screen.count() do - gears.wallpaper.maximized(beautiful.wallpaper, s, true) - end -end --- }}} - --- {{{ Tags --- Define a tag table which hold all screen tags. -tags = {} -for s = 1, screen.count() do - -- Each screen has its own tag table. - tags[s] = awful.tag({ "tmp", "news", "www", "im", "work1","work2","net","misc","remote" }, s, layouts[1]) -end --- }}} - --- {{{ Menu --- Create a laucher widget and a main menu -myawesomemenu = { - { "manual", terminal .. " -e man awesome" }, - { "edit config", editor_cmd .. " " .. awesome.conffile }, - { "restart", awesome.restart }, - { "quit", awesome.quit } -} - -mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon }, - { "open terminal", terminal }, - { "pcmanfm", "pcmanfm"} - } - }) - -mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon, - menu = mymainmenu }) - --- Menubar configuration -menubar.utils.terminal = terminal -- Set the terminal for applications that require it --- }}} - --- {{{ Wibox --- Create a textclock widget -mytextclock = awful.widget.textclock() - --- Create a wibox for each screen and add it -mywibox = {} -mypromptbox = {} -mylayoutbox = {} -mytaglist = {} -mytaglist.buttons = awful.util.table.join( - awful.button({ }, 1, awful.tag.viewonly), - awful.button({ modkey }, 1, awful.client.movetotag), - awful.button({ }, 3, awful.tag.viewtoggle), - awful.button({ modkey }, 3, awful.client.toggletag), - awful.button({ }, 4, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end), - awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end) - ) -mytasklist = {} -mytasklist.buttons = awful.util.table.join( - awful.button({ }, 1, function (c) - if c == client.focus then - c.minimized = true - else - -- Without this, the following - -- :isvisible() makes no sense - c.minimized = false - if not c:isvisible() then - awful.tag.viewonly(c:tags()[1]) - end - -- This will also un-minimize - -- the client, if needed - client.focus = c - c:raise() - end - end), - awful.button({ }, 3, function () - if instance then - instance:hide() - instance = nil - else - instance = awful.menu.clients({ width=250 }) - end - end), - awful.button({ }, 4, function () - awful.client.focus.byidx(1) - if client.focus then client.focus:raise() end - end), - awful.button({ }, 5, function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end)) - -for s = 1, screen.count() do - -- Create a promptbox for each screen - mypromptbox[s] = awful.widget.prompt() - -- Create an imagebox widget which will contains an icon indicating which layout we're using. - -- We need one layoutbox per screen. - mylayoutbox[s] = awful.widget.layoutbox(s) - mylayoutbox[s]:buttons(awful.util.table.join( - awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end), - awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end), - awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end), - awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end))) - -- Create a taglist widget - mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons) - - -- Create a tasklist widget - mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons) - - -- Create the wibox - mywibox[s] = awful.wibox({ position = "top", screen = s }) - - -- Widgets that are aligned to the left - local left_layout = wibox.layout.fixed.horizontal() - left_layout:add(mylauncher) - left_layout:add(mytaglist[s]) - left_layout:add(mypromptbox[s]) - - -- Widgets that are aligned to the right - local right_layout = wibox.layout.fixed.horizontal() - if s == 1 then right_layout:add(wibox.widget.systray()) end - right_layout:add(volwidget) - right_layout:add(cpuwidget) - right_layout:add(batwidget) - right_layout:add(mytextclock) - right_layout:add(mylayoutbox[s]) - - -- Now bring it all together (with the tasklist in the middle) - local layout = wibox.layout.align.horizontal() - layout:set_left(left_layout) - layout:set_middle(mytasklist[s]) - layout:set_right(right_layout) - - mywibox[s]:set_widget(layout) -end --- }}} - --- {{{ Mouse bindings -root.buttons(awful.util.table.join( - awful.button({ }, 3, function () mymainmenu:toggle() end), - awful.button({ }, 4, awful.tag.viewnext), - awful.button({ }, 5, awful.tag.viewprev) -)) --- }}} - --- {{{ Key bindings -globalkeys = awful.util.table.join( - awful.key({ modkey, }, "Left", awful.tag.viewprev ), - awful.key({ modkey, }, "Right", awful.tag.viewnext ), - awful.key({ modkey, }, "Escape", awful.tag.history.restore), - - awful.key({ modkey, }, "j", - function () - awful.client.focus.byidx( 1) - if client.focus then client.focus:raise() end - end), - awful.key({ modkey, }, "k", - function () - awful.client.focus.byidx(-1) - if client.focus then client.focus:raise() end - end), - awful.key({ modkey, }, "w", function () mymainmenu:show() end), - - -- Layout manipulation - awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), - awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), - awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end), - awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end), - awful.key({ modkey, }, "u", awful.client.urgent.jumpto), - awful.key({ modkey, }, "Tab", - function () - awful.client.focus.history.previous() - if client.focus then - client.focus:raise() - end - end), - - -- Standard program - awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end), - awful.key({ modkey, "Control" }, "r", awesome.restart), - awful.key({ modkey, "Shift" }, "q", awesome.quit), - - awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end), - awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end), - awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), - awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), - awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), - awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), - awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end), - awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end), - - awful.key({ modkey, "Control" }, "n", awful.client.restore), - awful.key({ }, "XF86AudioRaiseVolume", function () - awful.util.spawn("amixer set Master 5%+", false) end), - awful.key({ }, "XF86AudioLowerVolume", function () - awful.util.spawn("amixer set Master 5%-", false) end), - awful.key({ }, "XF86AudioMute", function () - awful.util.spawn("amixer -q -D default sset Master toggle", false) end), - - -- Prompt - awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end), - -- awful.key({ modkey }, "r", function () awful.util.spawn( "dmenu_run" ) end ), - awful.key({ modkey,"Control" }, "BackSpace", function () awful.util.spawn("xlock -mode blank") end), - awful.key({ }, "XF86ScreenSaver", function () awful.util.spawn("xlock -mode blank") end), - - awful.key({ modkey }, "x", - function () - awful.prompt.run({ prompt = "Run Lua code: " }, - mypromptbox[mouse.screen].widget, - awful.util.eval, nil, - awful.util.getdir("cache") .. "/history_eval") - end), - -- Menubar - awful.key({ modkey }, "p", function() menubar.show() end) -) - -clientkeys = awful.util.table.join( - awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end), - awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end), - awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ), - awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end), - awful.key({ modkey, }, "o", awful.client.movetoscreen ), - awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), - awful.key({ modkey, }, "n", - function (c) - -- The client currently has the input focus, so it cannot be - -- minimized, since minimized clients can't have the focus. - c.minimized = true - end), - awful.key({ modkey, }, "m", - function (c) - c.maximized_horizontal = not c.maximized_horizontal - c.maximized_vertical = not c.maximized_vertical - end) -) - --- Compute the maximum number of digit we need, limited to 9 -keynumber = 0 -for s = 1, screen.count() do - keynumber = math.min(9, math.max(#tags[s], keynumber)) -end - --- Bind all key numbers to tags. --- Be careful: we use keycodes to make it works on any keyboard layout. --- This should map on the top row of your keyboard, usually 1 to 9. -for i = 1, keynumber do - globalkeys = awful.util.table.join(globalkeys, - awful.key({ modkey }, "#" .. i + 9, - function () - local screen = mouse.screen - if tags[screen][i] then - awful.tag.viewonly(tags[screen][i]) - end - end), - awful.key({ modkey, "Control" }, "#" .. i + 9, - function () - local screen = mouse.screen - if tags[screen][i] then - awful.tag.viewtoggle(tags[screen][i]) - end - end), - awful.key({ modkey, "Shift" }, "#" .. i + 9, - function () - if client.focus and tags[client.focus.screen][i] then - awful.client.movetotag(tags[client.focus.screen][i]) - end - end), - awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, - function () - if client.focus and tags[client.focus.screen][i] then - awful.client.toggletag(tags[client.focus.screen][i]) - end - end)) -end - -clientbuttons = awful.util.table.join( - awful.button({ }, 1, function (c) client.focus = c; c:raise() end), - awful.button({ modkey }, 1, awful.mouse.client.move), - awful.button({ modkey }, 3, awful.mouse.client.resize)) - --- Set keys -root.keys(globalkeys) --- }}} - --- {{{ Rules -awful.rules.rules = { - -- All clients will match this rule. - { rule = { }, - properties = { border_width = beautiful.border_width, - border_color = beautiful.border_normal, - focus = awful.client.focus.filter, - keys = clientkeys, - buttons = clientbuttons } }, - { rule = { class = "MPlayer" }, - properties = { floating = true } }, - { rule = { class = "pinentry" }, - properties = { floating = true } }, - { rule = { class = "gimp" }, - properties = { floating = true } }, - { rule = { class = "Anamnesis" }, - properties = { floating = true } }, - -- Set Firefox to always map on tags number 2 of screen 1. - -- { rule = { class = "Firefox" }, - -- properties = { tag = tags[1][2] } }, -} --- }}} - --- {{{ Signals --- Signal function to execute when a new client appears. -client.connect_signal("manage", function (c, startup) - -- Enable sloppy focus - c:connect_signal("mouse::enter", function(c) - if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier - and awful.client.focus.filter(c) then - client.focus = c - end - end) - - if not startup then - -- Set the windows at the slave, - -- i.e. put it at the end of others instead of setting it master. - -- awful.client.setslave(c) - - -- Put windows in a smart way, only if they does not set an initial position. - if not c.size_hints.user_position and not c.size_hints.program_position then - awful.placement.no_overlap(c) - awful.placement.no_offscreen(c) - end - end - - local titlebars_enabled = false - if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then - -- Widgets that are aligned to the left - local left_layout = wibox.layout.fixed.horizontal() - left_layout:add(awful.titlebar.widget.iconwidget(c)) - - -- Widgets that are aligned to the right - local right_layout = wibox.layout.fixed.horizontal() - right_layout:add(awful.titlebar.widget.floatingbutton(c)) - right_layout:add(awful.titlebar.widget.maximizedbutton(c)) - right_layout:add(awful.titlebar.widget.stickybutton(c)) - right_layout:add(awful.titlebar.widget.ontopbutton(c)) - right_layout:add(awful.titlebar.widget.closebutton(c)) - - -- The title goes in the middle - local title = awful.titlebar.widget.titlewidget(c) - title:buttons(awful.util.table.join( - awful.button({ }, 1, function() - client.focus = c - c:raise() - awful.mouse.client.move(c) - end), - awful.button({ }, 3, function() - client.focus = c - c:raise() - awful.mouse.client.resize(c) - end) - )) - - -- Now bring it all together - local layout = wibox.layout.align.horizontal() - layout:set_left(left_layout) - layout:set_right(right_layout) - layout:set_middle(title) - - awful.titlebar(c):set_widget(layout) - end -end) - -function find_default_theme() - -- find the default lua theme in the package path - for path in package.path:gmatch('([^;]+);') do - if path:match('awesome.*share') then - theme_path = path:match('^([^?]*)') .. '../themes/default/theme.lua' - if awful.util.file_readable(theme_path) then return theme_path end - end - end -end - -beautiful.init(find_default_theme()) -client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) -client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) --- }}} -- cgit v1.2.3 From 2c65fed39714164ff4b28e3352440538ae262c79 Mon Sep 17 00:00:00 2001 From: makefu Date: Wed, 14 Oct 2015 01:13:16 +0200 Subject: m 2 base-gui: apparently overwriting important stuff breaks other shit postInstall is being used in the awesome pkg to wrap the executable, if this does not happen nothing works --- makefu/2configs/base-gui.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefu/2configs/base-gui.nix b/makefu/2configs/base-gui.nix index 28a03b8ff..7b7f85f13 100644 --- a/makefu/2configs/base-gui.nix +++ b/makefu/2configs/base-gui.nix @@ -35,7 +35,7 @@ in }; nixpkgs.config.packageOverrides = pkgs: rec { awesome = pkgs.stdenv.lib.overrideDerivation pkgs.awesome (oldAttrs : { - postInstall = '' + postFixup = '' cp ${awesomecfg} $out/etc/xdg/awesome/rc.lua ''; }); -- cgit v1.2.3 From 51b88fc8e3ec339445af98f2416baf71d58a7077 Mon Sep 17 00:00:00 2001 From: makefu Date: Thu, 15 Oct 2015 00:28:13 +0200 Subject: m 2 base: make vim default editor --- makefu/2configs/base.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/makefu/2configs/base.nix b/makefu/2configs/base.nix index 91a500393..4e38c27f8 100644 --- a/makefu/2configs/base.nix +++ b/makefu/2configs/base.nix @@ -51,9 +51,7 @@ with lib; "d /tmp 1777 root root - -" ]; - environment.extraInit = '' - EDITOR=vim - ''; + environment.variables.EDITOR = mkForce "vim"; environment.systemPackages = with pkgs; [ jq -- cgit v1.2.3 From 38fe86347f001413ce29328eea7d0b93083775ca Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 15 Oct 2015 14:44:14 +0200 Subject: lass: get up2date ts3client --- lass/1systems/mors.nix | 1 + lass/2configs/base.nix | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lass/1systems/mors.nix b/lass/1systems/mors.nix index c0c33828b..0c272b866 100644 --- a/lass/1systems/mors.nix +++ b/lass/1systems/mors.nix @@ -179,6 +179,7 @@ sshpass get genid + teamspeak_client ]; #TODO: fix this shit diff --git a/lass/2configs/base.nix b/lass/2configs/base.nix index 43c4f4e34..7fdc643a7 100644 --- a/lass/2configs/base.nix +++ b/lass/2configs/base.nix @@ -44,7 +44,7 @@ with lib; build.source = { git.nixpkgs = { url = https://github.com/Lassulus/nixpkgs; - rev = "e916273209560b302ab231606babf5ce1c481f08"; + rev = "b9270a2e8ac3d2cf4c95075a9529528aa1d859da"; }; }; }; -- cgit v1.2.3 From 202b53db3f732687b7f6205ac0f9090e56986017 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 15 Oct 2015 14:44:46 +0200 Subject: l 1 mors: deactivate realwallpaper --- lass/1systems/mors.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/lass/1systems/mors.nix b/lass/1systems/mors.nix index 0c272b866..18949fcc7 100644 --- a/lass/1systems/mors.nix +++ b/lass/1systems/mors.nix @@ -23,7 +23,6 @@ ../2configs/wordpress.nix ../2configs/bitlbee.nix ../2configs/firefoxPatched.nix - ../2configs/realwallpaper.nix ../2configs/skype.nix ]; -- cgit v1.2.3 From 7ef76e4ce4f8b99b493b86d744cf0fc5531f53fb Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 15 Oct 2015 14:45:13 +0200 Subject: l 1 echelon: activate newsbot-js --- lass/1systems/echelon.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/lass/1systems/echelon.nix b/lass/1systems/echelon.nix index 1320e0782..e0948d95e 100644 --- a/lass/1systems/echelon.nix +++ b/lass/1systems/echelon.nix @@ -17,6 +17,7 @@ in { ../2configs/redis.nix ../2configs/go.nix ../2configs/ircd.nix + ../2configs/newsbot-js.nix { networking.interfaces.enp2s1.ip4 = [ { -- cgit v1.2.3 From ede2746b007023c3f01057ce826119471e9d94e4 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 15 Oct 2015 14:45:32 +0200 Subject: l 1 mors: configure touchpad --- lass/1systems/mors.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lass/1systems/mors.nix b/lass/1systems/mors.nix index 18949fcc7..7076c8b14 100644 --- a/lass/1systems/mors.nix +++ b/lass/1systems/mors.nix @@ -210,4 +210,9 @@ ]; }; }; + #touchpad config + services.xserver.synaptics = { + enable = true; + tapButtons = false; + }; } -- cgit v1.2.3 From 9325827d7830407cc6d224381b8342fd82caeb37 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 15 Oct 2015 14:45:55 +0200 Subject: l 2 bitlbee: listen on port 6666 --- lass/2configs/bitlbee.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lass/2configs/bitlbee.nix b/lass/2configs/bitlbee.nix index 3a0080402..fa14c7fea 100644 --- a/lass/2configs/bitlbee.nix +++ b/lass/2configs/bitlbee.nix @@ -8,8 +8,9 @@ in { ../3modules/bitlbee.nix ]; - config.lass.bitlbee = { + lass.bitlbee = { enable = true; bitlbeePkg = lpkgs.bitlbee; + portNumber = 6666; }; } -- cgit v1.2.3 From 96f13eb838f9bee37a980170f281d3839deb2719 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 15 Oct 2015 14:46:12 +0200 Subject: l 2 ircd: exempt localhost & retiolum --- lass/2configs/ircd.nix | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/lass/2configs/ircd.nix b/lass/2configs/ircd.nix index e48bbfd3e..4d2c134b6 100644 --- a/lass/2configs/ircd.nix +++ b/lass/2configs/ircd.nix @@ -46,24 +46,28 @@ class "users" { ping_time = 2 minutes; - number_per_ident = 200; - number_per_ip = 200; - number_per_ip_global = 500; + number_per_ident = 10; + number_per_ip = 2048; + number_per_ip_global = 4096; cidr_ipv4_bitlen = 24; cidr_ipv6_bitlen = 64; - number_per_cidr = 9000; - max_number = 10000; - sendq = 400 kbytes; + number_per_cidr = 65536; + max_number = 3000; + sendq = 1 megabyte; }; exempt { ip = "127.0.0.1"; }; + exempt { + ip = "10.243.0.0/16"; + }; + auth { user = "*@*"; class = "users"; - flags = exceed_limit; + flags = kline_exempt, exceed_limit, flood_exempt; }; channel { -- cgit v1.2.3 From fb945f741d709ec198cbf534ad0da2c623abac76 Mon Sep 17 00:00:00 2001 From: lassulus Date: Thu, 15 Oct 2015 15:26:47 +0200 Subject: krebs 5: move realwallpaper to folder --- krebs/5pkgs/realwallpaper/default.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 krebs/5pkgs/realwallpaper/default.nix diff --git a/krebs/5pkgs/realwallpaper/default.nix b/krebs/5pkgs/realwallpaper/default.nix new file mode 100644 index 000000000..4fea977ec --- /dev/null +++ b/krebs/5pkgs/realwallpaper/default.nix @@ -0,0 +1,28 @@ +{ stdenv, fetchgit, xplanet, imagemagick, curl, file }: + +stdenv.mkDerivation { + name = "realwallpaper"; + + src = fetchgit { + url = https://github.com/Lassulus/realwallpaper; + rev = "c2778c3c235fc32edc8115d533a0d0853ab101c5"; + sha256 = "0yhbjz19zk8sj5dsvccm6skkqq2vardn1yi70qmd5li7qvp17mvs"; + }; + + phases = [ + "unpackPhase" + "installPhase" + ]; + + buildInputs = [ + xplanet + imagemagick + curl + file + ]; + + installPhase = '' + mkdir -p $out + cp realwallpaper.sh $out/realwallpaper.sh + ''; +} -- cgit v1.2.3 From 4d7bb2475f13730f238e854783b81b7609cfdcba Mon Sep 17 00:00:00 2001 From: makefu Date: Fri, 16 Oct 2015 22:58:54 +0200 Subject: m 2 fs/sda-crypto-root-home: resolve TODO, import crypto-root, add device --- makefu/2configs/fs/sda-crypto-root-home.nix | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/makefu/2configs/fs/sda-crypto-root-home.nix b/makefu/2configs/fs/sda-crypto-root-home.nix index 3821c7504..c2075a665 100644 --- a/makefu/2configs/fs/sda-crypto-root-home.nix +++ b/makefu/2configs/fs/sda-crypto-root-home.nix @@ -9,31 +9,16 @@ with lib; { - boot = { - loader.grub.enable =true; - loader.grub.version =2; - loader.grub.device = "/dev/sda"; - initrd.luks.devices = [ { name = "main"; device = "/dev/sda2"; allowDiscards=true; }]; - initrd.luks.cryptoModules = ["aes" "sha512" "sha1" "xts" ]; - initrd.availableKernelModules = ["xhci_hcd" "ehci_pci" "ahci" "usb_storage" ]; - }; + imports = [ + ./sda-crypto-root.nix + ]; + fileSystems = { - "/" = { - device = "/dev/mapper/main-root"; - fsType = "ext4"; - options="defaults,discard"; - }; - # TODO: just import sda-crypto-root, add this device "/home" = { device = "/dev/mapper/main-home"; fsType = "ext4"; options="defaults,discard"; }; - "/boot" = { - device = "/dev/disk/by-label/nixboot"; - fsType = "ext4"; - options="defaults,discard"; - }; }; } -- cgit v1.2.3 From 49eb14094324169e13b8a8910b7ad1719501fb30 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 17 Oct 2015 11:17:11 +0200 Subject: m 2 fs/root-home: fix root label --- makefu/2configs/fs/sda-crypto-root-home.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/makefu/2configs/fs/sda-crypto-root-home.nix b/makefu/2configs/fs/sda-crypto-root-home.nix index c2075a665..cc2133a49 100644 --- a/makefu/2configs/fs/sda-crypto-root-home.nix +++ b/makefu/2configs/fs/sda-crypto-root-home.nix @@ -3,18 +3,19 @@ # ssd # # sda: bootloader grub2 # sda1: boot ext4 (label nixboot) -# sda2: cryptoluks -> lvm: -# / (main-root) -# /home (main-home) +# sda2: cryptoluks -> +# lvm: +# / (main-root) +# /home (main-home) with lib; { imports = [ - ./sda-crypto-root.nix + ./sda-crypto-root.nix # configures crypto + boot ]; - fileSystems = { + "/".device = lib.mkForce "/dev/mapper/main-root"; "/home" = { device = "/dev/mapper/main-home"; fsType = "ext4"; -- cgit v1.2.3 From f83b3770dd401004bef0233c3de0eb07686788a5 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 17 Oct 2015 11:17:54 +0200 Subject: krebs 2 Reaktor: Delay Restart of Reaktor - avoid fast restart loops --- krebs/3modules/Reaktor.nix | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/krebs/3modules/Reaktor.nix b/krebs/3modules/Reaktor.nix index 82089a660..1ec49b81e 100644 --- a/krebs/3modules/Reaktor.nix +++ b/krebs/3modules/Reaktor.nix @@ -126,9 +126,8 @@ let ExecStart = "${pkgs.Reaktor}/bin/reaktor run /tmp/config.py"; PrivateTmp = "true"; User = "Reaktor"; - Restart = "on-abort"; - StartLimitInterval = "1m"; - StartLimitBurst = "1"; + Restart = "always"; + RestartSec= "30" ; }; }; }; -- cgit v1.2.3 [cgit] Unable to lock slot /tmp/cgit/04200000.lock: No such file or directory (2)