commit
3d0f689542
@ -0,0 +1,15 @@
|
||||
alias v=`which vim`
|
||||
|
||||
git=`which git`
|
||||
alias g=$git
|
||||
alias ga="$git add"
|
||||
alias gc="$git commit -m"
|
||||
alias gu="ga . && gc" # u for update
|
||||
alias gs="$git status"
|
||||
alias gi="$git init"
|
||||
alias gp="$git push"
|
||||
alias gf="$git pull" # f for fetch
|
||||
alias gC="$git clone"
|
||||
alias goops="$git reset --soft HEAD^"
|
||||
|
||||
alias rm="trash-put"
|
@ -0,0 +1,64 @@
|
||||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1664783440,
|
||||
"narHash": "sha256-KlMwR7mUf5h8MPnzV7nGFUAt6ih/euW5xgvZ5x+hwvI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e4e639dd4dc3e431aa5b5f95325f9a66ac7e0dd9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1664780719,
|
||||
"narHash": "sha256-Oxe6la5dSqRfJogjtY4sRzJjDDqvroJIVkcGEOT87MA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "fd54651f5ffb4a36e8463e0c327a78442b26cbe7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"locked": {
|
||||
"lastModified": 1659877975,
|
||||
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
{
|
||||
description = "A very basic flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = github:nix-community/home-manager;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager }:
|
||||
let
|
||||
user = "elnu";
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
elnu = lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
./configuration.nix
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.${user} = {
|
||||
imports = [
|
||||
./home.nix
|
||||
./wallpaper.nix
|
||||
./picom.nix
|
||||
./i3.nix
|
||||
./polybar/index.nix
|
||||
./rofi/index.nix
|
||||
./git.nix
|
||||
./terminal.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
package = pkgs.gitAndTools.gitFull;
|
||||
enable = true;
|
||||
userName = "ElnuDev";
|
||||
userEmail = "elnu@elnu.com";
|
||||
};
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
user = "elnu";
|
||||
in
|
||||
{
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home = {
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
username = "${user}";
|
||||
homeDirectory = "/home/${user}";
|
||||
|
||||
# This value determines the Home Manager release that your
|
||||
# configuration is compatible with. This helps avoid breakage
|
||||
# when a new Home Manager release introduces backwards
|
||||
# incompatible changes.
|
||||
#
|
||||
# You can update Home Manager without changing this value. See
|
||||
# the Home Manager release notes for a list of state version
|
||||
# changes in each release.
|
||||
stateVersion = "22.05";
|
||||
|
||||
packages = with pkgs; [
|
||||
# Command line utilities
|
||||
wget
|
||||
neofetch
|
||||
vim
|
||||
ranger
|
||||
trash-cli # aliased to rm in .bashrc
|
||||
|
||||
# GUI applications
|
||||
firefox
|
||||
];
|
||||
|
||||
file = {
|
||||
".bashrc" = {
|
||||
source = ./.bashrc;
|
||||
};
|
||||
};
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "vim";
|
||||
};
|
||||
};
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
mod = "Mod4";
|
||||
in {
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
config = {
|
||||
modifier = mod;
|
||||
gaps.inner = 12;
|
||||
startup = [
|
||||
{
|
||||
command = "systemctl --user restart polybar";
|
||||
always = true;
|
||||
notification = false;
|
||||
}
|
||||
];
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${mod}+Return" = "exec kitty";
|
||||
"Mod1+Q" = "exec /etc/profiles/per-user/elnu/bin/rofi-power";
|
||||
};
|
||||
keycodebindings = {
|
||||
"133" = "--release exec rofi -show run -theme";
|
||||
};
|
||||
window.commands = [
|
||||
{
|
||||
command = "border pixel 0";
|
||||
criteria = { class = "^.*"; };
|
||||
}
|
||||
];
|
||||
bars = [];
|
||||
};
|
||||
};
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
{ pkgs, lib, fetchFromGitHub, rustPlatform }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "aozora";
|
||||
version = "5b94155b4137c885bd63bc49cd400ec58152547f";
|
||||
|
||||
buildInputs = with pkgs; [ openssl ];
|
||||
nativeBuildInputs = with pkgs; [ pkg-config ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ElnuDev";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "93MP1Iw1eklC+IEQXAhzLHJ+qsDASm53qw7vUEtEstI=";
|
||||
};
|
||||
|
||||
cargoSha256 = "fiDdk6c1rPS6L//KKqfp6ODxcLEzNKrpySCb9n8aGQ0=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "A simple CLI for fetching Plume Labs air quality info.";
|
||||
homepage = "https://github.com/ElnuDev/aozora";
|
||||
license = licenses.gpl3;
|
||||
maintaners = [ maintainers.tailhook ];
|
||||
};
|
||||
}
|
@ -0,0 +1,135 @@
|
||||
{ pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
# Dependencies
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.callPackage ./aozora.nix { })
|
||||
(pkgs.callPackage ./polybar-now-playing.nix { })
|
||||
];
|
||||
services.polybar = {
|
||||
enable = true;
|
||||
script = "polybar &";
|
||||
package = pkgs.polybar.override {
|
||||
i3GapsSupport = true;
|
||||
alsaSupport = true;
|
||||
};
|
||||
config = {
|
||||
"colors" = {
|
||||
background = "#2e3440";
|
||||
background-alt = "#3b4252";
|
||||
foreground = "#eceff4";
|
||||
primary = "#8fbcbb";
|
||||
secondary = "#ff00ff"; # not sure what this does
|
||||
alert = "#ff00ff"; # not sure what this does
|
||||
disabled = "#434c5e";
|
||||
};
|
||||
"bar/top" = {
|
||||
font-0 = "Noto Sans Mono;2";
|
||||
font-1 = "Noto Sans CJK JP;2";
|
||||
background = "\${colors.background}";
|
||||
foreground = "\${colors.foreground}";
|
||||
width = "100%";
|
||||
|
||||
height = "24pt";
|
||||
line-size = "3pt";
|
||||
padding-right = 1;
|
||||
module-margin = 1;
|
||||
separator = "|";
|
||||
separator-foreground = "\${colors.disabled}";
|
||||
cursor-click = "pointer";
|
||||
cursor-scroll = "ns-resize";
|
||||
modules-left = [
|
||||
"xworkspaces"
|
||||
"xwindow"
|
||||
"now-playing"
|
||||
];
|
||||
modules-right = [
|
||||
"aozora"
|
||||
"filesystem"
|
||||
"pulseaudio"
|
||||
"memory"
|
||||
"cpu"
|
||||
"date"
|
||||
];
|
||||
};
|
||||
"module/xworkspaces" = {
|
||||
type = "internal/xworkspaces";
|
||||
|
||||
label-active-background = "\${colors.background-alt}";
|
||||
label-active-underline = "\${colors.primary}";
|
||||
label-active-padding-right = 1;
|
||||
|
||||
label-occupied-padding-right = 1;
|
||||
|
||||
label-urgent-background = "\${colors.alert}";
|
||||
label-urgent-padding-right = 1;
|
||||
|
||||
label-empty-foreground = "\${colors.disabled}";
|
||||
label-empty-padding-right = 1;
|
||||
};
|
||||
"module/xwindow" = {
|
||||
type = "internal/xwindow";
|
||||
};
|
||||
"module/now-playing" = {
|
||||
type = "custom/script";
|
||||
tail = true;
|
||||
format = "<label>";
|
||||
exec = "/etc/profiles/per-user/elnu/bin/polybar-now-playing";
|
||||
click-right = "kill -USR1 $(pgrep --oldest --parent %pid%)";
|
||||
};
|
||||
"module/aozora" = {
|
||||
type = "custom/script";
|
||||
format = "<label>";
|
||||
# Wait a few seconds before running to prevent no internet error on first start
|
||||
# TODO: make aozora wait blockingly for internet in --bar mode
|
||||
exec = "/run/current-system/sw/bin/sleep 3 && /etc/profiles/per-user/elnu/bin/aozora air-quality-in-lakewood-aw-341300 --bar";
|
||||
interval = 90;
|
||||
};
|
||||
"module/filesystem" = {
|
||||
type = "internal/fs";
|
||||
|
||||
interval = 25;
|
||||
mount-0 = "/";
|
||||
|
||||
label-mounted = "%{F#88c0d0}%mountpoint%%{F-} %percentage_used%%";
|
||||
label-unmounted = "%mountpoint% not mounted";
|
||||
label-unmounted-foreground = "\${colors.disabled}";
|
||||
};
|
||||
"module/pulseaudio" = {
|
||||
type = "internal/pulseaudio";
|
||||
|
||||
format-volume-prefix = "VOL ";
|
||||
format-volume-prefix-foreground = "\${colors.primary}";
|
||||
|
||||
label-muted = "muted";
|
||||
label-muted-foreground = "\${colors.disabled}";
|
||||
};
|
||||
"module/memory" = {
|
||||
type = "internal/memory";
|
||||
|
||||
interval = 2;
|
||||
|
||||
format-prefix = "RAM ";
|
||||
format-prefix-foreground = "\${colors.primary}";
|
||||
};
|
||||
"module/cpu" = {
|
||||
type = "internal/cpu";
|
||||
|
||||
interval = 2;
|
||||
|
||||
format-prefix = "CPU ";
|
||||
format-prefix-foreground = "\${colors.primary}";
|
||||
};
|
||||
"module/date" = {
|
||||
type = "internal/date";
|
||||
|
||||
internal = 1;
|
||||
|
||||
date = "%H:%M";
|
||||
date-alt = "%Y-%m-%d %H:%M:%S";
|
||||
|
||||
label-foreground = "\${colors.primary}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
{ pkgs, lib, fetchFromGitHub }:
|
||||
with pkgs.python3Packages;
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "polybar-now-playing";
|
||||
version = "c61658efeda178a842b03c558749169aa629f5a6";
|
||||
|
||||
# nativeBuildInputs = with pkgs; [ setuptools ];
|
||||
propagatedBuildInputs = with pkgs; [ dbus-python ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "d093w1z";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "DM4cVOWZiEJtBbGcA7PCuX2ZQMbNOj3AQX795ABBvOs=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Script for polybar to display and control media(not only Spotify) using DBus. ";
|
||||
homepage = "https://github.com/d093w1z/polybar-now-playing";
|
||||
maintaners = [ maintainers.tailhook ];
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
cat > setup.py << 'EOF'
|
||||
from setuptools import setup
|
||||
setup (
|
||||
name='polybar-now-playing',
|
||||
author='d093w1z',
|
||||
description='Script for polybar to display and control media(not only Spotify) using DBus. ',
|
||||
install_requires=['dbus-python'],
|
||||
scripts=['polybar-now-playing'],
|
||||
)
|
||||
EOF
|
||||
'';
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.callPackage ./power.nix { })
|
||||
];
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = "nord";
|
||||
};
|
||||
home.file.".config/rofi/nord.rasi" = {
|
||||
source = ./nord.rasi;
|
||||
};
|
||||
}
|
@ -0,0 +1,142 @@
|
||||
/**
|
||||
* Nordic rofi theme
|
||||
* Adapted by undiabler <undiabler@gmail.com>
|
||||
*
|
||||
* Nord Color palette imported from https://www.nordtheme.com/
|
||||
*
|
||||
*/
|
||||
|
||||
configuration {
|
||||
|
||||
font: "Noto Sans Mono 12";
|
||||
width: 30;
|
||||
line-margin: 10;
|
||||
lines: 6;
|
||||
columns: 2;
|
||||
|
||||
display-ssh: "";
|
||||
display-run: "";
|
||||
display-drun: "";
|
||||
display-window: "";
|
||||
display-combi: "";
|
||||
show-icons: true;
|
||||
}
|
||||
|
||||
* {
|
||||
nord0: #2e3440;
|
||||
nord1: #3b4252;
|
||||
nord2: #434c5e;
|
||||
nord3: #4c566a;
|
||||
|
||||
nord4: #d8dee9;
|
||||
nord5: #e5e9f0;
|
||||
nord6: #eceff4;
|
||||
|
||||
nord7: #8fbcbb;
|
||||
nord8: #88c0d0;
|
||||
nord9: #81a1c1;
|
||||
nord10: #5e81ac;
|
||||
nord11: #bf616a;
|
||||
|
||||
nord12: #d08770;
|
||||
nord13: #ebcb8b;
|
||||
nord14: #a3be8c;
|
||||
nord15: #b48ead;
|
||||
|
||||
foreground: @nord9;
|
||||
backlight: #ccffeedd;
|
||||
background-color: transparent;
|
||||
|
||||
highlight: underline bold #eceff4;
|
||||
|
||||
transparent: rgba(46,52,64,0);
|
||||
}
|
||||
|
||||
window {
|
||||
location: center;
|
||||
anchor: center;
|
||||
transparency: "screenshot";
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
border-radius: 0px;
|
||||
|
||||
background-color: @transparent;
|
||||
spacing: 0;
|
||||
children: [mainbox];
|
||||
orientation: horizontal;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
spacing: 0;
|
||||
children: [ inputbar, message, listview ];
|
||||
}
|
||||
|
||||
message {
|
||||
color: @nord0;
|
||||
padding: 5;
|
||||
border-color: @foreground;
|
||||
border: 0px 2px 2px 2px;
|
||||
background-color: @nord7;
|
||||
}
|
||||
|
||||
inputbar {
|
||||
color: @nord6;
|
||||
padding: 11px;
|
||||
background-color: #3b4252;
|
||||
|
||||
border: 0px;
|
||||
border-radius: 6px 6px 0px 0px;
|
||||
border-color: @nord10;
|
||||
}
|
||||
|
||||
entry, prompt, case-indicator {
|
||||
text-font: inherit;
|
||||
text-color:inherit;
|
||||
}
|
||||
|
||||
prompt {
|
||||
margin: 0px 0.3em 0em 0em ;
|
||||
}
|
||||
|
||||
listview {
|
||||
padding: 8px;
|
||||
border-radius: 0px 0px 6px 6px;
|
||||
border-color: @nord10;
|
||||
border: 0;
|
||||
background-color: rgba(46,52,64,0.9);
|
||||
dynamic: false;
|
||||
}
|
||||
|
||||
element {
|
||||
padding: 3px;
|
||||
vertical-align: 0.5;
|
||||
border-radius: 4px;
|
||||
background-color: transparent;
|
||||
color: @foreground;
|
||||
text-color: rgb(216, 222, 233);
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
background-color: @nord7;
|
||||
text-color: #2e3440;
|
||||
}
|
||||
|
||||
element-text, element-icon {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 6px;
|
||||
color: @foreground;
|
||||
horizontal-align: 0.5;
|
||||
|
||||
border: 2px 0px 2px 2px;
|
||||
border-radius: 4px 0px 0px 4px;
|
||||
border-color: @foreground;
|
||||
}
|
||||
|
||||
button selected normal {
|
||||
border: 2px 0px 2px 2px;
|
||||
border-color: @foreground;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
{ substituteAll }:
|
||||
|
||||
substituteAll {
|
||||
name = "rofi-power";
|
||||
src = ./power.sh;
|
||||
|
||||
dir = "bin";
|
||||
isExecutable = true;
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
POWER_OFF=" Power Off"
|
||||
REBOOT=" Reboot"
|
||||
SUSPEND=" Suspend"
|
||||
LOG_OUT=" Log out"
|
||||
|
||||
chosen=`printf "%s\n%s\n%s\n%s" "$POWER_OFF" "$REBOOT" "$SUSPEND" "$LOG_OUT" | rofi -dmenu -i -p ""`
|
||||
|
||||
case "$chosen" in
|
||||
$POWER_OFF) action="power off" ;;
|
||||
$REBOOT) action="reboot" ;;
|
||||
$SUSPEND) action="suspend" ;;
|
||||
$LOG_OUT) action="log out" ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
||||
|
||||
confirm=`printf "Yes, %s" "$action"`
|
||||
sure=`printf "%s\nNo, cancel" "$confirm" | rofi -dmenu -i -p "Are you sure"`
|
||||
|
||||
if [[ $sure != $confirm ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $chosen != $SUSPEND ]]; then
|
||||
sh /home/elnu/scripts/graceful-shutdown/graceful_shutdown.sh
|
||||
fi
|
||||
|
||||
case "$chosen" in
|
||||
$POWER_OFF) sudo poweroff ;;
|
||||
$REBOOT) sudo reboot ;;
|
||||
$SUSPEND) sudo systemctl suspend ;;
|
||||
$LOG_OUT) i3-msg exit ;;
|
||||
*) exit 1 ;;
|
||||
esac
|
After Width: | Height: | Size: 124 KiB |
@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
theme = "Nord";
|
||||
font = {
|
||||
name = "Monospace Regular";
|
||||
size = 12;
|
||||
};
|
||||
extraConfig = "enable_auto_bell 0\nconfirm_os_window_close 0";
|
||||
};
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
home.file."./.background-image" = {
|
||||
source = ./roxynord.png;
|
||||
};
|
||||
}
|
Loading…
Reference in new issue