Compare commits

...

8 Commits

Author SHA1 Message Date
99a93326b9 packages reformat 2026-02-20 14:08:18 -06:00
98b245bbf0 rename reflake to rerice 2026-02-19 15:49:13 -06:00
aa55dc0251 host 2026-02-19 13:08:11 -06:00
570687deae credential store 2026-01-30 23:34:47 -06:00
9c4ec53b0f nix lsp for nvim 2026-01-30 23:29:19 -06:00
b038dd3a41 package clean 2026-01-30 22:36:31 -06:00
c08fb243cc moved fonts to home 2026-01-30 20:30:30 -06:00
835e7498e4 nvim systemd for cloning 2026-01-30 20:24:40 -06:00
17 changed files with 119 additions and 92 deletions

View File

@@ -35,6 +35,15 @@
inherit self inputs username;
};
};
qemu-vm = nixpkgs.lib.nixosSystem {
inherit system;
modules = [ ./hosts/qemu-vm/configuration.nix ];
specialArgs = {
host = "qemu-vm";
inherit self inputs username;
};
};
};
};

View File

@@ -1,42 +0,0 @@
{
pkgs,
...
}:
{
nix.settings = {
experimental-features = "nix-command flakes";
};
imports = [
./hardware-configuration.nix
./modules
];
programs.hyprland.enable = true;
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";
networking.hostName = "poslop-nixvm";
networking.networkmanager.enable = true;
time.timeZone = "America/Chicago";
services.printing.enable = true;
services.pipewire = {
enable = true;
pulse.enable = true;
};
environment.systemPackages = with pkgs; [
kitty
vim
wget
git
curl
zsh
];
system.stateVersion = "24.11";
}

View File

@@ -1,34 +0,0 @@
# 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.
{
lib,
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-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/39b3801f-ffcd-421f-966f-46625fb8d4ca";
fsType = "ext4";
};
swapDevices = [ { device = "/dev/disk/by-uuid/7043d338-93f0-40a7-9033-6616685e32f3"; } ];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@@ -0,0 +1,18 @@
{
...
}:
{
imports = [
./hardware-configuration.nix
../../modules
];
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/vda";
services.spice-vdagentd.enable = true;
services.qemuGuest.enable = true;
system.stateVersion = "24.11";
}

View File

@@ -0,0 +1,33 @@
# 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" "virtio_blk" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/b8c66f3c-759d-4d4f-9d1a-3f2e04d91e23";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/b7d73851-7f85-44fa-b62a-e35deb0ea98a"; }
];
# 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.enp8s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@@ -3,10 +3,9 @@
./nvim.nix
./zsh
./git.nix
./fonts.nix
./hjem.nix
./network.nix
./packages.nix
./packages
./timezone.nix
./nix.nix
./pipewire.nix

View File

@@ -9,6 +9,9 @@
core = {
editor = "nvim -f";
};
credential = {
helper = "store";
};
};
};
}

View File

@@ -1,4 +1,6 @@
{ host, ... }:
{
networking.hostName = "poslop-nixvm2";
networking.hostName = host;
networking.networkmanager.enable = true;
}

View File

@@ -1,9 +1,24 @@
{ pkgs, ... }:
{
hj.files."./.config/nvim" = {
source = builtins.fetchGit {
url = "https://git.archfox.org/poslop/nvbad.git";
rev = "eab1653d4e3663562c597bab493eeb12d94d905c";
systemd.user.services."nvim-config" = {
description = "Clone Neovim config into ~/.config/nvim";
after = [ "network.target" ];
wantedBy = [ "default.target" ];
enable = true;
serviceConfig = {
Type = "oneshot";
};
uid = "poslop";
script = ''
set -e
if [ ! -d "$HOME/.config/nvim/.git" ]; then
echo "Cloning Neovim config..."
${pkgs.git}/bin/git clone https://git.archfox.org/poslop/nvbad.git "$HOME/.config/nvim"
else
echo "Neovim config already exists, skipping."
fi
'';
};
}

View File

@@ -0,0 +1,6 @@
{
imports = [
./user.nix
./system.nix
];
}

View File

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

View File

@@ -1,11 +1,12 @@
{ pkgs, username, inputs, ... }:
{ pkgs, username, ... }:
{
environment.systemPackages = with pkgs; [
#inputs.nix4nvchad.packages.${system}.nvchad
zsh
];
hjem.users.${username}.packages = with pkgs; [
clang
lld
nixfmt
llvmPackages.bintools
tlrc
unzip
neovim
btop
curl

View File

@@ -1,4 +1,7 @@
_:
{
programs.zsh.enable = true;
programs = {
zsh.enable = true;
nix-ld.enable = true;
};
}

View File

@@ -10,3 +10,9 @@ zstyle :compinstall filename '/home/poslop/.zshrc'
autoload -Uz compinit
compinit
rerice() {
local flake_dir="/etc/rice-flakes"
host="${1:-$(hostname -s)}"
sudo nixos-rebuild switch --flake "${flake_dir}#${host}"
}

View File

@@ -2,5 +2,6 @@
imports = [
./hyprland
./packages.nix
./fonts.nix
];
}

View File

@@ -1 +1 @@
sudo nixos-rebuild switch --flake ./#nixos-vm2
sudo nixos-rebuild switch --flake ./#qemu-vm