diff --git a/flake.lock b/flake.lock index 25f1e3a..bb50ac0 100644 --- a/flake.lock +++ b/flake.lock @@ -21,46 +21,6 @@ "type": "github" } }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1772020340, - "narHash": "sha256-aqBl3GNpCadMoJ/hVkWTijM1Aeilc278MjM+LA3jK6g=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "36e38ca0d9afe4c55405fdf22179a5212243eecc", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-25.11", - "repo": "home-manager", - "type": "github" - } - }, - "impermanence": { - "inputs": { - "home-manager": [], - "nixpkgs": [] - }, - "locked": { - "lastModified": 1769548169, - "narHash": "sha256-03+JxvzmfwRu+5JafM0DLbxgHttOQZkUtDWBmeUkN8Y=", - "owner": "nix-community", - "repo": "impermanence", - "rev": "7b1d382faf603b6d264f58627330f9faa5cba149", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "impermanence", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1771903837, @@ -96,8 +56,6 @@ "root": { "inputs": { "disko": "disko", - "home-manager": "home-manager", - "impermanence": "impermanence", "nixpkgs": "nixpkgs", "nixpkgs-unstable": "nixpkgs-unstable" } diff --git a/flake.nix b/flake.nix index 293e10f..65e6702 100644 --- a/flake.nix +++ b/flake.nix @@ -4,13 +4,13 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - impermanence = { - url = "github:nix-community/impermanence"; - inputs.nixpkgs.follows = ""; - inputs.home-manager.follows = ""; - }; - home-manager.url = "github:nix-community/home-manager/release-25.11"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; + #impermanence = { + # url = "github:nix-community/impermanence"; + # inputs.nixpkgs.follows = ""; + # inputs.home-manager.follows = ""; + #}; + #home-manager.url = "github:nix-community/home-manager/release-25.11"; + #home-manager.inputs.nixpkgs.follows = "nixpkgs"; disko.url = "github:nix-community/disko/latest"; disko.inputs.nixpkgs.follows = "nixpkgs-unstable"; #firefox-addons = { @@ -23,8 +23,8 @@ self, nixpkgs, nixpkgs-unstable, - home-manager, - impermanence, + #home-manager, + #impermanence, disko, ... } @ inputs: let @@ -37,45 +37,109 @@ # "x86_64-darwin" system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; - pkgs-unstable = nixpkgs-unstable.legacyPackages.${system}; + #pkgs-unstable = nixpkgs-unstable.legacyPackages.${system}; in { # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#stationette' nixosConfigurations = { stationette = nixpkgs.lib.nixosSystem { modules = [ - ./system/configuration.nix - disko.nixModules.disko - import ./system/disko.nix + ./hardware-configuration.nix { imports = [ - impermanence.nixModules.impermanence - home-manager.nixModules.home-manager + { + #imports = [ + # ./boot.nix + # ./networking.nix + # ./packages.nix + # ./programs.nix + # ./users.nix + #]; + } ]; - home-manager = { - users.chris = import ./home; - extraSpecialArgs = { - inherit pkgs-unstable; - inherit inputs; + + system.stateVersion = "25.11"; + } + disko.nixosModules.disko + # nix --extra-experimental-features "nix-command flakes" run github:nix-community/disko/latest#disko-install -- --flake=./#stationette --disk=stationette /dev/sda + { + disko.devices = { + disk = { + stationette = { + type = "disk"; + device = "/dev/sda"; # Check this with lsblk + content = { + type = "gpt"; + partitions = { + ESP = { + size = "512M"; + type = "EF00"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + }; + }; + root = { + size = "100%"; + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; # Force overwrite + subvolumes = { + "/root" = { + mountpoint = "/"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/nix" = { + mountpoint = "/nix"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/persist" = { + mountpoint = "/persist"; + mountOptions = [ "compress=zstd" "noatime" ]; + }; + "/swap" = { + mountpoint = "/.swapvol"; + swap.swapfile.size = "8G"; + }; + }; + }; + }; + }; + }; + }; }; }; } + #home-manager.nixosModules.home-manager + #{ + # imports = [ + # impermanence.nixosModules.impermanence + # ]; + # home-manager = { + # users.chris = import ./home; + # extraSpecialArgs = { + # inherit pkgs-unstable; + # inherit inputs; + # }; + # }; + #} ]; }; }; # Standalone home-manager configuration entrypoint - homeConfigurations = { - chris = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - extraSpecialArgs = { - inherit pkgs-unstable; - inherit inputs; - }; - modules = [ - ./home - ]; - }; - }; + #homeConfigurations = { + # chris = home-manager.lib.homeManagerConfiguration { + # inherit pkgs; + # extraSpecialArgs = { + # inherit pkgs-unstable; + # inherit inputs; + # }; + # modules = [ + # ./home + # ]; + # }; + #}; }; } diff --git a/system/hardware-configuration.nix b/hardware-configuration.nix similarity index 84% rename from system/hardware-configuration.nix rename to hardware-configuration.nix index 10bcb54..572db5a 100644 --- a/system/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -14,12 +14,12 @@ boot.extraModulePackages = [ ]; fileSystems."/" = - { device = "/dev/disk/by-uuid/c425db8f-455a-4fec-8a24-72cd670640cb"; - fsType = "ext4"; + { device = "/dev/disk/by-partlabel/disk-stationette-root"; + fsType = "btrfs"; }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/038B-4974"; + { device = "/dev/disk/by-partlabel/disk-stationette-ESP"; fsType = "vfat"; options = [ "fmask=0022" "dmask=0022" ]; }; diff --git a/system/modules/boot.nix b/modules/boot.nix similarity index 100% rename from system/modules/boot.nix rename to modules/boot.nix diff --git a/system/modules/default.nix b/modules/default.nix similarity index 100% rename from system/modules/default.nix rename to modules/default.nix diff --git a/system/modules/impermanenc.nix b/modules/impermanenc.nix similarity index 100% rename from system/modules/impermanenc.nix rename to modules/impermanenc.nix diff --git a/system/modules/networking.nix b/modules/networking.nix similarity index 100% rename from system/modules/networking.nix rename to modules/networking.nix diff --git a/system/modules/packages.nix b/modules/packages.nix similarity index 100% rename from system/modules/packages.nix rename to modules/packages.nix diff --git a/system/modules/programs.nix b/modules/programs.nix similarity index 100% rename from system/modules/programs.nix rename to modules/programs.nix diff --git a/system/modules/users.nix b/modules/users.nix similarity index 100% rename from system/modules/users.nix rename to modules/users.nix diff --git a/system/mounts.nix b/mounts.nix similarity index 100% rename from system/mounts.nix rename to mounts.nix diff --git a/system/configuration.nix b/system/configuration.nix deleted file mode 100644 index 8a87b47..0000000 --- a/system/configuration.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ - inputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./hardware-configuration.nix - ./modules - ]; - - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "25.11"; -} diff --git a/system/disko.nix b/system/disko.nix deleted file mode 100644 index fd0e895..0000000 --- a/system/disko.nix +++ /dev/null @@ -1,48 +0,0 @@ -# nix --extra-experimental-features "nix-command flakes" run github:nix-community/disko -- --mode disko ./disko.nix -{ - disko.devices = { - disk = { - stationette = { - type = "disk"; - device = "/dev/sda"; # Check this with lsblk - content = { - type = "gpt"; - partitions = { - ESP = { - size = "512M"; - type = "EFOO"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - }; - }; - root = { - size = "100%"; - type = "btfs"; - extraArgs = [ "-f" ]; # Force overwrite - subvolumes = { - "/root" = { - mountpoint = "/"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - "/nix" = { - mountpoint = "/nix"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - "/persist" = { - mountpoint = "/persist"; - mountOptions = [ "compress=zstd" "noatime" ]; - }; - "/swap" = { - mountpoint = "/.swapvol"; - swap.swapfile.size = "8G"; - }; - }; - }; - }; - }; - }; - }; - }; -}