nixos/common.nix

45 lines
1.2 KiB
Nix

{
pkgs,
lib,
...
}: let
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz";
in {
imports = [(import "${home-manager}/nixos")];
nix = {
settings.experimental-features = ["nix-command" "flakes"];
gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
};
extraOptions = ''
keep-outputs = true
keep-derivations = true
'';
};
system.autoUpgrade.enable = lib.mkDefault false;
nixpkgs.config.allowUnfree = true;
users.users.root.shell = pkgs.zsh;
home-manager = {
useUserPackages = false;
useGlobalPkgs = true;
users.root = {
imports = [./home/env/readline.nix ./home/env/starship.nix ./home/env/zsh.nix];
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "22.11";
};
};
networking.networkmanager.enable = true;
services.power-profiles-daemon.enable = true;
virtualisation.podman.enable = true;
programs = {
ssh.startAgent = true;
fish.enable = true;
zsh.enable = true;
};
fonts.fontconfig.enable = true;
environment.localBinInPath = true;
}