misc changes

This commit is contained in:
randomuser 2023-07-09 17:21:27 -05:00
parent dd1846046d
commit 16c071c9a3
8 changed files with 256 additions and 136 deletions

29
.gitignore vendored
View File

@ -1,30 +1,3 @@
.environment
.firefox_env
bash/hist
nvim/.netrwhist
bash/bash
bspwm/bspwm
git/git
nvim/nvim
simplestatus/simplestatus
ssh/ssh
sx/sx
sxhkd/sxhkd
zathura/zathura
python/python
firefox/
htop/htop
tridactyl/tridactyl
nvim/autoload/plug.vim.old
nvim/spell/
nvim/plugin
utils/*.swp
utils/*.tmp
utils/c/scream
utils/c/xgetnewwindow
utils/c/timer
utils/c/boid
utils/c/a.out
utils/c/anaconda
utils/c/colors
utils/c/tmessage
hardware-configuration.nix

26
builds/pash.nix Normal file
View File

@ -0,0 +1,26 @@
{ stdenv
, lib
, bash
, makeWrapper
, fetchgit
}:
stdenv.mkDerivation rec {
pname = "pash";
version = "1.00";
src = fetchgit {
url = "https://git.beepboop.systems/rndusr/pash";
sha256 = "sha256-0L3N7F4BwVdu4rR5xpUEIHcX/x64Gni8JTUki5kGH24=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
cp $src/pash $out/bin/pash
wrapProgram $out/bin/pash --prefix PATH : ${lib.makeBinPath [ bash ]}
'';
phases = [ "installPhase" ];
}

39
builds/st.nix Normal file
View File

@ -0,0 +1,39 @@
{ stdenv
, lib
, fetchgit
, pkg-config
, libX11
, libXft
, fontconfig
, freetype
, ncurses
, extraLibs ? [ ]
}:
stdenv.mkDerivation rec {
pname = "st";
version = "69.19";
src = fetchgit {
url = "https://git.beepboop.systems/rndusr/st";
sha256 = "sha256-zdID1SUnTO/zl90EG8TguBNYYCnrnqFnSLz32kQZbng=";
};
nativeBuildInputs = [ pkg-config fontconfig freetype ncurses];
buildInputs = [ libX11 libXft ] ++ extraLibs;
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out/bin
cp ${pname} $out/bin
'';
meta = with lib; {
description = "Customized builds of the st terminal emulator";
homepage = "https://git.beepboop.systems/rndusr/st";
license = licenses.mit;
};
}

18
builds/utils/sh/regenerate Executable file
View File

@ -0,0 +1,18 @@
#!/bin/sh
tmenu_path () {
IFS=" :"
for i in $PATH; do
for j in "$i"/*; do
[ -f "$j" ] && [ -x "$j" ] && printf "%s\n" "$j" | xargs basename
done
done
}
if [ "$1" = "-g" ] || [ "$(basename $0)" = "regenerate" ]; then
mkdir -p $HOME/.local/share
tmenu_path > $HOME/.local/share/tmenu_cache
xmessage "regeneration complete"
else
cat $HOME/.local/share/tmenu_cache | tmenu | ${SHELL:-"/bin/sh"} &
fi

View File

@ -124,6 +124,7 @@ setTabbing("python", 4)
setTabbing("javascript", 4)
setTabbing("css", 4)
setTabbing("html", 4)
setTabbing("nix", 2)
vim.api.nvim_create_autocmd({"TermOpen"}, {
pattern = {"*"},

View File

@ -24,6 +24,7 @@
tree
dig
htop
gnumake
];
system.copySystemConfiguration = true;

168
desktop.nix Normal file
View File

@ -0,0 +1,168 @@
{ lib, config, pkgs, ...}:
let
home-manager = builtins.fetchTarball {
url = "https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz";
sha256 = "0dfshsgj93ikfkcihf4c5z876h4dwjds998kvgv7sqbfv0z6a4bc";
};
in {
imports = [
(import "${home-manager}/nixos")
./configuration.nix
];
services.xserver = {
enable = true;
libinput.enable = true;
layout = "us";
# we're going to be pulling a sneaky
# we don't actually use startx, it just gets lightdm out of the way
displayManager.startx.enable = true;
};
sound.enable = true;
hardware.pulseaudio.enable = true;
environment.systemPackages = with pkgs; [
sx
lynx
fzy
gnupg
xclip
(pkgs.callPackage ./builds/utils.nix {})
(pkgs.callPackage ./builds/st.nix {})
(pkgs.callPackage ./builds/pash.nix {})
];
fonts.fonts = with pkgs; [
fantasque-sans-mono
];
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "curses";
enableSSHSupport = true;
};
programs.firefox = {
enable = true;
policies = {
DisableFirefoxStudies = true;
DisablePocket = true;
DisableTelemetry = {
Cryptomining = true;
Fingerprinting = true;
EmailTracking = true;
};
DisableFirefoxAccounts = true;
DisableFirefoxScreenshots = true;
DisableSetDesktopBackground = true;
DisplayBookmarksToolbar = "never";
DontCheckDefaultBrowser = true;
Extensions = {
Install = [
"https://addons.mozilla.org/firefox/downloads/file/3812704/umatrix-1.4.4.xpi"
"https://addons.mozilla.org/firefox/downloads/file/3824639/gruvbox_true_dark-2.0.xpi"
"https://addons.mozilla.org/firefox/downloads/file/4128489/darkreader-4.9.64.xpi"
"https://addons.mozilla.org/firefox/downloads/file/4036604/tridactyl_vim-1.23.0.xpi"
"https://addons.mozilla.org/firefox/downloads/file/4098688/user_agent_string_switcher-0.5.0.xpi"
];
};
FirefoxHome = {
Pocket = false;
Snippets = false;
TopSites = false;
SponsoredTopSites = false;
};
UserMessaging = {
ExtensionRecommendations = false;
SkipOnboarding = true;
MoreFromMozilla = false;
UrlbarInterventions = false;
WhatsNew = false;
};
EnableTrackingProtection = true;
OverrideFirstRunPage = "";
OverridePostUpdatePage = "";
PasswordManagerEnabled = false;
SearchSuggestEnabled = false;
};
nativeMessagingHosts.tridactyl = true;
};
users.users.usr = {
isNormalUser = true;
extraGroups = [ "wheel" ];
packages = with pkgs; [
firefox
tree
bspwm
sxhkd
];
};
# honking impure, but who's counting anyway?
system.activationScripts.test-script.text = ''
#!${pkgs.bash}/bin/bash
if [ "$(${pkgs.coreutils}/bin/whoami)" = "usr"]; then
${pkgs.coreutils}/bin/mkdir -p /home/usr/git
${pkgs.git}/bin/git https://git.beepboop.systems/rndusr/dot /home/usr/git/dot
${pkgs.git}/bin/git https://git.beepboop.systems/rndusr/privdata /home/usr/git/privdata
fi
'';
home-manager.users.usr.home = {
stateVersion = "23.05";
file = {
".config/bash" = {
source = ./config/bash;
recursive = true;
};
".config/bspwm" = {
source = ./config/bspwm;
recursive = true;
};
".config/git" = {
source = ./config/git;
recursive = true;
};
".config/htop" = {
source = ./config/htop;
recursive = true;
};
".config/nvim" = {
source = ./config/nvim;
recursive = true;
};
".config/python" = {
source = ./config/python;
recursive = true;
};
".config/sx" = {
source = ./config/sx;
recursive = true;
};
".config/sxhkd" = {
source = ./config/sxhkd;
recursive = true;
};
".config/tridactyl" = {
source = ./config/tridactyl;
recursive = true;
};
".config/zathura" = {
source = ./config/zathura;
recursive = true;
};
".local/share/wallpapers" = {
source = ./wallpapers;
recursive = true;
};
};
};
}

View File

@ -1,118 +1,12 @@
{ lib, config, pkgs, ...}:
let
home-manager = builtins.fetchTarball {
url = "https://github.com/nix-community/home-manager/archive/release-23.05.tar.gz";
sha256 = "0dfshsgj93ikfkcihf4c5z876h4dwjds998kvgv7sqbfv0z6a4bc";
};
in {
{
imports = [
(import "${home-manager}/nixos")
./configuration.nix
./desktop.nix
];
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";
networking.hostName = "virtbox";
services.xserver = {
enable = true;
libinput.enable = true;
layout = "us";
# we're going to be pulling a sneaky
# we don't actually use startx, it just gets lightdm out of the way
displayManager.startx.enable = true;
};
sound.enable = true;
hardware.pulseaudio.enable = true;
environment.systemPackages = with pkgs; [
sx
lynx
firefox
fzy
(pkgs.callPackage ./builds/utils.nix {})
(pkgs.callPackage ./builds/st.nix {})
];
fonts.fonts = with pkgs; [
fantasque-sans-mono
];
users.users.usr = {
isNormalUser = true;
extraGroups = [ "wheel" ];
packages = with pkgs; [
firefox
tree
bspwm
sxhkd
];
};
# honking impure, but who's counting anyway?
system.activationScripts.test-script.text = ''
#!${pkgs.bash}/bin/bash
if [ "$(${pkgs.coreutils}/bin/whoami)" = "usr"]; then
${pkgs.coreutils}/bin/mkdir -p /home/usr/git
${pkgs.git}/bin/git https://git.beepboop.systems/rndusr/dot /home/usr/git/dot
fi
'';
home-manager.users.usr.home = {
stateVersion = "23.05";
file = {
".config/bash" = {
source = ./config/bash;
recursive = true;
};
".config/bspwm" = {
source = ./config/bspwm;
recursive = true;
};
".config/git" = {
source = ./config/git;
recursive = true;
};
".config/htop" = {
source = ./config/htop;
recursive = true;
};
".config/nvim" = {
source = ./config/nvim;
recursive = true;
};
".config/python" = {
source = ./config/python;
recursive = true;
};
".config/sx" = {
source = ./config/sx;
recursive = true;
};
".config/sxhkd" = {
source = ./config/sxhkd;
recursive = true;
};
".config/tridactyl" = {
source = ./config/tridactyl;
recursive = true;
};
".config/zathura" = {
source = ./config/zathura;
recursive = true;
};
".local/share/wallpapers" = {
source = ./wallpapers;
recursive = true;
};
};
};
}