From 307fe7b05d783a669a6894d99e3b0bf9f79a34b5 Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L de Mello" Date: Sat, 8 Nov 2025 11:31:06 -0300 Subject: [PATCH] feat(rusty): minimal host configuration --- flake.nix | 18 +++++++++++ hosts/rusty/configuration.nix | 58 +++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 hosts/rusty/configuration.nix diff --git a/flake.nix b/flake.nix index 2cbe4cd..f7765c6 100644 --- a/flake.nix +++ b/flake.nix @@ -8,6 +8,11 @@ inputs.nixpkgs.follows = "nixpkgs"; }; + disko = { + url = "github:nix-community/disko/latest"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + stylix = { url = "github:danth/stylix/release-25.05"; inputs.nixpkgs.follows = "nixpkgs"; @@ -134,6 +139,19 @@ ./home/guz-lite/configuration.nix ]; }; + "rusty" = nixpkgs.lib.nixosSystem rec { + system = "x86_64-linux"; + specialArgs = { + pkgs-unstable = import nixpkgs-unstable { + inherit system; + config.allowUnfreePredicate = _: true; + }; + inherit inputs self; + }; + modules = [ + ./hosts/rusty/configuration.nix + ]; + }; }; homeConfigurations = forAllSystems ({ diff --git a/hosts/rusty/configuration.nix b/hosts/rusty/configuration.nix new file mode 100644 index 0000000..e54303b --- /dev/null +++ b/hosts/rusty/configuration.nix @@ -0,0 +1,58 @@ +{ + lib, + inputs, + ... +}: { + imports = [ + ../../configuration.nix + inputs.disko.nixosModules.disko + ]; + + # Network + networking = { + hostName = lib.mkForce "rusty"; + #wireless.enable = lib.mkForce true; + }; + + disko.devices.disk.main = { + device = "/dev/sda"; # This will be overwritten by disko-install + type = "disk"; + content = { + type = "table"; + format = "gpt"; + partitions = [ + { + name = "ESP"; + start = "1M"; + end = "500M"; + bootable = true; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot/efi"; + mountOptions = ["dmask=0022" "fmask=0022" "nofail"]; + }; + } + { + name = "root"; + start = "500M"; + end = "100%"; + part-type = "primary"; + bootable = true; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + } + ]; + }; + }; + + boot.loader.efi.canTouchEfiVariables = lib.mkForce false; + boot.loader.grub = { + efiSupport = true; + efiInstallAsRemovable = true; + device = "nodev"; + }; +}