diff --git a/flake.nix b/flake.nix index d99e3670..864760f7 100644 --- a/flake.nix +++ b/flake.nix @@ -46,7 +46,7 @@ nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; platform = "aarch64-linux"; format = "sd-aarch64"; }; }; - # Devshell for bootstrapping; acessible via 'nix develop' or 'nix-shell' (legacy) + # Devshell for bootstrapping; acessible via 'nix develop' devShells = libx.forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; in import ./shell.nix { inherit pkgs sops-nix; } diff --git a/home-manager/common/software/cli/bash.nix b/home-manager/common/software/cli/bash.nix index aceda815..60946ae7 100644 --- a/home-manager/common/software/cli/bash.nix +++ b/home-manager/common/software/cli/bash.nix @@ -94,7 +94,7 @@ dday = "date +%A"; # nixos-rebuild - ns = "nix-shell -p"; + ns = "nix shell"; nr = "sudo nixos-rebuild"; nrs = "sudo nixos-rebuild --upgrade switch"; nrt = "sudo nixos-rebuild test"; diff --git a/nixos/hosts/nixos-amd-osaka-01/default.nix b/nixos/hosts/nixos-amd-osaka-01/default.nix new file mode 100644 index 00000000..030192d1 --- /dev/null +++ b/nixos/hosts/nixos-amd-osaka-01/default.nix @@ -0,0 +1,38 @@ +{ config, lib, pkgs, modulesPath, desktop, username, ... }: { + imports = [ ]; + nixpkgs.config.allowUnfree = false; + + boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + # For cross-architecture builds + boot.binfmt.emulatedSystems = [ + "aarch64-linux" + "armv7l-linux" + ]; + + fileSystems."/" = { + device = "/dev/mapper/DISK"; + fsType = "btrfs"; + options = [ "subvol=@" ]; + }; + + + boot.initrd.luks.devices."DISK".device = "/dev/vda"; + + networking.useDHCP = lib.mkDefault true; + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + time.timeZone = "Asia/Tokyo"; + networking.hostName = "nixos-amd-osaka-01"; + + boot.loader.grub = { + enableCryptodisk = true; + enable = true; + device = "/dev/vda"; + useOSProber = true; + }; + + networking.firewall.allowedTCPPorts = [ 22 ]; +}