Loki integration

This commit is contained in:
Filippo Berto 2021-11-08 12:25:14 +01:00
parent c7f6486772
commit eacfa1939a
3 changed files with 125 additions and 4 deletions

View file

@ -4,17 +4,17 @@
(final: prev: {
devEnvironment = (import ./environment.nix) {
# enableCpp = true;
# enableData = true;
enableData = true;
# enableGo = true;
# enableHtml = true;
# enableJavascript = true;
# enableJava = true;
# enableLatex = true;
# enableNix = true;
enableNix = true;
# enableOffice = true;
# enablePython = true;
# enableRust = true;
# enableShell = true;
enableShell = true;
# enableSpelling = true;
};
})
@ -26,11 +26,14 @@
options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ];
};
packages = with pkgs; [
file
htop
neofetch
nix-prefetch-scripts
ripgrep
wget
xclip
yq
];
};
imports = [

118
nixos/loki.nix Normal file
View file

@ -0,0 +1,118 @@
{ config, pkgs, lib, ... }:
{
imports = [
/etc/nixos/hardware-configuration.nix
];
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
networking = {
hostName = "loki";
networkmanager.enable = true;
useDHCP = false;
interfaces = { eno1.useDHCP = true; wlp7s0.useDHCP = true; };
};
time.timeZone = "Europe/Rome";
i18n.defaultLocale = "it_IT.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "it";
};
services.xserver = {
enable = true;
videoDrivers = [ "nvidia" ];
layout = "it";
xkbOptions = "eurosign:e;";
libinput.enable = true;
};
hardware = {
nvidia.prime = {
offload.enable = false;
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
opengl = {
enable = true;
extraPackages = with pkgs; [ intel-media-driver libvdpau-va-gl vaapiIntel vaapiVdpau ];
};
bluetooth.enable = true;
};
users.users = {
bertof = {
isNormalUser = true;
extraGroups = [ "audio" "input" "docker" "libvirtd" "network" "usb" "video" "wheel" ];
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN+zsSWZFFzQKnATCAvtG+iuSm4qkZHjCtHzGa9B/71W" ];
shell = pkgs.zsh;
};
tiziano = {
isNormalUser = true;
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMExwtJFk6HjySrTZwJH67SOHC3hlL28NO4oe2GXsv6k" ];
};
};
programs = {
gnupg.agent = { enable = true; enableSSHSupport = true; };
zsh = { enable = true; syntaxHighlighting.enable = true; };
};
environment.pathsToLink = [ "/share/zsh" ];
services = {
avahi = { enable = true; nssmdns = true; };
blueman.enable = true;
dbus.packages = with pkgs; [ gnome.dconf ];
gnome.gnome-keyring.enable = true;
gvfs = { enable = true; package = lib.mkForce pkgs.gnome3.gvfs; };
logind.lidSwitch = "ignore";
openssh.enable = true;
power-profiles-daemon.enable = true;
smartd = { enable = true; notifications.x11.enable = true; };
thermald.enable = true;
zerotierone = { enable = true; joinNetworks = [ "8056c2e21cf9c753" ]; };
};
# services.snapper = {
# configs =
# let
# bertofExtraConfig = ''
# ALLOW_USERS="bertof"
# TIMELINE_CREATE=yes
# TIMELINE_CLEANUP=yes
# '';
# common = { extraConfig = bertofExtraConfig; };
# in
# {
# bertof_home = common // { subvolume = "/home/bertof"; };
# };
# };
virtualisation = {
docker.enable = true;
kvmgt.enable = true;
libvirtd.enable = true;
podman.enable = true;
virtualbox.host.enable = true;
};
environment.systemPackages = with pkgs; [ htop kakoune vim tmux ];
security.sudo.extraConfig = ''
Defaults pwfeedback
'';
nixpkgs.config.allowUnfree = true;
nix.gc.automatic = true;
system.stateVersion = "21.05";
}

View file

@ -7,7 +7,7 @@ case "$HOST" in
sudo nixos-rebuild boot -p Intel -I nixos-config=./nixos/odin-intel.nix &&
sudo nixos-rebuild boot -p Nvidia -I nixos-config=./nixos/odin-nvidia.nix
;;
thor | freya)
thor | freya | loki)
echo "Found $HOST"
sudo nixos-rebuild boot -I "nixos-config=./nixos/$HOST.nix"
;;