diff --git a/flake.nix b/flake.nix index a72e5f3..a7a40a1 100644 --- a/flake.nix +++ b/flake.nix @@ -59,6 +59,11 @@ email = personalEmail; workSystem = true; desktopEnvironment = "gnome"; - }; + }; + nixosConfigurations."bomba" = mkSystem "bomba" { + system = "x86_64-linux"; + email = personalEmail; + user = "r3ddy"; + }; }; } diff --git a/machines/bomba/configuration.nix b/machines/bomba/configuration.nix new file mode 100644 index 0000000..199f606 --- /dev/null +++ b/machines/bomba/configuration.nix @@ -0,0 +1,30 @@ +# 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, ... }: + +{ + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "Europe/Rome"; + + nixpkgs.config.allowUnfree = true; + + services.openssh.enable = true; + + # Open ports in the firewall. + networking.firewall.allowedTCPPorts = [ 22 ]; + networking.firewall.allowedUDPPorts = [ ]; + # Or disable the firewall altogether. + networking.firewall.enable = true; + xdg.portal.extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + ]; +} diff --git a/machines/bomba/default.nix b/machines/bomba/default.nix new file mode 100644 index 0000000..cd2f668 --- /dev/null +++ b/machines/bomba/default.nix @@ -0,0 +1,14 @@ +{ ... }: +{ + imports = [ + ./configuration.nix + ./hardware.nix + ]; + + networking.hostName = "bomba"; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + system.stateVersion = "25.05"; # Did you read the comment? +} diff --git a/machines/bomba/hardware.nix b/machines/bomba/hardware.nix new file mode 100644 index 0000000..1dfb748 --- /dev/null +++ b/machines/bomba/hardware.nix @@ -0,0 +1,38 @@ +# 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" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/a1939342-f36b-4902-b659-71b468b5e64b"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/6132-EE01"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + 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.enp0s31f6.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}