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" "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": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1747327360, "lastModified": 1747327360,
@ -92,6 +107,7 @@
"root": { "root": {
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"impermanence": "impermanence",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"snowfall-lib": "snowfall-lib" "snowfall-lib": "snowfall-lib"
} }

View file

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

View file

@ -5,6 +5,7 @@
./nvidia.nix ./nvidia.nix
./audio.nix ./audio.nix
./cpu.nix ./cpu.nix
./networking.nix
]; ];
options.hardware = { 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 = { options.system = {
hostname = lib.pantheon.mkStrOption;
mainUser = lib.pantheon.mkStrOption; mainUser = lib.pantheon.mkStrOption;
bootloader = lib.pantheon.mkStrOption; bootloader = lib.pantheon.mkStrOption;
}; };

View file

@ -1,5 +1,6 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
system.hostname = "nemesis";
system.mainUser = "rafiq"; system.mainUser = "rafiq";
system.bootloader = "systemd-boot"; system.bootloader = "systemd-boot";
hardware.drives.btrfs = { hardware.drives.btrfs = {
@ -10,15 +11,6 @@
hardware.platform = "amd"; hardware.platform = "amd";
hardware.gpu = "nvidia"; hardware.gpu = "nvidia";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; 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.
} }