Compare commits

...

10 Commits

Author SHA1 Message Date
marc
d660b0fb36 Added Skype 2024-01-08 19:25:35 +01:00
marc
fffa64bc44 NixOS upgrade 23.05 -> 23.11 2023-12-29 17:05:01 +01:00
marc
b898d0af42 Added docker 2023-12-29 16:40:08 +01:00
marc
3713e4eca1 Removed ICE module from polybar 2023-12-17 18:53:25 +01:00
marc
f95a9948a6 Added ICE polybar module 2023-11-21 14:51:15 +01:00
marc
ad76fdf575 Added LSP Tailwind CSS to emacs 2023-11-21 13:52:59 +01:00
marc
0d63549504 Added netflix app 2023-11-21 13:52:33 +01:00
marc
596736b542 Fix python function symbol 2023-11-01 12:42:31 +01:00
marc
84a41bed0f Fix in steam (test) 2023-10-13 18:34:31 +02:00
marc
8b641e5614 Fixes in wifi and rofi-pass 2023-10-13 18:34:18 +02:00
20 changed files with 147 additions and 22 deletions

View File

@@ -108,6 +108,11 @@
(setq pipenv-with-projectile t)
(setenv "PIPENV_MAX_DEPTH" "10"))
;; -----------------------------------------------------------------------------
;; Web (HTML + CSS)
;; -----------------------------------------------------------------------------
(use-package! lsp-tailwindcss)
;; -----------------------------------------------------------------------------
;; Org
;; -----------------------------------------------------------------------------
@@ -154,7 +159,7 @@
(load! "modules/prettify-utils.el")
(pretty-hook python-mode
("def" "")
;; ("def" "󰊕")
;; ("class" "𝙘")
("None" "")
("lambda" "λ")

View File

@@ -60,6 +60,9 @@
;; Python
(package! py-autopep8)
;; Web (HTML + CSS)
(package! lsp-tailwindcss :recipe (:host github :repo "merrickluo/lsp-tailwindcss"))
;; Org
;; Org-Roam UI

View File

@@ -55,3 +55,7 @@ fg = ${colour-scheme.base0C}
[colours/spotify]
bg = ${colour-scheme.base00}
fg = ${colour-scheme.base0A}
[colours/ice]
bg = ${colour-scheme.base00}
fg = ${colour-scheme.base0A}

View File

@@ -0,0 +1,8 @@
[module/ice]
type = custom/script
exec = ~/.config/polybar/scripts/ice.sh
interval = 5
format-background = ${colours/ice.bg}
format-foreground = ${colours/ice.fg}
format-padding = 1

33
config/polybar/scripts/ice.sh Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/sh
# Show current train speed on ICE
main() {
status=$(curl -X GET https://iceportal.de/api1/rs/status 2>/dev/null)
tripInfo=$(curl -X GET https://iceportal.de/api1/rs/tripInfo/trip 2>/dev/null)
if [[ -z $status || -z $tripInfo ]]; then
return
fi
# Speed
speed=$(echo $status | jq ".speed")
# Next stop
nextId=$(echo $tripInfo | jq ".trip.stopInfo.actualNext")
nextStop=$(echo $tripInfo | jq ".trip.stops[] | select( .station.evaNr == $nextId )")
nextStopName=$(echo $nextStop | jq -r ".station.name")
nextStopArrival=$(echo $nextStop | jq ".timetable.actualArrivalTime")
nextStopRemainingSeconds=$(expr $(expr $nextStopArrival / 1000) - $(date +%s))
if [[ ${nextStopRemainingSeconds:0:1} == "-" ]]; then
nextStopRemainingTime="Arribada!"
else
nextStopRemainingTime=$(date -d@$nextStopRemainingSeconds -u +%Hh%Mm%Ss)
fi
echo "$nextStopName ·  $nextStopRemainingTime · 󰓅 $speed km/h"
}
main "$@"

View File

@@ -78,7 +78,7 @@ inputbar {
textbox-prompt-colon {
enabled: true;
expand: false;
str: "";
str: "󰖩";
background-color: inherit;
text-color: inherit;
}

View File

@@ -1,5 +1,5 @@
[[ -x "$(command -v exa)" ]] && {
alias ll="exa --group-directories-first --color=auto --git -la"
[[ -x "$(command -v eza)" ]] && {
alias ll="eza --group-directories-first --color=auto --git -la"
} || {
alias ll="ls -alh --color=always --group-directories-first"
}

16
flake.lock generated
View File

@@ -77,16 +77,16 @@
]
},
"locked": {
"lastModified": 1692099905,
"narHash": "sha256-/pSusGhmIdSdAaywQRFA5dVbfdIzlWQTecM+E46+cJ0=",
"lastModified": 1703367386,
"narHash": "sha256-FMbm48UGrBfOWGt8+opuS+uLBLQlRfhiYXhHNcYMS5k=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2a6679aa9cc3872c29ba2a57fe1b71b3e3c5649f",
"rev": "d5824a76bc6bb93d1dce9ebbbcb09a9b6abcc224",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
@@ -141,16 +141,16 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1692525914,
"narHash": "sha256-MUgZ9/9mE/EbEQA6JPdcQHkjoR5fgvaKhpy6UO67uEc=",
"lastModified": 1703467016,
"narHash": "sha256-/5A/dNPhbQx/Oa2d+Get174eNI3LERQ7u6WTWOlR1eQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "475d5ae2c4cb87b904545bdb547af05681198fcc",
"rev": "d02d818f22c777aa4e854efc3242ec451e5d462a",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}

View File

@@ -4,10 +4,10 @@
inputs = {
# - Nixpkgs ----------------------------------
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.11";
# - Home-Manager -----------------------------
home-manager.url = "github:nix-community/home-manager/release-23.05";
home-manager.url = "github:nix-community/home-manager/release-23.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# - NUR --------------------------------------

View File

@@ -71,8 +71,13 @@ in
dev.git.userEmail = "marc@sastre.cat";
dev.devenv.enable = true;
dev.docker.enable = true;
dev.docker.users = ["marc"];
# - Other apps -------------------------------
app.spotify.enable = true;
app.skype.enable = true;
# app.netflix.enable = true;
# - Gaming -----------------------------------
gaming.lutris.enable = true;
@@ -82,5 +87,5 @@ in
# - Extra / Temporary --------------------------
programs.dconf.enable = true; # Inkscape crashes
fonts.fonts = [];
fonts.packages = [];
}

View File

@@ -15,7 +15,7 @@ in
fonts.fontconfig.enable = true;
fonts.fonts = with pkgs; [
fonts.packages = with pkgs; [
iosevka
(nerdfonts.override { fonts = [ "Iosevka" ]; })
];

15
modules/app/netflix.nix Normal file
View File

@@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
let
cfg = config.samfelag.modules.app.netflix;
in
{
options.samfelag.modules.app.netflix = {
enable = lib.mkEnableOption "netflix";
};
config = lib.mkIf cfg.enable {
hm.home.packages = with pkgs; [
netflix
];
};
}

15
modules/app/skype.nix Normal file
View File

@@ -0,0 +1,15 @@
{ config, lib, pkgs, ... }:
let
cfg = config.samfelag.modules.app.skype;
in
{
options.samfelag.modules.app.skype = {
enable = lib.mkEnableOption "skype";
};
config = lib.mkIf cfg.enable {
hm.home.packages = with pkgs; [
skypeforlinux
];
};
}

View File

@@ -25,7 +25,7 @@ in {
playerctl
];
fonts.fonts = with pkgs; [
fonts.packages = with pkgs; [
iosevka
(nerdfonts.override { fonts = [ "Iosevka" ]; })
];

20
modules/dev/docker.nix Normal file
View File

@@ -0,0 +1,20 @@
{ config, lib, pkgs, ... }:
let
cfg = config.samfelag.modules.dev.docker;
in
{
options.samfelag.modules.dev.docker = with lib.types; {
enable = lib.mkEnableOption "docker";
users = lib.my.mkOpt (listOf str) config.user.name;
};
config = lib.mkIf cfg.enable {
virtualisation.docker.enable = true;
users.extraGroups.docker.members = cfg.users;
environment.systemPackages = with pkgs; [
docker
];
};
}

View File

@@ -31,7 +31,7 @@ in {
## Opt deps
fd
imagemagick
pinentry_emacs
pinentry-emacs
zstd
## Modules deps
@@ -49,7 +49,7 @@ in {
graphviz
];
fonts.fonts = with pkgs; [
fonts.packages = with pkgs; [
iosevka
emacs-all-the-icons-fonts
];

View File

@@ -8,8 +8,22 @@ in
enable = lib.mkEnableOption "steam";
};
config = lib.mkIf cfg.enable {
# nixpkgs.config.packageOverrides = pkgs: {
# steam = pkgs.steam.override {
# extraPkgs = pkgs: with pkgs; [
# pango
# libthai
# harfbuzz
# ];
# };
# };
programs.steam = {
enable = true;
# package = with pkgs; (pkgs.steam.override {
# extraPkgs = pkgs: with pkgs; [ pango harfbuzz libthai ];
# });
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
};

View File

@@ -10,7 +10,7 @@ in
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [
bat
exa
eza
fd
fzf
jq

View File

@@ -14,7 +14,7 @@ in
zsh-powerlevel10k
];
fonts.fonts = with pkgs; [
fonts.packages = with pkgs; [
iosevka
(nerdfonts.override { fonts = [ "Iosevka" ]; })
];
@@ -26,7 +26,7 @@ in
enableAutosuggestions = true;
enableCompletion = true;
enableSyntaxHighlighting = true;
syntaxHighlighting.enable = true;
initExtra = ''
# Source generic (bash) configuration

View File

@@ -20,6 +20,9 @@ in
default_user="sastrey@gmail.com"
default_user2="marc"
# Random value, see https://github.com/carnager/rofi-pass/issues/226
help_color="#4872FF"
_rofi () {
rofi -i -no-auto-select -theme /home/marc/.config/rofi/menus/pass/pass.rasi "$@"
}