diff --git a/configuration.nix b/configuration.nix index a3f923a..ebbb3b9 100644 --- a/configuration.nix +++ b/configuration.nix @@ -96,7 +96,7 @@ extraGroups = [ "wheel" "kvm" "libvirt" ]; initialHashedPassword = "$y$j9T$XguIcj/AVXsWW/MxSYAGh0$TivGAa0z8KNCli2mKTd24vtqimpadNzqMFwfbeh0p30"; openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOVgHcJ9C8TD515x+KqFKNYUa6IZML6LU3FWovmDIvyZ" ] + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOVgHcJ9C8TD515x+KqFKNYUa6IZML6LU3FWovmDIvyZ" ]; }; }; diff --git a/flake.nix b/flake.nix index 01818d7..0663d9d 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,23 @@ } ]; }; + gemini = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { inherit inputs; }; + modules = [ + + ./configuration.nix + ./hosts/gemini/default.nix + + home-manager.nixosModules.home-manager + { + home-manager.extraSpecialArgs = {inherit inputs;}; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.nyadmin = import ./users/nyadmin/home.nix; + } + ]; + }; }; }; diff --git a/hosts/gemini/default.nix b/hosts/gemini/default.nix new file mode 100644 index 0000000..a26dfac --- /dev/null +++ b/hosts/gemini/default.nix @@ -0,0 +1,28 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running `nixos-help`). + +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + networking.hostName = "gemini"; + time.timeZone = "America/Los_Angeles"; + + services.openssh = { + enable = true; + settings.PasswordAuthentication = false; + settings.KbdInteractiveAuthentication = false; + }; + + # Open ports in the firewall. + networking.firewall.allowedTCPPorts = [ 22 ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + + system.stateVersion = "23.05"; # Did you read the comment? +} + diff --git a/hosts/gemini/hardware-configuration.nix b/hosts/gemini/hardware-configuration.nix new file mode 100644 index 0000000..a3f32fb --- /dev/null +++ b/hosts/gemini/hardware-configuration.nix @@ -0,0 +1,40 @@ +# 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 + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/7a0bd5fe-fb8a-43a5-bdf8-a45d8a303fc5"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/7a0bd5fe-fb8a-43a5-bdf8-a45d8a303fc5"; + fsType = "btrfs"; + options = [ "subvol=@home" ]; + }; + + 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.enp4s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/users/nyadmin/home.nix b/users/nyadmin/home.nix index 6f5e5a6..b8fe4e1 100644 --- a/users/nyadmin/home.nix +++ b/users/nyadmin/home.nix @@ -25,6 +25,6 @@ # Read the Docs before change - #home.stateVersion = "23.05"; + home.stateVersion = "23.05"; #home.homeDirectory = "/home/stitchynyan"; }