This commit is contained in:
randomuser 2023-12-28 15:27:31 -06:00
parent 7995c89087
commit e7f323f9bf
24 changed files with 72 additions and 201 deletions

View File

@ -1,10 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
<nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
# Provide an initial copy of the NixOS channel so that the user
# doesn't need to run "nix-channel --update" first.
<nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
];
}

View File

@ -2,10 +2,13 @@
{ {
imports = [ imports = [
../common/desktop.nix ./hardware-configuration.nix
../common/nvidia.nix ./nvidia.nix
../common/gaming.nix ../../modules/bootstrap.nix
../common/steam.nix ../../modules/common.nix
../../modules/x11.nix
../../modules/discord.nix
../../modules/gaming.nix
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@ -2,10 +2,11 @@
{ {
imports = [ imports = [
../bootstrap.nix ./hardware-configuration.nix
../modules/common.nix ../../modules/bootstrap.nix
../modules/x11.nix ../../modules/common.nix
../modules/discord.nix ../../modules/x11.nix
../../modules/discord.nix
]; ];
boot.loader.grub.enable = true; boot.loader.grub.enable = true;

9
boxes/virtbox/home.nix Normal file
View File

@ -0,0 +1,9 @@
{ lib, inputs, config, pkgs, home, ... }:
{
imports = [
../../home/x11.nix
];
home.stateVersion = "23.11";
}

View File

@ -1,48 +0,0 @@
{ lib, config, pkgs, ...}:
{
imports = [
../common/desktop.nix
../common/steam.nix
];
environment.systemPackages = with pkgs; [
gnome.cheese
musescore
libsForQt5.kdenlive
xdotool
texlive.combined.scheme-full
lilypond
virt-manager
# virtualbox
xsane
android-studio
mpc-cli
emacs
nyxt
cmus
];
# users.extraGroups.vboxusers.members = [ "usr" ];
# virtualisation.virtualbox.host.enable = true;
# virtualisation.virtualbox.host.enableExtensionPack = true;
services.tlp.enable = true;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
services.printing.enable = true;
services.avahi.enable = true;
services.avahi.nssmdns = true;
# for a WiFi printer
services.avahi.openFirewall = true;
networking.nameservers = [ "1.1.1.1" "9.9.9.9" ];
networking.hostName = "xps";
virtualisation.libvirtd.enable = true;
programs.dconf.enable = true;
users.users.usr.extraGroups = [ "libvirtd" ];
}

27
builds/flake.lock Normal file
View File

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1703467016,
"narHash": "sha256-/5A/dNPhbQx/Oa2d+Get174eNI3LERQ7u6WTWOlR1eQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "d02d818f22c777aa4e854efc3242ec451e5d462a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

View File

@ -19,7 +19,6 @@
st = pkgs.callPackage ./st.nix { }; st = pkgs.callPackage ./st.nix { };
rebuild = pkgs.callPackage ./rebuild.nix { }; rebuild = pkgs.callPackage ./rebuild.nix { };
utils = pkgs.callPackage ./utils.nix { }; utils = pkgs.callPackage ./utils.nix { };
pash = pkgs.callPackage ./pash.nix { };
}; };
in in
withSystem ( withSystem (

View File

@ -1,7 +0,0 @@
{ lib, config, pkgs, ...}:
{
imports = [
./main.nix
];
}

View File

@ -1,9 +0,0 @@
{ config, lib, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
steam-run
prismlauncher
xonotic
minetest
];
}

View File

@ -1,5 +0,0 @@
{ lib, config, pkgs, ... }:
{
system.stateVersion = "23.11"; # don't change this, lol
}

View File

@ -1,5 +0,0 @@
{ lib, config, pkgs, home-manager, ...}:
{
home

View File

@ -80,10 +80,10 @@
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"utils": "utils" "utilpkg": "utilpkg"
} }
}, },
"utils": { "utilpkg": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -91,12 +91,12 @@
}, },
"locked": { "locked": {
"lastModified": 1, "lastModified": 1,
"narHash": "sha256-WtyNlVS46B3e7GlJY0S5p9lKfp++kVudfkzinGtTP+8=", "narHash": "sha256-xCQE9SSKWjmoYOaIkzdlGULeGbEF9Gau5TPgYJxalmw=",
"path": "/nix/store/4910sx6j7s74xb9ywmp0piqfgkr2v3lx-source/builds", "path": "/nix/store/khgahixmjd7zvvv541crbibjwg3wbshv-source/builds",
"type": "path" "type": "path"
}, },
"original": { "original": {
"path": "/nix/store/4910sx6j7s74xb9ywmp0piqfgkr2v3lx-source/builds", "path": "/nix/store/khgahixmjd7zvvv541crbibjwg3wbshv-source/builds",
"type": "path" "type": "path"
} }
} }

