From 93045ff8636d002ef02d654ea66ceeb0e18db367 Mon Sep 17 00:00:00 2001 From: Hunter Haugen Date: Mon, 29 Dec 2025 13:06:56 -0800 Subject: [PATCH] Remove some spare files --- configuration.nix | 167 ------------------------------------- hardware-configuration.nix | 64 -------------- qemu/shell.nix | 10 +++ 3 files changed, 10 insertions(+), 231 deletions(-) delete mode 100644 configuration.nix delete mode 100644 hardware-configuration.nix create mode 100644 qemu/shell.nix diff --git a/configuration.nix b/configuration.nix deleted file mode 100644 index cdd6788..0000000 --- a/configuration.nix +++ /dev/null @@ -1,167 +0,0 @@ -# Enable the OpenSSH daemon. -# services.openssh.enable = true; - -# Open ports in the firewall. -# networking.firewall.allowedTCPPorts = [ ... ]; -# networking.firewall.allowedUDPPorts = [ ... ]; -# Or disable the firewall altogether. -# networking.firewall.enable = false; - -# Copy the NixOS configuration file and link it from the resulting system -# (/run/current-system/configuration.nix). This is useful in case you -# accidentally delete configuration.nix. -# system.copySystemConfiguration = true; -{ config, pkgs, lib, ... }: - -let - impermanence = builtins.fetchTarball "https://github.com/nix-community/impermanence/archive/master.tar.gz"; -in -{ - imports = - [ - ./hardware-configuration.nix - "${impermanence}/nixos.nix" - ]; - - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - - # Enable ZFS support - boot.supportedFilesystems = [ "zfs" ]; - boot.zfs.extraPools = [ "tank" ]; - #boot.zfs.requestEncryptionCredentials = true; - - # ZFS filesystem configuration - fileSystems = { - #"/" = { - # device = "rpool/local/root"; - # fsType = "zfs"; - #}; - - #"/boot" = { - # device = "/dev/disk/by-uuid/10CD-4CB5"; - # fsType = "vfat"; - # options = [ "fmask=0077" "dmask=0077" ]; - #}; - - #"/nix" = { - # device = "rpool/local/nix"; - # fsType = "zfs"; - #}; - - #"/home" = { - # device = "rpool/safe/home"; - # fsType = "zfs"; - #}; - - "/persist" = { - device = "rpool/safe/persist"; - fsType = "zfs"; - neededForBoot = true; - }; - - #"/var/lib/docker" = { - # device = "rpool/docker"; - # fsType = "zfs"; - # options = [ "zfsutil" ]; - # neededForBoot = true; - #}; - }; - - swapDevices = [{ - randomEncryption = true; - device = "/dev/disk/by-partuuid/1a5d6a96-0558-4623-bf52-e7523f5afe0e"; - }]; - - # Impermanence configuration - # /var/log and /var/lib ar persisted through zfs datasets, but not backed up. - # Anything stored in /persist should get backed up. - environment.persistence."/persist" = { - hideMounts = true; - directories = [ - "/root" - "/etc/nixos" - "/etc/ssh" - ]; - files = [ - "/etc/machine-id" - "/etc/nix/id_rsa" - ]; - }; - - # Create tmpfs for root to implement impermanence - boot.initrd.postDeviceCommands = lib.mkAfter '' - zfs rollback -r rpool/local/root@blank - ''; - - # Docker configuration - virtualisation.docker = { - enable = true; - extraOptions = "--storage-driver=overlay2"; - }; - - # System packages - environment.systemPackages = with pkgs; [ - git - vim - wget - curl - htop - zfs - zsh - tmux - docker-compose - ]; - - # User configuration - users.users.hunner = { - isNormalUser = true; - extraGroups = [ "wheel" "docker" "networkmanager" ]; - initialPassword = "a"; - shell = pkgs.zsh; - }; - - # Home manager integration for persistent home configuration (optional) - # home-manager.users.hunner = { pkgs, ... }: { - # home.persistence."/persist/home/hunner" = { - # directories = [ - # "Downloads" - # "Documents" - # "Pictures" - # "Videos" - # ".ssh" - # ".config" - # ]; - # files = [ - # ".bash_history" - # ]; - # }; - # }; - - # Networking - networking = { - hostName = "cryostation"; - hostId = "a20e391e"; # Required for ZFS - networkmanager.enable = true; - }; - - # Time zone and locale - time.timeZone = "America/Los_Angeles"; # Adjust to your timezone - i18n.defaultLocale = "en_US.UTF-8"; - - programs.zsh.enable = true; - services.openssh.enable = true; - # Enable ZFS auto-snapshot service - # services.zfs.autoSnapshot = { - # enable = true; - # frequent = 4; - # hourly = 24; - # daily = 7; - # weekly = 4; - # monthly = 12; - # }; - - # This value determines the NixOS release - system.stateVersion = "24.11"; -} - diff --git a/hardware-configuration.nix b/hardware-configuration.nix deleted file mode 100644 index 023a9bc..0000000 --- a/hardware-configuration.nix +++ /dev/null @@ -1,64 +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. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sr_mod" "virtio_blk" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "rpool/local/root"; - fsType = "zfs"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/10CD-4CB5"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - fileSystems."/nix" = - { device = "rpool/local/nix"; - fsType = "zfs"; - }; - - fileSystems."/home" = - { device = "rpool/safe/home"; - fsType = "zfs"; - }; - - fileSystems."/persist" = - { device = "rpool/safe/persist"; - fsType = "zfs"; - }; - - fileSystems."/var/lib" = - { device = "rpool/local/varlib"; - fsType = "zfs"; - }; - - fileSystems."/var/log" = - { device = "rpool/local/varlog"; - fsType = "zfs"; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/08997d20-b4ed-4b01-bd25-51cd33af20cc"; } - ]; - - # 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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; -} diff --git a/qemu/shell.nix b/qemu/shell.nix new file mode 100644 index 0000000..04e1742 --- /dev/null +++ b/qemu/shell.nix @@ -0,0 +1,10 @@ +let + pkgs = import { config.allowUnfree = true; }; + #unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz") { + # config.allowUnfree = true; + #}; +in pkgs.mkShell { + packages = with pkgs; [ + qemu + ]; +}