Merge branch 'master' of git.2li.ch:Nebucatnetzer/nixos
This commit is contained in:
commit
965302b818
|
@ -11,17 +11,30 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader = {
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Zurich";
|
time.timeZone = "Europe/Zurich";
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking = {
|
||||||
|
networkmanager.enable = true;
|
||||||
|
firewall.allowedTCPPorts = [ 22 ];
|
||||||
|
# firewall.allowedUDPPorts = [ ... ];
|
||||||
|
};
|
||||||
|
|
||||||
# Configure network proxy if necessary
|
hardware = {
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
cpu.intel.updateMicrocode = true;
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
enableRedistributableFirmware = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
openssh.enable = true;
|
||||||
|
autorandr.enable = true;
|
||||||
|
printing.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
@ -31,28 +44,21 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.lightdm.enable = true;
|
||||||
services.xserver.displayManager.lightdm.enable = true;
|
displayManager.defaultSession = "none+qtile";
|
||||||
services.xserver.displayManager.defaultSession = "none+qtile";
|
windowManager.qtile.enable = true;
|
||||||
services.xserver.windowManager = {
|
layout = "us";
|
||||||
qtile.enable = true;
|
xkbOptions = "compose:ralt";
|
||||||
|
libinput.enable = true;
|
||||||
};
|
};
|
||||||
services.autorandr.enable = true;
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver.layout = "us";
|
|
||||||
services.xserver.xkbOptions = "compose:ralt";
|
|
||||||
|
|
||||||
fonts.fonts = with pkgs; [
|
fonts.fonts = with pkgs; [
|
||||||
source-code-pro
|
source-code-pro
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
# Enable keyring
|
# Enable keyring
|
||||||
security.pam.services.lightdm.enableGnomeKeyring = true;
|
security.pam.services.lightdm.enableGnomeKeyring = true;
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
@ -61,9 +67,6 @@
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = true;
|
hardware.pulseaudio.enable = true;
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
|
||||||
services.xserver.libinput.enable = true;
|
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.andreas = {
|
users.users.andreas = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
@ -115,6 +118,7 @@
|
||||||
htop
|
htop
|
||||||
i3lock
|
i3lock
|
||||||
killall
|
killall
|
||||||
|
libreoffice-fresh
|
||||||
lxappearance
|
lxappearance
|
||||||
ncdu
|
ncdu
|
||||||
nitrogen
|
nitrogen
|
||||||
|
@ -128,20 +132,6 @@
|
||||||
wget
|
wget
|
||||||
];
|
];
|
||||||
|
|
||||||
hardware = {
|
|
||||||
cpu.intel.updateMicrocode = true;
|
|
||||||
enableRedistributableFirmware = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
||||||
# Or disable the firewall altogether.
|
|
||||||
# networking.firewall.enable = false;
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
|
|
@ -4,27 +4,29 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
boot.initrd.availableKernelModules = [
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
"aesni_intel"
|
||||||
];
|
"ahci"
|
||||||
|
"cryptd"
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "aesni_intel" "cryptd" ];
|
"sd_mod"
|
||||||
|
"usb_storage"
|
||||||
|
"xhci_pci"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
boot.initrd.luks.devices."cryptlvm".device = "/dev/sda2";
|
boot.initrd.luks.devices."cryptlvm".device = "/dev/sda2";
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-label/nixos";
|
device = "/dev/disk/by-label/nixos";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-label/BOOT";
|
device = "/dev/disk/by-label/BOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-label/swap"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-label/swap"; }
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,10 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "nixos-vm"; # Define your hostname.
|
networking = {
|
||||||
networking.interfaces.enp0s3.useDHCP = true;
|
hostName = "nixos-vm";
|
||||||
|
interfaces.enp0s3.useDHCP = true;
|
||||||
|
};
|
||||||
|
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
ZWEILI_HARDWARE = "vm";
|
ZWEILI_HARDWARE = "vm";
|
||||||
|
|
|
@ -4,26 +4,29 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"ata_piix"
|
||||||
boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "sd_mod" "sr_mod" ];
|
"ohci_pci"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ ];
|
boot.kernelModules = [ ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-label/nixos";
|
device = "/dev/disk/by-label/nixos";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-label/BOOT";
|
device = "/dev/disk/by-label/BOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [
|
||||||
[ { device = "/dev/disk/by-label/swap"; }
|
{ device = "/dev/disk/by-label/swap"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.virtualbox.guest.enable = true;
|
virtualisation.virtualbox.guest.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,10 @@
|
||||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
boot.kernelParams = [
|
||||||
|
"mem_sleep_default=deep"
|
||||||
|
]
|
||||||
|
|
||||||
boot.initrd.luks.devices."cryptlvm".device = "/dev/sda2";
|
boot.initrd.luks.devices."cryptlvm".device = "/dev/sda2";
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-label/nixos";
|
{ device = "/dev/disk/by-label/nixos";
|
||||||
|
|
|
@ -6,14 +6,11 @@
|
||||||
];
|
];
|
||||||
programs.git.userEmail = "zweili@contria.com";
|
programs.git.userEmail = "zweili@contria.com";
|
||||||
|
|
||||||
home.shellAliases = {
|
|
||||||
management-server = "mosh --ssh=\"ssh -p 22\" localadmin@10.40.0.53 tmux a";
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
bashrcExtra = ''
|
bashrcExtra = ''
|
||||||
. ~/git_repos/nixos/home-manager/work_config/bashrc
|
. ~/git_repos/nixos/home-manager/work_config/bashrc
|
||||||
|
. /home/andreas/.nix-profile/etc/profile.d/nix.sh
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue