Rename maschines -> machines

This commit is contained in:
Valentin Brandl
2022-02-18 12:12:50 +01:00
parent ecda312786
commit c38e003b98
2 changed files with 0 additions and 0 deletions

150
machines/common.nix Normal file
View File

@ -0,0 +1,150 @@
inputs:
{ config, libs, pkgs, ... }: {
nix = {
extraOptions = ''
experimental-features = nix-command flakes
'';
binaryCaches = lib.mkForce [
"https://cache.nixos.org/"
"https://nix-community.cachix.org"
];
binaryCachePublicKeys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
];
};
nixpkgs.config.allowUnfree = true;
networking = {
networkmanager.enable = true;
};
i18n.defaultLocale = "en_GB.UTF-8";
time.timeZone = "Europe/Berlin";
sound.enable = true;
hardware = {
pulseaudio = {
enable = true;
# stop mumble from muting other processes
extraConfig = "unload-module module-role-cork";
};
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
};
services = {
dbus.packages = with pkgs; [ gcr ];
unbound.enable = true;
udisks2.enable = true;
# Enable CUPS to print documents.
printing.enable = true;
pipewire = {
enable = true;
pulse.enable = true;
};
# required for nextcloud
gnome.gnome-keyring.enable = true;
# faster entropy generation
haveged.enable = true;
xserver = {
enable = true;
layout = "eu";
xkbOptions = "caps:escape";
displayManager = {
defaultSession = "none+i3";
lightdm.enable = true;
};
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
dmenu
rofi
i3status
i3lock
i3blocks
];
};
};
};
systemd.tmpfiles.rules = [
"L+ /lib64/ld-linux-x86-64.so.2 - - - - ${pkgs.stdenv.glibc}/lib64/ld-linux-x86-64.so.2"
];
environment.systemPackages = with pkgs; [
arandr
git
keepassxc
lxappearance
networkmanagerapplet
nextcloud-client
pavucontrol
termite
vim
which
xfce.thunar
xfce.thunar-volman
gvfs
];
virtualisation = {
docker = {
enable = true;
};
# podman = {
# enable = true;
# dockerCompat = true;
# dockerSocket.enable = true;
# };
# lxd.enable = true;
# virtualbox.host.enable = true;
# virtualbox.host.enableExtensionPack = true;
};
programs = {
# enable zsh globally
zsh.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
pinentryFlavor = "curses";
};
};
environment.sessionVariables = {
XKB_DEFAULT_OPTIONS = "caps:escape";
XKB_DEFAULT_LAYOUT = "eu";
};
# required for i3
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
fonts = {
enableDefaultFonts = true;
fonts = with pkgs; [
font-awesome-ttf
nerdfonts
noto-fonts-cjk
noto-fonts-emoji
powerline-fonts
];
fontconfig = {
defaultFonts = {
monospace = [ "JetBrainsMono Nerd Font" "Noto Color Emoji" ];
sansSerif = [ "JetBrainsMono Nerd Font" "Noto Color Emoji" ];
serif = [ "JetBrainsMono Nerd Font" "Noto Color Emoji" ];
};
};
}
}

96
machines/w1n5t0n.nix Normal file
View File

@ -0,0 +1,96 @@
inputs:
let
system = "x86_64-linux";
hostname = "w1n5t0n";
in
inputs.nixpkgs.lib.nixosSystem {
inherit system;
modules = [
{ system.stateVersion = "21.11"; }
(import ./common.nix inputs)
({ pkgs, lib, ... }: {
networking.hostName = hostname;
users.users.me = {
isNormalUser = true;
createHome = true;
extraGroups = [
"adbusers"
"audio"
"davfs2"
"disk"
"docker"
"networkmanager"
"plugdev"
"users"
"uucp"
"vboxusers"
"video"
"wheel"
];
shell = pkgs.zsh;
};
boot = {
initrd = {
availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
kernelModules = [ "dm-snapshot" ];
luks.devices.root = {
device = "/dev/nvme0n1p2";
preLVM = true;
};
};
kernelModules = [ "kvm-intel" ];
# use latest kernel
kernelPackages = pkgs.linuxPackages.latest;
kernel.sysctl = {
# function keys on keychron keyboard won't work otherwise
"module.hid_apple.parameters.fnmode" = "2";
};
# Use the systemd-boot EFI boot loader.
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# mount tmp as tmpfs
tmpOnTmpfs = true;
# Enable NTFS support
supportedFilesystems = [ "ntfs" ];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/35f68af7-92fe-41ed-9338-8766ad7fbd5f";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/0DD8-8BF6";
fsType = "vfat";
};
swapDevices = [
{ device = "/dev/disk/by-uuid/c1bdaad5-2080-4e08-b37f-cd74e5edc734"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware = {
opengl = {
extraPackages = with pkgs; [
rocm-opencl-icd
rocm-opencl-runtime
];
};
};
})
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {
inherit inputs;
inherit system;
hostname = hostname;
};
users.me = import ../users/me.nix;
};
}
];
}