Simplifying

This commit is contained in:
2026-02-26 23:27:43 +00:00
parent eb5b621962
commit e847828109
13 changed files with 99 additions and 140 deletions

128
flake.nix
View File

@@ -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
# ];
# };
#};
};
}