Merge branch 'master' into fixing
This commit is contained in:
commit
492ae9d92a
11 changed files with 179 additions and 7 deletions
|
|
@ -1 +1,4 @@
|
|||
{ allowUnfree = true; }
|
||||
{
|
||||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
}
|
||||
|
|
|
|||
98
extralib.nix
Normal file
98
extralib.nix
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
{ lib ? (import <nixpkgs> {}).lib, ... }:
|
||||
with lib;
|
||||
with builtins;
|
||||
{
|
||||
lib = {
|
||||
floats = rec {
|
||||
_floatComponents = f: lib.strings.splitString "." (toString f);
|
||||
|
||||
ceil = f:
|
||||
let
|
||||
comp = _floatComponents f;
|
||||
int = strings.toInt (head comp);
|
||||
inc = if match "[1-9][[:digit:]]*" (head (tail comp)) != null then 1 else 0;
|
||||
in
|
||||
assert(isFloat f);
|
||||
int + inc;
|
||||
|
||||
floor = f:
|
||||
let
|
||||
int = strings.toInt (head (_floatComponents f));
|
||||
in
|
||||
assert(isFloat f);
|
||||
int;
|
||||
|
||||
toInt = f:
|
||||
let
|
||||
comp = _floatComponents f;
|
||||
int = strings.toInt (head comp);
|
||||
inc = if match "[5-9][[:digit:]]*" (head (tail comp)) != null then 1 else 0;
|
||||
in
|
||||
assert(isFloat f);
|
||||
int + inc;
|
||||
};
|
||||
|
||||
hex = rec {
|
||||
parseDigit = c:
|
||||
let
|
||||
v = strings.toUpper c;
|
||||
in
|
||||
assert(match "[0-9A-F]" c != null);
|
||||
{
|
||||
"0" = 0;
|
||||
"1" = 1;
|
||||
"2" = 2;
|
||||
"3" = 3;
|
||||
"4" = 4;
|
||||
"5" = 5;
|
||||
"6" = 6;
|
||||
"7" = 7;
|
||||
"8" = 8;
|
||||
"9" = 9;
|
||||
"A" = 10;
|
||||
"B" = 11;
|
||||
"C" = 12;
|
||||
"D" = 13;
|
||||
"E" = 14;
|
||||
"F" = 15;
|
||||
}."${v}";
|
||||
|
||||
toDec = s:
|
||||
let characters = stringToCharacters s;
|
||||
values = map parseDigit characters;
|
||||
value = foldl (acc: n: acc * 16 + n) 0 values;
|
||||
in value;
|
||||
|
||||
fromDec = trivial.toHexString;
|
||||
|
||||
};
|
||||
|
||||
# colors = rec {
|
||||
|
||||
|
||||
|
||||
# colorFromHex = s:
|
||||
# let rgba = match "#([[:xdigit:]]{2})([[:xdigit:]]{2})([[:xdigit:]]{2})([[:xdigit:]]{2})" s;
|
||||
# rgb = match "#([[:xdigit:]]{2})([[:xdigit:]]{2})([[:xdigit:]]{2})" s;
|
||||
# values = map hexToDec (if isNull rgb then rgba else rgb ++ [ "FF" ]);
|
||||
# in {
|
||||
# r = (head values) / 255.0;
|
||||
# g = (head (tail values)) / 255.0;
|
||||
# b = (head (drop 2 values)) / 255.0;
|
||||
# a = (last values) / 255.0;
|
||||
# };
|
||||
|
||||
# red = { r = 255.0; g = 0.0; b = 0.0; };
|
||||
# green = { r = 0.0; g = 255.0; b = 0.0; };
|
||||
# blue = { r = 0.0; g = 0.0; b = 255.0; };
|
||||
|
||||
# toRGBHex = { r, g, b, ... }:
|
||||
# ''#${concatMapStrings (v: fixedWidthString 2 "0" (toHexString (v * 255))) [ r g b ]}'';
|
||||
# toRGBAHex = { r, g, b, a }:
|
||||
# ''#${concatMapStrings (v: fixedWidthString 2 "0" (toHexString v)) [ r g b a ]}'';
|
||||
|
||||
# toRgbHex = c: strings.toLower (toRGBHex c);
|
||||
# toRgbaHex = c: strings.toLower (toRGBAHex c);
|
||||
# };
|
||||
};
|
||||
}
|
||||
13
home.nix
13
home.nix
|
|
@ -20,6 +20,7 @@ in {
|
|||
gnome3.evince
|
||||
gnome3.file-roller
|
||||
gnome3.gnome-screenshot
|
||||
gnome3.gnome-tweaks
|
||||
gnome3.nautilus
|
||||
htop
|
||||
jetbrains.datagrip
|
||||
|
|
@ -28,7 +29,6 @@ in {
|
|||
megasync
|
||||
mpv
|
||||
neofetch
|
||||
neofetch
|
||||
nerdfonts
|
||||
obsidian
|
||||
openvpn
|
||||
|
|
@ -51,9 +51,12 @@ in {
|
|||
};
|
||||
|
||||
imports = [
|
||||
./extralib.nix
|
||||
|
||||
./modules/configurations.nix
|
||||
|
||||
./modules/alacritty.nix
|
||||
./modules/bash.nix
|
||||
./modules/bat.nix
|
||||
./modules/broot.nix
|
||||
./modules/bottom.nix
|
||||
|
|
@ -64,10 +67,18 @@ in {
|
|||
./modules/go.nix
|
||||
./modules/gpg.nix
|
||||
./modules/info.nix
|
||||
./modules/jq.nix
|
||||
./modules/kakoune.nix
|
||||
./modules/keychain.nix
|
||||
./modules/man.nix
|
||||
# ./modules/nix-index.nix
|
||||
./modules/noti.nix
|
||||
./modules/obs-studio.nix
|
||||
./modules/pazi.nix
|
||||
./modules/picom.nix
|
||||
./modules/qogir_theme.nix
|
||||
./modules/rofi.nix
|
||||
./modules/ssh.nix
|
||||
./modules/screen_locker.nix
|
||||
./modules/ssh.nix
|
||||
./modules/sxhkd.nix
|
||||
|
|
|
|||
5
modules/jq.nix
Normal file
5
modules/jq.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
programs.jq = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
10
modules/keychain.nix
Normal file
10
modules/keychain.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
programs.keychain = {
|
||||
enable = true;
|
||||
keys = [ "id_ed25519" "bitbucket" "github" "gitlab" "heroku" "local" ];
|
||||
agents = [ "gpg" "ssh" ];
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
enableXsessionIntegration = true;
|
||||
};
|
||||
}
|
||||
5
modules/man.nix
Normal file
5
modules/man.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
programs.man = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
7
modules/nix-index.nix
Normal file
7
modules/nix-index.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
5
modules/noti.nix
Normal file
5
modules/noti.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
programs.noti = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
12
modules/obs-studio.nix
Normal file
12
modules/obs-studio.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
# obs-linuxbrowser
|
||||
obs-v4l2sink
|
||||
obs-gstreamer
|
||||
obs-move-transition
|
||||
];
|
||||
};
|
||||
}
|
||||
7
modules/pazi.nix
Normal file
7
modules/pazi.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
programs.pazi = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -5,11 +5,20 @@
|
|||
# modi = "drun,run,ssh,window";
|
||||
# theme = "nord";
|
||||
# };
|
||||
extraConfig = "
|
||||
modi = drun,run,ssh,window
|
||||
theme = nord
|
||||
";
|
||||
# extraConfig = builtins.concatStringsSep "\n" [
|
||||
# "modi = drun,run,ssh,window"
|
||||
# "theme = nord"
|
||||
# ];
|
||||
};
|
||||
|
||||
xdg.configFile."rofi/config.rasi".text = ''
|
||||
configuration {
|
||||
location: 0;
|
||||
yoffset: 0;
|
||||
xoffset: 0;
|
||||
modi: "drun,run,ssh,window";
|
||||
theme: "nord";
|
||||
}
|
||||
'';
|
||||
xdg.configFile."rofi/nord.rasi".source = ../configs/rofi/nord.rasi;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue