smorgasboard (tm)

This commit is contained in:
randomuser 2023-07-07 16:55:42 -05:00
parent 9c49ea2dfd
commit 013cbc1a0f
51 changed files with 193 additions and 11 deletions

33
builds/utils.nix Normal file
View File

@ -0,0 +1,33 @@
{ stdenv
, lib
, bash
, feh
, jq
, curl
, xrandr
, makeWrapper
}:
stdenv.mkDerivation rec {
pname = "utils";
version = "1.00";
src = ./utils;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash feh xrandr jq curl ];
buildPhase = "";
installPhase = ''
mkdir -p $out/bin
for i in $(ls $src/sh); do
cp $src/sh/$i $out/bin
wrapProgram $out/bin/$i --prefix PATH : ${lib.makeBinPath [ bash feh xrandr jq curl ]}
done
'';
phases = [ "buildPhase" "installPhase" ];
}

122
configuration.nix Normal file
View File

@ -0,0 +1,122 @@
{ 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 =
[
./hardware-configuration.nix
(import "${home-manager}/nixos")
];
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";
networking.hostName = "virtbox"; # Define your hostname.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
time.timeZone = "America/Chicago";
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
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; [
neovim
curl
htop
git
sx
(pkgs.callPackage ./builds/utils/utils.nix {})
];
users.users.usr = {
isNormalUser = true;
extraGroups = [ "wheel" ];
packages = with pkgs; [
firefox
tree
bspwm
sxhkd
];
};
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;
};
};
};
system.copySystemConfiguration = true;
system.stateVersion = "23.05"; # don't change this, lol
}

11
environ
View File

@ -1,11 +0,0 @@
#!/bin/sh
set -x
[ -f .environment ] && exit 2
[ -w /etc/bash.bashrc ] || exit 1
[ -w /etc/profile ] || exit 1
printf '[ -f $HOME/.config/bash/bashrc ] && . $HOME/.config/bash/bashrc\n' >> /etc/bash.bashrc
printf '[ -f $HOME/.config/bash/profile ] && . $HOME/.config/bash/profile\n' >> /etc/profile
touch .environment

View File

@ -0,0 +1,38 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/profiles/qemu-guest.nix")
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/348bd40a-08e7-48e4-aad7-d4fe002e9dc0";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/f161dbd9-52f3-4d04-b327-dbcf74cc44fd";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/9349bfd4-d7f0-4e0d-b485-5e897d2d1e7b"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}