Compare commits

...

3 Commits

Author SHA1 Message Date
mediocregopher 035224eab6 Remove i3lock, I never use it anyway 5 months ago
mediocregopher 654914d8ee Import full awesome env into root env 5 months ago
mediocregopher a0e3c9325b Move bin derivation to global default.nix 5 months ago
  1. 5
      Makefile
  2. 4
      awesome/bin/random_i3lock.sh
  3. 3
      awesome/config/gtk-3.0/bookmarks
  4. 2
      awesome/config/gtk-3.0/settings.ini
  5. 78
      awesome/default.nix
  6. 7
      awesome/rc.lua
  7. 3
      bin/sshfs
  8. 26
      default.nix
  9. 30
      zsh/default.nix
  10. 6
      zsh/zshrc

@ -11,11 +11,6 @@ install-rm-keyfile:
sudo cp ./base/rm-keyfile.service /etc/systemd/system
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:
@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"

@ -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,
}: rec {
pkgs = (import ../pkgs.nix).stable {};
pkgs2305 = (import ../pkgs.nix).stable2305 {};
pkgsEdge = (import ../pkgs.nix).edge {};
xorgInnerEnv = pkgs.buildEnv {
name = "xorg-inner-env";
@ -41,10 +39,9 @@ EOF
done
'';
startx = pkgs.writeShellScriptBin "startx" ''
startx = pkgs.writeShellScriptBin "startx-awesome" ''
# TODO pass .xinitrc into here, somehow
export XORGCONFIG=${xorgConf}
export PATH=${xorgInnerEnv}/bin:$PATH
exec startx
'';
@ -60,43 +57,6 @@ EOF
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;
dirsLua = pkgs.writeTextDir "dirs.lua" ''
@ -111,19 +71,10 @@ EOF
set -e -x
export BROWSER=${browser}/bin/browser
# Turn off powersaving (fuck the environment)
xset -dpms
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}
# HACK: This sleep is here because phwmon actually creates a separate tray
@ -150,11 +101,34 @@ EOF
echo "New awesome session starting" > $this_log
exec awesome \
exec ${pkgs.awesome}/bin/awesome \
-c ${./rc.lua} \
--search ${dirsLua} \
--search ${./share} \
--search ${env}/share/awesome/themes \
--search ${pkgs.awesome}/share/awesome/themes \
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
end
function rand_wp_lock()
awful.spawn(bin_dir.."random_i3lock.sh "..wp_dir, false)
end
local wp = rand_wp()
local imgavg = io.popen("cat " .. wp .. " | " .. bin_dir .. "imgavg")
local avgcolor = imgavg:read()
@ -338,9 +334,6 @@ globalkeys = awful.util.table.join(
naughty.notify({ text = "Screenshot taken" })
end),
--Lock screen
awful.key({ modkey, "Control" }, "Delete", rand_wp_lock),
awful.key( { }, "XF86AudioRaiseVolume", function()
awful.spawn("/usr/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%", 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 $@

@ -4,6 +4,7 @@
pkgs ? (import ./pkgs.nix).stable {},
pkgs2305 ? (import ./pkgs.nix).stable2305 {},
pkgsEdge ? (import ./pkgs.nix).edge {},
}: let
@ -36,6 +37,18 @@ in rec {
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;
awesome = ((import ./awesome) { inherit config; });
@ -94,12 +107,19 @@ in rec {
pkgs.udiskie
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
zsh
((import ./alacritty) { inherit config zsh; }).alacritty
awesome.awesome
awesome.startx
awesome.env
];
};

@ -5,27 +5,9 @@
}: 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" ''
# 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
# oh-my-zsh
@ -36,13 +18,7 @@
plugins=(git vi-mode)
source $ZSH/oh-my-zsh.sh
export PATH=${bin}/bin:$PATH
#Global stuff shitty programs use
export EDITOR=~/.nix-profile/bin/nvim
# GPG is needy
export GPG_TTY=$(tty)
export BROWSER=${config.browser}/bin/browser
. ${./zshrc}
. ${./aliases}

@ -1,3 +1,9 @@
#Global stuff shitty programs use
export EDITOR=~/.nix-profile/bin/nvim
# GPG is needy
export GPG_TTY=$(tty)
#Correctly background processes
setopt nohup

Loading…
Cancel
Save