From 31667f737f1f9651e5013605e457053dc84a4cb5 Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Mon, 18 Oct 2021 22:16:56 +0100 Subject: [PATCH] Add miniding --- {nixpkgs => home/daniel}/home.nix | 23 ++-- {nixpkgs => home/daniel}/i3/default.nix | 0 {nixpkgs => home/daniel}/i3utils/default.nix | 0 {nixpkgs => home/daniel}/polybar/config | 0 {nixpkgs => home/daniel}/polybar/default.nix | 0 hosts/miniding/configuration.nix | 117 +++++++++++++++++++ hosts/miniding/hardware-configuration.nix | 28 +++++ 7 files changed, 159 insertions(+), 9 deletions(-) rename {nixpkgs => home/daniel}/home.nix (82%) rename {nixpkgs => home/daniel}/i3/default.nix (100%) rename {nixpkgs => home/daniel}/i3utils/default.nix (100%) rename {nixpkgs => home/daniel}/polybar/config (100%) rename {nixpkgs => home/daniel}/polybar/default.nix (100%) create mode 100644 hosts/miniding/configuration.nix create mode 100644 hosts/miniding/hardware-configuration.nix diff --git a/nixpkgs/home.nix b/home/daniel/home.nix similarity index 82% rename from nixpkgs/home.nix rename to home/daniel/home.nix index 4611aff..6d6595c 100644 --- a/nixpkgs/home.nix +++ b/home/daniel/home.nix @@ -17,12 +17,6 @@ xsession.enable = true; services.dunst.enable = true; - nixpkgs.overlays = [ - (import (builtins.fetchTarball { - url = https://github.com/nix-community/neovim-nightly-overlay/archive/master.tar.gz; - })) - ]; - home.packages = with pkgs; [ (import ./i3utils) @@ -31,7 +25,7 @@ element-desktop feh fzf - go + go_1_17 i3 i3lock lazygit @@ -51,17 +45,28 @@ ]; }; + programs = { + zsh = { + enable = true; + oh-my-zsh = { + enable = true; + plugins = [ "git" "fzf" ]; + theme = "agnoster"; + }; + }; + }; + programs.git = { enable = true; userName = "Daniel Patterson"; userEmail = "me@danielpatterson.dev"; }; + + programs.starship.enable = true; programs.neovim.enable = true; programs.neovim.viAlias = true; programs.neovim.vimAlias = true; - - home.stateVersion = "21.05"; } diff --git a/nixpkgs/i3/default.nix b/home/daniel/i3/default.nix similarity index 100% rename from nixpkgs/i3/default.nix rename to home/daniel/i3/default.nix diff --git a/nixpkgs/i3utils/default.nix b/home/daniel/i3utils/default.nix similarity index 100% rename from nixpkgs/i3utils/default.nix rename to home/daniel/i3utils/default.nix diff --git a/nixpkgs/polybar/config b/home/daniel/polybar/config similarity index 100% rename from nixpkgs/polybar/config rename to home/daniel/polybar/config diff --git a/nixpkgs/polybar/default.nix b/home/daniel/polybar/default.nix similarity index 100% rename from nixpkgs/polybar/default.nix rename to home/daniel/polybar/default.nix diff --git a/hosts/miniding/configuration.nix b/hosts/miniding/configuration.nix new file mode 100644 index 0000000..957f350 --- /dev/null +++ b/hosts/miniding/configuration.nix @@ -0,0 +1,117 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). + +{ config, pkgs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + nixpkgs.config.allowUnfree = true; + + networking.hostName = "miniding"; # Define your hostname. + networking.networkmanager.enable = true; + programs.nm-applet.enable = true; + # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. + + # Set your time zone. + time.timeZone = "Europe/London"; + + # 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.wlp2s0.useDHCP = true; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Enable the X11 windowing system. + services.xserver = { + enable = true; + + libinput = { + enable = true; + }; + + windowManager.i3.enable = true; + + }; + + + # Configure keymap in X11 + # services.xserver.xkbOptions = "eurosign:e"; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable sound. + sound.enable = true; + hardware.pulseaudio.enable = true; + + hardware.opengl.driSupport32Bit = 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’. + users.users.daniel = { + isNormalUser = true; + home = "/home/daniel"; + initialPassword = "password"; + extraGroups = [ "wheel" "networkmanager" ]; # Enable ‘sudo’ for the user. + shell = pkgs.zsh; + }; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + curl + fd + firefox + git + i3 + ripgrep + wget + zsh + ]; + + environment.homeBinInPath = 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; + # }; + + # 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; + + # 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. It‘s 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 = "21.05"; # Did you read the comment? + +} + diff --git a/hosts/miniding/hardware-configuration.nix b/hosts/miniding/hardware-configuration.nix new file mode 100644 index 0000000..ec19f0a --- /dev/null +++ b/hosts/miniding/hardware-configuration.nix @@ -0,0 +1,28 @@ +# 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, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/6a362ee7-854b-4a5b-8989-e65af01b9b99"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/C103-FFC1"; + fsType = "vfat"; + }; + + swapDevices = [ ]; + +}