From 0230a9cf1b5879e61ca52f9df0a00a6b2f46c0b8 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 25 Jan 2023 21:59:27 -0600 Subject: [PATCH] impure bitch --- Makefile | 4 +- flake.lock | 6 +-- flake.nix | 4 +- modules/configuration.nix | 104 ++++++++++++++++++++++++++++++++++++++ modules/environment.nix | 19 +++---- 5 files changed, 121 insertions(+), 16 deletions(-) create mode 100644 modules/configuration.nix diff --git a/Makefile b/Makefile index b7d3d18..87670ac 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,9 @@ lint: ## format *.nix nixpkgs-fmt . boot: ## evaluate flake for next boot - sudo nixos-rebuild boot --flake . + sudo nixos-rebuild boot --flake . switch: ## perform nixos rebuild - sudo nixos-rebuild switch --flake . + sudo nixos-rebuild switch --flake . --impure -include .task.cfg.mk diff --git a/flake.lock b/flake.lock index bd6afec..c3987ef 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1674584991, - "narHash": "sha256-2NqCy2ViyT/iOniL0UtrLi15z1TYfPYVj/iY4rWur3M=", + "lastModified": 1669833724, + "narHash": "sha256-/HEZNyGbnQecrgJnfE8d0WC5c1xuPSD2LUpB6YXlg4c=", "owner": "nixos", "repo": "nixpkgs", - "rev": "eb95aa0392d4a6f0eb3ac66eb0329397eafde4fb", + "rev": "4d2b37a84fad1091b9de401eb450aae66f1a741e", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index b068891..7face62 100644 --- a/flake.nix +++ b/flake.nix @@ -13,10 +13,11 @@ nixos-vm = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - # ./modules/configuration.nix + ./modules/configuration.nix ./modules/overlays.nix ./modules/environment.nix ]; + specialArgs = { inherit inputs; }; }; jeran = inputs.nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -24,7 +25,6 @@ ./hosts/jeran/configuration.nix ./hosts/jeran/motd.nix ./modules/environment.nix - ]; specialArgs = { inherit inputs; }; }; diff --git a/modules/configuration.nix b/modules/configuration.nix new file mode 100644 index 0000000..0cdf2bb --- /dev/null +++ b/modules/configuration.nix @@ -0,0 +1,104 @@ +{ inputs, lib, config, pkgs, ... }: + +{ + imports = + [ + "${inputs.nixpkgs}/nixos/modules/installer/virtualbox-demo.nix" + ]; + + nixpkgs.config.allowUnfree = true; + + nix.package = pkgs.nixUnstable; + nix.extraOptions = '' + experimental-features = nix-command flakes + ''; + boot.kernelPackages = pkgs.linuxPackages_latest; + + virtualisation.virtualbox.guest.enable = true; + networking.hostName = "nixos-vm"; # Define your hostname. + + time.timeZone = "America/Chicago"; + + programs.zsh.enable = true; + + programs.nix-ld.enable = true; + + services.xserver = { + enable = true; + displayManager.startx.enable = true; + displayManager.sddm.enable = lib.mkForce false; + + displayManager.autoLogin.enable = lib.mkForce false; + windowManager.qtile.enable = true; + }; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users = { + defaultUserShell = pkgs.zsh; + users.daylin = { + shell = pkgs.zsh; + isNormalUser = true; + extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + }; + }; + + fonts.fonts = with pkgs; [ + noto-fonts + noto-fonts-emoji + noto-fonts-extra + (nerdfonts.override { fonts = [ "FiraCode" "FiraMono" ]; }) + ]; + + + environment.systemPackages = with pkgs; [ + fuse + zsh + + wget + unzip + less + gnumake + gcc + + git + + vim + neovim + starship + chezmoi + lsd + fzf + delta + gh + + nixpkgs-fmt + + xdotool + wezterm + eww + rofi + dunst + feh + + picom + gtk3 + + gnome.adwaita-icon-theme + gnome.gnome-settings-daemon + catppuccin-gtk + + wavebox + + pciutils + (vivaldi.override { + proprietaryCodecs = true; + enableWidevine = false; + commandLineArgs = "--force-dark-mode"; + }) + + vscode.fhs + + go + rustup + ]; +} diff --git a/modules/environment.nix b/modules/environment.nix index 305ea72..03bb032 100644 --- a/modules/environment.nix +++ b/modules/environment.nix @@ -8,13 +8,14 @@ issue.source = ../etc/issue; }; - # # environment.variables = { - # # NIX_LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [ - # # stdenv.cc.cc - # # openssl - # # - # # zlib # for delta - # # ]; - # # NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; - # # }; + environment.variables = { + # NIX_LD_LIBRARY_PATH = with pkgs; lib.makeLibraryPath [ + # stdenv.cc.cc + # openssl + # + # zlib # for delta + # ]; + # this setting means needing to build --impure + NIX_LD = lib.fileContents "${pkgs.stdenv.cc}/nix-support/dynamic-linker"; + }; }