File tree Expand file tree Collapse file tree 5 files changed +98
-22
lines changed Expand file tree Collapse file tree 5 files changed +98
-22
lines changed Original file line number Diff line number Diff line change 42
42
url = "github:natsukium/mcp-servers-nix" ;
43
43
inputs . nixpkgs . follows = "nixpkgs" ;
44
44
} ;
45
+ disko = {
46
+ url = "github:nix-community/disko" ;
47
+ inputs . nixpkgs . follows = "nixpkgs" ;
48
+ } ;
45
49
} ;
46
50
47
51
outputs =
65
69
OPL2212-2 = import ./hosts/OPL2212-2 { inherit inputs ; } ;
66
70
} ;
67
71
nixosConfigurations = {
68
- X13Gen2 = import ./hosts/X13Gen2 { inherit inputs ; } ;
72
+ X13Gen2 = inputs . nixpkgs . lib . nixosSystem {
73
+ system = "x86_64-linux" ;
74
+ modules = [
75
+ ./hosts/X13Gen2
76
+ inputs . disko . nixosModules . disko
77
+ ] ;
78
+ } ;
69
79
} ;
70
80
nixOnDroidConfigurations = {
71
81
OPPO-A79 = import ./hosts/OPPO-A79 { inherit inputs ; } ;
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ nixpkgs.lib.nixosSystem {
15
15
modules = [
16
16
../../nixos
17
17
./hardware-configuration.nix
18
+ ./disko-config.nix
18
19
sops-nix . nixosModules . sops
19
20
home-manager . nixosModules . home-manager
20
21
{
Original file line number Diff line number Diff line change
1
+ { lib , ... } :
2
+ {
3
+ disko . devices = {
4
+ disk = {
5
+ main = {
6
+ type = "disk" ;
7
+ device = "/dev/nvme0n1" ; # Change this to your disk device
8
+ content = {
9
+ type = "gpt" ;
10
+ partitions = {
11
+ ESP = {
12
+ size = "512M" ;
13
+ type = "EF00" ;
14
+ content = {
15
+ type = "filesystem" ;
16
+ format = "vfat" ;
17
+ mountpoint = "/boot" ;
18
+ } ;
19
+ } ;
20
+ root = {
21
+ size = "100%" ;
22
+ content = {
23
+ type = "btrfs" ;
24
+ extraArgs = [ "-f" ] ; # Override existing partitions
25
+ subvolumes = {
26
+ "/root" = {
27
+ mountpoint = "/" ;
28
+ mountOptions = [
29
+ "compress=zstd"
30
+ "noatime"
31
+ ] ;
32
+ } ;
33
+ "/home" = {
34
+ mountpoint = "/home" ;
35
+ mountOptions = [
36
+ "compress=zstd"
37
+ "noatime"
38
+ ] ;
39
+ } ;
40
+ "/nix" = {
41
+ mountpoint = "/nix" ;
42
+ mountOptions = [
43
+ "compress=zstd"
44
+ "noatime"
45
+ ] ;
46
+ } ;
47
+ "/swap" = {
48
+ mountpoint = "/swap" ;
49
+ swap . swapfile . size = "8G" ;
50
+ } ;
51
+ } ;
52
+ } ;
53
+ } ;
54
+ } ;
55
+ } ;
56
+ } ;
57
+ } ;
58
+ } ;
59
+ }
Original file line number Diff line number Diff line change 24
24
extraModulePackages = [ ] ;
25
25
} ;
26
26
27
- fileSystems = {
28
- "/" = {
29
- device = "/dev/disk/by-uuid/643f028c-88a5-45af-b7b8-52d78f05a501" ;
30
- fsType = "ext4" ;
31
- } ;
32
- "/boot" = {
33
- device = "/dev/disk/by-uuid/A44D-7A24" ;
34
- fsType = "vfat" ;
35
- options = [
36
- "fmask=0022"
37
- "dmask=0022"
38
- ] ;
39
- } ;
40
- } ;
41
-
42
27
nixpkgs . hostPlatform = lib . mkDefault "x86_64-linux" ;
43
28
networking . useDHCP = lib . mkDefault true ;
44
29
hardware . cpu . amd . updateMicrocode = lib . mkDefault config . hardware . enableRedistributableFirmware ;
You can’t perform that action at this time.
0 commit comments