Compare commits
No commits in common. "035224eab61b80b5f6053ac7f72a3a6efa2aaa3b" and "d211b2efba99d17eab42439b4353865fa16f40bc" have entirely different histories.
035224eab6
...
d211b2efba
5
Makefile
5
Makefile
@ -11,6 +11,11 @@ install-rm-keyfile:
|
|||||||
sudo cp ./base/rm-keyfile.service /etc/systemd/system
|
sudo cp ./base/rm-keyfile.service /etc/systemd/system
|
||||||
sudo systemctl enable rm-keyfile.service
|
sudo systemctl enable rm-keyfile.service
|
||||||
|
|
||||||
|
install-pamd:
|
||||||
|
drv=$$(nix-instantiate -E '((import ./pkgs.nix).stable {}).i3lock'); \
|
||||||
|
store=$$(nix-store --realise $$drv); \
|
||||||
|
sudo cp $$store"/etc/pam.d/i3lock" /etc/pam.d/i3lock
|
||||||
|
|
||||||
install-loadout:
|
install-loadout:
|
||||||
@if [ -z "$(HOSTNAME)" ]; then echo "USAGE: make HOSTNAME=... install-loadout"; exit 1; fi
|
@if [ -z "$(HOSTNAME)" ]; then echo "USAGE: make HOSTNAME=... install-loadout"; exit 1; fi
|
||||||
nix-env -v -i loadout -f default.nix --arg hostConfig "import ./config/$(HOSTNAME).nix"
|
nix-env -v -i loadout -f default.nix --arg hostConfig "import ./config/$(HOSTNAME).nix"
|
||||||
|
4
awesome/bin/random_i3lock.sh
Executable file
4
awesome/bin/random_i3lock.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
R=`find "$1" | grep -P 'png$' | sort -R | head -n1`
|
||||||
|
exec i3lock -i $R -t
|
3
awesome/config/gtk-3.0/bookmarks
Normal file
3
awesome/config/gtk-3.0/bookmarks
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
file:///tmp
|
||||||
|
file:///home/mediocregopher/Screenshots
|
||||||
|
file:///home/mediocregopher/Downloads
|
2
awesome/config/gtk-3.0/settings.ini
Normal file
2
awesome/config/gtk-3.0/settings.ini
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[Settings]
|
||||||
|
gtk-icon-theme-name = Tela
|
@ -2,10 +2,12 @@
|
|||||||
|
|
||||||
config,
|
config,
|
||||||
|
|
||||||
|
|
||||||
}: rec {
|
}: rec {
|
||||||
|
|
||||||
pkgs = (import ../pkgs.nix).stable {};
|
pkgs = (import ../pkgs.nix).stable {};
|
||||||
pkgs2305 = (import ../pkgs.nix).stable2305 {};
|
pkgs2305 = (import ../pkgs.nix).stable2305 {};
|
||||||
|
pkgsEdge = (import ../pkgs.nix).edge {};
|
||||||
|
|
||||||
xorgInnerEnv = pkgs.buildEnv {
|
xorgInnerEnv = pkgs.buildEnv {
|
||||||
name = "xorg-inner-env";
|
name = "xorg-inner-env";
|
||||||
@ -39,9 +41,10 @@ EOF
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
startx = pkgs.writeShellScriptBin "startx-awesome" ''
|
startx = pkgs.writeShellScriptBin "startx" ''
|
||||||
# TODO pass .xinitrc into here, somehow
|
# TODO pass .xinitrc into here, somehow
|
||||||
export XORGCONFIG=${xorgConf}
|
export XORGCONFIG=${xorgConf}
|
||||||
|
export PATH=${xorgInnerEnv}/bin:$PATH
|
||||||
exec startx
|
exec startx
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -57,6 +60,43 @@ EOF
|
|||||||
exec "$@"
|
exec "$@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
browser = pkgs.writeScriptBin "browser" ''
|
||||||
|
#!${pkgs.bash}/bin/bash
|
||||||
|
exec ${nativeWrap}/bin/native-wrap ${config.browser} "$@"
|
||||||
|
'';
|
||||||
|
|
||||||
|
env = pkgs.buildEnv {
|
||||||
|
name = "awesome-env";
|
||||||
|
paths = [
|
||||||
|
pkgs.awesome
|
||||||
|
pkgs.tela-icon-theme
|
||||||
|
|
||||||
|
nativeWrap
|
||||||
|
browser
|
||||||
|
|
||||||
|
pkgs.pavucontrol
|
||||||
|
pkgs.xdg-utils
|
||||||
|
pkgs.arandr
|
||||||
|
|
||||||
|
pkgs.i3lock
|
||||||
|
pkgs.scrot
|
||||||
|
pkgs.feh
|
||||||
|
pkgs.brightnessctl
|
||||||
|
|
||||||
|
pkgs.cbatticon
|
||||||
|
pkgs.phwmon
|
||||||
|
|
||||||
|
pkgs2305.libreoffice
|
||||||
|
pkgs.gimp
|
||||||
|
pkgs.inkscape
|
||||||
|
pkgs.vlc
|
||||||
|
pkgs.sylpheed
|
||||||
|
pkgs.calibre
|
||||||
|
|
||||||
|
pkgsEdge.lagrange
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
wp = ../wallpapers;
|
wp = ../wallpapers;
|
||||||
|
|
||||||
dirsLua = pkgs.writeTextDir "dirs.lua" ''
|
dirsLua = pkgs.writeTextDir "dirs.lua" ''
|
||||||
@ -71,10 +111,19 @@ EOF
|
|||||||
|
|
||||||
set -e -x
|
set -e -x
|
||||||
|
|
||||||
|
export BROWSER=${browser}/bin/browser
|
||||||
|
|
||||||
# Turn off powersaving (fuck the environment)
|
# Turn off powersaving (fuck the environment)
|
||||||
xset -dpms
|
xset -dpms
|
||||||
xset s off
|
xset s off
|
||||||
|
|
||||||
|
export PATH=${env}/bin:$PATH
|
||||||
|
|
||||||
|
export XDG_CONFIG_DIRS=${./config}
|
||||||
|
|
||||||
|
export XDG_DATA_DIRS=${env}/share
|
||||||
|
export XDG_DATA_DIRS=$XDG_DATA_DIRS:/home/mediocregopher/.nix-profile/share
|
||||||
|
|
||||||
${config.awesome.startupExtra}
|
${config.awesome.startupExtra}
|
||||||
|
|
||||||
# HACK: This sleep is here because phwmon actually creates a separate tray
|
# HACK: This sleep is here because phwmon actually creates a separate tray
|
||||||
@ -101,34 +150,11 @@ EOF
|
|||||||
|
|
||||||
echo "New awesome session starting" > $this_log
|
echo "New awesome session starting" > $this_log
|
||||||
|
|
||||||
exec ${pkgs.awesome}/bin/awesome \
|
exec awesome \
|
||||||
-c ${./rc.lua} \
|
-c ${./rc.lua} \
|
||||||
--search ${dirsLua} \
|
--search ${dirsLua} \
|
||||||
--search ${./share} \
|
--search ${./share} \
|
||||||
--search ${pkgs.awesome}/share/awesome/themes \
|
--search ${env}/share/awesome/themes \
|
||||||
2>&1 2>>$this_log
|
2>&1 2>>$this_log
|
||||||
'';
|
'';
|
||||||
|
|
||||||
env = pkgs.buildEnv {
|
|
||||||
name = "awesome-env";
|
|
||||||
paths = [
|
|
||||||
pkgs.tela-icon-theme
|
|
||||||
|
|
||||||
# We only include utilities in here which are directly used by awesome.
|
|
||||||
# General purpose applications go in the root default.nix env.
|
|
||||||
pkgs.pavucontrol
|
|
||||||
pkgs.xdg-utils
|
|
||||||
pkgs.arandr
|
|
||||||
pkgs.scrot
|
|
||||||
pkgs.feh
|
|
||||||
pkgs.brightnessctl
|
|
||||||
pkgs.cbatticon
|
|
||||||
pkgs.phwmon
|
|
||||||
|
|
||||||
xorgInnerEnv
|
|
||||||
nativeWrap
|
|
||||||
awesome
|
|
||||||
startx
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
@ -65,6 +65,10 @@ function rand_wp()
|
|||||||
return wp_dir .. wp
|
return wp_dir .. wp
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function rand_wp_lock()
|
||||||
|
awful.spawn(bin_dir.."random_i3lock.sh "..wp_dir, false)
|
||||||
|
end
|
||||||
|
|
||||||
local wp = rand_wp()
|
local wp = rand_wp()
|
||||||
local imgavg = io.popen("cat " .. wp .. " | " .. bin_dir .. "imgavg")
|
local imgavg = io.popen("cat " .. wp .. " | " .. bin_dir .. "imgavg")
|
||||||
local avgcolor = imgavg:read()
|
local avgcolor = imgavg:read()
|
||||||
@ -334,6 +338,9 @@ globalkeys = awful.util.table.join(
|
|||||||
naughty.notify({ text = "Screenshot taken" })
|
naughty.notify({ text = "Screenshot taken" })
|
||||||
end),
|
end),
|
||||||
|
|
||||||
|
--Lock screen
|
||||||
|
awful.key({ modkey, "Control" }, "Delete", rand_wp_lock),
|
||||||
|
|
||||||
awful.key( { }, "XF86AudioRaiseVolume", function()
|
awful.key( { }, "XF86AudioRaiseVolume", function()
|
||||||
awful.spawn("/usr/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%", false)
|
awful.spawn("/usr/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%", false)
|
||||||
awful.spawn("/usr/bin/pactl set-sink-mute @DEFAULT_SINK@ 0", false)
|
awful.spawn("/usr/bin/pactl set-sink-mute @DEFAULT_SINK@ 0", false)
|
||||||
|
3
bin/sshfs
Executable file
3
bin/sshfs
Executable file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
/usr/bin/sshfs -oTCPKeepAlive=yes -oServerAliveCountMax=1 -oServerAliveInterval=5 $@
|
24
default.nix
24
default.nix
@ -4,7 +4,6 @@
|
|||||||
|
|
||||||
pkgs ? (import ./pkgs.nix).stable {},
|
pkgs ? (import ./pkgs.nix).stable {},
|
||||||
pkgs2305 ? (import ./pkgs.nix).stable2305 {},
|
pkgs2305 ? (import ./pkgs.nix).stable2305 {},
|
||||||
pkgsEdge ? (import ./pkgs.nix).edge {},
|
|
||||||
|
|
||||||
}: let
|
}: let
|
||||||
|
|
||||||
@ -37,18 +36,6 @@ in rec {
|
|||||||
exec ${pkgs.git}/bin/git "$@"
|
exec ${pkgs.git}/bin/git "$@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
bin = pkgs.buildEnv {
|
|
||||||
name = "mediocregopher-bin";
|
|
||||||
paths = [
|
|
||||||
(pkgs.runCommand "mediocregopher-default-bin" {} ''
|
|
||||||
mkdir -p "$out"
|
|
||||||
cp -rL "${./bin}" "$out"/bin
|
|
||||||
'')
|
|
||||||
] ++ (
|
|
||||||
builtins.map (cFn: cFn pkgs) config.binExtra
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
zsh = ((import ./zsh) { inherit config; }).zsh;
|
zsh = ((import ./zsh) { inherit config; }).zsh;
|
||||||
awesome = ((import ./awesome) { inherit config; });
|
awesome = ((import ./awesome) { inherit config; });
|
||||||
|
|
||||||
@ -107,19 +94,12 @@ in rec {
|
|||||||
pkgs.udiskie
|
pkgs.udiskie
|
||||||
|
|
||||||
pkgs.xterm # nice to have a backup
|
pkgs.xterm # nice to have a backup
|
||||||
pkgs2305.libreoffice
|
|
||||||
pkgs.gimp
|
|
||||||
pkgs.inkscape
|
|
||||||
pkgs.vlc
|
|
||||||
pkgs.sylpheed
|
|
||||||
pkgs.calibre
|
|
||||||
pkgsEdge.lagrange
|
|
||||||
|
|
||||||
bin
|
|
||||||
((import ./nvim) {}).nvim
|
((import ./nvim) {}).nvim
|
||||||
zsh
|
zsh
|
||||||
((import ./alacritty) { inherit config zsh; }).alacritty
|
((import ./alacritty) { inherit config zsh; }).alacritty
|
||||||
awesome.env
|
awesome.awesome
|
||||||
|
awesome.startx
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,9 +5,27 @@
|
|||||||
|
|
||||||
}: rec {
|
}: rec {
|
||||||
|
|
||||||
|
ohMyZsh = ./oh-my-zsh;
|
||||||
|
|
||||||
|
bin = pkgs.buildEnv {
|
||||||
|
name = "mediocregopher-bin";
|
||||||
|
paths = [
|
||||||
|
(pkgs.stdenv.mkDerivation {
|
||||||
|
name = "mediocregopher-default-bin";
|
||||||
|
src = ../bin;
|
||||||
|
builder = builtins.toFile "builder.sh" ''
|
||||||
|
source $stdenv/setup
|
||||||
|
mkdir -p "$out"
|
||||||
|
cp -rL "$src" "$out"/bin
|
||||||
|
'';
|
||||||
|
})
|
||||||
|
] ++ (
|
||||||
|
builtins.map (cFn: cFn pkgs) config.binExtra
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
zshrc = pkgs.writeTextDir ".zshrc" ''
|
zshrc = pkgs.writeTextDir ".zshrc" ''
|
||||||
# Import before anything else, so that we have the full PATH available for
|
# Import before anything else, so that we have the full PATH available for everything following
|
||||||
# everything following
|
|
||||||
. ${pkgs.nix}/etc/profile.d/nix.sh
|
. ${pkgs.nix}/etc/profile.d/nix.sh
|
||||||
|
|
||||||
# oh-my-zsh
|
# oh-my-zsh
|
||||||
@ -18,7 +36,13 @@
|
|||||||
plugins=(git vi-mode)
|
plugins=(git vi-mode)
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
export BROWSER=${config.browser}/bin/browser
|
export PATH=${bin}/bin:$PATH
|
||||||
|
|
||||||
|
#Global stuff shitty programs use
|
||||||
|
export EDITOR=~/.nix-profile/bin/nvim
|
||||||
|
|
||||||
|
# GPG is needy
|
||||||
|
export GPG_TTY=$(tty)
|
||||||
|
|
||||||
. ${./zshrc}
|
. ${./zshrc}
|
||||||
. ${./aliases}
|
. ${./aliases}
|
||||||
|
Loading…
Reference in New Issue
Block a user