From cb0880e23e22f285a7f8525abf4b168e7ed28568 Mon Sep 17 00:00:00 2001 From: Tom Barrett Date: Mon, 11 Oct 2021 21:08:05 +0200 Subject: trying out nixos --- .autostart | 2 +- .zshrc | 5 ++++ build | 2 +- nix/configuration.nix | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ nixbuild | 5 ++++ 5 files changed, 81 insertions(+), 2 deletions(-) create mode 100644 nix/configuration.nix create mode 100755 nixbuild diff --git a/.autostart b/.autostart index 7a0b866..5afc9aa 100755 --- a/.autostart +++ b/.autostart @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env zsh wait_time=0.1 # user arandr to generate startup diff --git a/.zshrc b/.zshrc index db90775..d03ecd7 100644 --- a/.zshrc +++ b/.zshrc @@ -8,6 +8,11 @@ path=( "$HOME/bin" "/usr/local/games" "/usr/local/bin" "/usr/local/sbin" + "/run/wrappers/bin" + "/home/tom/.nix-profile/bin" + "/etc/profiles/per-user/tom/bin" + "/nix/var/nix/profiles/default/bin" + "/run/current-system/sw/bin" ) export PATH EDITOR=nvim diff --git a/build b/build index ca2f44d..a273659 100755 --- a/build +++ b/build @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # var setup RC_DIR=$HOME'/src/rc' diff --git a/nix/configuration.nix b/nix/configuration.nix new file mode 100644 index 0000000..aa6f3e0 --- /dev/null +++ b/nix/configuration.nix @@ -0,0 +1,69 @@ +{ config, pkgs, ... }: + +{ + imports = [ ./hardware-configuration.nix ]; + + networking.hostName = "nixos"; + boot.loader.grub.device = "/dev/sda"; + networking.interfaces.wlp3s0.useDHCP = true; + + boot.loader.grub.enable = true; + time.timeZone = "Europe/Berlin"; + networking.networkmanager.enable = true; + i18n.defaultLocale = "en_US.UTF-8"; + + users.users.tom = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" "lxd"]; + shell = pkgs.zsh; + }; + + services.xserver.enable = true; + services.xserver.autorun = false; + services.xserver.displayManager.startx.enable = true; + services.xserver.libinput.enable = true; + + environment.variables.EDITOR = "nvim"; + environment.systemPackages = with pkgs; [ + neovim + git + htop + ncmpcpp + w3m + firefox + wget + curl + dmenu + pass + feh + nixfmt + neomutt + acpi + ranger + mpc_cli + lm_sensors + ]; + + programs.gnupg.agent = { + enable = true; + pinentryFlavor = "gtk2"; + enableSSHSupport = true; + }; + + programs.zsh.enable = true; + programs.zsh.autosuggestions.enable = true; + programs.zsh.syntaxHighlighting.enable = true; + + fonts.fonts = with pkgs; [ hermit ]; + + system.stateVersion = "21.05"; + + virtualisation.lxd.enable = true; + + swapDevices = [ + { + device = "/swap"; + size = 4096; + } + ]; +} diff --git a/nixbuild b/nixbuild new file mode 100755 index 0000000..0012392 --- /dev/null +++ b/nixbuild @@ -0,0 +1,5 @@ +#!/usr/bin/env nix-shell +#!nix-shell -p xorg.libX11.dev xorg.libXft xorg.libXinerama git bash pkg-config +#!nix-shell -i bash +./build + -- cgit v1.2.3