diff options
| author | beeb5k <beebeeb5k@gmail.com> | 2026-09-02 10:16:21 +0530 |
|---|---|---|
| committer | beeb5k <beebeeb5k@gmail.com> | 2026-09-02 10:16:21 +0530 |
| commit | c38acc6dce1075ae7e73dedf018be69202900054 (patch) | |
| tree | ce676853cff426c6b5d41c7e7930d1e20c41fe11 /hosts/oixos | |
| parent | ca4cff791d8cc0fec5a487cd50229d299ddd0d24 (diff) | |
oixos
Diffstat (limited to 'hosts/oixos')
| -rw-r--r-- | hosts/oixos/default.nix | 60 | ||||
| -rw-r--r-- | hosts/oixos/disko.nix | 36 | ||||
| -rw-r--r-- | hosts/oixos/hardware-configuration.nix | 28 |
3 files changed, 124 insertions, 0 deletions
diff --git a/hosts/oixos/default.nix b/hosts/oixos/default.nix new file mode 100644 index 0000000..416e2f2 --- /dev/null +++ b/hosts/oixos/default.nix @@ -0,0 +1,60 @@ +{ + systemState, + user, + hostname, +}: +{ + pkgs, + config, + inputs, + lib, + ... +}: +{ + imports = [ + inputs.disko.nixosModules.disko + ./disko.nix + ./hardware-configuration.nix + ]; + + boot.loader.grub = { + efiSupport = true; + efiInstallAsRemovable = true; + }; + + networking.hostName = hostname; + networking.useDHCP = true; + + services.openssh = { + enable = true; + # settings = { + # PermitRootLogin = "prohibit-password"; + # PasswordAuthentication = false; + # }; + }; + + # users.users.beeb5k = { + # isNormalUser = true; + # extraGroups = [ "wheel" ]; + # + # openssh.authorizedKeys.keys = [ + # "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGTMc0gNGM6vI8s9CrW+fYlW4ppRTKRCELOve3Izj1VD beeb5k" + # ]; + # }; + + services.cloud-init.enable = true; + + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGTMc0gNGM6vI8s9CrW+fYlW4ppRTKRCELOve3Izj1VD beeb5k" + ]; + + environment.systemPackages = with pkgs; [ + git + ]; + + # security.sudo.wheelNeedsPassword = false; + + nixpkgs.hostPlatform = "aarch64-linux"; + + system.stateVersion = systemState; +} diff --git a/hosts/oixos/disko.nix b/hosts/oixos/disko.nix new file mode 100644 index 0000000..e77f368 --- /dev/null +++ b/hosts/oixos/disko.nix @@ -0,0 +1,36 @@ +{ + disko.devices = { + disk.main = { + type = "disk"; + device = "/dev/sda"; + + content = { + type = "gpt"; + + partitions = { + ESP = { + size = "1G"; + type = "EF00"; + + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + + root = { + size = "100%"; + + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/oixos/hardware-configuration.nix b/hosts/oixos/hardware-configuration.nix new file mode 100644 index 0000000..bddf5a4 --- /dev/null +++ b/hosts/oixos/hardware-configuration.nix @@ -0,0 +1,28 @@ +# 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 = [ + "xhci_pci" + "virtio_pci" + "virtio_scsi" + "usbhid" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +} |
