Compare commits
7 Commits
master
...
32cfdc0f3d
| Author | SHA1 | Date | |
|---|---|---|---|
| 32cfdc0f3d | |||
| aa7520e487 | |||
| c86f9f4dc1 | |||
| 011afecb6f | |||
| 99a93326b9 | |||
| 98b245bbf0 | |||
| aa55dc0251 |
@@ -24,18 +24,25 @@
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
username = "poslop";
|
||||
mkHost =
|
||||
host: modules:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
modules = [ { nixpkgs.hostPlatform = system; } ] ++ modules;
|
||||
specialArgs = {
|
||||
inherit
|
||||
self
|
||||
inputs
|
||||
username
|
||||
host
|
||||
;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
nixos-vm2 = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [ ./hosts/nixos-vm2/configuration.nix ];
|
||||
specialArgs = {
|
||||
host = "nixos-vm2";
|
||||
inherit self inputs username;
|
||||
};
|
||||
};
|
||||
nixos-vm2 = mkHost "nixos-vm2" [ ./hosts/nixos-vm2/configuration.nix ];
|
||||
qemu-vm = mkHost "qemu-vm" [ ./hosts/qemu-vm/configuration.nix ];
|
||||
goyplex-vm = mkHost "goyplex-vm" [ ./hosts/goyplex-vm/configuration.nix ];
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../modules
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
services.spice-vdagentd.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
# 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 = [ "uhci_hcd" "ehci_pci" "ahci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/4a546e61-4a4d-4e09-8b00-3f56acc14ccb";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/C838-5FC2";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
@@ -5,7 +5,7 @@
|
||||
./git.nix
|
||||
./hjem.nix
|
||||
./network.nix
|
||||
./packages.nix
|
||||
./packages
|
||||
./timezone.nix
|
||||
./nix.nix
|
||||
./pipewire.nix
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
{ host, ... }:
|
||||
|
||||
{
|
||||
networking.hostName = "poslop-nixvm2";
|
||||
networking.hostName = host;
|
||||
networking.networkmanager.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
systemd.user.services."nvim-config" = {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./user.nix
|
||||
./system.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
zsh
|
||||
];
|
||||
|
||||
}
|
||||
@@ -1,16 +1,11 @@
|
||||
{ pkgs, username, inputs, ... }:
|
||||
{ pkgs, username, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
zsh
|
||||
];
|
||||
|
||||
hjem.users.${username}.packages = with pkgs; [
|
||||
clang
|
||||
lld
|
||||
nixfmt
|
||||
llvmPackages.bintools
|
||||
tlrc
|
||||
rustc
|
||||
cargo
|
||||
unzip
|
||||
neovim
|
||||
btop
|
||||
@@ -10,3 +10,14 @@ zstyle :compinstall filename '/home/poslop/.zshrc'
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
alias ga='git add'
|
||||
alias gc='git commit'
|
||||
alias gp='git push'
|
||||
alias gs='git status'
|
||||
|
||||
rerice() {
|
||||
local flake_dir="/etc/rice-flakes"
|
||||
host="${1:-$(hostname -s)}"
|
||||
sudo nixos-rebuild switch --flake "${flake_dir}#${host}"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
programs.hyprland.enable = true;
|
||||
hj = {
|
||||
rum.programs.hyprland.enable = true;
|
||||
rum.desktops.hyprland.enable = true;
|
||||
|
||||
files = {
|
||||
".config/hypr".source = ./hypr;
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
sudo nixos-rebuild switch --flake ./#nixos-vm2
|
||||
sudo nixos-rebuild switch --flake ./#qemu-vm
|
||||
|
||||
Reference in New Issue
Block a user