Simplifying
This commit is contained in:
42
flake.lock
generated
42
flake.lock
generated
@@ -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"
|
||||
}
|
||||
|
||||
128
flake.nix
128
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
|
||||
# ];
|
||||
# };
|
||||
#};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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" ];
|
||||
};
|
||||
@@ -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";
|
||||
}
|
||||
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user