feat(flake.nix): add impermanence module to flake

This commit is contained in:
Mohammad Rafiq 2025-05-18 15:46:39 +08:00
parent 067e0c9970
commit 7b591ba470
6 changed files with 32 additions and 10 deletions

16
flake.lock generated
View file

@ -73,6 +73,21 @@
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1737831083,
"narHash": "sha256-LJggUHbpyeDvNagTUrdhe/pRVp4pnS6wVKALS782gRI=",
"owner": "nix-community",
"repo": "impermanence",
"rev": "4b3e914cdf97a5b536a889e939fb2fd2b043a170",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "impermanence",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1747327360,
@ -92,6 +107,7 @@
"root": {
"inputs": {
"disko": "disko",
"impermanence": "impermanence",
"nixpkgs": "nixpkgs",
"snowfall-lib": "snowfall-lib"
}

View file

@ -5,6 +5,7 @@
disko.inputs.nixpkgs.follows = "nixpkgs";
snowfall-lib.url = "github:snowfallorg/lib";
snowfall-lib.inputs.nixpkgs.follows = "nixpkgs";
impermanence.url = "github:nix-community/impermanence";
};
outputs = inputs:
@ -13,7 +14,8 @@
src = ./.;
snowfall.namespace = "pantheon";
systems.modules.nixos = with inputs; [
inputs.disko.nixosModules.disko
disko.nixosModules.disko
impermanence.nixosModules.impermanence
];
};
}

View file

@ -5,6 +5,7 @@
./nvidia.nix
./audio.nix
./cpu.nix
./networking.nix
];
options.hardware = {

View file

@ -0,0 +1,10 @@
{ config, lib, ... }:
{
config = lib.mkMerge [
{
networking.useDHCP = lib.mkDefault true;
networking.hostName = config.system.hostname;
networking.networkmanager.enable = true;
}
];
}

View file

@ -8,6 +8,7 @@
];
options.system = {
hostname = lib.pantheon.mkStrOption;
mainUser = lib.pantheon.mkStrOption;
bootloader = lib.pantheon.mkStrOption;
};

View file

@ -1,5 +1,6 @@
{ config, lib, pkgs, ... }:
{
system.hostname = "nemesis";
system.mainUser = "rafiq";
system.bootloader = "systemd-boot";
hardware.drives.btrfs = {
@ -10,15 +11,6 @@
hardware.platform = "amd";
hardware.gpu = "nvidia";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
networking.useDHCP = lib.mkDefault true;
networking.hostName = "nemesis"; # Define your hostname.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
}