Compare commits
No commits in common. "7872a7b3a74c82f3a9bb96a5102cd5cae28c95be" and "163f5f4b6f1242dc837a41a45546ffd1674fed15" have entirely different histories.
7872a7b3a7
...
163f5f4b6f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1 +0,0 @@
|
||||
result
|
32
Justfile
32
Justfile
@ -1,32 +0,0 @@
|
||||
default: all
|
||||
|
||||
all: home nixos
|
||||
|
||||
home:
|
||||
home-manager switch --flake ./. -b $(mktemp -u XXXX)
|
||||
|
||||
nixos:
|
||||
doas nixos-rebuild switch --flake ./.
|
||||
|
||||
update:
|
||||
nix flake update
|
||||
|
||||
clean: cleanRoot cleanHome
|
||||
|
||||
cleanHome:
|
||||
nix-collect-garbage --delete-older-than 90d
|
||||
|
||||
cleanRoot:
|
||||
doas nix-collect-garbage --delete-older-than 90d
|
||||
|
||||
news:
|
||||
home-manager news --flake ./.
|
||||
|
||||
music:
|
||||
doas nixos-rebuild switch --flake ./#music
|
||||
|
||||
nonya:
|
||||
doas nixos-rebuild switch --flake ./#nonya
|
||||
|
||||
ai:
|
||||
doas nixos-rebuild switch --flake ./#ai
|
25
Makefile
Normal file
25
Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
.PHONY: default all home nixos update clean
|
||||
|
||||
default: all
|
||||
|
||||
all: home nixos
|
||||
|
||||
home:
|
||||
home-manager switch --flake ./. -b $$(mktemp -u XXXX)
|
||||
|
||||
nixos:
|
||||
doas nixos-rebuild switch --flake ./.
|
||||
|
||||
update:
|
||||
nix flake update
|
||||
|
||||
clean: cleanRoot cleanHome
|
||||
|
||||
cleanHome:
|
||||
nix-collect-garbage -d
|
||||
|
||||
cleanRoot:
|
||||
doas nix-collect-garbage -d
|
||||
|
||||
news:
|
||||
home-manager news --flake ./.
|
31
README.md
31
README.md
@ -2,19 +2,38 @@
|
||||
|
||||
### Usage
|
||||
|
||||
To build the nixos system:
|
||||
To build the base system for my craptop:
|
||||
|
||||
```bash
|
||||
make nixos
|
||||
sudo nixos-rebuild switch --flake github:ivandimitrov8080/configuration.nix#laptop
|
||||
```
|
||||
|
||||
To build ivand home:
|
||||
|
||||
```bash
|
||||
make home
|
||||
home-manager switch --flake github:ivandimitrov8080/configuration.nix#ivand
|
||||
```
|
||||
|
||||
To make music:
|
||||
```bash
|
||||
make music # this will compile the realtime kernel
|
||||
To reuse modules:
|
||||
|
||||
in your flake.nix:
|
||||
```nix
|
||||
inputs.ivan-mods = {
|
||||
url = "github:ivandimitrov8080/configuration.nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
outputs = {self, nixpkgs, ivan-mods, ...}:{
|
||||
...
|
||||
homeConfigurations = {
|
||||
my-user = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = with ivan-mods.modules.home; [
|
||||
programs.nvim
|
||||
programs.zsh
|
||||
];
|
||||
};
|
||||
};
|
||||
...
|
||||
};
|
||||
```
|
||||
|
||||
|
35
bin/bingwp
Executable file
35
bin/bingwp
Executable file
@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
let today = (date now | format date '%Y-%m-%d')
|
||||
let pic_dir = (xdg-user-dir PICTURES)
|
||||
let bg_dir = $pic_dir | path join "bg"
|
||||
let today_img_file = $bg_dir | path join ( [ $today, ".png" ] | str join )
|
||||
let is_new = ((date now | format date "%H" | into int) >= 10)
|
||||
mkdir $bg_dir
|
||||
|
||||
def exists [file: path] {
|
||||
return ($file | path exists)
|
||||
}
|
||||
|
||||
def is_empty [file: path] {
|
||||
return ((exists $file) and ((ls $file | get size | first | into int) == 0))
|
||||
}
|
||||
|
||||
def fetch [] {
|
||||
http get ("https://bing.com" + ((http get https://www.bing.com/HPImageArchive.aspx?format=js&n=1).images.0.url)) | save $today_img_file
|
||||
}
|
||||
|
||||
def cleanup [] {
|
||||
if (is_empty $today_img_file) {
|
||||
rm -rf $today_img_file
|
||||
}
|
||||
}
|
||||
|
||||
cleanup
|
||||
|
||||
if $is_new and (not (exists $today_img_file)) {
|
||||
fetch
|
||||
/run/current-system/sw/bin/ln -sf $today_img_file ( $pic_dir | path join "bg.png" )
|
||||
}
|
||||
|
||||
cleanup
|
3
bin/i2p
Executable file
3
bin/i2p
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
chromium --proxy-server=127.0.0.1:4444
|
22
bin/ks
Executable file
22
bin/ks
Executable file
@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
doc_dir=$(xdg-user-dir DOCUMENTS)
|
||||
ks_dir="$doc_dir/ks"
|
||||
name="$1"
|
||||
full_path="$ks_dir/$name.md.gpg"
|
||||
tmpfile="/tmp/$name.md"
|
||||
|
||||
mkdir -p "$ks_dir"
|
||||
cd "$ks_dir"
|
||||
|
||||
if [ -f "$full_path" ]; then
|
||||
gpg --decrypt -o "$tmpfile" "$full_path"
|
||||
else
|
||||
touch "$tmpfile"
|
||||
fi
|
||||
|
||||
$EDITOR "$tmpfile"
|
||||
|
||||
gpg --encrypt -r ivan@idimitrov.dev -o "$full_path" "$tmpfile"
|
||||
|
||||
git add . && git commit -m "editing $name" && git push --set-upstream origin HEAD
|
5
bin/purge-home
Executable file
5
bin/purge-home
Executable file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
cd "$HOME"
|
||||
|
||||
rm -rf .visualvm .bin .npm .cache .cargo .librewolf .mupdf.history .ollama .psql_history .python_history .sbt .tldrc .zcompdump .viminfo .wireguard
|
30
bin/screenshot
Executable file
30
bin/screenshot
Executable file
@ -0,0 +1,30 @@
|
||||
#!/usr/bin/env nu
|
||||
|
||||
let tmp_img = "/tmp/screen.png" | path join
|
||||
let ss_dir = ((xdg-user-dir PICTURES | str trim) | path join "ss")
|
||||
let pic_dir = ($ss_dir | path join ((date now | format date) | str join ".png"))
|
||||
|
||||
mkdir $ss_dir
|
||||
|
||||
def copy_image [] {
|
||||
open $pic_dir | wl-copy
|
||||
}
|
||||
|
||||
def prepare_screen [] {
|
||||
let grim_id = pueue add -i -p grim $tmp_img
|
||||
let imv_id = pueue add -a $grim_id -p imv -f $tmp_img
|
||||
grim -g $"(slurp -b '#FFFFFF00' -c '#FF0000FF')" $pic_dir
|
||||
pueue kill $imv_id $grim_id
|
||||
pueue wait
|
||||
pueue remove $imv_id $grim_id
|
||||
}
|
||||
|
||||
def "main area" [] {
|
||||
prepare_screen
|
||||
copy_image
|
||||
}
|
||||
|
||||
def main [] {
|
||||
grim $pic_dir
|
||||
copy_image
|
||||
}
|
3
bin/srvsts
Executable file
3
bin/srvsts
Executable file
@ -0,0 +1,3 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
ssh -n vpsfree-root 'cat /var/log/nginx/access.log' | goaccess --datetime-format='%d/%b/%Y:%H:%M:%S %z' --log-format='COMBINED'
|
17
default.nix
17
default.nix
@ -1,21 +1,24 @@
|
||||
top@{ inputs, ... }: {
|
||||
imports = [ ./nixos ./home ./packages ];
|
||||
imports = [ ./nixos ./home ];
|
||||
systems = [ "x86_64-linux" ];
|
||||
flake.stateVersion = "24.05";
|
||||
perSystem = perSystem@{ config, system, ... }: {
|
||||
perSystem = perSystem@{ system, ... }: {
|
||||
config._module.args = {
|
||||
pkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
nvim = config.packages.nvim;
|
||||
bingwp = config.packages.bingwp;
|
||||
screenshot = config.packages.screenshot;
|
||||
cursors = config.packages.cursors;
|
||||
nvim = inputs.ide.nvim.${system}.standalone.default {
|
||||
plugins.lsp.servers = {
|
||||
bashls.enable = true;
|
||||
nushell.enable = true;
|
||||
};
|
||||
};
|
||||
scripts = (prev.buildEnv { name = "scripts"; paths = [ ./. ]; });
|
||||
})
|
||||
inputs.sal.overlays.default
|
||||
];
|
||||
};
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
88
flake.lock
88
flake.lock
@ -1,5 +1,20 @@
|
||||
{
|
||||
"nodes": {
|
||||
"catppuccin": {
|
||||
"locked": {
|
||||
"lastModified": 1719758387,
|
||||
"narHash": "sha256-bMaI1jJNzIZar4TP/hhoPQROqqcbD6zT6O+sqIJdp8c=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "9eb0610d48dd0e1fecf772bbdacf9050d7b82d7c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
@ -324,11 +339,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721714663,
|
||||
"narHash": "sha256-ZDW5+rlROxaOuoEfIQM7Gqhoa+WALEYdYIiZhyJjAu0=",
|
||||
"lastModified": 1719827439,
|
||||
"narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "7560dc942a6fbd37ebd1310b3dbda513de2d4b82",
|
||||
"rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -366,11 +381,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721522228,
|
||||
"narHash": "sha256-qM7pLw81jjPh8IWAHO8KguwSKrU/97g9aMtIvmsh8SA=",
|
||||
"lastModified": 1719456570,
|
||||
"narHash": "sha256-FS9+w+9QPBd6hCtX7C5x/xm4nGCA0lOtYgjefkQNbbg=",
|
||||
"owner": "StevenBlack",
|
||||
"repo": "hosts",
|
||||
"rev": "2eaa823eac9129bade167cf89549829b1e11bddb",
|
||||
"rev": "0f8be09978187ba0e4eab2a9e0dcde88f358f1dc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -390,11 +405,11 @@
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1720387774,
|
||||
"narHash": "sha256-vbdLOPW2s5HZ/aRJl2GtcL1d4racetoPRn6W7dGVl+E=",
|
||||
"lastModified": 1719498174,
|
||||
"narHash": "sha256-TZHKHP2P8FmbzTnQ1CII8MN6L/yigMsSRok8ShVglOg=",
|
||||
"owner": "ivandimitrov8080",
|
||||
"repo": "flake-ide",
|
||||
"rev": "7194c89a92430d755aabd11d2eae25d13b6e8f00",
|
||||
"rev": "953b69dde6f3798eeb36892540267bb338a4d241",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -403,26 +418,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"musnix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721613486,
|
||||
"narHash": "sha256-M7RCvk8aqCFWQIPKS7pdFPJ+0QdZv6EjNWE5dBq/MvE=",
|
||||
"owner": "musnix",
|
||||
"repo": "musnix",
|
||||
"rev": "410be50500882ed4d0672acef2f9e757d3d5372d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "musnix",
|
||||
"repo": "musnix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"neovim-nightly-overlay": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
@ -465,6 +460,26 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nid": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719832725,
|
||||
"narHash": "sha256-dr8DkeS74KVNTgi8BE0BiUKALb+EKlMIV86G2xPYO64=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"rev": "2917972ed34ce292309b3a4976286f8b5c08db27",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "nix-index-database",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
@ -489,11 +504,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1721562059,
|
||||
"narHash": "sha256-Tybxt65eyOARf285hMHIJ2uul8SULjFZbT9ZaEeUnP8=",
|
||||
"lastModified": 1719690277,
|
||||
"narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "68c9ed8bbed9dfce253cc91560bf9043297ef2fe",
|
||||
"rev": "2741b4b489b55df32afac57bc4bfd220e8bf617e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -538,11 +553,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"lastModified": 1719745305,
|
||||
"narHash": "sha256-xwgjVUpqSviudEkpQnioeez1Uo2wzrsMaJKJClh+Bls=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"rev": "c3c5ecc05edc7dafba779c6c1a61cd08ac6583e9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -553,10 +568,11 @@
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"catppuccin": "catppuccin",
|
||||
"home-manager": "home-manager",
|
||||
"hosts": "hosts",
|
||||
"ide": "ide",
|
||||
"musnix": "musnix",
|
||||
"nid": "nid",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"parts": "parts",
|
||||
"sal": "sal"
|
||||
|
@ -21,10 +21,11 @@
|
||||
url = "github:ivandimitrov8080/sal";
|
||||
inputs = { nixpkgs.follows = "nixpkgs"; ide.follows = "ide"; };
|
||||
};
|
||||
musnix = {
|
||||
url = "github:musnix/musnix";
|
||||
nid = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
catppuccin.url = "github:catppuccin/nix";
|
||||
};
|
||||
outputs = inputs: inputs.parts.lib.mkFlake { inherit inputs; } { imports = [ ./. ]; };
|
||||
}
|
||||
|
@ -1,20 +1,3 @@
|
||||
toplevel@{ inputs, withSystem, config, ... }:
|
||||
{
|
||||
flake.homeConfigurations.ivand = withSystem "x86_64-linux" (ctx@{ pkgs, ... }:
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules =
|
||||
let
|
||||
mods = config.flake.homeManagerModules;
|
||||
in
|
||||
with mods; [
|
||||
base
|
||||
ivand
|
||||
shell
|
||||
util
|
||||
swayland
|
||||
web
|
||||
work
|
||||
];
|
||||
});
|
||||
imports = [ ./ivand ];
|
||||
}
|
||||
|
23
home/configs/ivand/default.nix
Normal file
23
home/configs/ivand/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
toplevel@{ inputs, withSystem, ... }:
|
||||
{
|
||||
flake.homeConfigurations.ivand = withSystem "x86_64-linux" (ctx@{ pkgs, stateVersion, ... }:
|
||||
inputs.home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules =
|
||||
let
|
||||
mods = toplevel.config.flake.homeManagerModules;
|
||||
in
|
||||
[
|
||||
{
|
||||
home.stateVersion = stateVersion;
|
||||
}
|
||||
inputs.nid.hmModules.nix-index
|
||||
mods.all
|
||||
mods.dev
|
||||
mods.essential
|
||||
mods.random
|
||||
mods.reminders
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
];
|
||||
});
|
||||
}
|
@ -1,511 +1,3 @@
|
||||
toplevel@{ moduleWithSystem, ... }: {
|
||||
flake.homeManagerModules = {
|
||||
base = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, config, ... }: {
|
||||
programs.home-manager.enable = true;
|
||||
home = {
|
||||
stateVersion = toplevel.config.flake.stateVersion;
|
||||
username = "ivand";
|
||||
homeDirectory = "/home/ivand";
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
PAGER = "bat";
|
||||
TERM = "screen-256color";
|
||||
MAKEFLAGS = "-j 4";
|
||||
};
|
||||
pointerCursor = with pkgs; { name = "catppuccin-mocha-green-cursors"; package = catppuccin-cursors.mochaGreen; size = 24; gtk.enable = true; };
|
||||
packages = with pkgs; [ transmission_4 speedtest-cli nvim ];
|
||||
};
|
||||
xdg = {
|
||||
enable = true;
|
||||
userDirs = with config; {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${home.homeDirectory}/dt";
|
||||
documents = "${home.homeDirectory}/doc";
|
||||
download = "${home.homeDirectory}/dl";
|
||||
pictures = "${home.homeDirectory}/pic";
|
||||
videos = "${home.homeDirectory}/vid";
|
||||
templates = "${home.homeDirectory}/tpl";
|
||||
publicShare = "${home.homeDirectory}/pub";
|
||||
music = "${home.homeDirectory}/mus";
|
||||
};
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"text/html" = "firefox.desktop";
|
||||
"x-scheme-handler/http" = "firefox.desktop";
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
"x-scheme-handler/about" = "firefox.desktop";
|
||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
ivand = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, config, ... }: {
|
||||
programs = {
|
||||
password-store = { enable = true; package = pkgs.pass.withExtensions (e: with e; [ pass-otp pass-file ]); settings = { PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store"; }; };
|
||||
git = {
|
||||
enable = true;
|
||||
delta.enable = true;
|
||||
userName = pkgs.lib.mkDefault "Ivan Kirilov Dimitrov";
|
||||
userEmail = pkgs.lib.mkDefault "ivan@idimitrov.dev";
|
||||
signing = { signByDefault = true; key = "ivan@idimitrov.dev"; };
|
||||
extraConfig = { color.ui = "auto"; pull.rebase = true; push.autoSetupRemote = true; };
|
||||
aliases = { a = "add ."; c = "commit"; d = "diff --cached"; p = "push"; pa = "!git remote | xargs -L1 git push --all"; };
|
||||
};
|
||||
gpg.enable = true;
|
||||
};
|
||||
services = { gpg-agent = { enable = true; enableBashIntegration = true; enableZshIntegration = true; enableNushellIntegration = true; pinentryPackage = pkgs.pinentry-qt; }; };
|
||||
}
|
||||
);
|
||||
shell = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, ... }: {
|
||||
programs =
|
||||
let
|
||||
shellAliases = {
|
||||
cal = "cal $(date +%Y)";
|
||||
GG = "git add . && git commit -m 'GG' && git push --set-upstream origin HEAD";
|
||||
gad = "git add . && git diff --cached";
|
||||
gac = "ga && gc";
|
||||
gach = "gac -C HEAD";
|
||||
ga = "git add .";
|
||||
gc = "git commit";
|
||||
dev = "nix develop --command $SHELL";
|
||||
ls = "eza";
|
||||
la = "eza -al";
|
||||
lt = "eza --long --tree --level=10";
|
||||
torrent = "transmission-remote";
|
||||
torrent-start = "transmission-daemon";
|
||||
vi = "nvim";
|
||||
sc = "systemctl";
|
||||
neofetch = "${pkgs.fastfetch}/bin/fastfetch -c all.jsonc";
|
||||
};
|
||||
sessionVariables = { TERM = "screen-256color"; };
|
||||
in
|
||||
{
|
||||
bash = {
|
||||
inherit shellAliases sessionVariables;
|
||||
enable = true;
|
||||
enableVteIntegration = true;
|
||||
historyControl = [ "erasedups" ];
|
||||
historyIgnore = [ "ls" "cd" "exit" ];
|
||||
};
|
||||
zsh = {
|
||||
inherit shellAliases sessionVariables;
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
defaultKeymap = "viins";
|
||||
enableVteIntegration = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
history.expireDuplicatesFirst = true;
|
||||
historySubstringSearch.enable = true;
|
||||
};
|
||||
nushell = {
|
||||
enable = true;
|
||||
environmentVariables = { config = '' { show_banner: false, completions: { quick: false partial: false algorithm: "prefix" } } ''; };
|
||||
shellAliases = { gcal = '' bash -c "cal $(date +%Y)" ''; la = "ls -al"; dev = "nix develop --command $env.SHELL"; };
|
||||
};
|
||||
kitty.shellIntegration = { enableBashIntegration = true; enableZshIntegration = true; };
|
||||
tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
baseIndex = 1;
|
||||
escapeTime = 0;
|
||||
keyMode = "vi";
|
||||
shell = "\${SHELL}";
|
||||
terminal = "screen-256color";
|
||||
plugins = with pkgs.tmuxPlugins; [ tilish catppuccin ];
|
||||
extraConfig = ''
|
||||
set-option -a terminal-features 'screen-256color:RGB'
|
||||
'';
|
||||
};
|
||||
starship = { enable = true; enableNushellIntegration = true; enableZshIntegration = true; enableBashIntegration = true; };
|
||||
eza = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
extraOptions = [
|
||||
"--header"
|
||||
"--icons"
|
||||
"--smart-group"
|
||||
"--mounts"
|
||||
"--octal-permissions"
|
||||
"--git"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
util = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ ... }: {
|
||||
programs = {
|
||||
tealdeer = {
|
||||
enable = true;
|
||||
settings = { display = { compact = true; }; updates = { auto_update = true; }; };
|
||||
};
|
||||
bottom = {
|
||||
enable = true;
|
||||
settings = {
|
||||
flags = { rate = "250ms"; };
|
||||
row = [
|
||||
{ ratio = 40; child = [{ type = "cpu"; } { type = "mem"; } { type = "net"; }]; }
|
||||
{ ratio = 35; child = [{ type = "temp"; } { type = "disk"; }]; }
|
||||
{ ratio = 40; child = [{ type = "proc"; default = true; }]; }
|
||||
];
|
||||
};
|
||||
};
|
||||
bat.enable = true;
|
||||
};
|
||||
}
|
||||
);
|
||||
swayland = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, config, ... }: {
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
config = rec {
|
||||
menu = "rofi -show run";
|
||||
terminal = "kitty";
|
||||
modifier = "Mod4";
|
||||
startup = [
|
||||
{ command = "swaymsg 'workspace 2; exec firefox'"; }
|
||||
{ command = "swaymsg 'workspace 1; exec kitty'"; }
|
||||
];
|
||||
bars = [ ];
|
||||
window.titlebar = false;
|
||||
keybindings = pkgs.lib.mkOptionDefault {
|
||||
"F1" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"Shift+F1" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
"F2" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||
"Shift+F2" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%";
|
||||
"F3" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"Shift+F3" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ +5%";
|
||||
"F9" = "exec doas ${pkgs.light}/bin/light -A 10";
|
||||
"F8" = "exec doas ${pkgs.light}/bin/light -U 10";
|
||||
"Alt+Shift+l" = "exec ${pkgs.swaylock}/bin/swaylock";
|
||||
"${modifier}+p" = "exec ${menu}";
|
||||
"${modifier}+Shift+a" = "exec ${pkgs.screenshot}/bin/screenshot area";
|
||||
"${modifier}+Shift+s" = "exec ${pkgs.screenshot}/bin/screenshot";
|
||||
"${modifier}+c" = "exec ${pkgs.sal}/bin/sal";
|
||||
"End" = "exec rofi -show calc";
|
||||
"${modifier}+Shift+r" = "reload";
|
||||
"${modifier}+Shift+c" = "kill";
|
||||
"${modifier}+Shift+q" = "exit";
|
||||
};
|
||||
input = { "*" = { xkb_layout = "us,bg"; xkb_options = "grp:win_space_toggle"; xkb_variant = ",phonetic"; }; };
|
||||
};
|
||||
swaynag = { enable = config.wayland.windowManager.sway.enable; };
|
||||
};
|
||||
programs = {
|
||||
waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar =
|
||||
let
|
||||
in
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
output = [ "eDP-1" "HDMI-A-1" ];
|
||||
|
||||
modules-left = [ "sway/workspaces" ];
|
||||
modules-center = [ "clock#week" "clock#year" "clock#time" ];
|
||||
modules-right = [ "network" "pulseaudio" "memory" "cpu" "battery" ];
|
||||
|
||||
"clock#time" = { format = "{:%H:%M:%S}"; interval = 1; };
|
||||
"clock#week" = { format = "{:%a}"; };
|
||||
"clock#year" = { format = "{:%Y-%m-%d}"; };
|
||||
|
||||
battery = {
|
||||
format = "{icon} <span color='#cdd6f4'>{capacity}% {time}</span>";
|
||||
format-time = " {H} h {M} m";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
states = { warning = 30; critical = 15; };
|
||||
};
|
||||
|
||||
cpu = { format = "<span color='#74c7ec'></span> {usage}%"; };
|
||||
|
||||
memory = { format = "<span color='#89b4fa'></span> {percentage}%"; interval = 5; };
|
||||
|
||||
pulseaudio = {
|
||||
format = "<span color='#a6e3a1'>{icon}</span> {volume}% | {format_source}";
|
||||
format-muted = "<span color='#f38ba8'></span> {volume}% | {format_source}";
|
||||
format-source = "{volume}% <span color='#a6e3a1'></span>";
|
||||
format-source-muted = "{volume}% <span color='#f38ba8'></span>";
|
||||
format-icons = { headphone = ""; default = [ "" "" "" ]; };
|
||||
};
|
||||
|
||||
network = {
|
||||
format-ethernet = "<span color='#89dceb'></span> | <span color='#fab387'></span> {bandwidthUpBytes} <span color='#fab387'></span> {bandwidthDownBytes}";
|
||||
format-wifi = "<span color='#06b6d4'>{icon}</span> | <span color='#fab387'></span> {bandwidthUpBytes} <span color='#fab387'></span> {bandwidthDownBytes}";
|
||||
format-disconnected = "<span color='#eba0ac'> no connection</span>";
|
||||
format-icons = [ "" "" "" "" ];
|
||||
interval = 5;
|
||||
};
|
||||
|
||||
"sway/workspaces" = { disable-scroll = true; all-outputs = true; };
|
||||
};
|
||||
};
|
||||
systemd = { enable = true; target = "sway-session.target"; };
|
||||
style = /* CSS */
|
||||
''
|
||||
@define-color rosewater #f5e0dc;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color red #f38ba8;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color peach #fab387;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color sky #89dceb;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext1 #bac2de;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color overlay2 #9399b2;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color surface2 #585b70;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface0 #313244;
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
* {
|
||||
font-family: FontAwesome, 'Fira Code';
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(43, 48, 59, 0.1);
|
||||
border-bottom: 2px solid rgba(100, 114, 125, 0.5);
|
||||
color: @rosewater;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background-color: @base;
|
||||
color: @text;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: @mantle;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: @crust;
|
||||
box-shadow: inset 0 -2px @sky;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#wireplumber,
|
||||
#custom-media,
|
||||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#scratchpad,
|
||||
#power-profiles-daemon,
|
||||
#mpd {
|
||||
padding: 0 10px;
|
||||
color: @text;
|
||||
background-color: @base;
|
||||
margin: 0 .5em;
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
#clock.week {
|
||||
margin-right: 0px;
|
||||
color: @peach;
|
||||
border-radius: 9999px 0px 0px 9999px;
|
||||
}
|
||||
|
||||
#clock.year {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
color: @pink;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#clock.time {
|
||||
margin-left: 0px;
|
||||
color: @sky;
|
||||
border-radius: 0px 9999px 9999px 0px;
|
||||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
color: @green;
|
||||
}
|
||||
|
||||
#battery.discharging {
|
||||
color: @yellow;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
/* Using steps() instead of linear as a timing function to limit cpu usage */
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: @red;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: steps(12);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
||||
''
|
||||
;
|
||||
};
|
||||
swaylock = {
|
||||
enable = true;
|
||||
settings = { show-failed-attempts = true; image = config.home.homeDirectory + "/pic/bg.png"; };
|
||||
};
|
||||
rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland.override {
|
||||
plugins = with pkgs; [
|
||||
(
|
||||
rofi-calc.override
|
||||
{
|
||||
rofi-unwrapped = rofi-wayland-unwrapped;
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
extraConfig = {
|
||||
modi = "window,drun,run,ssh,calc";
|
||||
};
|
||||
};
|
||||
kitty = {
|
||||
enable = true;
|
||||
font = { package = pkgs.fira-code; name = "FiraCodeNFM-Reg"; };
|
||||
settings = { background_opacity = "0.90"; cursor_shape = "beam"; term = "screen-256color"; };
|
||||
};
|
||||
imv.enable = true;
|
||||
mpv.enable = true;
|
||||
bash.profileExtra = '' [ "$(tty)" = "/dev/tty1" ] && exec sway '';
|
||||
zsh.loginExtra = '' [ "$(tty)" = "/dev/tty1" ] && exec sway '';
|
||||
nushell.loginFile.text = '' if (tty) == "/dev/tty1" { sway } '';
|
||||
};
|
||||
services = { mako.enable = true; cliphist = { enable = true; systemdTarget = "sway-session.target"; }; };
|
||||
systemd.user = {
|
||||
timers = { rbingwp = { Timer = { OnCalendar = "*-*-* 10:00:00"; Persistent = true; }; Install = { WantedBy = [ "timers.target" ]; }; }; };
|
||||
services = {
|
||||
wpd = {
|
||||
Service = {
|
||||
Environment = [ "PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.swaybg}/bin" ];
|
||||
ExecStart = [ "${pkgs.nushell}/bin/nu -c 'swaybg -i ((xdg-user-dir PICTURES) | path split | path join bg.png)'" ];
|
||||
};
|
||||
};
|
||||
bingwp = {
|
||||
Service = { Type = "oneshot"; Environment = [ "PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.nushell}/bin" ]; ExecStart = [ "${pkgs.bingwp}/bin/bingwp" ]; };
|
||||
};
|
||||
rbingwp = {
|
||||
Install = { WantedBy = [ "sway-session.target" ]; };
|
||||
Unit = { Description = "Restart bingwp and wpd services"; After = "graphical-session-pre.target"; PartOf = "graphical-session.target"; };
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = [ "${pkgs.nushell}/bin/nu -c '${pkgs.systemd}/bin/systemctl --user restart bingwp.service; ${pkgs.systemd}/bin/systemctl --user restart wpd.service'" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs; [ audacity gimp grim libnotify libreoffice-qt mupdf slurp wl-clipboard xdg-user-dirs xdg-utils xwayland ];
|
||||
}
|
||||
);
|
||||
web = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, ... }: {
|
||||
programs = {
|
||||
browserpass.enable = true;
|
||||
firefox = {
|
||||
enable = true;
|
||||
profiles.ivand = {
|
||||
id = 0;
|
||||
search.default = "DuckDuckGo";
|
||||
bookmarks = [
|
||||
{ name = "home-options"; url = "https://nix-community.github.io/home-manager/options.xhtml"; }
|
||||
{ name = "nixvim-docs"; url = "https://nix-community.github.io/nixvim/"; }
|
||||
];
|
||||
settings = {
|
||||
"general.smoothScroll" = true;
|
||||
"signon.rememberSignons" = false;
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
"layout.frame_rate" = 120;
|
||||
};
|
||||
};
|
||||
policies = {
|
||||
CaptivePortal = false;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
OfferToSaveLogins = false;
|
||||
OfferToSaveLoginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
|
||||
FirefoxHome = { Search = true; Pocket = false; Snippets = false; TopSites = false; Highlights = false; };
|
||||
|
||||
UserMessaging = { ExtensionRecommendations = false; SkipOnboarding = true; };
|
||||
|
||||
Handlers = {
|
||||
schemes = {
|
||||
mailto = { action = "useHelperApp"; ask = false; handlers = [{ name = "RoundCube"; uriTemplate = "https://mail.idimitrov.dev/?_task=mail&_action=compose&_to=%s"; }]; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
home = {
|
||||
file.".mozilla/native-messaging-hosts/gpgmejson.json".text = builtins.toJSON {
|
||||
name = "gpgmejson";
|
||||
description = "Integration with GnuPG";
|
||||
path = "${pkgs.gpgme.dev}/bin/gpgme-json";
|
||||
type = "stdio";
|
||||
allowed_extensions = [ "jid1-AQqSMBYb0a8ADg@jetpack" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
work = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, ... }: {
|
||||
programs.chromium = { enable = true; package = pkgs.ungoogled-chromium; };
|
||||
}
|
||||
);
|
||||
};
|
||||
{
|
||||
imports = [ ./packages ];
|
||||
}
|
||||
|
192
home/modules/packages/default.nix
Normal file
192
home/modules/packages/default.nix
Normal file
@ -0,0 +1,192 @@
|
||||
{ moduleWithSystem, ... }: {
|
||||
flake.homeManagerModules = {
|
||||
dev = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
openssh
|
||||
procs
|
||||
ripgrep
|
||||
fswatch
|
||||
nvim
|
||||
];
|
||||
}
|
||||
);
|
||||
essential = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
gopass
|
||||
ffmpeg
|
||||
transmission_4
|
||||
speedtest-cli
|
||||
];
|
||||
}
|
||||
);
|
||||
random = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
xonotic
|
||||
tor-browser
|
||||
electrum
|
||||
monero-cli
|
||||
bisq-desktop
|
||||
];
|
||||
}
|
||||
);
|
||||
all = moduleWithSystem
|
||||
(
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, ... }:
|
||||
rec {
|
||||
imports = [ ../programs ];
|
||||
programs.home-manager.enable = true;
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
flavor = "mocha";
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home = rec {
|
||||
username = "ivand";
|
||||
homeDirectory = "/home/ivand";
|
||||
sessionPath = [
|
||||
"$HOME/.local/bin"
|
||||
];
|
||||
sessionVariables = {
|
||||
PASSWORD_STORE_DIR = "${homeDirectory}/.password-store";
|
||||
EDITOR = "nvim";
|
||||
PAGER = "bat";
|
||||
TERM = "screen-256color";
|
||||
MAKEFLAGS = "-j 4";
|
||||
};
|
||||
pointerCursor = with pkgs; {
|
||||
name = lib.mkForce "BreezeX-RosePine-Linux";
|
||||
package = lib.mkForce rose-pine-cursor;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user = {
|
||||
timers = {
|
||||
rbingwp = {
|
||||
Timer = {
|
||||
OnCalendar = "*-*-* 10:00:00";
|
||||
Persistent = true;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
services = {
|
||||
wpd = {
|
||||
Service = {
|
||||
Environment = [
|
||||
"PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.swaybg}/bin"
|
||||
];
|
||||
ExecStart = [ "${pkgs.nushell}/bin/nu -c 'swaybg -i ((xdg-user-dir PICTURES) | path split | path join bg.png)'" ];
|
||||
};
|
||||
};
|
||||
bingwp = {
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Environment = [
|
||||
"PATH=${pkgs.xdg-user-dirs}/bin:${pkgs.nushell}/bin"
|
||||
];
|
||||
ExecStart = [ "${pkgs.scripts}/bin/bingwp" ];
|
||||
};
|
||||
};
|
||||
rbingwp = {
|
||||
Install = {
|
||||
WantedBy = [ "sway-session.target" ];
|
||||
};
|
||||
Unit = {
|
||||
Description = "Restart bingwp and wpd services";
|
||||
After = "graphical-session-pre.target";
|
||||
PartOf = "graphical-session.target";
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = [ "${pkgs.nushell}/bin/nu -c '${pkgs.systemd}/bin/systemctl --user restart bingwp.service; ${pkgs.systemd}/bin/systemctl --user restart wpd.service'" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
desktop = "${home.homeDirectory}/dt";
|
||||
documents = "${home.homeDirectory}/doc";
|
||||
download = "${home.homeDirectory}/dl";
|
||||
pictures = "${home.homeDirectory}/pic";
|
||||
videos = "${home.homeDirectory}/vid";
|
||||
templates = "${home.homeDirectory}/tpl";
|
||||
publicShare = "${home.homeDirectory}/pub";
|
||||
music = "${home.homeDirectory}/mus";
|
||||
};
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"text/html" = "firefox.desktop";
|
||||
"x-scheme-handler/http" = "firefox.desktop";
|
||||
"x-scheme-handler/https" = "firefox.desktop";
|
||||
"x-scheme-handler/about" = "firefox.desktop";
|
||||
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||
"x-scheme-handler/mailto" = "userapp-Thunderbird-LDALA2.desktop";
|
||||
"message/rfc822" = "userapp-Thunderbird-LDALA2.desktop";
|
||||
"x-scheme-handler/mid" = "userapp-Thunderbird-LDALA2.desktop";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
reminders =
|
||||
moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, ... }: {
|
||||
systemd.user = {
|
||||
timers = {
|
||||
track-time = {
|
||||
Timer = {
|
||||
OnCalendar = "Mon..Fri *-*-* 16:00:*";
|
||||
Persistent = true;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "timers.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
services = {
|
||||
track-time = {
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
ExecStart = [ "${pkgs.libnotify}/bin/notify-send -u critical 'Reminder: Track time'" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
cust = moduleWithSystem (
|
||||
top@{ ... }:
|
||||
perSystem@{ pkgs, ... }: {
|
||||
imports = [ ../programs/zsh ../programs/nushell ../programs/starship ../programs/carapace ../programs/bottom ../programs/firefox ];
|
||||
home.packages = with pkgs; [
|
||||
openssh
|
||||
procs
|
||||
ripgrep
|
||||
fswatch
|
||||
];
|
||||
}
|
||||
);
|
||||
};
|
||||
}
|
6
home/modules/programs/bat/default.nix
Normal file
6
home/modules/programs/bat/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
};
|
||||
}
|
34
home/modules/programs/bottom/default.nix
Normal file
34
home/modules/programs/bottom/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{
|
||||
programs.bottom = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
settings = {
|
||||
flags = {
|
||||
rate = "250ms";
|
||||
};
|
||||
row = [
|
||||
{
|
||||
ratio = 40;
|
||||
child = [
|
||||
{ type = "cpu"; }
|
||||
{ type = "mem"; }
|
||||
{ type = "net"; }
|
||||
];
|
||||
}
|
||||
{
|
||||
ratio = 35;
|
||||
child = [
|
||||
{ type = "temp"; }
|
||||
{ type = "disk"; }
|
||||
];
|
||||
}
|
||||
{
|
||||
ratio = 40;
|
||||
child = [
|
||||
{ type = "proc"; default = true; }
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
7
home/modules/programs/carapace/default.nix
Normal file
7
home/modules/programs/carapace/default.nix
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
programs.carapace = {
|
||||
enable = true;
|
||||
enableNushellIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
6
home/modules/programs/chromium/default.nix
Normal file
6
home/modules/programs/chromium/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
};
|
||||
}
|
6
home/modules/programs/cliphist/default.nix
Normal file
6
home/modules/programs/cliphist/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
services.cliphist = {
|
||||
enable = true;
|
||||
systemdTarget = "sway-session.target";
|
||||
};
|
||||
}
|
6
home/modules/programs/comma/default.nix
Normal file
6
home/modules/programs/comma/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
programs = {
|
||||
nix-index-database.comma.enable = true;
|
||||
nix-index.enable = true;
|
||||
};
|
||||
}
|
30
home/modules/programs/default.nix
Normal file
30
home/modules/programs/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./bat
|
||||
./bottom
|
||||
./carapace
|
||||
./chromium
|
||||
./cliphist
|
||||
./comma
|
||||
./firefox
|
||||
./git
|
||||
./gpg
|
||||
./imv
|
||||
./mako
|
||||
./kitty
|
||||
./lf
|
||||
./mpv
|
||||
./nushell
|
||||
./obs-studio
|
||||
./pueue
|
||||
./rofi
|
||||
./starship
|
||||
./sway
|
||||
./swaylock
|
||||
./tealdeer
|
||||
./tmux
|
||||
./waybar
|
||||
./zsh
|
||||
];
|
||||
programs.browserpass.enable = true;
|
||||
}
|
74
home/modules/programs/firefox/default.nix
Normal file
74
home/modules/programs/firefox/default.nix
Normal file
@ -0,0 +1,74 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
profiles.ivand = {
|
||||
id = 0;
|
||||
search.default = "DuckDuckGo";
|
||||
bookmarks = [
|
||||
{
|
||||
name = "home-options";
|
||||
url = "https://nix-community.github.io/home-manager/options.xhtml";
|
||||
}
|
||||
{
|
||||
name = "nixvim-docs";
|
||||
url = "https://nix-community.github.io/nixvim/";
|
||||
}
|
||||
];
|
||||
settings = {
|
||||
"general.smoothScroll" = true;
|
||||
"signon.rememberSignons" = false;
|
||||
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
|
||||
"layout.frame_rate" = 120;
|
||||
};
|
||||
};
|
||||
policies = {
|
||||
CaptivePortal = false;
|
||||
DisableFirefoxStudies = true;
|
||||
DisablePocket = true;
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxAccounts = true;
|
||||
OfferToSaveLogins = false;
|
||||
OfferToSaveLoginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
|
||||
FirefoxHome = {
|
||||
Search = true;
|
||||
Pocket = false;
|
||||
Snippets = false;
|
||||
TopSites = false;
|
||||
Highlights = false;
|
||||
};
|
||||
|
||||
UserMessaging = {
|
||||
ExtensionRecommendations = false;
|
||||
SkipOnboarding = true;
|
||||
};
|
||||
|
||||
Handlers = {
|
||||
schemes = {
|
||||
mailto = {
|
||||
action = "useHelperApp";
|
||||
ask = false;
|
||||
handlers = [
|
||||
{
|
||||
name = "RoundCube";
|
||||
uriTemplate = "https://mail.idimitrov.dev/?_task=mail&_action=compose&_to=%s";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
home = {
|
||||
file.".mozilla/native-messaging-hosts/gpgmejson.json".text = builtins.toJSON {
|
||||
name = "gpgmejson";
|
||||
description = "Integration with GnuPG";
|
||||
path = "${pkgs.gpgme.dev}/bin/gpgme-json";
|
||||
type = "stdio";
|
||||
allowed_extensions = [
|
||||
"jid1-AQqSMBYb0a8ADg@jetpack"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
23
home/modules/programs/git/default.nix
Normal file
23
home/modules/programs/git/default.nix
Normal file
@ -0,0 +1,23 @@
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
delta.enable = true;
|
||||
userName = "Ivan Kirilov Dimitrov";
|
||||
userEmail = "ivan@idimitrov.dev";
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
key = "ivan@idimitrov.dev";
|
||||
};
|
||||
extraConfig = {
|
||||
color.ui = "auto";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
aliases = {
|
||||
a = "add .";
|
||||
c = "commit";
|
||||
d = "diff --cached";
|
||||
p = "push";
|
||||
};
|
||||
};
|
||||
}
|
11
home/modules/programs/gpg/default.nix
Normal file
11
home/modules/programs/gpg/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableNushellIntegration = true;
|
||||
pinentryPackage = pkgs.pinentry-qt;
|
||||
};
|
||||
}
|
6
home/modules/programs/imv/default.nix
Normal file
6
home/modules/programs/imv/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
programs.imv = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
};
|
||||
}
|
14
home/modules/programs/kitty/default.nix
Normal file
14
home/modules/programs/kitty/default.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
font = {
|
||||
package = pkgs.fira-code;
|
||||
name = "FiraCodeNFM-Reg";
|
||||
};
|
||||
settings = {
|
||||
background_opacity = "0.96";
|
||||
cursor_shape = "beam";
|
||||
};
|
||||
};
|
||||
}
|
12
home/modules/programs/lf/default.nix
Normal file
12
home/modules/programs/lf/default.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
extraConfig = builtins.readFile ./lfrc;
|
||||
keybindings = {
|
||||
D = "trash";
|
||||
T = "touch";
|
||||
M = "mkdir";
|
||||
R = "mv";
|
||||
};
|
||||
};
|
||||
}
|
39
home/modules/programs/lf/lfrc
Normal file
39
home/modules/programs/lf/lfrc
Normal file
@ -0,0 +1,39 @@
|
||||
# Basic Settings
|
||||
set hidden true
|
||||
set ignorecase true
|
||||
set icons true
|
||||
|
||||
# Custom Functions
|
||||
|
||||
cmd trash ${{
|
||||
files=$(printf "$fx" | tr '\n' ';')
|
||||
while [ "$files" ]; do
|
||||
file=${files%%;*}
|
||||
|
||||
rm -rf "$(basename "$file")"
|
||||
if [ "$files" = "$file" ]; then
|
||||
files=''
|
||||
else
|
||||
files="${files#*;}"
|
||||
fi
|
||||
done
|
||||
}}
|
||||
|
||||
cmd mkdir ${{
|
||||
printf "Directory Name: "
|
||||
read ans
|
||||
mkdir "$ans"
|
||||
}}
|
||||
|
||||
cmd touch ${{
|
||||
printf "File Name: "
|
||||
read ans
|
||||
touch "$ans"
|
||||
}}
|
||||
|
||||
cmd mv ${{
|
||||
printf "Move to: "
|
||||
read ans
|
||||
mv "$f" "$ans"
|
||||
}}
|
||||
|
6
home/modules/programs/mako/default.nix
Normal file
6
home/modules/programs/mako/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
};
|
||||
}
|
6
home/modules/programs/mpv/default.nix
Normal file
6
home/modules/programs/mpv/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
};
|
||||
}
|
34
home/modules/programs/nushell/default.nix
Normal file
34
home/modules/programs/nushell/default.nix
Normal file
@ -0,0 +1,34 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.nushell = {
|
||||
enable = true;
|
||||
environmentVariables = {
|
||||
config = ''
|
||||
{
|
||||
show_banner: false,
|
||||
completions: {
|
||||
quick: false
|
||||
partial: false
|
||||
algorithm: "prefix"
|
||||
}
|
||||
}
|
||||
'';
|
||||
PATH = "($env.PATH | split row (char esep) | append ($env.HOME | path join .local bin))";
|
||||
};
|
||||
shellAliases = {
|
||||
gcal = ''
|
||||
bash -c "cal $(date +%Y)"
|
||||
'';
|
||||
la = "ls -al";
|
||||
dev = "nix develop --command $env.SHELL";
|
||||
torrent = "transmission-remote";
|
||||
vi = "nvim";
|
||||
sc = "systemctl";
|
||||
neofetch = "${pkgs.fastfetch}/bin/fastfetch -c all.jsonc";
|
||||
};
|
||||
loginFile.text = ''
|
||||
if (tty) == "/dev/tty1" {
|
||||
sway
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
6
home/modules/programs/obs-studio/default.nix
Normal file
6
home/modules/programs/obs-studio/default.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [ wlrobs ];
|
||||
};
|
||||
}
|
5
home/modules/programs/pueue/default.nix
Normal file
5
home/modules/programs/pueue/default.nix
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
services.pueue = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
19
home/modules/programs/rofi/default.nix
Normal file
19
home/modules/programs/rofi/default.nix
Normal file
@ -0,0 +1,19 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
package = pkgs.rofi-wayland.override {
|
||||
plugins = with pkgs; [
|
||||
(
|
||||
rofi-calc.override
|
||||
{
|
||||
rofi-unwrapped = rofi-wayland-unwrapped;
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
extraConfig = {
|
||||
modi = "window,drun,run,ssh,calc";
|
||||
};
|
||||
};
|
||||
}
|
8
home/modules/programs/starship/default.nix
Normal file
8
home/modules/programs/starship/default.nix
Normal file
@ -0,0 +1,8 @@
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
enableNushellIntegration = true;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
69
home/modules/programs/sway/default.nix
Normal file
69
home/modules/programs/sway/default.nix
Normal file
@ -0,0 +1,69 @@
|
||||
{ pkgs, ... }: {
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
systemd.enable = true;
|
||||
config = rec {
|
||||
menu = "rofi -show run";
|
||||
terminal = "kitty";
|
||||
modifier = "Mod4";
|
||||
startup = [
|
||||
{ command = "swaymsg 'workspace 1; exec kitty'"; }
|
||||
{ command = "swaymsg 'workspace 2; exec firefox'"; }
|
||||
];
|
||||
bars = [ ];
|
||||
window.titlebar = false;
|
||||
keybindings = pkgs.lib.mkOptionDefault {
|
||||
# System
|
||||
"End" = "exec systemctl poweroff";
|
||||
"Insert" = "exec systemctl reboot";
|
||||
# Audio
|
||||
"XF86AudioMicMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||
"XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||
"Alt+XF86AudioRaiseVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ +5%";
|
||||
"Alt+XF86AudioLowerVolume" = "exec ${pkgs.pulseaudio}/bin/pactl set-source-volume @DEFAULT_SOURCE@ -5%";
|
||||
"XF86AudioMute" = "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
# Display
|
||||
"Alt+Shift+l" = "exec ${pkgs.swaylock}/bin/swaylock"; # Lock screen
|
||||
"XF86ScreenSaver" = "output 'eDP-1' toggle"; # Turn screen off
|
||||
"XF86MonBrightnessUp" = "exec doas ${pkgs.light}/bin/light -A 10";
|
||||
"XF86MonBrightnessDown" = "exec doas ${pkgs.light}/bin/light -U 10";
|
||||
# Programs
|
||||
"${modifier}+p" = "exec ${menu}";
|
||||
"${modifier}+Shift+a" = "exec screenshot area";
|
||||
"${modifier}+Shift+s" = "exec screenshot";
|
||||
"${modifier}+c" = "exec ${pkgs.sal}/bin/sal";
|
||||
"XF86Calculator" = "exec rofi -show calc";
|
||||
# sway commands
|
||||
"${modifier}+Shift+r" = "reload";
|
||||
"${modifier}+Shift+c" = "kill";
|
||||
"${modifier}+Shift+q" = "exit";
|
||||
};
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "us,bg";
|
||||
xkb_options = "grp:win_space_toggle";
|
||||
xkb_variant = ",phonetic";
|
||||
};
|
||||
};
|
||||
};
|
||||
swaynag = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
audacity
|
||||
gimp
|
||||
grim
|
||||
libnotify
|
||||
libreoffice-qt
|
||||
mupdf
|
||||
pavucontrol
|
||||
slurp
|
||||
wl-clipboard
|
||||
xdg-user-dirs
|
||||
xdg-utils
|
||||
xwayland
|
||||
];
|
||||
}
|
10
home/modules/programs/swaylock/default.nix
Normal file
10
home/modules/programs/swaylock/default.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ config, ... }: {
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
settings = {
|
||||
show-failed-attempts = true;
|
||||
image = config.home.homeDirectory + "/pic/bg.png";
|
||||
};
|
||||
};
|
||||
}
|
13
home/modules/programs/tealdeer/default.nix
Normal file
13
home/modules/programs/tealdeer/default.nix
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
programs.tealdeer = {
|
||||
enable = true;
|
||||
settings = {
|
||||
display = {
|
||||
compact = true;
|
||||
};
|
||||
updates = {
|
||||
auto_update = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
15
home/modules/programs/tmux/default.nix
Normal file
15
home/modules/programs/tmux/default.nix
Normal file
@ -0,0 +1,15 @@
|
||||
{ pkgs, ... }: {
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
baseIndex = 1;
|
||||
escapeTime = 0;
|
||||
keyMode = "vi";
|
||||
shell = "\${SHELL}";
|
||||
terminal = "screen-256color";
|
||||
plugins = with pkgs.tmuxPlugins; [ tilish catppuccin ];
|
||||
extraConfig = ''
|
||||
set-option -a terminal-features 'screen-256color:RGB'
|
||||
'';
|
||||
};
|
||||
}
|
84
home/modules/programs/waybar/default.nix
Normal file
84
home/modules/programs/waybar/default.nix
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
settings = {
|
||||
mainBar =
|
||||
let
|
||||
in
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
output = [
|
||||
"eDP-1"
|
||||
"HDMI-A-1"
|
||||
];
|
||||
modules-left = [ "sway/workspaces" ];
|
||||
modules-center = [ "clock#week" "clock#year" "clock#time" ];
|
||||
modules-right = [ "network" "pulseaudio" "memory" "cpu" "battery" ];
|
||||
|
||||
"clock#time" = {
|
||||
format = "{:%H:%M:%S}";
|
||||
interval = 1;
|
||||
};
|
||||
|
||||
"clock#week" = {
|
||||
format = "{:%a}";
|
||||
};
|
||||
|
||||
"clock#year" = {
|
||||
format = "{:%Y-%m-%d}";
|
||||
};
|
||||
|
||||
battery = {
|
||||
format = "{icon} <span color='#cdd6f4'>{capacity}% {time}</span>";
|
||||
format-time = " {H} h {M} m";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
};
|
||||
|
||||
cpu = {
|
||||
format = "<span color='#74c7ec'></span> {usage}%";
|
||||
};
|
||||
|
||||
memory = {
|
||||
format = "<span color='#89b4fa'></span> {percentage}%";
|
||||
interval = 5;
|
||||
};
|
||||
|
||||
pulseaudio = {
|
||||
format = "<span color='#a6e3a1'>{icon}</span> {volume}% | {format_source}";
|
||||
format-muted = "<span color='#f38ba8'></span> {volume}% | {format_source}";
|
||||
format-source = "{volume}% <span color='#a6e3a1'></span>";
|
||||
format-source-muted = "{volume}% <span color='#f38ba8'></span>";
|
||||
format-icons = {
|
||||
headphone = "";
|
||||
default = [ "" "" "" ];
|
||||
};
|
||||
};
|
||||
|
||||
network = {
|
||||
format-ethernet = "<span color='#89dceb'></span> | <span color='#fab387'></span> {bandwidthUpBytes} <span color='#fab387'></span> {bandwidthDownBytes}";
|
||||
format-wifi = "<span color='#06b6d4'>{icon}</span> | <span color='#fab387'></span> {bandwidthUpBytes} <span color='#fab387'></span> {bandwidthDownBytes}";
|
||||
format-disconnected = "<span color='#eba0ac'> no connection</span>";
|
||||
format-icons = [ "" "" "" "" ];
|
||||
interval = 5;
|
||||
};
|
||||
|
||||
"sway/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "sway-session.target";
|
||||
};
|
||||
style = builtins.readFile ./style.css;
|
||||
};
|
||||
}
|
102
home/modules/programs/waybar/style.css
Normal file
102
home/modules/programs/waybar/style.css
Normal file
@ -0,0 +1,102 @@
|
||||
* {
|
||||
font-family: FontAwesome, 'Fira Code';
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background-color: rgba(43, 48, 59, 0.1);
|
||||
border-bottom: 2px solid rgba(100, 114, 125, 0.5);
|
||||
color: @rosewater;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 5px;
|
||||
background-color: @base;
|
||||
color: @text;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: @mantle;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: @crust;
|
||||
box-shadow: inset 0 -2px @sky;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
#clock,
|
||||
#battery,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#backlight,
|
||||
#network,
|
||||
#pulseaudio,
|
||||
#wireplumber,
|
||||
#custom-media,
|
||||
#tray,
|
||||
#mode,
|
||||
#idle_inhibitor,
|
||||
#scratchpad,
|
||||
#power-profiles-daemon,
|
||||
#mpd {
|
||||
padding: 0 10px;
|
||||
color: @text;
|
||||
background-color: @base;
|
||||
margin: 0 .5em;
|
||||
border-radius: 9999px;
|
||||
}
|
||||
|
||||
#clock.week {
|
||||
margin-right: 0px;
|
||||
color: @peach;
|
||||
border-radius: 9999px 0px 0px 9999px;
|
||||
}
|
||||
|
||||
#clock.year {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
color: @pink;
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
#clock.time {
|
||||
margin-left: 0px;
|
||||
color: @sky;
|
||||
border-radius: 0px 9999px 9999px 0px;
|
||||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
color: @green;
|
||||
}
|
||||
|
||||
#battery.discharging {
|
||||
color: @yellow;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
to {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
|
||||
#battery.warning:not(.charging) {
|
||||
background-color: @red;
|
||||
}
|
||||
|
||||
/* Using steps() instead of linear as a timing function to limit cpu usage */
|
||||
#battery.critical:not(.charging) {
|
||||
background-color: @red;
|
||||
animation-name: blink;
|
||||
animation-duration: 0.5s;
|
||||
animation-timing-function: steps(12);
|
||||
animation-iteration-count: infinite;
|
||||
animation-direction: alternate;
|
||||
}
|
35
home/modules/programs/zsh/default.nix
Normal file
35
home/modules/programs/zsh/default.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
defaultKeymap = "viins";
|
||||
enableVteIntegration = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestion.enable = true;
|
||||
loginExtra = ''
|
||||
[ "$(tty)" = "/dev/tty1" ] && exec sway
|
||||
'';
|
||||
sessionVariables = {
|
||||
TERM = "screen-256color";
|
||||
};
|
||||
shellAliases = {
|
||||
cal = "cal $(date +%Y)";
|
||||
GG = "git add . && git commit -m 'GG' && git push --set-upstream origin HEAD";
|
||||
gad = "git add . && git diff --cached";
|
||||
gac = "ga && gc";
|
||||
gach = "gac -C HEAD";
|
||||
ga = "git add .";
|
||||
gc = "git commit";
|
||||
dev = "nix develop --command $SHELL";
|
||||
ls = "${pkgs.nushell}/bin/nu -c 'ls'";
|
||||
la = "${pkgs.nushell}/bin/nu -c 'ls -al'";
|
||||
torrent = "transmission-remote";
|
||||
vi = "nvim";
|
||||
sc = "systemctl";
|
||||
};
|
||||
shellGlobalAliases.comp = "-vcodec libx265 -crf 28";
|
||||
history.expireDuplicatesFirst = true;
|
||||
historySubstringSearch.enable = true;
|
||||
};
|
||||
}
|
@ -1,60 +1,18 @@
|
||||
toplevel@{ inputs, withSystem, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
nixosModules = toplevel.config.flake.nixosModules;
|
||||
hardwareConfigurations = {
|
||||
nova = { lib, modulesPath, ... }: {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
boot = {
|
||||
initrd = {
|
||||
availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
kernelModules = [ ];
|
||||
luks.devices."nixos".device = "/dev/disk/by-uuid/712dd8ba-d5b4-438a-9a77-663b8c935cfe";
|
||||
};
|
||||
kernelModules = [ "kvm-intel" ];
|
||||
extraModulePackages = [ ];
|
||||
};
|
||||
fileSystems = {
|
||||
"/" = { device = "/dev/disk/by-uuid/47536cbe-7265-493b-a2e3-bbd376a6f9af"; fsType = "btrfs"; };
|
||||
"/boot" = { device = "/dev/disk/by-uuid/4C3C-993A"; fsType = "vfat"; };
|
||||
};
|
||||
swapDevices = [ ];
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkForce false;
|
||||
};
|
||||
};
|
||||
essential = [ hardwareConfigurations.nova inputs.hosts.nixosModule ] ++ (with nixosModules; [ grub base sound wayland security ivand wireless wireguard ]);
|
||||
in
|
||||
{
|
||||
flake.nixosConfigurations = {
|
||||
nixos = withSystem system (ctx@{ config, inputs', ... }: inputs.nixpkgs.lib.nixosSystem {
|
||||
flake.nixosConfigurations.nixos = withSystem system (ctx@{ config, inputs', ... }:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs inputs';
|
||||
packages = config.packages;
|
||||
};
|
||||
modules = essential;
|
||||
modules = [
|
||||
./laptop-hardware.nix
|
||||
inputs.hosts.nixosModule
|
||||
inputs.catppuccin.nixosModules.catppuccin
|
||||
] ++ (with toplevel.config.flake.nixosModules; [ wireguard catppuccin boot security xdg networking users services programs env rest ]);
|
||||
});
|
||||
music = withSystem system (ctx@{ config, inputs', ... }: inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs inputs';
|
||||
packages = config.packages;
|
||||
};
|
||||
modules = essential ++ [ inputs.musnix.nixosModules.musnix nixosModules.music ];
|
||||
});
|
||||
nonya = withSystem system (ctx@{ config, inputs', ... }: inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs inputs';
|
||||
packages = config.packages;
|
||||
};
|
||||
modules = essential ++ (with nixosModules; [ anon cryptocurrency ]);
|
||||
});
|
||||
ai = withSystem system (ctx@{ config, inputs', ... }: inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs inputs';
|
||||
packages = config.packages;
|
||||
};
|
||||
modules = essential ++ [ nixosModules.ai ];
|
||||
});
|
||||
};
|
||||
}
|
||||
|
38
nixos/configs/laptop-hardware.nix
Normal file
38
nixos/configs/laptop-hardware.nix
Normal file
@ -0,0 +1,38 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/sda1";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/D76B-0BB3";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp2s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
@ -1,63 +1,12 @@
|
||||
top@{ moduleWithSystem, ... }: {
|
||||
{ moduleWithSystem, ... }: {
|
||||
flake.nixosModules = {
|
||||
grub = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||
boot = {
|
||||
loader = {
|
||||
grub =
|
||||
let
|
||||
theme = pkgs.sleek-grub-theme.override { withBanner = "Hello Ivan"; withStyle = "bigSur"; };
|
||||
in
|
||||
{ enable = true; useOSProber = true; efiSupport = true; device = "nodev"; theme = theme; splashImage = "${theme}/background.png"; };
|
||||
efi = { canTouchEfiVariables = true; };
|
||||
};
|
||||
};
|
||||
});
|
||||
base = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||
system.stateVersion = top.config.flake.stateVersion;
|
||||
nix = { extraOptions = ''experimental-features = nix-command flakes''; };
|
||||
i18n.supportedLocales = [ "all" ];
|
||||
time.timeZone = "Europe/Prague";
|
||||
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ];
|
||||
environment = {
|
||||
systemPackages = with pkgs; [ cmatrix uutils-coreutils cryptsetup fd file git glibc gnumake mlocate moreutils openssh openssl procs ripgrep srm unzip vim zip just ];
|
||||
shells = with pkgs; [ zsh nushell ];
|
||||
};
|
||||
programs = { zsh.enable = true; nix-ld.enable = true; dconf.enable = true; };
|
||||
services = { dbus.enable = true; };
|
||||
networking = { stevenBlackHosts = { enable = true; blockFakenews = true; blockGambling = true; }; };
|
||||
});
|
||||
sound = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||
services = { pipewire = { enable = true; alsa.enable = true; pulse.enable = true; }; };
|
||||
environment.systemPackages = with pkgs; [ pwvucontrol ];
|
||||
});
|
||||
music = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [ guitarix ];
|
||||
services.pipewire = {
|
||||
jack.enable = true;
|
||||
extraConfig = { jack."69-low-latency" = { "jack.properties" = { "node.latency" = "64/48000"; }; }; };
|
||||
};
|
||||
musnix = {
|
||||
enable = true;
|
||||
rtcqs.enable = true;
|
||||
soundcardPciId = "00:1f.3";
|
||||
kernel = { realtime = true; packages = pkgs.linuxPackages_6_8_rt; };
|
||||
rtirq = { resetAll = 1; prioLow = 0; enable = true; nameList = "rtc0 snd"; };
|
||||
};
|
||||
});
|
||||
wayland = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: { hardware.graphics.enable = true; security.pam.services.swaylock = { }; });
|
||||
security = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: {
|
||||
security = {
|
||||
sudo = { enable = false; execWheelOnly = true; extraRules = [{ groups = [ "wheel" ]; }]; };
|
||||
doas = { enable = true; extraRules = [{ groups = [ "wheel" ]; noPass = true; keepEnv = true; }]; };
|
||||
polkit.enable = true;
|
||||
rtkit.enable = true;
|
||||
};
|
||||
});
|
||||
wireguard = {
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
address = [ "10.0.0.4/32" ];
|
||||
address = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/64" ];
|
||||
dns = [ "1.1.1.1" "fdc9:281f:04d7:9ee9::1" ];
|
||||
privateKeyFile = "/etc/wireguard/privatekey";
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = "5FiTLnzbgcbgQLlyVyYeESEd+2DtwM1JHCGz/32UcEU=";
|
||||
@ -69,7 +18,64 @@ top@{ moduleWithSystem, ... }: {
|
||||
};
|
||||
};
|
||||
};
|
||||
wireless = {
|
||||
catppuccin = {
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
flavor = "mocha";
|
||||
};
|
||||
boot.loader.grub.catppuccin.enable = true;
|
||||
};
|
||||
boot = {
|
||||
boot = {
|
||||
loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
useOSProber = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
};
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
};
|
||||
kernelModules = [ "v4l2loopback" ];
|
||||
};
|
||||
};
|
||||
security = moduleWithSystem (toplevel@{ ... }: nixos@{ pkgs, ... }: {
|
||||
security = {
|
||||
sudo = {
|
||||
enable = false;
|
||||
execWheelOnly = true;
|
||||
extraRules = [
|
||||
{
|
||||
groups = [ "wheel" ];
|
||||
commands = [{ command = "${pkgs.light}/bin/light"; options = [ "SETENV" "NOPASSWD" ]; }];
|
||||
}
|
||||
];
|
||||
};
|
||||
doas = {
|
||||
enable = true;
|
||||
extraRules = [
|
||||
# Allow wheel to run all commands without password and keep user env.
|
||||
{ groups = [ "wheel" ]; noPass = true; keepEnv = true; }
|
||||
];
|
||||
};
|
||||
polkit.enable = true;
|
||||
rtkit.enable = true;
|
||||
pam = { services = { swaylock = { }; }; };
|
||||
};
|
||||
});
|
||||
xdg = {
|
||||
xdg = {
|
||||
portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
config.common.default = "*";
|
||||
};
|
||||
};
|
||||
};
|
||||
networking = {
|
||||
networking = {
|
||||
wireless = {
|
||||
enable = true;
|
||||
@ -109,15 +115,19 @@ top@{ moduleWithSystem, ... }: {
|
||||
};
|
||||
};
|
||||
};
|
||||
stevenBlackHosts = {
|
||||
enable = true;
|
||||
blockFakenews = true;
|
||||
blockGambling = true;
|
||||
};
|
||||
};
|
||||
ivand = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||
};
|
||||
users = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users = {
|
||||
ivand = {
|
||||
isNormalUser = true;
|
||||
createHome = true;
|
||||
extraGroups = [
|
||||
"adbusers"
|
||||
"adm"
|
||||
@ -136,22 +146,66 @@ top@{ moduleWithSystem, ... }: {
|
||||
extraGroups = { mlocate = { }; };
|
||||
};
|
||||
});
|
||||
flatpak = {
|
||||
xdg = { portal = { enable = true; wlr.enable = true; config.common.default = "*"; }; };
|
||||
services.flatpak.enable = true;
|
||||
};
|
||||
ai = moduleWithSystem (toplevel@{ ... }: perSystem@{ ... }: {
|
||||
services = { ollama.enable = true; };
|
||||
});
|
||||
anon = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [ tor-browser ];
|
||||
});
|
||||
cryptocurrency = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [ monero-cli ];
|
||||
services = {
|
||||
monero.enable = true;
|
||||
bitcoind.mainnet.enable = true;
|
||||
services = {
|
||||
xserver.videoDrivers = [ "nouveau" ];
|
||||
dbus.enable = true;
|
||||
flatpak.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
programs = {
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
nix-ld.enable = true;
|
||||
adb.enable = true;
|
||||
dconf.enable = true;
|
||||
};
|
||||
};
|
||||
env = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
cmatrix
|
||||
coreutils-full
|
||||
cryptsetup
|
||||
dig
|
||||
fd
|
||||
file
|
||||
git
|
||||
glibc
|
||||
gnumake
|
||||
jq
|
||||
mlocate
|
||||
moreutils
|
||||
ntfs3g
|
||||
openssl
|
||||
srm
|
||||
unzip
|
||||
vim
|
||||
zip
|
||||
];
|
||||
shells = with pkgs; [ zsh nushell ];
|
||||
};
|
||||
});
|
||||
rest = moduleWithSystem (toplevel@{ ... }: perSystem@{ pkgs, ... }: {
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
system.stateVersion = "24.05";
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
i18n.supportedLocales = [ "all" ];
|
||||
time.timeZone = "Europe/Prague";
|
||||
fonts.packages = with pkgs; [ (nerdfonts.override { fonts = [ "FiraCode" ]; }) noto-fonts noto-fonts-emoji noto-fonts-lgc-plus ];
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -1,56 +0,0 @@
|
||||
top@{ inputs, ... }: {
|
||||
perSystem = perSystem@{ system, pkgs, ... }: {
|
||||
config.packages = {
|
||||
nvim = inputs.ide.nvim.${system}.standalone.default {
|
||||
plugins.lsp.servers = {
|
||||
bashls.enable = true;
|
||||
pylsp.enable = true;
|
||||
lua-ls.enable = true;
|
||||
};
|
||||
};
|
||||
bingwp = pkgs.writers.writeNuBin "bingwp" ''
|
||||
http get "https://pic.idimitrov.dev/latest.png" | save -f ([(xdg-user-dir PICTURES), "bg.png"] | str join "/")
|
||||
'';
|
||||
screenshot = pkgs.writers.writeNuBin "screenshot" ''
|
||||
let tmp_img = "/tmp/screen.png" | path join
|
||||
let ss_dir = ((xdg-user-dir PICTURES | str trim) | path join "ss")
|
||||
let pic_dir = ($ss_dir | path join (([(date now | format date "%Y-%m-%d_%H-%M-%S"), ".png"] | str join)))
|
||||
|
||||
mkdir $ss_dir
|
||||
|
||||
def copy_image [] {
|
||||
open $pic_dir | wl-copy
|
||||
}
|
||||
|
||||
def prepare_screen [] {
|
||||
let grim_id = pueue add -i -p grim $tmp_img
|
||||
let imv_id = pueue add -a $grim_id -p imv -f $tmp_img
|
||||
grim -g $"(slurp -b '#FFFFFF00' -c '#FF0000FF')" $pic_dir
|
||||
pueue kill $imv_id $grim_id
|
||||
pueue wait
|
||||
pueue remove $imv_id $grim_id
|
||||
}
|
||||
|
||||
def "main area" [] {
|
||||
prepare_screen
|
||||
copy_image
|
||||
}
|
||||
|
||||
def main [] {
|
||||
grim $pic_dir
|
||||
copy_image
|
||||
}
|
||||
'';
|
||||
cursors = pkgs.catppuccin-cursors.overrideAttrs (prev: rec {
|
||||
version = "0.3.1";
|
||||
nativeBuildInputs = prev.nativeBuildInputs ++ [ pkgs.xcur2png ];
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "catppuccin";
|
||||
repo = "cursors";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-CuzD6O/RImFKLWzJoiUv7nlIdoXNvwwl+k5mTeVIY10=";
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user