View File

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

View File

@ -11,6 +11,4 @@
./tty-progs.nix ./tty-progs.nix
]; ];
home.stateVersion = "23.11";
} }

View File

@ -7,12 +7,9 @@
environment.systemPackages = [ environment.systemPackages = [
# is it this? this throws a similar error; no attr st, etc. # is it this? this throws a similar error; no attr st, etc.
# inputs.utilpkg.packages.st inputs.utilpkg.packages.x86_64-linux.st
# inputs.utilpkg.packages.rebuild inputs.utilpkg.packages.x86_64-linux.rebuild
# inputs.utilpkg.packages.utils inputs.utilpkg.packages.x86_64-linux.utils
inputs.utilpkg.st
inputs.utilpkg.rebuild
inputs.utilpkg.utils
pkgs.man-pages pkgs.man-pages
]; ];

View File

@ -4,4 +4,8 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
discord discord
]; ];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"discord"
];
} }

View File

@ -7,6 +7,8 @@
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
steam-run prismlauncher
xonotic
minetest
]; ];
} }

View File

@ -8,6 +8,11 @@
./pulse.nix ./pulse.nix
]; ];
environment.systemPackages = [
pkgs.bspwm
pkgs.sxhkd
];
services.xserver = { services.xserver = {
enable = true; enable = true;
libinput.enable = true; libinput.enable = true;

View File

@ -1,79 +0,0 @@
if [ "$(id -u)" -eq 1000 ]; then
printf "switch to the root user, and try again.\n"
exit 1
fi
lsblk
read -p "Drive name? (/dev/vda): " DRIVE
ls ../boxes
read -p "NixOS configuration? (virtbox): " NIXOS_CONFIG
read -p "Reboot? (yes/no, default 'yes'): " REBOOT
umount -f /mnt/boot
umount -f /mnt
swapoff -a
nix-env -iA nixos.git
if [ -z "$DRIVE" ]; then
DRIVE="/dev/vda"
fi
if [ -z "$NIXOS_CONFIG" ]; then
NIXOS_CONFIG="virtbox"
fi
if [ -z "$REBOOT" ]; then
REBOOT="yes"
fi
fdisk "$DRIVE" <<EOF
d
d
d
d
n
p
1
+200M
y
n
p
2
+8G
y
n
p
3
y
w
EOF
yes | mkfs.ext4 "$DRIVE"1
yes | mkswap "$DRIVE"2
yes | mkfs.ext4 "$DRIVE"3
mount "$DRIVE"3 /mnt
mkdir /mnt/boot
mount "$DRIVE"1 /mnt/boot
swapon "$DRIVE"2
nixos-generate-config --root /mnt
git clone https://git.beepboop.systems/rndusr/dot_testing /mnt/root/dot_testing
cp /mnt/etc/nixos/hardware-configuration.nix /mnt/root/dot_testing/
yes | nixos-install -I nixos-config=/mnt/root/dot_testing/boxes/$NIXOS_CONFIG.nix --cores 0
mv /mnt/root/dot_testing /mnt/home/usr/dot_testing
if [ "$REBOOT" = "yes" ]; then
reboot
fi

View File

@ -1,10 +0,0 @@
# fetch private data repository and deploy
mkdir -p $HOME/git/
git clone https://git.beepboop.systems/rndusr/privdata $HOME/git/privdata
cd $HOME/git/privdata
./handler.sh unarch
cd output
make

View File

@ -1 +0,0 @@
# sets up a 'traditional' environment in our home directory