Initial commit

This commit is contained in:
Valentin Brandl 2020-05-30 14:07:02 +02:00
commit 0eecc461c9
9 changed files with 319 additions and 0 deletions

17
configuration.nix Normal file
View File

@ -0,0 +1,17 @@
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration-current.nix
./role-current.nix
];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "20.03"; # Did you read the comment?
}

View File

@ -0,0 +1 @@
hardware/hardware-configuration-desktop.nix

View File

@ -0,0 +1,32 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/878539a9-eab3-4b29-86ba-dc703ac93de6";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/6456-8B97";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/5292c090-e162-441d-95f2-c43f4afec853"; }
];
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View File

@ -0,0 +1,32 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ad7ff130-6171-4c9e-85c9-3db3f4bf5ae9";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8939-9AFF";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/ecb19fb8-4335-40d4-89ff-2b11947e0e0e"; }
];
nix.maxJobs = lib.mkDefault 8;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

1
role-current.nix Symbolic link
View File

@ -0,0 +1 @@
roles/workstation.nix

30
roles/subroles/dev.nix Normal file
View File

@ -0,0 +1,30 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
neovim
vim
vscodium
docker-compose
binutils
curl
htop
nixfmt
ripgrep
shellcheck
tmux
unzip
wget
git
rustup
direnv
];
services.lorri.enable = true;
programs.adb.enable = true;
}

View File

@ -0,0 +1,20 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
steam
steam-run
#lutris
#multimc
#(wine.override { wineBuild = "wineWow"; })
mplayer
spotify
vlc
teamspeak_client
];
# needed for steam
hardware.opengl.driSupport32Bit = true;
hardware.pulseaudio.support32Bit = true;
}

View File

@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
firefox
chromium
thunderbird
riot-desktop
tdesktop
];
}

174
roles/workstation.nix Normal file
View File

@ -0,0 +1,174 @@
{ config, pkgs, builtins, ... }:
{
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# mount tmp as tmpfs
boot.tmpOnTmpfs = true;
boot.initrd.luks.devices = {
root = {
device = "/dev/sda2";
preLVM = true;
};
};
networking.hostName = "w1n5t0n"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.eno1.useDHCP = true;
networking.networkmanager.enable = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Select internationalisation properties.
i18n.defaultLocale = "en_GB.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "eu";
# };
# Set your time zone.
time.timeZone = "Europe/Berlin";
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
glibcLocales
keepassxc
lxappearance
networkmanagerapplet
nextcloud-client
pavucontrol
termite
vim
which
];
# required for nextcloud
services.gnome3.gnome-keyring.enable = true;
virtualisation.docker.enable = true;
# virtualisation.lxd.enable = true;
# virtualisation.virtualbox.host.enable = true;
# virtualisation.virtualbox.host.enableExtensionPack = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
# pinentryFlavor = "gnome3";
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# set keyboard layout
environment.sessionVariables = {
XKB_DEFAULT_OPTIONS = "caps:escape";
XKB_DEFAULT_LAYOUT = "eu";
};
# Enable the X11 windowing system.
services.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
];
};
};
# required for i3
environment.pathsToLink = [ "/libexec" ]; # links /libexec from derivations to /run/current-system/sw
# Enable touchpad support.
# services.xserver.libinput.enable = true;
# Enable the KDE Desktop Environment.
# services.xserver.displayManager.sddm.enable = true;
# services.xserver.desktopManager.plasma5.enable = true;
# enable zsh globally
programs.zsh.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.me = {
shell = pkgs.zsh;
createHome = true;
isNormalUser = true;
extraGroups = [
"adbusers"
"audio"
"disk"
"docker"
"networkmanager"
"plugdev"
"vboxusers"
"video"
"wheel"
];
};
# systemd.services.home-manager-me.preStart = ''
# ${pkgs.nix}/bin/nix-env -i -E
# '';
fonts.fonts = with pkgs; [
font-awesome-ttf
#nerdfonts
noto-fonts-cjk
powerline-fonts
];
# Enable NTFS support
boot.supportedFilesystems = [ "ntfs" ];
imports =
[
./subroles/dev.nix
./subroles/entertainment.nix
./subroles/internet.nix
];
}