From f398775552ed4460ae9919f8e87781332972bf9b Mon Sep 17 00:00:00 2001 From: Riley Apeldoorn Date: Mon, 23 May 2022 12:35:37 +0200 Subject: [PATCH] Add oxalica overlay --- common.nix | 24 ++++++++++++++++--- flake.lock | 53 +++++++++++++++++++++++++++++++++++++++++- flake.nix | 15 ++++++++---- modules/default.nix | 5 ---- modules/kak/colors.nix | 24 +++++++++---------- 5 files changed, 96 insertions(+), 25 deletions(-) diff --git a/common.nix b/common.nix index 391be71..9d21577 100644 --- a/common.nix +++ b/common.nix @@ -1,6 +1,7 @@ -# Holds common settings for all systems. +# Holds common settings for *all* systems, including both servers and +# clients. -{ ... }: { +{ pkgs, oxalica, ... }: { nix = { optimise.automatic = true; @@ -11,9 +12,26 @@ nixpkgs = { config = { allowUnfree = true; }; - overlays = [ (import ./overlays) ]; + overlays = [ + + # Import overlays defined under the `overlays/` directory. + (import ./overlays) + + # Clients need Rust for development, servers need Rust for + # deployment. + oxalica.overlay + + ]; }; boot.cleanTmpDir = true; + environment.systemPackages = [ + + # Include common packages I use everywhere, like `rg` + # and `exa` + (import ./env.nix { inherit pkgs; }) + + ]; + } diff --git a/flake.lock b/flake.lock index 3cbb9b2..795bfab 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,20 @@ { "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1637014545, + "narHash": "sha256-26IZAc5yzlD9FlDT54io1oqG/bBoyka+FJk5guaX4x4=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "bba5dcc8e0b20ab664967ad83d24d64cb64ec4f4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": "nixpkgs" @@ -48,10 +63,46 @@ "type": "github" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1637453606, + "narHash": "sha256-Gy6cwUswft9xqsjWxFYEnx/63/qzaFUwatcbV5GF/GQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "8afc4e543663ca0a6a4f496262cd05233737e732", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "oxalica": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1653273659, + "narHash": "sha256-dHXYaNL1axhZZyiZXxt1WKhvZrYXq7bjCs3y5VjgyGI=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "0fa3e01da1ce98e3b40063b8e2678095943402b1", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "oxalica": "oxalica" } } }, diff --git a/flake.nix b/flake.nix index 9cfb4fd..ecc08d8 100644 --- a/flake.nix +++ b/flake.nix @@ -2,20 +2,27 @@ inputs = { + # Living on the edge nixpkgs = { url = github:NixOS/nixpkgs/nixos-unstable; }; - + + # Used for managing dotfiles home-manager = { url = github:nix-community/home-manager; }; + # Rust overlay, for Rust development + oxalica = { + url = github:oxalica/rust-overlay; + }; + }; outputs = args: with args.nixpkgs; { nixosConfigurations = { - # Desktop + # Desktop client "thor" = lib.nixosSystem { system = "x86_64-linux"; modules = [ @@ -25,7 +32,7 @@ specialArgs = args; }; - # Laptop + # Dell XPS laptop client "loki" = lib.nixosSystem { system = "x86_64-linux"; modules = [ @@ -37,7 +44,7 @@ # TODO: Pinebook Pro # TODO: Raspberry Pi - + }; }; diff --git a/modules/default.nix b/modules/default.nix index 04fe115..d8008e1 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -36,8 +36,6 @@ let themeType = }; }; - utils = import ../env.nix { inherit pkgs; }; - in { options.riley = with lib; { @@ -136,9 +134,6 @@ in { curl git - # Common utils (rg, sk, fd, etc.) - utils - ]; environment.shellAliases = { diff --git a/modules/kak/colors.nix b/modules/kak/colors.nix index c137d2e..462318e 100644 --- a/modules/kak/colors.nix +++ b/modules/kak/colors.nix @@ -1,13 +1,13 @@ { theme, lib, pkgs }: pkgs.writeTextFile (rec { - name = "colors.kak"; - destination = "/share/kak/colors/${name}"; - text = with theme; '' + name = "colors.kak"; + destination = "/share/kak/colors/${name}"; + text = with theme; '' - face global comment rgb:828282 + face global comment rgb:828282 - face global value rgb:${blue.normal} + face global value rgb:${blue.normal} face global string rgb:${green.normal} face global keyword rgb:${cyan.normal} face global operator rgb:${cyan.normal} @@ -17,12 +17,12 @@ pkgs.writeTextFile (rec { face global meta rgb:${green.bright} face global type rgb:${blue.bright} - face global LineNumbers rgb:${background.slight} - face global BufferPadding rgb:${background.slight} - face global LineNumberCursor rgb:${foreground.primary} - face global crosshairs_line "default,rgb:212121" - face global MenuForeground "default,rgb:${blue.normal}" - face global MenuBackground "default,rgb:313131" + face global LineNumbers rgb:${background.slight} + face global BufferPadding rgb:${background.slight} + face global LineNumberCursor rgb:${foreground.primary} + face global crosshairs_line "default,rgb:212121" + face global MenuForeground "default,rgb:${blue.normal}" + face global MenuBackground "default,rgb:313131" - ''; + ''; })