diff options
author | makefu <github@syntax-fehler.de> | 2019-05-28 09:12:57 +0200 |
---|---|---|
committer | makefu <github@syntax-fehler.de> | 2019-05-28 09:12:57 +0200 |
commit | 952aeb6c14ecee07b65c7afdf65992216055c9d6 (patch) | |
tree | 038079c0d476286358f9a5f3ebaee60f6b49ebf5 /mb/1systems | |
parent | f541eae020a229b99afe531139be246f8aecb695 (diff) | |
parent | be12b8a41370f50b413376717a5db38edfebd828 (diff) |
Merge remote-tracking branch 'lass/master'
Diffstat (limited to 'mb/1systems')
-rw-r--r-- | mb/1systems/gr33n/configuration.nix | 130 | ||||
-rw-r--r-- | mb/1systems/gr33n/hardware-configuration.nix | 37 | ||||
-rw-r--r-- | mb/1systems/orange/configuration.nix | 9 | ||||
-rw-r--r-- | mb/1systems/p1nk/configuration.nix | 8 |
4 files changed, 177 insertions, 7 deletions
diff --git a/mb/1systems/gr33n/configuration.nix b/mb/1systems/gr33n/configuration.nix new file mode 100644 index 000000000..4342ba0e2 --- /dev/null +++ b/mb/1systems/gr33n/configuration.nix @@ -0,0 +1,130 @@ +{ config, pkgs, callPackage, ... }: let + unstable = import <nixpkgs-unstable> { config = { allowUnfree = true; }; }; +in { + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + <stockholm/mb> + ]; + + krebs.build.host = config.krebs.hosts.gr33n; + + boot.kernelPackages = pkgs.linuxPackages_latest; + boot.extraModulePackages = with config.boot.kernelPackages; [ wireguard ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + fileSystems."/".options = [ "noatime" "nodiratime" "discard" ]; + fileSystems."/mnt/public" = { + device = "//192.168.0.4/public"; + fsType = "cifs"; + options = let + automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; + in [ "${automount_opts},user,rw,username=mb0,iocharset=utf8,credentials=${config.users.users.mb.home}/.smbcredentials" ]; + }; + + i18n = { + consoleFont = "Lat2-Terminus16"; + consoleKeyMap = "de"; + defaultLocale = "en_US.UTF-8"; + }; + + time.timeZone = "Europe/Berlin"; + + nixpkgs.config.allowUnfree = true; + + nixpkgs.config.packageOverrides = super: { + openvpn = super.openvpn.override { + pkcs11Support = true; + useSystemd = false; + }; + }; + + environment.shellAliases = { + ll = "ls -alh"; + ls = "ls --color=tty"; + }; + + environment.systemPackages = with pkgs; [ + curl + fish + git + htop + nmap + ranger + tcpdump + tmux + traceroute + tree + vim + wcalc + wget + xz + ]; + + programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; + + sound.enable = false; + + services.openssh.enable = true; + services.openssh.passwordAuthentication = false; + + networking.wireless.enable = false; + networking.networkmanager.enable = false; + krebs.iptables.enable = true; + networking.enableIPv6 = false; + + programs.fish = { + enable = true; + shellInit = '' + function ssh_agent --description 'launch the ssh-agent and add the id_rsa identity' + if begin + set -q SSH_AGENT_PID + and kill -0 $SSH_AGENT_PID + and grep -q '^ssh-agent' /proc/$SSH_AGENT_PID/cmdline + end + echo "ssh-agent running on pid $SSH_AGENT_PID" + else + eval (command ssh-agent -c | sed 's/^setenv/set -Ux/') + end + set -l identity $HOME/.ssh/id_rsa + set -l fingerprint (ssh-keygen -lf $identity | awk '{print $2}') + ssh-add -l | grep -q $fingerprint + or ssh-add $identity + end + ''; + promptInit = '' + function fish_prompt --description 'Write out the prompt' + set -l color_cwd + set -l suffix + set -l nix_shell_info ( + if test "$IN_NIX_SHELL" != "" + echo -n " <nix-shell>" + end + ) + switch "$USER" + case root toor + if set -q fish_color_cwd_root + set color_cwd $fish_color_cwd_root + else + set color_cwd $fish_color_cwd + end + set suffix '#' + case '*' + set color_cwd $fish_color_cwd + set suffix '>' + end + + echo -n -s "$USER" @ (set_color green) (prompt_hostname) (set_color normal) "$nix_shell_info" ' ' (set_color $color_cwd) (prompt_pwd) (set_color normal) "$suffix " + end + ''; + }; + + nix.buildCores = 4; + system.autoUpgrade.enable = false; + system.autoUpgrade.channel = "https://nixos.org/channels/nixos-19.03"; + system.stateVersion = "19.03"; + +} diff --git a/mb/1systems/gr33n/hardware-configuration.nix b/mb/1systems/gr33n/hardware-configuration.nix new file mode 100644 index 000000000..1d13b8dc7 --- /dev/null +++ b/mb/1systems/gr33n/hardware-configuration.nix @@ -0,0 +1,37 @@ +# 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 = [ "ahci" "xhci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + boot.initrd.mdadmConf = '' + ARRAY /dev/md0 level=raid6 num-devices=4 metadata=1.2 name=gr33n:0 UUID=5b715fd9:0be6bfa6:19f07db4:c16836d6 + devices=/dev/sda1,/dev/sdb1,/dev/sdc1,/dev/sdd1 + ''; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/a9f2c19b-f60f-450c-87f1-146a54c4198b"; + fsType = "ext4"; + }; + fileSystems."/storage" = + { device = "/dev/disk/by-label/storage"; + fsType = "ext4"; + }; + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/93EB-BCA3"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + + nix.maxJobs = lib.mkDefault 4; + powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; +} diff --git a/mb/1systems/orange/configuration.nix b/mb/1systems/orange/configuration.nix index 4ac0996a4..3e90f89a2 100644 --- a/mb/1systems/orange/configuration.nix +++ b/mb/1systems/orange/configuration.nix @@ -27,15 +27,13 @@ in { fileSystems."/".options = [ "noatime" "nodiratime" "discard" ]; fileSystems."/mnt/public" = { - device = "//192.168.88.252/public"; + device = "//192.168.0.4/public"; fsType = "cifs"; options = let automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; in [ "${automount_opts},user,rw,username=mb0,iocharset=utf8,credentials=${config.users.users.mb.home}/.smbcredentials" ]; }; - #networking.hostName = "0r4n93"; - networking.wireless.enable = false; # Select internationalisation properties. i18n = { @@ -132,7 +130,6 @@ in { vulnix wcalc wget - wireshark-gtk xz ]; @@ -151,6 +148,8 @@ in { sound.enable = true; hardware.pulseaudio.enable = true; + hardware.pulseaudio.support32Bit = true; + nixpkgs.config.pulseaudio = true; services.xserver = { enable = true; @@ -173,7 +172,9 @@ in { #services.openssh.permitRootLogin = "yes"; services.openssh.passwordAuthentication = false; + networking.wireless.enable = false; networking.networkmanager.enable = false; + krebs.iptables.enable = true; #networking.nameservers = [ "8.8.8.8" "141.1.1.1" ]; networking.enableIPv6 = false; diff --git a/mb/1systems/p1nk/configuration.nix b/mb/1systems/p1nk/configuration.nix index 28a7c7776..905630e78 100644 --- a/mb/1systems/p1nk/configuration.nix +++ b/mb/1systems/p1nk/configuration.nix @@ -22,14 +22,13 @@ in { ]; fileSystems."/".options = [ "noatime" "nodiratime" "discard" ]; fileSystems."/mnt/public" = { - device = "//192.168.88.252/public"; + device = "//192.168.0.4/public"; fsType = "cifs"; options = let automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s"; in [ "${automount_opts},user,rw,username=mb0,iocharset=utf8,credentials=${config.users.users.mb.home}/.smbcredentials" ]; }; - networking.wireless.enable = true; i18n = { consoleFont = "Lat2-Terminus16"; @@ -143,11 +142,12 @@ in { sound.enable = true; hardware.pulseaudio.enable = true; + hardware.pulseaudio.support32Bit = true; services.xserver = { enable = true; layout = "de"; - xkbOptions = "neo"; + xkbOptions = "nodeadkeys"; libinput.enable = true; desktopManager = { default = "xfce"; @@ -164,7 +164,9 @@ in { services.openssh.enable = true; services.openssh.passwordAuthentication = false; + krebs.iptables.enable = true; networking.networkmanager.enable = false; + networking.wireless.enable = true; networking.nameservers = [ "8.8.8.8" "141.1.1.1" ]; networking.enableIPv6 = false; |