Compare commits
3 Commits
d211b2efba
...
035224eab6
Author | SHA1 | Date | |
---|---|---|---|
|
035224eab6 | ||
|
654914d8ee | ||
|
a0e3c9325b |
5
Makefile
5
Makefile
@ -11,11 +11,6 @@ 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"
|
||||||
|
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
R=`find "$1" | grep -P 'png$' | sort -R | head -n1`
|
|
||||||
exec i3lock -i $R -t
|
|
@ -1,3 +0,0 @@
|
|||||||
file:///tmp
|
|
||||||
file:///home/mediocregopher/Screenshots
|
|
||||||
file:///home/mediocregopher/Downloads
|
|
@ -1,2 +0,0 @@
|
|||||||
[Settings]
|
|
||||||
gtk-icon-theme-name = Tela
|
|
@ -2,12 +2,10 @@
|
|||||||
|
|
||||||
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";
|
||||||
@ -41,10 +39,9 @@ EOF
|
|||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
|
||||||
startx = pkgs.writeShellScriptBin "startx" ''
|
startx = pkgs.writeShellScriptBin "startx-awesome" ''
|
||||||
# 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
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -60,43 +57,6 @@ 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" ''
|
||||||
@ -111,19 +71,10 @@ 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
|
||||||
@ -150,11 +101,34 @@ EOF
|
|||||||
|
|
||||||
echo "New awesome session starting" > $this_log
|
echo "New awesome session starting" > $this_log
|
||||||
|
|
||||||
exec awesome \
|
exec ${pkgs.awesome}/bin/awesome \
|
||||||
-c ${./rc.lua} \
|
-c ${./rc.lua} \
|
||||||
--search ${dirsLua} \
|
--search ${dirsLua} \
|
||||||
--search ${./share} \
|
--search ${./share} \
|
||||||
--search ${env}/share/awesome/themes \
|
--search ${pkgs.awesome}/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,10 +65,6 @@ 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()
|
||||||
@ -338,9 +334,6 @@ 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)
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
/usr/bin/sshfs -oTCPKeepAlive=yes -oServerAliveCountMax=1 -oServerAliveInterval=5 $@
|
|
24
default.nix
24
default.nix
@ -4,6 +4,7 @@
|
|||||||
|
|
||||||
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
|
||||||
|
|
||||||
@ -36,6 +37,18 @@ 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; });
|
||||||
|
|
||||||
@ -94,12 +107,19 @@ 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.awesome
|
awesome.env
|
||||||
awesome.startx
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -5,27 +5,9 @@
|
|||||||
|
|
||||||
}: 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 everything following
|
# Import before anything else, so that we have the full PATH available for
|
||||||
|
# everything following
|
||||||
. ${pkgs.nix}/etc/profile.d/nix.sh
|
. ${pkgs.nix}/etc/profile.d/nix.sh
|
||||||
|
|
||||||
# oh-my-zsh
|
# oh-my-zsh
|
||||||
@ -36,13 +18,7 @@
|
|||||||
plugins=(git vi-mode)
|
plugins=(git vi-mode)
|
||||||
source $ZSH/oh-my-zsh.sh
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
export PATH=${bin}/bin:$PATH
|
export BROWSER=${config.browser}/bin/browser
|
||||||
|
|
||||||
#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