started work on a new live environment nix config using impermanence

This commit is contained in:
2024-11-17 21:42:06 -05:00
parent 7a60cdd513
commit 6350837b37
7 changed files with 127 additions and 240 deletions

41
hosts/live-env/config.nix Executable file
View File

@@ -0,0 +1,41 @@
{ lib, pkgs, modulesPath, inputs, ... }:
let
userConfig = {
isNormalUser = true;
initialPassword = "1234";
shell = pkgs.zsh;
extraGroups = [ "wheel" ];
};
in
{
imports = [ ./hardware.nix ];
movOpts = {
sysEnv = {
issue.enable = true;
stylixConfig.enable = true;
nixSettings.enable = true;
};
hardwareCfg = {
networkModule.enable = true;
bootLoader.enable = true;
};
softwareCfg = {
sysPkgs.enable = true;
sysProgs.enable = true;
sysServices.enable = true;
};
};
users = {
groups.persist = { };
users = {
impermanence = userConfig;
persistence = userConfig // {
extraGroups = userConfig.extraGroups ++ [ "persist" ];
};
root.initialPassword = "1234";
};
};
}

View File

@@ -0,0 +1,56 @@
# USAGE in your configuration.nix.
# Update devices to match your hardware.
{ device ? throw "Set this to your disk device, e.g. /dev/sda", root_size
, nix_size, ... }: {
disko.devices = {
disk = {
main = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
size = "1M";
type = "EF02"; # for grub MBR
};
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
nix = {
size = "${nix_size}";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/nix";
};
};
root = {
size = "${root_size}";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
home = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
};
};
};
};
};
};
};
}

44
hosts/live-env/home.nix Normal file
View File

@@ -0,0 +1,44 @@
{ username, ... }:
{
home.username = "${username}";
home.homeDirectory = "/home/${username}";
home.stateVersion = "25.05";
programs.home-manager.enable = true;
movOpts = {
homeFiles.enable = true;
envConfig = {
hyprlandConfig = {
enable = true;
monitorNames = [ "eDP-1" ];
workspaceLayout = "singlemonitor";
};
userPkgs.enable = true;
stylixHomeConfig.enable = true;
gtkConfig.enable = true;
starshipConfig.enable = true;
swayncConfig.enable = true;
zshConfig = {
shellAliases.enable = true;
envVariables.enable = true;
shellOptions.enable = true;
extraConfig.enable = true;
};
};
programConfigs = {
autojumpConfig.enable = true;
btopConfig.enable = true;
ezaConfig.enable = true;
firefoxConfig.enable = true;
fuzzelConfig.enable = true;
fzfConfig.enable = true;
gitConfig.enable = true;
kittyConfig.enable = true;
yaziConfig.enable = true;
passConfig.enable = true;
batConfig.enable = true;
};
};
}