100 lines
2.0 KiB
Nix
100 lines
2.0 KiB
Nix
{
|
|
inputs,
|
|
nixosModules,
|
|
pkgs,
|
|
userName,
|
|
...
|
|
}:
|
|
{
|
|
imports = [ nixosModules.packages.common ];
|
|
|
|
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";
|
|
};
|
|
};
|
|
|
|
i18n = rec {
|
|
defaultLocale = "en_US.UTF-8";
|
|
extraLocales = [ "sv_SE.UTF-8/UTF-8" ];
|
|
|
|
extraLocaleSettings = {
|
|
LC_ADDRESS = defaultLocale;
|
|
LC_CTYPE = defaultLocale;
|
|
LC_COLLATE = defaultLocale;
|
|
LC_IDENTIFICATION = defaultLocale;
|
|
LC_MEASUREMENT = defaultLocale;
|
|
LC_MESSAGES = defaultLocale;
|
|
LC_MONETARY = defaultLocale;
|
|
LC_NAME = defaultLocale;
|
|
LC_NUMERIC = defaultLocale;
|
|
LC_PAPER = defaultLocale;
|
|
LC_TELEPHONE = defaultLocale;
|
|
LC_TIME = defaultLocale;
|
|
};
|
|
};
|
|
|
|
services.xserver.xkb.layout = "se";
|
|
time.timeZone = "Europe/Stockholm";
|
|
|
|
console = {
|
|
earlySetup = true;
|
|
font = "ter-v16n";
|
|
keyMap = "sv-latin1";
|
|
packages = [ pkgs.terminus_font ];
|
|
};
|
|
|
|
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;
|
|
ipv6AcceptRAConfig.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";
|
|
};
|
|
|
|
security.sudo.wheelNeedsPassword = true;
|
|
|
|
users.users.${userName}.openssh.authorizedKeys.keys = [ ];
|
|
}
|