init commit
This commit is contained in:
commit
bc9173b7c8
0
configuration.nix
Normal file
0
configuration.nix
Normal file
69
disko.nix
Normal file
69
disko.nix
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
fileSystems."/nix".neededForBoot = true;
|
||||||
|
|
||||||
|
disko.devices.nodev = {
|
||||||
|
"/" = {
|
||||||
|
fsType = "tmpfs";
|
||||||
|
mountOptions = [
|
||||||
|
"size=25%"
|
||||||
|
"mode=755"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
disko.devices.disk.main = {
|
||||||
|
device = "/dev/vda"; # MAKE SURE TOO SELECT CORRECT DISK HERE
|
||||||
|
type = "disk";
|
||||||
|
|
||||||
|
content.type = "gpt";
|
||||||
|
|
||||||
|
content.partitions.boot = {
|
||||||
|
name = "boot";
|
||||||
|
size = "1M";
|
||||||
|
type = "EF02";
|
||||||
|
};
|
||||||
|
|
||||||
|
content.partitions.esp = {
|
||||||
|
name = "ESP";
|
||||||
|
size = "1G";
|
||||||
|
type = "EF00";
|
||||||
|
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
content.partitions.swap = {
|
||||||
|
size = "4G";
|
||||||
|
|
||||||
|
content = {
|
||||||
|
type = "swap";
|
||||||
|
resumeDevice = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
content.partitions.root = {
|
||||||
|
name = "root";
|
||||||
|
size = "100%";
|
||||||
|
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ];
|
||||||
|
|
||||||
|
subvolumes = {
|
||||||
|
"/persistent" = {
|
||||||
|
mountOptions = [ "subvol=persistent" "noatime" ];
|
||||||
|
mountpoint = "/persistent";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/nix" = {
|
||||||
|
mountOptions = [ "subvol=nix" "noatime" ];
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
64
flake.lock
Normal file
64
flake.lock
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"disko": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1777713215,
|
||||||
|
"narHash": "sha256-8GzXDOXckDWwST8TY5DbwYFjdvQLlP7K9CLSVx6iTTo=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"rev": "63b4e7e6cf75307c1d26ac3762b886b5b0247267",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "disko",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1778443072,
|
||||||
|
"narHash": "sha256-zi7/fsqM/kFdNuED//4WOCUtezGtKKqRNORjMvfwjnA=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "da5ad661ba4e5ef59ba743f0d112cbc30e474f32",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"preservation": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1757436102,
|
||||||
|
"narHash": "sha256-mMI9IanU+Xw+pVogD2oT0I2kTmvz2Un/Apc5+CwUpEY=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "preservation",
|
||||||
|
"rev": "93416f4614ad2dfed5b0dcf12f27e57d27a5ab11",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "preservation",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"disko": "disko",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"preservation": "preservation"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
23
flake.nix
Normal file
23
flake.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
disko.url = "github:nix-community/disko";
|
||||||
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
preservation.url = "github:nix-community/preservation";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = inputs: {
|
||||||
|
nixosConfigurations.nixos = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
inputs.disko.nixosModules.disko
|
||||||
|
inputs.preservation.nixosModules.default
|
||||||
|
./configuration.nix
|
||||||
|
./disko.nix
|
||||||
|
./preservation.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
14
hardware.nix
Normal file
14
hardware.nix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
# GENERATED!
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
35
preservation.nix
Normal file
35
preservation.nix
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
preservation = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
preserveAt."/persistent" = {
|
||||||
|
directories = [
|
||||||
|
"/etc/nixos"
|
||||||
|
"/var/lib/bluetooth"
|
||||||
|
{
|
||||||
|
directory = "/var/lib/nixos";
|
||||||
|
inInitrd = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
files = [
|
||||||
|
{
|
||||||
|
file = "/etc/machine-id";
|
||||||
|
inInitrd = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
# Preserve user files
|
||||||
|
# users.yurii = {
|
||||||
|
# directories = [
|
||||||
|
# ".ssh"
|
||||||
|
# ".mozilla"
|
||||||
|
# ];
|
||||||
|
#
|
||||||
|
# files = [
|
||||||
|
#
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user