started work on a new live environment nix config using impermanence
This commit is contained in:
48
flake.nix
48
flake.nix
@@ -99,10 +99,40 @@
|
||||
nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
neonImpermanenceHome = let host = "neonImpermanence"; in home-manager.lib.homeManagerConfiguration { # Live Environment
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = nixpkgsConfig;
|
||||
};
|
||||
extraSpecialArgs = {
|
||||
inherit host self username inputs;
|
||||
};
|
||||
modules = [
|
||||
./modules/home
|
||||
(import ./hosts/live-env/home.nix { username = "impermanence"; })
|
||||
nixvim.homeManagerModules.nixvim
|
||||
stylix.homeManagerModules.stylix
|
||||
];
|
||||
};
|
||||
neonPersistenceHome = let host = "neonPersistence"; in home-manager.lib.homeManagerConfiguration { # Live Environment
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = nixpkgsConfig;
|
||||
};
|
||||
extraSpecialArgs = {
|
||||
inherit host self username inputs;
|
||||
};
|
||||
modules = [
|
||||
./modules/home
|
||||
(import ./hosts/live-env/home.nix { username = "persistence"; })
|
||||
nixvim.homeManagerModules.nixvim
|
||||
stylix.homeManagerModules.stylix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
oganesson = nixpkgs.lib.nixosSystem {
|
||||
oganesson = nixpkgs.lib.nixosSystem { # Desktop
|
||||
specialArgs = {
|
||||
inherit self inputs username;
|
||||
host = "oganesson";
|
||||
@@ -121,7 +151,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
mercury = nixpkgs.lib.nixosSystem {
|
||||
mercury = nixpkgs.lib.nixosSystem { # Laptop
|
||||
specialArgs = {
|
||||
inherit self inputs username;
|
||||
host = "mercury";
|
||||
@@ -140,7 +170,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
xenon = nixpkgs.lib.nixosSystem {
|
||||
xenon = nixpkgs.lib.nixosSystem { # Server
|
||||
specialArgs = {
|
||||
inherit self inputs username;
|
||||
host = "xenon";
|
||||
@@ -159,10 +189,9 @@
|
||||
nur.nixosModules.nur
|
||||
];
|
||||
};
|
||||
|
||||
installer = nixpkgs.lib.nixosSystem {
|
||||
neon = nixpkgs.lib.nixosSystem { # Live environment
|
||||
specialArgs = {
|
||||
host = "installer";
|
||||
host = "neon";
|
||||
inherit self inputs;
|
||||
};
|
||||
inherit system;
|
||||
@@ -171,7 +200,12 @@
|
||||
config = nixpkgsConfig;
|
||||
overlays = [];
|
||||
};
|
||||
modules = [ ./hosts/installer nixvim.nixosModules.nixvim ];
|
||||
modules = [
|
||||
./hosts/live-env
|
||||
./modules/sys
|
||||
nixvim.nixosModules.nixvim
|
||||
stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,231 +0,0 @@
|
||||
{ lib, pkgs, modulesPath, inputs, ... }:
|
||||
let
|
||||
extraFigletFonts = pkgs.fetchFromGitHub {
|
||||
owner = "xero";
|
||||
repo = "figlet-fonts";
|
||||
rev = "master";
|
||||
sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY=";
|
||||
};
|
||||
toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: {
|
||||
buildInputs = oldAttrs.buildInputs or [ ] ++ [ extraFigletFonts ];
|
||||
|
||||
installPhase = ''
|
||||
make install PREFIX=$out
|
||||
mkdir -p $out/share/figlet
|
||||
cp -r ${extraFigletFonts}/* $out/share/figlet
|
||||
'';
|
||||
});
|
||||
in {
|
||||
imports = [
|
||||
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
../../modules/sys/software/nixvim
|
||||
];
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
system.stateVersion = "24.05";
|
||||
nix = { settings = { experimental-features = [ "nix-command" "flakes" ]; }; };
|
||||
|
||||
networking = {
|
||||
wireless.enable = false;
|
||||
networkmanager.enable = true;
|
||||
hostName = "mov-nixos-installer";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
nix-output-monitor
|
||||
nh
|
||||
nvd
|
||||
lolcat
|
||||
curl
|
||||
wget
|
||||
coreutils
|
||||
findutils
|
||||
zip
|
||||
unzip
|
||||
util-linux
|
||||
git
|
||||
btrfs-progs
|
||||
dosfstools
|
||||
parted
|
||||
bc
|
||||
pciutils
|
||||
usbutils
|
||||
toilet-extrafonts
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
users.root = {
|
||||
programs.home-manager.enable = true;
|
||||
home = {
|
||||
stateVersion = "24.05";
|
||||
file = { "disko.nix".source = ./disko-ext4-singledisk.nix; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
dbus.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = [ "git" "fzf" ];
|
||||
};
|
||||
|
||||
enableCompletion = true;
|
||||
|
||||
histFile = "$HOME/.zsh_history";
|
||||
histSize = 10000;
|
||||
|
||||
autosuggestions = {
|
||||
enable = true;
|
||||
highlightStyle = "fg=#4C566A,underline";
|
||||
};
|
||||
|
||||
shellAliases = {
|
||||
grep = "grep --color=auto";
|
||||
vi = "nvim";
|
||||
mv = "mv -v";
|
||||
cp = "cp -vr";
|
||||
".." = "cd ..";
|
||||
psg = "ps aux | grep -v grep | grep -i -e VSZ -e";
|
||||
mkdir = "mkdir -p";
|
||||
pk = "pkill -9 -f";
|
||||
svc = "sudo systemctl";
|
||||
};
|
||||
promptInit = ''
|
||||
bindkey -v
|
||||
type starship_zle-keymap-select >/dev/null || \
|
||||
{
|
||||
eval "$(starship init zsh)"
|
||||
}
|
||||
'';
|
||||
setOptions = [
|
||||
"APPEND_HISTORY"
|
||||
"INC_APPEND_HISTORY"
|
||||
"SHARE_HISTORY"
|
||||
"CORRECT"
|
||||
"NO_NOMATCH"
|
||||
"LIST_PACKED"
|
||||
"ALWAYS_TO_END"
|
||||
"GLOB_COMPLETE"
|
||||
"COMPLETE_ALIASES"
|
||||
"COMPLETE_IN_WORD"
|
||||
"AUTO_CD"
|
||||
"AUTO_CONTINUE"
|
||||
"LONG_LIST_JOBS"
|
||||
"HIST_VERIFY"
|
||||
"SHARE_HISTORY"
|
||||
"HIST_IGNORE_SPACE"
|
||||
"HIST_SAVE_NO_DUPS"
|
||||
"HIST_IGNORE_ALL_DUPS"
|
||||
"EXTENDED_GLOB"
|
||||
"TRANSIENT_RPROMPT"
|
||||
"INTERACTIVE_COMMENTS"
|
||||
];
|
||||
shellInit = ''
|
||||
export EDITOR="nvim"
|
||||
export SUDO_EDITOR="nvim"
|
||||
export VISUAL="nvim"
|
||||
export LANG="en_US.UTF-8"
|
||||
|
||||
unalias ls
|
||||
ls() {
|
||||
eza -1 --group-directories-first --icons "$@"
|
||||
}
|
||||
|
||||
y() {
|
||||
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
|
||||
yazi "$@" --cwd-file="$tmp"
|
||||
if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
|
||||
builtin cd -- "$cwd"
|
||||
fi
|
||||
rm -f -- "$tmp"
|
||||
}
|
||||
|
||||
cd() {
|
||||
export SOUNDS_ENABLED=0
|
||||
eza -1 --group-directories-first --icons "$@"
|
||||
builtin cd "$@" || exit
|
||||
export SOUNDS_ENABLED=1
|
||||
}
|
||||
if [ ! -e $HOME/.zsh_history ]; then
|
||||
touch $HOME/.zsh_history
|
||||
chmod 600 $HOME/.zsh_history
|
||||
fi
|
||||
|
||||
autoload -U compinit # completion
|
||||
autoload -U terminfo # terminfo keys
|
||||
zmodload -i zsh/complist # menu completion
|
||||
autoload -U promptinit # prompt
|
||||
|
||||
autoload -U up-line-or-beginning-search; zle -N up-line-or-beginning-search
|
||||
autoload -U down-line-or-beginning-search; zle -N down-line-or-beginning-search
|
||||
|
||||
unalias ls
|
||||
clear
|
||||
'';
|
||||
};
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
right_format = "($custom)";
|
||||
|
||||
format = lib.concatStrings [
|
||||
"($username)(bold white)($cmd_duration)($character)"
|
||||
"($git_branch)($git_status)($rust)($nix-shell)"
|
||||
"($directory)"
|
||||
"$line_break[ > ](bold #89b4fa)"
|
||||
];
|
||||
|
||||
username = {
|
||||
show_always = true;
|
||||
style_user = "bold white";
|
||||
format = "[$user]($style)";
|
||||
};
|
||||
directory = {
|
||||
format = ''
|
||||
|
||||
[$path](bold cyan)[/](bold green) '';
|
||||
style = "bold #b4befe";
|
||||
};
|
||||
|
||||
character = {
|
||||
success_symbol = "[ -> ](bold green)";
|
||||
error_symbol = "[ -> ✗](bold red)";
|
||||
# error_symbol = "[ ](bold #89dceb)[ ✗](bold red)";
|
||||
};
|
||||
|
||||
cmd_duration = {
|
||||
format = "[ $duration]($style)";
|
||||
disabled = false;
|
||||
style = "bg:none fg:#f9e2af";
|
||||
show_notifications = false;
|
||||
min_time_to_notify = 60000;
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
format = ''
|
||||
|
||||
on [$symbol$branch](bold purple)'';
|
||||
symbol = " ";
|
||||
truncation_length = 15;
|
||||
style = "bold purple";
|
||||
};
|
||||
|
||||
custom.shellver = {
|
||||
command = "zsh --version";
|
||||
when = ''test $SHELL = "/run/current-system/sw/bin/zsh"'';
|
||||
symbol = "";
|
||||
style = "bold magenta";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
41
hosts/live-env/config.nix
Executable file
41
hosts/live-env/config.nix
Executable 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
44
hosts/live-env/home.nix
Normal file
44
hosts/live-env/home.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -58,7 +58,6 @@ in {
|
||||
lolcat
|
||||
vesktop
|
||||
qbittorrent
|
||||
neovide
|
||||
zsh
|
||||
zsh-syntax-highlighting
|
||||
zsh-history-substring-search
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
lib.mkEnableOption "enables my nixos settings";
|
||||
};
|
||||
config = lib.mkIf config.movOpts.sysEnv.nixSettings.enable {
|
||||
system.stateVersion = "24.05";
|
||||
system.stateVersion = "25.05";
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
|
||||
Reference in New Issue
Block a user