Refactor modules

Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
2024-06-13 19:53:43 +03:00
parent 4b5c7e5c68
commit 77deff930e
34 changed files with 326 additions and 313 deletions

87
hosts/common/default.nix Normal file
View File

@@ -0,0 +1,87 @@
{ inputs, lib, pkgs, ... }:
{
imports = [
inputs.impermanence.nixosModules.impermanence
./configs/zsh.nix
./configs/neovim.nix
./configs/tmux.nix
];
fileSystems."/persist".neededForBoot = true;
boot = {
loader = {
systemd-boot.enable = true;
timeout = 0;
efi.canTouchEfiVariables = true;
};
initrd = {
verbose = false;
postDeviceCommands = lib.mkAfter (builtins.readFile ./scripts/impermanence.sh);
};
kernelParams = [ "loglevel=3" "quiet" ];
consoleLogLevel = 0;
};
environment = {
persistence."/persist" = {
hideMounts = true;
directories = [
"/etc/nixos"
"/etc/NetworkManager/system-connections"
"/var/lib/nixos"
"/var/log"
"/var/lib/systemd/coredump"
];
files = [
"/var/lib/sops-nix/key.txt"
"/etc/machine-id"
"/root/.zsh_history"
];
};
systemPackages = with pkgs; [
nano
tree
git
ranger
btop
fastfetch
];
};
networking.networkmanager.enable = true;
i18n.defaultLocale = "en_US.UTF-8";
users.defaultUserShell = pkgs.zsh;
programs = {
nix-ld = {
enable = true;
libraries = [ ];
};
};
security.sudo.extraConfig = ''
Defaults lecture = never
'';
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system = {
autoUpgrade = {
enable = true;
flake = inputs.self.outPath;
flags = [
"--update-input"
"nixpkgs"
"-L"
];
dates = "02:00";
};
stateVersion = "24.05";
};
}