Simplifying
This commit is contained in:
42
flake.lock
generated
42
flake.lock
generated
@@ -21,46 +21,6 @@
|
|||||||
"type": "github"
|
"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": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1771903837,
|
"lastModified": 1771903837,
|
||||||
@@ -96,8 +56,6 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"home-manager": "home-manager",
|
|
||||||
"impermanence": "impermanence",
|
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
}
|
}
|
||||||
|
|||||||
128
flake.nix
128
flake.nix
@@ -4,13 +4,13 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
impermanence = {
|
#impermanence = {
|
||||||
url = "github:nix-community/impermanence";
|
# url = "github:nix-community/impermanence";
|
||||||
inputs.nixpkgs.follows = "";
|
# inputs.nixpkgs.follows = "";
|
||||||
inputs.home-manager.follows = "";
|
# inputs.home-manager.follows = "";
|
||||||
};
|
#};
|
||||||
home-manager.url = "github:nix-community/home-manager/release-25.11";
|
#home-manager.url = "github:nix-community/home-manager/release-25.11";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
#home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
disko.url = "github:nix-community/disko/latest";
|
disko.url = "github:nix-community/disko/latest";
|
||||||
disko.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
disko.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
#firefox-addons = {
|
#firefox-addons = {
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixpkgs-unstable,
|
nixpkgs-unstable,
|
||||||
home-manager,
|
#home-manager,
|
||||||
impermanence,
|
#impermanence,
|
||||||
disko,
|
disko,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
@@ -37,45 +37,109 @@
|
|||||||
# "x86_64-darwin"
|
# "x86_64-darwin"
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
|
#pkgs-unstable = nixpkgs-unstable.legacyPackages.${system};
|
||||||
in {
|
in {
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#stationette'
|
# Available through 'nixos-rebuild --flake .#stationette'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
stationette = nixpkgs.lib.nixosSystem {
|
stationette = nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
./system/configuration.nix
|
./hardware-configuration.nix
|
||||||
disko.nixModules.disko
|
|
||||||
import ./system/disko.nix
|
|
||||||
{
|
{
|
||||||
imports = [
|
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;
|
system.stateVersion = "25.11";
|
||||||
extraSpecialArgs = {
|
}
|
||||||
inherit pkgs-unstable;
|
disko.nixosModules.disko
|
||||||
inherit inputs;
|
# 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
|
# Standalone home-manager configuration entrypoint
|
||||||
homeConfigurations = {
|
#homeConfigurations = {
|
||||||
chris = home-manager.lib.homeManagerConfiguration {
|
# chris = home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
# inherit pkgs;
|
||||||
extraSpecialArgs = {
|
# extraSpecialArgs = {
|
||||||
inherit pkgs-unstable;
|
# inherit pkgs-unstable;
|
||||||
inherit inputs;
|
# inherit inputs;
|
||||||
};
|
# };
|
||||||
modules = [
|
# modules = [
|
||||||
./home
|
# ./home
|
||||||
];
|
# ];
|
||||||
};
|
# };
|
||||||
};
|
#};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,12 +14,12 @@
|
|||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/c425db8f-455a-4fec-8a24-72cd670640cb";
|
{ device = "/dev/disk/by-partlabel/disk-stationette-root";
|
||||||
fsType = "ext4";
|
fsType = "btrfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/038B-4974";
|
{ device = "/dev/disk/by-partlabel/disk-stationette-ESP";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
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