diff --git a/flake.lock b/flake.lock index a6b1230..7fea723 100644 --- a/flake.lock +++ b/flake.lock @@ -92,11 +92,11 @@ ] }, "locked": { - "lastModified": 1737968762, - "narHash": "sha256-xiPARGKwocaMtv+U/rgi+h2g56CZZEmrcl7ldRaslq8=", + "lastModified": 1738192575, + "narHash": "sha256-2DFgkx6GgLqYyTR/wtEk+EiMiAuFZo7D4LfKjTDKLTc=", "owner": "nix-community", "repo": "home-manager", - "rev": "e1ae908bcc30af792b0bb0a52e53b03d2577255e", + "rev": "697ba1319fdc58c94dc94cd7908df554dc48d970", "type": "github" }, "original": { @@ -127,11 +127,11 @@ ] }, "locked": { - "lastModified": 1737926801, - "narHash": "sha256-un7IETRNjUm83jM5Gd/7BO4rCzzkom46O0FDMo5toaI=", + "lastModified": 1738033138, + "narHash": "sha256-qlIM8A3bdL9c6PexhpS+QyZLO9y/8a3V75HVyJgDE5Q=", "owner": "LnL7", "repo": "nix-darwin", - "rev": "62ba0a22426721c94e08f0779ed8235d5672869b", + "rev": "349a74c66c596ef97ee97b4d80a3ca61227b6120", "type": "github" }, "original": { @@ -142,11 +142,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1737885589, - "narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=", + "lastModified": 1738142207, + "narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8", + "rev": "9d3ae807ebd2981d593cddd0080856873139aa40", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b3f9f64..3a67b36 100644 --- a/flake.nix +++ b/flake.nix @@ -157,6 +157,25 @@ }; }; + # We define a NixOS configuration for a scratch VM. + nixosConfigurations.flareon = nixpkgs.lib.nixosSystem { + modules = [ + ./hosts/linux/flareon/configuration.nix + + vscode-server.nixosModules.default + home-manager.nixosModules.home-manager + { + nixpkgs.overlays = [ self.overlays.default ]; + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.spotlight = import ./home/home.nix; + extraSpecialArgs = { desktop = false; gpg = false; }; + }; + } + ]; + }; + # We define a default Darwin configuration via nix-darwin. darwinConfigurations."spotlights-macbook-air" = nix-darwin.lib.darwinSystem { modules = [ diff --git a/hosts/linux/flareon/configuration.nix b/hosts/linux/flareon/configuration.nix new file mode 100644 index 0000000..73bcd4d --- /dev/null +++ b/hosts/linux/flareon/configuration.nix @@ -0,0 +1,60 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ../shared.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + networking = { + hostName = "flareon"; + networkmanager.enable = true; + }; + + time.timeZone = "America/Chicago"; + + services = { + # We're a VM, so enable related services. + xserver.videoDrivers = [ "qxl" ]; + qemuGuest.enable = true; + spice-vdagentd.enable = true; + + # vscode-server + vscode-server.enable = true; + }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + nix-output-monitor + ripgrep + ]; + + services.openssh.enable = true; + + # This option defines the first version of NixOS you have installed on this particular machine, + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. + # + # Most users should NEVER change this value after the initial install, for any reason, + # even if you've upgraded your system to a new NixOS release. + # + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, + # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how + # to actually do that. + # + # This value being lower than the current NixOS release does NOT mean your system is + # out of date, out of support, or vulnerable. + # + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, + # and migrated your data accordingly. + # + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . + system.stateVersion = "24.05"; # Did you read the comment? +} + diff --git a/hosts/linux/flareon/hardware-configuration.nix b/hosts/linux/flareon/hardware-configuration.nix new file mode 100644 index 0000000..94f7d02 --- /dev/null +++ b/hosts/linux/flareon/hardware-configuration.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + boot.kernelPackages = pkgs.linuxPackages_latest; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/cb472c06-8372-4d74-af6e-f3071ccd4146"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/CDA9-BDB9"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # 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.enp0s1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +}