This commit is contained in:
randomuser 2023-12-28 00:20:13 -06:00
parent d6d7097b06
commit a052c6a758
20 changed files with 239 additions and 179 deletions

View File

@ -1,11 +1,10 @@
{ config, pkgs, ... }:
{
imports =
[
./hardware-configuration.nix
];
imports = [
./hardware-configuration.nix
];
environment.systemPackages = with pkgs; [
git
neovim

View File

@ -1,6 +1,13 @@
{ lib, config, pkgs, ...}:
{
imports = [
../bootstrap.nix
../modules/common.nix
../modules/x11.nix
../modules/discord.nix
];
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";

32
builds/flake.nix Normal file
View File

@ -0,0 +1,32 @@
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
outputs =
{ nixpkgs, ... }:
let
inherit (nixpkgs) lib;
withSystem =
f:
lib.fold lib.recursiveUpdate { } (
map f [
"x86_64-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
]
);
mkPackages = pkgs: {
st = pkgs.callPackage ./st.nix { };
rebuild = pkgs.callPackage ./rebuild.nix { };
utils = pkgs.callPackage ./utils.nix { };
pash = pkgs.callPackage ./pash.nix { };
};
in
withSystem (
system: {
overlays.default = final: _: mkPackages final;
packages.${system} = mkPackages nixpkgs.legacyPackages.${system};
}
);
}

View File

@ -1,120 +1,7 @@
{ lib, config, pkgs, ...}:
let
customPolybar = pkgs.polybar.override {
alsaSupport = true;
pulseSupport = true;
};
in {
{
imports = [
./main.nix
];
services.xserver = {
enable = true;
libinput.enable = true;
layout = "us";
displayManager.sx.enable = true;
};
sound.enable = true;
hardware.pulseaudio.enable = true;
nixpkgs.config = {
allowUnfree = true;
permittedInsecurePackages = [
"libxls-1.6.2"
];
};
environment.systemPackages = with pkgs; [
sx
fzy
xclip
xcape
ffmpeg
man-pages
ncmpcpp
pciutils
tor-browser-bundle-bin
xscreensaver
ncpamixer
gpick
calcurse
dunst
libnotify
tig
mpv
yt-dlp
tmux
lynx
feh
elinks
sc-im
ledger
remind
python3
pinentry-curses
magic-wormhole
xbrightness
xdotool
figlet
neomutt
unzip
lua-language-server
rnix-lsp
python311Packages.jedi-language-server
ungoogled-chromium
discord
customPolybar
(pkgs.callPackage ../builds/utils.nix {})
(pkgs.callPackage ../builds/st.nix {})
(pkgs.callPackage ../builds/pash.nix {})
];
fonts.packages = with pkgs; [
fantasque-sans-mono
];
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "gtk2";
enableSSHSupport = true;
};
users.users.usr = {
isNormalUser = true;
extraGroups = [ "wheel" ];
initialPassword = "usr";
packages = with pkgs; [
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
'';
environment.etc = {
"profile.local" = {
text = "source /home/usr/.config/bash/profile";
};
"bashrc.local" = {
text = "source /home/usr/.config/bash/bashrc";
};
};
}

View File

@ -1,36 +1,5 @@
{ lib, config, pkgs, ... }:
let
my_neovim = pkgs.neovim.overrideAttrs (oldAttrs: {
buildInputs = oldAttrs.buildInputs or [] ++ [ pkgs.luajitPackages.luaexpat ];
});
in {
imports =
[
../hardware-configuration.nix # include the results of the hardware scan
];
networking.networkmanager.enable = true;
time.timeZone = "America/Chicago";
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
environment.systemPackages = with pkgs; [
curl
htop
git
tree
dig
htop
gnumake
(pkgs.callPackage ../builds/rebuild.nix {})
];
{
system.stateVersion = "23.11"; # don't change this, lol
}

View File

@ -79,7 +79,25 @@
"inputs": {
"firefox-addons": "firefox-addons",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"utils": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1,
"narHash": "sha256-WtyNlVS46B3e7GlJY0S5p9lKfp++kVudfkzinGtTP+8=",
"path": "/nix/store/4910sx6j7s74xb9ywmp0piqfgkr2v3lx-source/builds",
"type": "path"
},
"original": {
"path": "/nix/store/4910sx6j7s74xb9ywmp0piqfgkr2v3lx-source/builds",
"type": "path"
}
}
},

View File

@ -11,23 +11,25 @@
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
utils = {
url = "./builds";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, firefox-addons, ... }@inputs: {
outputs = { self, nixpkgs, home-manager, firefox-addons, utils, ... }@inputs: {
nixosConfigurations = {
virtbox = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./bootstrap.nix
./boxes/virtbox.nix
./common/desktop.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs; };
home-manager.users.usr = import ./home/terminal.nix;
home-manager.users.usr = import ./home/x11.nix;
}
];
};

View File

@ -1,23 +0,0 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
./bash/default.nix
./bspwm/default.nix
./git/default.nix
./htop/default.nix
./nvim/default.nix
./python/default.nix
./polybar/default.nix
./sx/default.nix
./sxhkd/default.nix
./tridactyl/default.nix
./zathura/default.nix
./wallpapers/default.nix
./firefox/default.nix
./gnupg/default.nix
./emacs/default.nix
];
home.stateVersion = "23.11";
}

