Compare commits

...

3 Commits

Author SHA1 Message Date
Riley Apeldoorn f398775552 Add oxalica overlay 2022-05-23 12:35:37 +02:00
Riley Apeldoorn b706942195 Add overlay to systemwide nixpkgs 2022-05-23 10:50:43 +02:00
Riley Apeldoorn 60cd61444e Retab 2022-05-23 10:40:50 +02:00
6 changed files with 204 additions and 130 deletions

View File

@ -2,120 +2,120 @@
let inherit (builtins) mapAttrs map; in rec {
# A simple dark theme with vibrant colors.
"dark" = rec {
# A simple dark theme with vibrant colors.
"dark" = rec {
# Determines the background for applications such as the terminal,
# status bars or WM elements.
background = {
primary = "1a1a1a";
# Determines the background for applications such as the terminal,
# status bars or WM elements.
background = {
normal = "212121";
slight = "535353";
primary = "1a1a1a";
};
normal = "212121";
slight = "535353";
# Determines the foreground color of text.
foreground = {
primary = "fafafa";
normal = "efefef";
slight = "bdbdbd";
};
};
# Determines the foreground color of text.
foreground = {
grayscales = [
"121212"
background.primary
background.normal
"2a2a2a"
"323232"
"424242"
"4a4a4a"
background.slight
"646464"
"6a6a6a"
"757575"
"7a7a7a"
"868686"
"8a8a8a"
"979797"
"9a9a9a"
"a8a8a8"
"aaaaaa"
"b9b9b9"
foreground.slight
"cacaca"
"dadada"
"eaeaea"
foreground.normal
foreground.primary
];
primary = "fafafa";
red = {
normal = "ff6161";
bright = "ff3b3b";
pastel = "ff7588";
};
normal = "efefef";
slight = "bdbdbd";
green = {
normal = "8aff80";
bright = "29f26c";
pastel = "";
};
};
blue = {
normal = "30c7ff";
bright = "00e1ff";
pastel = "";
};
grayscales = [
"121212"
background.primary
background.normal
"2a2a2a"
"323232"
"424242"
"4a4a4a"
background.slight
"646464"
"6a6a6a"
"757575"
"7a7a7a"
"868686"
"8a8a8a"
"979797"
"9a9a9a"
"a8a8a8"
"aaaaaa"
"b9b9b9"
foreground.slight
"cacaca"
"dadada"
"eaeaea"
foreground.normal
foreground.primary
];
yellow = {
normal = "fcfc51";
bright = "fcfc51";
pastel = "";
};
purple = {
normal = "b58aff";
bright = "c97ffa";
pastel = "d9b5ff";
};
cyan = {
normal = "29f8ff";
bright = "26e3fc";
pastel = "63e8ff";
};
red = {
normal = "ff6161";
bright = "ff3b3b";
pastel = "ff7588";
};
pink = {
normal = "ee8fff";
bright = "ff63e5";
pastel = "ff96e3";
};
green = {
normal = "8aff80";
bright = "29f26c";
pastel = "";
};
orange = {
normal = "ff8c26";
bright = "fca151";
pastel = "";
};
blue = {
normal = "30c7ff";
bright = "00e1ff";
pastel = "";
};
misc = {
blueGrey = "9ccdd9";
teal = "00ccad";
lime = "d5ff63";
};
yellow = {
normal = "fcfc51";
bright = "fcfc51";
pastel = "";
};
hex = mapAttrs (name: value:
if name == "grayscales"
then map (v: "#" + v) value
else if name == "hex"
then value
else mapAttrs (n: v: "#" + v) value
) (dark);
purple = {
normal = "b58aff";
bright = "c97ffa";
pastel = "d9b5ff";
};
};
cyan = {
normal = "29f8ff";
bright = "26e3fc";
pastel = "63e8ff";
};
pink = {
normal = "ee8fff";
bright = "ff63e5";
pastel = "ff96e3";
};
orange = {
normal = "ff8c26";
bright = "fca151";
pastel = "";
};
misc = {
blueGrey = "9ccdd9";
teal = "00ccad";
lime = "d5ff63";
};
hex = mapAttrs (name: value:
if name == "grayscales"
then map (v: "#" + v) value
else if name == "hex"
then value
else mapAttrs (n: v: "#" + v) value
) (dark);
};
}

View File

@ -1,16 +1,37 @@
# Holds common settings for all systems.
# Holds common settings for *all* systems, including both servers and
# clients.
{ ... }: {
{ pkgs, oxalica, ... }: {
nix = {
optimise.automatic = true;
extraOptions = ''
experimental-features = nix-command flakes
'';
optimise.automatic = true;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
nixpkgs.config.allowUnfree = true;
nixpkgs = {
config = { allowUnfree = true; };
overlays = [
boot.cleanTmpDir = true;
# 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; })
];
}

View File

@ -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"
}
}
},

View File

@ -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
};
};

View File

@ -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 = {

View File

@ -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"
'';
'';
})