nix
This commit is contained in:
103
modules/base.nix
Normal file
103
modules/base.nix
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
pkgs,
|
||||
userName,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
};
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 14d";
|
||||
};
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = false;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
configurationLimit = 10;
|
||||
device = "nodev";
|
||||
efiSupport = true;
|
||||
enableCryptodisk = true;
|
||||
useOSProber = true;
|
||||
zfsSupport = true;
|
||||
};
|
||||
|
||||
time.timeZone = "Europe/Stockholm";
|
||||
i18n.defaultLocale = "sv_SE.UTF-8";
|
||||
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "sv-latin1";
|
||||
};
|
||||
|
||||
networking.useNetworkd = true;
|
||||
systemd.network.enable = true;
|
||||
systemd.network.wait-online.enable = false;
|
||||
services.resolved.enable = true;
|
||||
services.openssh.enable = true;
|
||||
|
||||
systemd.network.networks."10-wired" = {
|
||||
matchConfig.Name = [
|
||||
"en*"
|
||||
"eth*"
|
||||
];
|
||||
networkConfig = {
|
||||
DHCP = "yes";
|
||||
IPv6AcceptRA = true;
|
||||
};
|
||||
dhcpV4Config.RouteMetric = 100;
|
||||
dhcpV6Config.RouteMetric = 100;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
programs.htop.enable = true;
|
||||
programs.tmux.enable = true;
|
||||
programs.git.enable = true;
|
||||
programs.lazygit.enable = true;
|
||||
programs.bat.enable = true;
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
environment.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
cowsay
|
||||
fortune
|
||||
lolcat
|
||||
curl
|
||||
eza
|
||||
fzf
|
||||
neovim
|
||||
odt2txt
|
||||
openssl
|
||||
stow
|
||||
tpm2-tools
|
||||
unzip
|
||||
wget
|
||||
zsh
|
||||
];
|
||||
|
||||
security.sudo.wheelNeedsPassword = true;
|
||||
|
||||
users.users.${userName}.openssh.authorizedKeys.keys = [ ];
|
||||
}
|
||||
Reference in New Issue
Block a user