17
home/tty-progs.nix Normal file
View File

@ -0,0 +1,17 @@
{ lib, config, pkgs, ...}:
{
home.packages = with pkgs; [
cmus # music player
ncpamixer # audio mixer
yt-dlp # youtube downloader
tmux # (t)erminal (mu)ltiple(x)er
elinks # tty web browser
ledger # accounting
neomutt # mail
curl
tree
dig
python3 # nice interactive calculator and shell
];
}

16
home/tty.nix Normal file
View File

@ -0,0 +1,16 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
./bash
./git
./htop
./nvim
./python
./gnupg
./tty-progs.nix
];
home.stateVersion = "23.11";
}

13
home/x11-progs.nix Normal file
View File

@ -0,0 +1,13 @@
{ lib, config, pkgs, ...}:
{
home.packages = with pkgs; [
xclip
xcape
xscreensaver
mpv
feh
xbrightness
xdotool
];
}

18
home/x11.nix Normal file
View File

@ -0,0 +1,18 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
./bspwm
./polybar
./sx
./sxhkd
./tridactyl
./zathura
./wallpapers
./firefox
./emacs
./x11-progs.nix
./tty.nix
];
}

13
modules/bash.nix Normal file
View File

@ -0,0 +1,13 @@
{ lib, config, pkgs, ...}:
{
# make the home-manager .config/bash/(profile/bashrc) work
environment.etc = {
"profile.local" = {
text = "source /home/usr/.config/bash/profile";
};
"bashrc.local" = {
text = "source /home/usr/.config/bash/bashrc";
};
};
}

33
modules/common.nix Normal file
View File

@ -0,0 +1,33 @@
{ lib, config, pkgs, inputs, ...}:
{
imports = [
./bash.nix
];
environment.systemPackages = [
# inputs.utilpkg.packages.st
# inputs.utilpkg.packages.rebuild
# inputs.utilpkg.packages.utils
# inputs.utilpkg.st
# inputs.utilpkg.rebuild
# inputs.utilpkg.utils
pkgs.man-pages
];
networking.networkmanager.enable = true;
time.timeZone = "America/Chicago";
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
users.users.usr = {
isNormalUser = true;
extraGroups = [ "wheel" ];
initialPassword = "usr";
};
}

7
modules/discord.nix Normal file
View File

@ -0,0 +1,7 @@
{ lib, config, pkgs, ...}:
{
environment.systemPackages = with pkgs; [
discord
];
}

7
modules/fonts.nix Normal file
View File

@ -0,0 +1,7 @@
{ lib, config, pkgs, ...}:
{
fonts.packages = with pkgs; [
fantasque-sans-mono
];
}

9
modules/gnupg.nix Normal file
View File

@ -0,0 +1,9 @@
{ lib, config, pkgs, ...}:
{
programs.gnupg.agent = {
enable = true;
pinentryFlavor = "gtk2";
enableSSHSupport = true;
};
}

12
modules/polybar.nix Normal file
View File

@ -0,0 +1,12 @@
{ lib, config, pkgs, ...}:
let
customPolybar = pkgs.polybar.override {
alsaSupport = true;
pulseSupport = true;
};
in {
environment.systemPackages = with pkgs; [
customPolybar
];
}

6
modules/pulse.nix Normal file
View File

@ -0,0 +1,6 @@
{ lib, config, pkgs, ...}:
{
sound.enable = true;
hardware.pulseaudio.enable = true;
}

18
modules/x11.nix Normal file
View File

@ -0,0 +1,18 @@
{ lib, config, pkgs, ...}:
{
imports = [
./polybar.nix
./gnupg.nix
./fonts.nix
./pulse.nix
];
services.xserver = {
enable = true;
libinput.enable = true;
layout = "us";
displayManager.sx.enable = true;
};
}