diff --git a/flake.nix b/flake.nix index 831ddd8f..955cd5dd 100644 --- a/flake.nix +++ b/flake.nix @@ -130,21 +130,15 @@ tertiary = "DP-1"; }; } - { - name = "genzai"; - system = "x86_64-linux"; - user = "fs0c131y"; - hasGui = false; # Don't wan't to run GUI apps on a headless server - } { name = "Uttarayans-MacBook-Pro"; system = "aarch64-darwin"; user = "fs0c131y"; } { - name = "Serviuss-iMac-Pro"; - system = "x86_64-darwin"; - user = "servius"; + name = "deoxys"; + system = "x86_64-linux"; + user = "fs0c131y"; hasGui = false; # It's a vm so no GUI apps are used } { @@ -241,6 +235,14 @@ path = inputs.deploy-rs.lib.aarch64-darwin.activate.darwin self.darwinConfigurations.Uttarayans-MacBook-Pro; }; }; + deoxys = { + hostname = "deoxys"; + profiles.system = { + sshUser = "servius"; + path = inputs.deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.deoxys; + user = "root"; + }; + }; }; }; diff --git a/nixos/deoxys/configuration.nix b/nixos/deoxys/configuration.nix new file mode 100644 index 00000000..013c13f2 --- /dev/null +++ b/nixos/deoxys/configuration.nix @@ -0,0 +1,97 @@ +# 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. + ./deoxys.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "nixos"; # Define your hostname. + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Asia/Kolkata"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_IN"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_IN"; + LC_IDENTIFICATION = "en_IN"; + LC_MEASUREMENT = "en_IN"; + LC_MONETARY = "en_IN"; + LC_NAME = "en_IN"; + LC_NUMERIC = "en_IN"; + LC_PAPER = "en_IN"; + LC_TELEPHONE = "en_IN"; + LC_TIME = "en_IN"; + }; + + # Configure keymap in X11 + services.xserver = { + layout = "us"; + xkbVariant = ""; + }; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.servius = { + isNormalUser = true; + description = "servius"; + extraGroups = ["networkmanager" "wheel"]; + packages = with pkgs; []; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + # vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. + # wget + ]; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + # programs.gnupg.agent = { + # enable = true; + # enableSSHSupport = true; + # }; + + # List services that you want to enable: + + # Enable the OpenSSH daemon. + services.openssh.enable = true; + services.tailscale.enable = true; + + # Open ports in the firewall. + networking.firewall.allowedTCPPorts = [22]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "23.11"; # Did you read the comment? +} diff --git a/nixos/deoxys/deoxys.nix b/nixos/deoxys/deoxys.nix new file mode 100644 index 00000000..32d31c7c --- /dev/null +++ b/nixos/deoxys/deoxys.nix @@ -0,0 +1,37 @@ +# 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" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/1f72dde1-a713-4e69-a272-39a8324368c2"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2CFD-2F25"; + fsType = "vfat"; + }; + + 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.wlp0s20f3.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}