doing all sorts of random stuff, custom isntaller iso, testbed, etc
This commit is contained in:
parent
bdd5bf83ed
commit
334f73d0a6
9 changed files with 897 additions and 380 deletions
|
|
@ -97,6 +97,7 @@
|
|||
# ./sway_customizations.nix
|
||||
./i3_customizations.nix
|
||||
./opencode-shim.nix
|
||||
./vms.nix
|
||||
(
|
||||
{
|
||||
config,
|
||||
|
|
|
|||
32
hosts/lio/vms.nix
Normal file
32
hosts/lio/vms.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
options = { };
|
||||
|
||||
config = {
|
||||
users.users.josh.extraGroups = [ "libvirtd" "kvm" ];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
virt-manager
|
||||
virt-viewer
|
||||
spice
|
||||
spice-gtk
|
||||
spice-protocol
|
||||
win-virtio
|
||||
win-spice
|
||||
adwaita-icon-theme
|
||||
];
|
||||
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
qemu = {
|
||||
swtpm.enable = true;
|
||||
ovmf.enable = true;
|
||||
ovmf.packages = [ pkgs.OVMFFull.fd ];
|
||||
};
|
||||
};
|
||||
spiceUSBRedirection.enable = true;
|
||||
};
|
||||
services.spice-vdagentd.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
...
|
||||
}:
|
||||
{
|
||||
system.stateVersion = "25.05"; # Did you read the comment?
|
||||
}
|
||||
876
hosts/testbed/flake.lock
generated
876
hosts/testbed/flake.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,16 +1,19 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
# nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager.url = "github:rycee/home-manager/release-25.05";
|
||||
|
||||
# Use relative to get current version for testing
|
||||
# common.url = "path:../../common";
|
||||
common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles";
|
||||
# common.url = "path:../../flakes/common";
|
||||
common.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/common";
|
||||
|
||||
disko.url = "github:nix-community/disko/latest";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# impermanence.url = "github:nix-community/impermanence";
|
||||
|
||||
# hyprland.url = "path:../../flakes/hyprland";
|
||||
hyprland.url = "git+https://git.joshuabell.xyz/ringofstorms/dotfiles?dir=flakes/hyprland";
|
||||
|
||||
ros_neovim.url = "git+https://git.joshuabell.xyz/ringofstorms/nvim";
|
||||
};
|
||||
|
||||
|
|
@ -18,88 +21,102 @@
|
|||
{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
common,
|
||||
ros_neovim,
|
||||
disko,
|
||||
hyprland,
|
||||
# impermanence,
|
||||
...
|
||||
}:
|
||||
let
|
||||
configuration_name = "testbed";
|
||||
configurationName = "testbed";
|
||||
stateVersion = "25.05";
|
||||
primaryUser = "luser";
|
||||
lib = nixpkgs.lib;
|
||||
in
|
||||
{
|
||||
packages = {
|
||||
x86_64-linux.vm = self.nixosConfigurations.${configuration_name}.config.system.build.vmWithDisko;
|
||||
x86_64-linux.vm = self.nixosConfigurations.${configurationName}.config.system.build.vmWithDisko;
|
||||
};
|
||||
nixosConfigurations = {
|
||||
"${configuration_name}" = (
|
||||
"${configurationName}" = (
|
||||
lib.nixosSystem {
|
||||
modules = [
|
||||
home-manager.nixosModules.default
|
||||
|
||||
disko.nixosModules.disko
|
||||
# impermanence.nixosModules.impermanence
|
||||
common.nixosModules.default
|
||||
ros_neovim.nixosModules.default
|
||||
./configuration.nix
|
||||
hyprland.nixosModules.default
|
||||
# impermanence.nixosModules.impermanence
|
||||
|
||||
common.nixosModules.essentials
|
||||
common.nixosModules.git
|
||||
common.nixosModules.boot_systemd
|
||||
common.nixosModules.hardening
|
||||
common.nixosModules.nix_options
|
||||
common.nixosModules.podman
|
||||
common.nixosModules.timezone_auto
|
||||
common.nixosModules.zsh
|
||||
|
||||
./hardware-configuration.nix
|
||||
./disko-config.nix
|
||||
(
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
rec {
|
||||
# Home Manager
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
useGlobalPkgs = true;
|
||||
backupFileExtension = "bak";
|
||||
# add all normal users to home manager so it applies to them
|
||||
users = lib.mapAttrs (name: user: {
|
||||
home.stateVersion = stateVersion;
|
||||
programs.home-manager.enable = true;
|
||||
}) (lib.filterAttrs (name: user: user.isNormalUser or false) users.users);
|
||||
|
||||
sharedModules = [
|
||||
common.homeManagerModules.tmux
|
||||
common.homeManagerModules.atuin
|
||||
common.homeManagerModules.direnv
|
||||
common.homeManagerModules.git
|
||||
common.homeManagerModules.postgres_cli_options
|
||||
common.homeManagerModules.starship
|
||||
common.homeManagerModules.zoxide
|
||||
common.homeManagerModules.zsh
|
||||
];
|
||||
};
|
||||
|
||||
# System configuration
|
||||
system.stateVersion = stateVersion;
|
||||
networking.hostName = configurationName;
|
||||
programs.nh.flake = "/home/${primaryUser}/.config/nixos-config/hosts/${configurationName}";
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
users.users = {
|
||||
"${primaryUser}" = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "password1";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
"video"
|
||||
"input"
|
||||
];
|
||||
openssh.authorizedKeys.keys = [
|
||||
];
|
||||
};
|
||||
root = {
|
||||
shell = pkgs.zsh;
|
||||
openssh.authorizedKeys.keys = [
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
cowsay
|
||||
lolcat
|
||||
];
|
||||
|
||||
ringofstorms_common = {
|
||||
systemName = configuration_name;
|
||||
boot.systemd.enable = true;
|
||||
programs = {
|
||||
ssh.enable = true;
|
||||
podman.enable = true;
|
||||
};
|
||||
users = {
|
||||
admins = [ "luser" ]; # First admin is also the primary user owning nix config
|
||||
users = {
|
||||
root = {
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2KFSRkViT+asBTjCgA7LNP3SHnfNCW+jHbV08VUuIi nix2nix"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
luser = {
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2KFSRkViT+asBTjCgA7LNP3SHnfNCW+jHbV08VUuIi nix2nix"
|
||||
];
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"video"
|
||||
"input"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
};
|
||||
homeManager = {
|
||||
users = {
|
||||
luser = {
|
||||
imports = with common.homeManagerModules; [
|
||||
kitty
|
||||
tmux
|
||||
atuin
|
||||
direnv
|
||||
git
|
||||
nix_deprecations
|
||||
postgres
|
||||
ssh
|
||||
starship
|
||||
zoxide
|
||||
zsh
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue