1
0
mirror of https://github.com/kmein/niveum synced 2026-03-16 10:11:08 +01:00

chore: move module/constants.nix to lib/default.nix

This commit is contained in:
2020-10-30 11:05:26 +01:00
parent b8c79fd21c
commit 5dc561da83
37 changed files with 464 additions and 550 deletions

View File

@@ -1,18 +1,19 @@
{ pkgs, lib, config, ... }:
let
inherit (import <niveum/lib>) colours;
colourNames =
[ "black" "red" "green" "yellow" "blue" "magenta" "cyan" "white" ];
colours = lib.getAttrs colourNames config.niveum.colours;
colourPairs = lib.getAttrs colourNames colours;
alacrittyConfig = {
background_opacity = 0.9;
colors = {
primary = { inherit (config.niveum.colours) background foreground; };
normal = lib.mapAttrs (_: colour: colour.dark) colours;
bright = lib.mapAttrs (_: colour: colour.bright) colours;
primary = { inherit (colours) background foreground; };
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
};
font = {
normal.family = "Monospace";
size = config.niveum.fonts.size - 2;
size = 9;
};
key_bindings = [
{

View File

@@ -1,40 +1,14 @@
{ pkgs, lib, config, options, ... }:
let
inherit (lib.strings) makeBinPath;
inherit (import <niveum/lib>) localAddresses;
inherit (import <niveum/lib>) localAddresses kieran;
in {
imports = [
<niveum/modules/constants.nix>
<home-manager/nixos>
<niveum/modules/system-dependent.nix>
{
boot.supportedFilesystems = [ "ntfs" ];
}
{
niveum.user = {
github = "kmein";
email = "kmein@posteo.de";
name = "Kierán Meinhardt";
};
niveum.applications = rec {
fileManager = "$TERMINAL -e ${pkgs.ranger}/bin/ranger";
};
niveum.theme = {
gtk = {
name = "Adwaita-dark";
package = pkgs.gnome3.gnome-themes-extra;
};
icon = {
name = "Adwaita";
package = pkgs.gnome3.adwaita-icon-theme;
};
cursor = {
name = "capitaine-cursors-white";
package = pkgs.capitaine-cursors;
};
};
}
{
nix.nixPath = [
"/var/src"
@@ -42,18 +16,6 @@ in {
];
}
{ services.dbus.packages = [ pkgs.gnome3.dconf ]; }
{
environment.systemPackages = [
(pkgs.writers.writeDashBin "x-www-browser" ''
for browser in $BROWSER firefox chromium google-chrome google-chrome-stable opera vivaldi qupzilla iceweasel konqueror firefox-aurora google-chrome-beta opera-beta vivaldi-beta google-chrome-dev opera-developer vivaldi-snapshot luakit midori epiphany lynx w3m dillo elinks vimb; do
if command -v $browser > /dev/null 2>&1; then
exec $browser "$@"
fi
done
exit 1
'')
];
}
{
nixpkgs = {
config = {
@@ -104,7 +66,7 @@ in {
users.users.me = {
name = "kfm";
description = config.niveum.user.name;
description = kieran.name;
hashedPassword =
"$6$w9hXyGFl/.IZBXk$5OiWzS1G.5hImhh1YQmZiCXYNAJhi3X6Y3uSLupJNYYXPLMsQpx2fwF4Xr2uYzGMV8Foqh8TgUavx1APD9rcb/";
isNormalUser = true;
@@ -260,7 +222,6 @@ in {
./sshd.nix
./sudo.nix
./sxiv.nix
./themes/mac-os.nix
./theming.nix
./tmux.nix
./tor.nix

View File

@@ -1,12 +1,14 @@
{ config, pkgs, ... }:
with config.niveum; {
let
inherit (import <niveum/lib>) defaultApplications colours theme;
in {
home-manager.users.me.services.dunst = {
enable = true;
iconTheme = theme.icon;
iconTheme = (theme pkgs).icon;
settings = {
global = {
transparency = 10;
font = "Sans ${toString fonts.size}";
font = "Monospace 8";
geometry = "200x5-30+20";
frame_color = colours.foreground;
follow = "mouse";
@@ -31,7 +33,7 @@ with config.niveum; {
sticky_history = true;
history_length = 20;
dmenu = "${pkgs.rofi}/bin/rofi -display-run dunst -show run";
browser = "x-www-browser";
browser = (defaultApplications pkgs).browser;
verbosity = "mesg";
corner_radius = 0;
mouse_left_click = "do_action";

View File

@@ -1,5 +1,6 @@
{ lib, pkgs, ... }:
let
inherit (import <niveum/lib>) defaultApplications;
flameshot-once =
pkgs.callPackage <stockholm/krebs/5pkgs/simple/flameshot-once> {};
in {
@@ -16,7 +17,7 @@ in {
enable = true;
createUrl = "http://p.r/image";
deleteUrl = "http://p.r/image/delete/%1";
xdg-open.browser = "x-www-browser";
xdg-open.browser = (defaultApplications pkgs).browser;
};
config.timeout = 200;
})

View File

@@ -1,6 +1,4 @@
{ pkgs, ... }: {
niveum.fonts.size = 9;
fonts = {
enableDefaultFonts = true;
enableFontDir = true;

View File

@@ -1,4 +1,8 @@
{ pkgs, config, lib, ... }: {
{ pkgs, config, lib, ... }:
let
inherit (import <niveum/lib>) kieran ignorePaths;
in
{
environment.systemPackages = [
pkgs.mr
pkgs.git
@@ -53,8 +57,8 @@
programs.git = {
enable = true;
package = pkgs.gitAndTools.gitFull;
userName = config.niveum.user.name;
userEmail = config.niveum.user.email;
userName = kieran.name;
userEmail = kieran.email;
aliases = {
br = "branch";
co = "checkout";
@@ -69,7 +73,7 @@
graph =
"log --graph --abbrev-commit --decorate --date=relative --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all";
};
ignores = config.niveum.ignore;
ignores = ignorePaths;
extraConfig = {
pull.ff = "only";
core.pager =

View File

@@ -1,5 +1,6 @@
{ config, pkgs, lib, ... }:
let
inherit (import <niveum/lib>) defaultApplications colours;
klem = import <niveum/packages/scripts/klem.nix> {
inherit pkgs lib;
config.scripts = {
@@ -59,7 +60,7 @@ let
fi
'';
in with config.niveum; {
in {
services.xserver = {
displayManager.defaultSession = "none+i3";
windowManager.i3 = {
@@ -71,7 +72,7 @@ in with config.niveum; {
home-manager.users.me.xsession.windowManager.i3 = {
enable = true;
config = rec {
fonts = [ "Monospace ${toString config.niveum.fonts.size}" ];
fonts = [ "Monospace 10" ];
modifier = "Mod4";
window = {
titlebar = false;
@@ -133,7 +134,7 @@ in with config.niveum; {
};
bars = [{
workspaceButtons = false;
fonts = [ "Monospace ${toString (config.niveum.fonts.size - 1)}" ];
fonts = [ "Monospace 8" ];
mode = "hide"; # "dock"
position = "bottom";
colors = rec {
@@ -148,9 +149,8 @@ in with config.niveum; {
};
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ${
pkgs.writeTOML (import <niveum/lib/i3status-rust.nix> {
wifi-interface = networkInterfaces.wireless;
batteryBlock = batteryBlocks.default;
inherit (config.niveum) colours;
inherit (config.niveum) batteryName wirelessInterface;
inherit colours;
inherit pkgs;
})
}";
@@ -196,10 +196,10 @@ in with config.niveum; {
"${modifier}+v" = "split v";
"${modifier}+w" = "layout tabbed";
"${modifier}+Return" = "exec i3-sensible-terminal";
# "${modifier}+Shift+y" = "exec ${pkgs.qutebrowser}/bin/qutebrowser";
"${modifier}+t" = "exec ${applications.fileManager}";
"${modifier}+y" = "exec x-www-browser";
"${modifier}+Return" = "exec ${(defaultApplications pkgs).terminal}";
"${modifier}+t" = "exec ${(defaultApplications pkgs).fileManager}";
"${modifier}+y" = "exec ${(defaultApplications pkgs).browser}";
"${modifier}+Shift+w" = "exec ${pkgs.xautolock}/bin/xautolock -locknow";
"${modifier}+a" =

View File

@@ -1,5 +1,7 @@
{ config, pkgs, lib, ... }:
let
inherit (import <niveum/lib>) kieran;
nixpkgs-much = import (pkgs.fetchFromGitHub {
owner = "NixOS";
repo = "nixpkgs";
@@ -145,7 +147,7 @@ in {
};
userName = "kieran@fysi.tech";
address = "kieran@fysi.tech";
realName = config.niveum.user.name;
realName = kieran.name;
passwordCommand = pass_ <secrets/mail/fastmail>;
};
cock = enableDefaults {
@@ -172,7 +174,7 @@ in {
primary = false;
flavor = "gmail.com";
address = "kieran.meinhardt@gmail.com";
realName = config.niveum.user.name;
realName = kieran.name;
userName = "kieran.meinhardt";
passwordCommand = pass_ <secrets/mail/gmail/kieran.meinhardt>;
folders = {
@@ -185,7 +187,7 @@ in {
primary = false;
flavor = "gmail.com";
address = "amroplay@gmail.com";
realName = config.niveum.user.name;
realName = kieran.name;
userName = "amroplay";
passwordCommand = pass_ <secrets/mail/gmail/amroplay>;
folders = {
@@ -210,14 +212,14 @@ in {
tls.enable = true;
};
address = "kieran.meinhardt@posteo.net";
realName = config.niveum.user.name;
realName = kieran.name;
userName = "kieran.meinhardt@posteo.net";
passwordCommand = pass_ <secrets/mail/posteo>;
};
hu-berlin = enableDefaults {
primary = false;
address = "meinhark@hu-berlin.de";
realName = config.niveum.user.name;
realName = kieran.name;
userName = "meinhark";
passwordCommand = pass_ <secrets/eduroam/password>;
smtp = {

View File

@@ -10,13 +10,13 @@
'';
# :def unpl \x -> return $ ":!${pkgs.haskellPackages.pointful}/bin/pointful \"" ++ x ++ "\""
# :def pl \x -> return $ ":!${pkgs.haskellPackages.pointfree}/bin/pointfree -v \"" ++ x ++ "\""
".stack/config.yaml".text = let inherit (config.niveum) user;
".stack/config.yaml".text = let inherit (import <niveum/lib>) kieran;
in builtins.toJSON {
templates.params = {
author-name = user.name;
author-email = user.email;
copyright = "Copyright: (c) 2019 ${user.name}";
github-username = user.github;
author-name = kieran.name;
author-email = kieran.email;
copyright = "Copyright: (c) 2020 ${kieran.name}";
github-username = kieran.github;
};
};
};

View File

@@ -1,12 +1,14 @@
{ config, ... }:
with config.niveum; {
let
inherit (import <niveum/lib>) colours;
in{
home-manager.users.me.programs.rofi = {
enable = true;
separator = "solid";
scrollbar = false;
borderWidth = 0;
lines = 5;
font = "Monospace ${toString (fonts.size - 1)}";
font = "Monospace 10";
colors = rec {
window = rec {
background = colours.foreground;

View File

@@ -1,39 +0,0 @@
{
niveum.colours = rec {
black = {
bright = "#151515";
dark = "#000000";
};
red = {
bright = "#de575c";
dark = "#de575c";
};
yellow = {
bright = "#ebe971";
dark = "#ebe971";
};
green = {
bright = "#00b853";
dark = "#00b853";
};
blue = {
bright = "#90d0f0";
dark = "#7fc6f0";
};
magenta = {
bright = "#cf9ffa";
dark = "#cf9ffa";
};
cyan = {
bright = "#4ae5e8";
dark = "#4ae5e8";
};
white = {
bright = "#ffffff";
dark = "#bbbbbb";
};
background = black.dark;
foreground = white.dark;
cursor = green.bright;
};
}

View File

@@ -1,39 +0,0 @@
{
niveum.colours = {
black = {
bright = "#444444";
dark = "#1c1c1c";
};
red = {
bright = "#ff8700";
dark = "#af5f5f";
};
green = {
bright = "#87af87";
dark = "#5f875f";
};
yellow = {
bright = "#ffffaf";
dark = "#87875f";
};
blue = {
bright = "#8fafd7";
dark = "#5f87af";
};
magenta = {
bright = "#8787af";
dark = "#5f5f87";
};
cyan = {
bright = "#5fafaf";
dark = "#5f8787";
};
white = {
bright = "#999999";
dark = "#6c6c6c";
};
background = "#262626";
foreground = "#bcbcbc";
cursor = "#bcbcbc";
};
}

View File

@@ -1,39 +0,0 @@
{
niveum.colours = rec {
black = {
bright = "#454545";
dark = "#222222";
};
red = {
bright = "#FA8072";
dark = "#B22222";
};
green = {
bright = "#779A3E";
dark = "#556B2F";
};
yellow = {
bright = "#DAA520";
dark = "#B8860B";
};
blue = {
bright = "#6495ED";
dark = "#4682B4";
};
magenta = {
bright = "#DA70D6";
dark = "#9932CC";
};
cyan = {
bright = "#B0E0E6";
dark = "#87CEEB";
};
white = {
bright = "#FFFFFF";
dark = "#C0C0C0";
};
background = "#000000";
foreground = "#AAAAAA";
cursor = green.bright;
};
}

View File

@@ -1,39 +0,0 @@
{
niveum.colours = rec {
black = {
bright = "#818383";
dark = "#000000";
};
red = {
bright = "#fc391f";
dark = "#c23621";
};
yellow = {
bright = "#eaec23";
dark = "#adad27";
};
green = {
bright = "#31e722";
dark = "#25bc24";
};
blue = {
bright = "#5833ff";
dark = "#492ee1";
};
magenta = {
bright = "#f935f8";
dark = "#d338d3";
};
cyan = {
bright = "#14f0f0";
dark = "#33bbc8";
};
white = {
bright = "#e9ebeb";
dark = "#cbcccd";
};
background = black.dark;
foreground = white.dark;
cursor = green.bright;
};
}

View File

@@ -1,39 +0,0 @@
{
niveum.colours = rec {
black = {
bright = "#4b4b4b";
dark = "#242424";
};
red = {
bright = "#fc1c18";
dark = "#d71c15";
};
green = {
bright = "#6bc219";
dark = "#5aa513";
};
yellow = {
bright = "#fec80e";
dark = "#fdb40c";
};
blue = {
bright = "#0955ff";
dark = "#063b8c";
};
magenta = {
bright = "#fb0050";
dark = "#e40038";
};
cyan = {
bright = "#3ea8fc";
dark = "#2595e1";
};
white = {
bright = "#8c00ec";
dark = "#efefef";
};
background = "#181818";
foreground = white.dark;
cursor = "#bbbbbb";
};
}

View File

@@ -1,39 +0,0 @@
{
niveum.colours = rec {
black = {
bright = "#282c34";
dark = "#282c34";
};
red = {
bright = "#e06c75";
dark = "#e06c75";
};
green = {
bright = "#98c379";
dark = "#98c379";
};
yellow = {
bright = "#e5c07b";
dark = "#e5c07b";
};
blue = {
bright = "#61afef";
dark = "#61afef";
};
magenta = {
bright = "#c678dd";
dark = "#c678dd";
};
cyan = {
bright = "#56b6c2";
dark = "#56b6c2";
};
white = {
bright = "#dcdfe4";
dark = "#dcdfe4";
};
background = black.dark;
foreground = white.bright;
cursor = "#a3b3cc";
};
}

View File

@@ -1,39 +0,0 @@
{
niveum.colours = rec {
black = {
dark = "#073642";
bright = "#002b36";
};
red = {
dark = "#dc322f";
bright = "#cb4b16";
};
yellow = {
dark = "#b58900";
bright = "#657b83";
};
green = {
dark = "#859900";
bright = "#586e75";
};
blue = {
dark = "#268bd2";
bright = "#839496";
};
magenta = {
dark = "#d33682";
bright = "#6c71c4";
};
cyan = {
dark = "#2aa198";
bright = "#93a1a1";
};
white = {
dark = "#eee8d5";
bright = "#fdf6e3";
};
background = black.bright;
foreground = blue.bright;
cursor = cyan.bright;
};
}

View File

@@ -1,39 +0,0 @@
{
niveum.colours = rec {
black = {
dark = "#073642";
bright = "#002b36";
};
red = {
dark = "#dc322f";
bright = "#cb4b16";
};
yellow = {
dark = "#b58900";
bright = "#657b83";
};
green = {
dark = "#859900";
bright = "#586e75";
};
blue = {
dark = "#268bd2";
bright = "#839496";
};
magenta = {
dark = "#d33682";
bright = "#6c71c4";
};
cyan = {
dark = "#2aa198";
bright = "#93a1a1";
};
white = {
dark = "#eee8d5";
bright = "#fdf6e3";
};
background = white.bright;
foreground = yellow.bright;
cursor = green.bright;
};
}

View File

@@ -1,8 +1,7 @@
{ lib, config, ... }:
let inherit (config.niveum) theme colourPalette;
{ lib, config, pkgs, ... }:
let
theme = (import <niveum/lib>).theme pkgs;
in {
console.colors = map (c: lib.strings.removePrefix "#" c) colourPalette;
environment.systemPackages =
[ theme.gtk.package theme.icon.package theme.cursor.package ];

View File

@@ -37,6 +37,8 @@
"Born11".psk = "56LMVLbw840EGNWk0RYRqvgicx3FSO";
"FactoryCommunityGuest".psk = "Factory4ever";
"krebs".psk = "aidsballs";
"b-base".pskRaw = "44040369a63d5bce4576637e8d34aeb3ed3d178011386decb99da473418e9861";
"c-base".pskRaw = "1355ccb287407bcd0caa4a7a399367c28b1e11bf5da34dd100d4b86ac4cafe46";
};
};

37
lib/colours/antares.nix Normal file
View File

@@ -0,0 +1,37 @@
rec {
black = {
bright = "#151515";
dark = "#000000";
};
red = {
bright = "#de575c";
dark = "#de575c";
};
yellow = {
bright = "#ebe971";
dark = "#ebe971";
};
green = {
bright = "#00b853";
dark = "#00b853";
};
blue = {
bright = "#90d0f0";
dark = "#7fc6f0";
};
magenta = {
bright = "#cf9ffa";
dark = "#cf9ffa";
};
cyan = {
bright = "#4ae5e8";
dark = "#4ae5e8";
};
white = {
bright = "#ffffff";
dark = "#bbbbbb";
};
background = black.dark;
foreground = white.dark;
cursor = green.bright;
}

View File

@@ -0,0 +1,37 @@
{
black = {
bright = "#444444";
dark = "#1c1c1c";
};
red = {
bright = "#ff8700";
dark = "#af5f5f";
};
green = {
bright = "#87af87";
dark = "#5f875f";
};
yellow = {
bright = "#ffffaf";
dark = "#87875f";
};
blue = {
bright = "#8fafd7";
dark = "#5f87af";
};
magenta = {
bright = "#8787af";
dark = "#5f5f87";
};
cyan = {
bright = "#5fafaf";
dark = "#5f8787";
};
white = {
bright = "#999999";
dark = "#6c6c6c";
};
background = "#262626";
foreground = "#bcbcbc";
cursor = "#bcbcbc";
}

37
lib/colours/connermcd.nix Normal file
View File

@@ -0,0 +1,37 @@
rec {
black = {
bright = "#454545";
dark = "#222222";
};
red = {
bright = "#FA8072";
dark = "#B22222";
};
green = {
bright = "#779A3E";
dark = "#556B2F";
};
yellow = {
bright = "#DAA520";
dark = "#B8860B";
};
blue = {
bright = "#6495ED";
dark = "#4682B4";
};
magenta = {
bright = "#DA70D6";
dark = "#9932CC";
};
cyan = {
bright = "#B0E0E6";
dark = "#87CEEB";
};
white = {
bright = "#FFFFFF";
dark = "#C0C0C0";
};
background = "#000000";
foreground = "#AAAAAA";
cursor = green.bright;
}

37
lib/colours/mac-os.nix Normal file
View File

@@ -0,0 +1,37 @@
rec {
black = {
bright = "#818383";
dark = "#000000";
};
red = {
bright = "#fc391f";
dark = "#c23621";
};
yellow = {
bright = "#eaec23";
dark = "#adad27";
};
green = {
bright = "#31e722";
dark = "#25bc24";
};
blue = {
bright = "#5833ff";
dark = "#492ee1";
};
magenta = {
bright = "#f935f8";
dark = "#d338d3";
};
cyan = {
bright = "#14f0f0";
dark = "#33bbc8";
};
white = {
bright = "#e9ebeb";
dark = "#cbcccd";
};
background = black.dark;
foreground = white.dark;
cursor = green.bright;
}

View File

@@ -0,0 +1,37 @@
rec {
black = {
bright = "#4b4b4b";
dark = "#242424";
};
red = {
bright = "#fc1c18";
dark = "#d71c15";
};
green = {
bright = "#6bc219";
dark = "#5aa513";
};
yellow = {
bright = "#fec80e";
dark = "#fdb40c";
};
blue = {
bright = "#0955ff";
dark = "#063b8c";
};
magenta = {
bright = "#fb0050";
dark = "#e40038";
};
cyan = {
bright = "#3ea8fc";
dark = "#2595e1";
};
white = {
bright = "#8c00ec";
dark = "#efefef";
};
background = "#181818";
foreground = white.dark;
cursor = "#bbbbbb";
}

View File

@@ -0,0 +1,37 @@
rec {
black = {
bright = "#282c34";
dark = "#282c34";
};
red = {
bright = "#e06c75";
dark = "#e06c75";
};
green = {
bright = "#98c379";
dark = "#98c379";
};
yellow = {
bright = "#e5c07b";
dark = "#e5c07b";
};
blue = {
bright = "#61afef";
dark = "#61afef";
};
magenta = {
bright = "#c678dd";
dark = "#c678dd";
};
cyan = {
bright = "#56b6c2";
dark = "#56b6c2";
};
white = {
bright = "#dcdfe4";
dark = "#dcdfe4";
};
background = black.dark;
foreground = white.bright;
cursor = "#a3b3cc";
}

View File

@@ -0,0 +1,37 @@
rec {
black = {
dark = "#073642";
bright = "#002b36";
};
red = {
dark = "#dc322f";
bright = "#cb4b16";
};
yellow = {
dark = "#b58900";
bright = "#657b83";
};
green = {
dark = "#859900";
bright = "#586e75";
};
blue = {
dark = "#268bd2";
bright = "#839496";
};
magenta = {
dark = "#d33682";
bright = "#6c71c4";
};
cyan = {
dark = "#2aa198";
bright = "#93a1a1";
};
white = {
dark = "#eee8d5";
bright = "#fdf6e3";
};
background = black.bright;
foreground = blue.bright;
cursor = cyan.bright;
}

View File

@@ -0,0 +1,37 @@
rec {
black = {
dark = "#073642";
bright = "#002b36";
};
red = {
dark = "#dc322f";
bright = "#cb4b16";
};
yellow = {
dark = "#b58900";
bright = "#657b83";
};
green = {
dark = "#859900";
bright = "#586e75";
};
blue = {
dark = "#268bd2";
bright = "#839496";
};
magenta = {
dark = "#d33682";
bright = "#6c71c4";
};
cyan = {
dark = "#2aa198";
bright = "#93a1a1";
};
white = {
dark = "#eee8d5";
bright = "#fdf6e3";
};
background = white.bright;
foreground = yellow.bright;
cursor = green.bright;
}

View File

@@ -0,0 +1,5 @@
pkgs: rec {
terminal = "${pkgs.alacritty}/bin/alacritty";
browser = "${pkgs.brave}/bin/brave";
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
}

View File

@@ -1,20 +1,63 @@
{
localAddresses = {
toum = "192.168.178.24";
zaatar = "192.168.178.21";
homeros = "192.168.178.22";
wilde = "192.168.178.32";
android = "192.168.178.35";
tradfri = "192.168.178.28";
officejet = "192.168.178.27";
fritzbox = "192.168.178.1";
};
nixpkgs-unstable = builtins.fetchGit {
url = "https://github.com/NixOS/nixpkgs";
rev = "4512dac960f3833cf24cdbd742b63cb447bbdd9a";
};
sshPort = 22022;
colours = import ./colours/mac-os.nix;
theme = pkgs: {
gtk = {
name = "Adwaita-dark";
package = pkgs.gnome3.gnome-themes-extra;
};
icon = {
name = "Adwaita";
package = pkgs.gnome3.adwaita-icon-theme;
};
cursor = {
name = "capitaine-cursors-white";
package = pkgs.capitaine-cursors;
};
};
defaultApplications = import ./default-applications.nix;
localAddresses = import ./local-network.nix;
kieran = {
github = "kmein";
email = "kmein@posteo.de";
name = "Kierán Meinhardt";
};
ignorePaths = [
"*~"
".stack-work/"
"__pycache__/"
".mypy_cache/"
"*.py[co]"
"*.o"
"*.hi"
"*.aux"
"*.bbl"
"*.bcf"
"*.blg"
"*.fdb_latexmk"
"*.fls"
"*.out"
"*.run.xml"
"*.toc"
"*.bbl"
"*.class"
"*.dyn_hi"
"*.dyn_o"
"dist/"
".envrc"
".direnv/"
"dist-newstyle/"
".history"
];
}

View File

@@ -1,4 +1,4 @@
{ pkgs, wifi-interface, colours, batteryBlock }:
{ pkgs, wirelessInterface, colours, batteryName }:
let
inherit (pkgs) lib;
@@ -114,7 +114,7 @@ in {
}
{
block = "net";
device = wifi-interface;
device = wirelessInterface;
speed_up = false;
speed_down = false;
signal_strength = true;
@@ -122,7 +122,7 @@ in {
}
{
block = "battery";
device = batteryBlock;
device = batteryName;
}
{
block = "sound";

11
lib/local-network.nix Normal file
View File

@@ -0,0 +1,11 @@
{
toum = "192.168.178.24";
zaatar = "192.168.178.21";
homeros = "192.168.178.22";
wilde = "192.168.178.32";
android = "192.168.178.35";
tradfri = "192.168.178.28";
officejet = "192.168.178.27";
fritzbox = "192.168.178.1";
}

View File

@@ -1,134 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
colourScheme = config.niveum.colours;
my-types.hexColour = types.strMatching "#[0-9A-Fa-f]{6}";
my-types.colourPair = types.submodule {
options = {
dark = mkOption { type = my-types.hexColour; };
bright = mkOption { type = my-types.hexColour; };
};
};
my-types.theme = types.submodule {
options = {
name = mkOption { type = types.str; };
package = mkOption { type = types.package; };
};
};
my-types.colourTheme = types.submodule {
options = {
black = mkOption { type = my-types.colourPair; };
red = mkOption { type = my-types.colourPair; };
green = mkOption { type = my-types.colourPair; };
yellow = mkOption { type = my-types.colourPair; };
blue = mkOption { type = my-types.colourPair; };
magenta = mkOption { type = my-types.colourPair; };
cyan = mkOption { type = my-types.colourPair; };
white = mkOption { type = my-types.colourPair; };
background = mkOption { type = my-types.hexColour; };
foreground = mkOption { type = my-types.hexColour; };
cursor = mkOption { type = my-types.hexColour; };
};
};
in {
options.niveum = {
applications = { fileManager = mkOption { type = types.str; }; };
colours = mkOption { type = my-types.colourTheme; };
colourPalette = mkOption {
type = types.listOf my-types.hexColour;
default = with config.niveum.colours; [
black.dark
red.dark
green.dark
yellow.dark
blue.dark
magenta.dark
cyan.dark
white.dark
black.bright
red.bright
green.bright
yellow.bright
blue.bright
magenta.bright
cyan.bright
white.bright
];
};
networkInterfaces.wireless = mkOption { type = types.str; };
batteryBlocks.default = mkOption { type = types.str; };
promptColours = let
colours16 = types.enum [
"black"
"red"
"green"
"yellow"
"blue"
"magenta"
"cyan"
"white"
];
in {
success = mkOption {
type = colours16;
default = "green";
};
failure = mkOption {
type = colours16;
default = "red";
};
};
fonts = { size = mkOption { type = types.int; }; };
user = {
github = mkOption { type = types.str; };
name = mkOption { type = types.str; };
email = mkOption { type = types.strMatching ".+@.+\\..+"; };
};
ignore = mkOption {
type = types.listOf types.str;
default = [
"*~"
".stack-work/"
"__pycache__/"
".mypy_cache/"
"*.py[co]"
"*.o"
"*.hi"
"*.aux"
"*.bbl"
"*.bcf"
"*.blg"
"*.fdb_latexmk"
"*.fls"
"*.out"
"*.run.xml"
"*.toc"
"*.bbl"
"*.class"
"*.dyn_hi"
"*.dyn_o"
"dist/"
".envrc"
".direnv/"
"dist-newstyle/"
".history"
];
};
theme = {
gtk = mkOption { type = my-types.theme; };
icon = mkOption { type = my-types.theme; };
cursor = mkOption { type = my-types.theme; };
};
};
}

View File

@@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
with lib;
{
options.niveum = {
wirelessInterface = mkOption { type = types.str; };
batteryName = mkOption { type = types.str; };
promptColours = let
colours16 = types.enum [
"black"
"red"
"green"
"yellow"
"blue"
"magenta"
"cyan"
"white"
];
in {
success = mkOption {
type = colours16;
default = "green";
};
failure = mkOption {
type = colours16;
default = "red";
};
};
};
}

View File

@@ -8,10 +8,9 @@
environment.systemPackages = [ pkgs.zeroad pkgs.minecraft ];
niveum = {
batteryBlocks.default = "BAT1";
networkInterfaces.wireless = "wlp3s0";
batteryName = "BAT1";
wirelessInterface = "wlp3s0";
promptColours.success = "green";
fonts.size = lib.mkForce 11;
};
boot.loader.systemd-boot = {

View File

@@ -20,6 +20,9 @@ in {
<niveum/configs/traadfri.nix>
<niveum/modules/retiolum.nix>
<niveum/modules/telegram-bot.nix>
{
services.rss-bridge.enable = true;
}
{
nixpkgs = {
overlays = [ (import <niveum/overlays/toml.nix>) ];

View File

@@ -2,7 +2,7 @@
let
inherit (import <niveum/lib>) nixpkgs-unstable;
unstable = import nixpkgs-unstable {
config.allowUnfree = true;
config.allowUnfree = true;
};
in
{
@@ -29,8 +29,8 @@ in
];
niveum = {
batteryBlocks.default = "BAT0";
networkInterfaces.wireless = "wlp3s0";
batteryName = "BAT0";
wirelessInterface = "wlp3s0";
promptColours.success = "cyan";
};