mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
acb7db87df | ||
|
|
0f5b7f60b6 | ||
|
|
d7264b0de1 | ||
|
|
23b518381a | ||
|
|
8876aae16c | ||
|
|
0ed5d1cf04 | ||
|
|
83decac5e9 | ||
|
|
9104494893 | ||
|
|
10d1a73eeb | ||
|
|
307c0b5edd |
@@ -1,8 +1,8 @@
|
||||
[//]: # (Title: Nixy)
|
||||
[//]: # (Description: Nixy is a Hyprland NixOS configuration with home-manager, secrets and custom theming all in one place. It's a simple way to manage your system configuration and dotfiles.)
|
||||
[//]: # (Author: Hadi)
|
||||
[//]: # (Date: 08/18/24)
|
||||
[//]: # (Version: v2.0.1)
|
||||
[//]: # (Date: 08/19/24)
|
||||
[//]: # (Version: v2.1.0)
|
||||
|
||||
<div align="center">
|
||||
<img src="https://raw.githubusercontent.com/anotherhadi/nixy/main/docs/src/logo.png" width="100px" />
|
||||
@@ -15,7 +15,7 @@
|
||||
<br>
|
||||
<div align="center">
|
||||
<a href="https://github.com/anotherhadi/nixy">
|
||||
<img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=Version&message=v2.0.1&colorA=181825&colorB=89b4fa&logo=githubactions&logoColor=89b4fa"/>
|
||||
<img src="https://img.shields.io/static/v1.svg?style=for-the-badge&label=Version&message=v2.1.0&colorA=181825&colorB=89b4fa&logo=githubactions&logoColor=89b4fa"/>
|
||||
</a>
|
||||
<a href="https://github.com/anotherhadi/nixy/stargazers">
|
||||
<img src="https://img.shields.io/github/stars/anotherhadi/nixy?color=89b4fa&labelColor=181825&style=for-the-badge&logo=starship&logoColor=89b4fa">
|
||||
@@ -54,7 +54,7 @@ It's a simple way to manage your system configuration and dotfiles.
|
||||
- 🏠 `home` are the dotfiles and configuration files for the users
|
||||
- 'programs' is a collection of apps configured with home-manager
|
||||
- 'scripts' is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
||||
- 'system' is some desktop environment like configuration
|
||||
- 'system' is some "desktop environment" configuration
|
||||
- 'wallpapers' are... wallpapers
|
||||
- 💻 `hosts` are the system configuration files
|
||||
- 'laptop' is my configuration for my laptop with Nvidia that you can copy
|
||||
|
||||
@@ -8,11 +8,12 @@ The laptop configuration is used by an Omen 16 laptop w/ nvidia and an amd gpu r
|
||||
The configurations files can be found in the `hosts/laptop` directory.
|
||||
|
||||
| Category | Name |
|
||||
|-----------------------------------------|----------------|
|
||||
| --------------------------------------- | -------------- |
|
||||
| WM | Hyprland |
|
||||
| | hyprlock |
|
||||
| | hyprpaper |
|
||||
| | hypridle |
|
||||
| | hyprcursor |
|
||||
| | wlogout |
|
||||
| Bar | waybar |
|
||||
| Terminal | kitty |
|
||||
@@ -49,7 +50,6 @@ I exposed some services to the internet using a reverse proxy (Nginx) and cloudf
|
||||
- Nextcloud
|
||||
- Vaultwarden
|
||||
- Adguard Home
|
||||
- Unifi Controler
|
||||
- Uptime Kuma
|
||||
- "Jackflix"
|
||||
- Jellyfin, Transmission, *arr
|
||||
|
||||
@@ -2,37 +2,37 @@
|
||||
|
||||
The list of the keybindings working on Hyprland:
|
||||
|
||||
| Description | Keybinding | Command |
|
||||
| --------------------------- | ---------------------- | ------------------------------------------------------------------ |
|
||||
| Switch Workspace | SUPER + {Number} | workspace {Number} |
|
||||
| Move app to Workspace | SUPER SHIFT + {Number} | movetoworkspace {Number} |
|
||||
| Kitty | SUPER + RETURN | exec \${pkgs.kitty}/bin/kitty |
|
||||
| Thunar | SUPER + E | exec \${pkgs.xfce.thunar}/bin/thunar |
|
||||
| Qutebrowser | SUPER + B | exec \${pkgs.qutebrowser}/bin/qutebrowser |
|
||||
| Bitwarden | SUPER + K | exec \${pkgs.bitwarden}/bin/bitwarden |
|
||||
| Peaclock | SUPER + C | exec \${pkgs.kitty}/bin/kitty --class peaclock peaclock |
|
||||
| Lock | SUPER + L | exec \${pkgs.hyprlock}/bin/hyprlock |
|
||||
| Powermenu | SUPER + X | exec powermenu |
|
||||
| Launcher | SUPER + SPACE | exec menu |
|
||||
| Close window | SUPER + Q | killactive |
|
||||
| Toggle Floating | SUPER + T | togglefloating |
|
||||
| Toggle Fullscreen | SUPER + F | fullscreen |
|
||||
| Move focus left | SUPER + left | movefocus l |
|
||||
| Move focus Right | SUPER + right | movefocus r |
|
||||
| Move focus Up | SUPER + up | movefocus u |
|
||||
| Move focus Down | SUPER + down | movefocus d |
|
||||
| Screenshot window | SUPER + PRINT | exec screenshot window |
|
||||
| Screenshot monitor | PRINT | exec screenshot monitor |
|
||||
| Screenshot region | SUPER SHIFT + PRINT | exec screenshot region |
|
||||
| Screenshot region then edit | ALT PRINT | exec screenshot region swappy |
|
||||
| Turn off night shift | SUPER + F2 | exec night-shift-off |
|
||||
| Turn on night shift | SUPER + F3 | exec night-shift-on |
|
||||
| Choose sound output | SUPER + F5 | exec \${pkgs.kitty}/bin/kitty --class floating zsh -c sound-output |
|
||||
| Move Window (mouse) | SUPER + mouse:272 | movewindow |
|
||||
| Resize Window (mouse) | SUPER + R | resizewindow |
|
||||
| Toggle Mute | XF86AudioMute | exec sound-toggle |
|
||||
| Lock when closing Lid | switch:Lid Switch | exec \${pkgs.hyprlock}/bin/hyprlock |
|
||||
| Sound Up | XF86AudioRaiseVolume | exec sound-up |
|
||||
| Sound Down | XF86AudioLowerVolume | exec sound-down |
|
||||
| Brightness Up | XF86MonBrightnessUp | exec brightness-up |
|
||||
| Brightness Down | XF86MonBrightnessDown | exec brightness-down |
|
||||
| Description | Keybinding |
|
||||
|-----------------------------|--------------------------|
|
||||
| Switch Workspace | SUPER + {Number} |
|
||||
| Move app to Workspace | SHIFT + SUPER + {Number} |
|
||||
| Kitty | SUPER + RETURN |
|
||||
| Thunar | SUPER + E |
|
||||
| Qutebrowser | SUPER + B |
|
||||
| Bitwarden | SUPER + K |
|
||||
| Peaclock | SUPER + C |
|
||||
| Lock | SUPER + L |
|
||||
| Powermenu | SUPER + X |
|
||||
| Launcher | SUPER + SPACE |
|
||||
| Close window | SUPER + Q |
|
||||
| Toggle Floating | SUPER + T |
|
||||
| Toggle Fullscreen | SUPER + F |
|
||||
| Move focus left | SUPER + left |
|
||||
| Move focus Right | SUPER + right |
|
||||
| Move focus Up | SUPER + up |
|
||||
| Move focus Down | SUPER + down |
|
||||
| Screenshot window | SUPER + PRINT |
|
||||
| Screenshot monitor | PRINT |
|
||||
| Screenshot region | SHIFT + SUPER + PRINT |
|
||||
| Screenshot region then edit | ALT PRINT |
|
||||
| Turn off night shift | SUPER + F2 |
|
||||
| Turn on night shift | SUPER + F3 |
|
||||
| Choose sound output | SUPER + F5 |
|
||||
| Move Window (mouse) | SUPER + mouse:272 |
|
||||
| Resize Window (mouse) | SUPER + R |
|
||||
| Toggle Mute | XF86AudioMute |
|
||||
| Lock when closing Lid | switch:Lid Switch |
|
||||
| Sound Up | XF86AudioRaiseVolume |
|
||||
| Sound Down | XF86AudioLowerVolume |
|
||||
| Brightness Up | XF86MonBrightnessUp |
|
||||
| Brightness Down | XF86MonBrightnessDown |
|
||||
|
||||
40
docs/TODO.md
40
docs/TODO.md
@@ -2,43 +2,33 @@
|
||||
|
||||
feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
|
||||
|
||||
- [ ] Jackflix V2
|
||||
- Backup Radarr, Prowlarr, Sonarr config
|
||||
|
||||
- [ ] Nixy
|
||||
- [~] Installation script ([install.sh](./scripts/install.sh) to test on a fresh install)
|
||||
- [~] Variables-template with defaults
|
||||
- [ ] Themes
|
||||
- [ ] macOS theme
|
||||
- [ ] Tofi (Wofi, but terminal based)
|
||||
|
||||
- [ ] Qutebrowser
|
||||
- [ ] !!! Bitwarden integration (I need this.)
|
||||
|
||||
- [ ] Hyprland
|
||||
- [-] Implement Hyprcursor (see home/system/hyprland/hyprcursor.nix: Not working, small cursor on some apps, big one on others)
|
||||
- [ ] Animations based on app name
|
||||
- [ ] Wofi: popin
|
||||
- [ ] Wlogout: fade in
|
||||
- [ ] Fix screenshots
|
||||
- [ ] Fix hyprlock
|
||||
- [ ] Hyprlock tty theme
|
||||
- [ ] Implement Hyprcursor
|
||||
echo "Compresing png files..."
|
||||
- [ ] wofi: popin
|
||||
- [ ] wlogout: fade in
|
||||
- [ ] Fix screenshots (screenshot region's border shows up in the screenshot, hyprshot jq error?)
|
||||
- [ ] Hyprlock themes
|
||||
- [ ] Hypridle fix: suspend not working?
|
||||
|
||||
- [ ] Nixvim
|
||||
- [ ] Keymaps:
|
||||
- Trouble
|
||||
- Tagbar
|
||||
- Tagbar (actually not working)
|
||||
- [ ] Disable background color for headlines.nvim for titles
|
||||
|
||||
- [ ] Backup system for some folders ($home/dev, $home/pictures, ...)
|
||||
- [ ] Exclude file pattern (nodes modules, ...)
|
||||
- [ ] Auto backup when a specific usb key is plugged
|
||||
- [ ] Pika backup?
|
||||
## Server
|
||||
|
||||
- [ ] Markdown to pdf tool
|
||||
|
||||
- [ ] Server
|
||||
- [ ] Bitcoin-git
|
||||
- [ ] ServerFetch: Neofetch like, but for server: CPU, RAM, Disk, Network, Uptime, status (check with uptime kuma API)
|
||||
- [ ] Server configuration is actually broken, need to update with the new modules
|
||||
- [ ] Jackflix V2
|
||||
- Backup Radarr, Prowlarr, Sonarr config
|
||||
- Take a look into buildarr
|
||||
- [ ] Bitcoin-git: to test
|
||||
- [ ] Ntfy auth file
|
||||
- [ ] Launch transmission-openvpn on boot (see hosts/server/modules/jackflix/transmission.nix)
|
||||
- [ ] Secrets mode 0444: not secure
|
||||
|
||||
@@ -28,8 +28,8 @@ Wallpapers can be found in the `/home/wallpapers` folder.
|
||||
| mountains.png |  |
|
||||
| nix.png |  |
|
||||
| problems.png |  |
|
||||
| sea2.png |  |
|
||||
| sea.png |  |
|
||||
| see.png |  |
|
||||
| space2.png |  |
|
||||
| space.png |  |
|
||||
| street.png |  |
|
||||
|
||||
@@ -7,14 +7,18 @@ echo "Current tag: $TAG"
|
||||
|
||||
read -rp "Enter the new tag name: " NEW_TAG
|
||||
|
||||
read -rp "Do you want to compress the png files? [y/N]: " COMPRESS_PNG
|
||||
if [[ "$COMPRESS_PNG" == "y" || "$COMPRESS_PNG" == "Y" ]]; then
|
||||
echo "Compresing png files..."
|
||||
bash ./docs/scripts/compress_png.sh
|
||||
fi
|
||||
|
||||
echo "Creating wallpapers preview..."
|
||||
bash ./docs/scripts/create_preview_wallpapers.sh
|
||||
echo "Creating README.md..."
|
||||
bash ./docs/scripts/create_readme.sh
|
||||
echo "Creating keybindings.md..."
|
||||
bash ./docs/scripts/create_keybindings.sh
|
||||
bash ./docs/scripts/keybindings_to_markdown.sh
|
||||
|
||||
git add .
|
||||
git commit -m "Release $NEW_TAG"
|
||||
|
||||
@@ -17,7 +17,7 @@ It's a simple way to manage your system configuration and dotfiles.
|
||||
- 🏠 `home` are the dotfiles and configuration files for the users
|
||||
- 'programs' is a collection of apps configured with home-manager
|
||||
- 'scripts' is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
||||
- 'system' is some desktop environment like configuration
|
||||
- 'system' is some "desktop environment" configuration
|
||||
- 'wallpapers' are... wallpapers
|
||||
- 💻 `hosts` are the system configuration files
|
||||
- 'laptop' is my configuration for my laptop with Nvidia that you can copy
|
||||
|
||||
97
flake.lock
generated
97
flake.lock
generated
@@ -92,6 +92,22 @@
|
||||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-compat_2": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
@@ -149,24 +165,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_3": {
|
||||
"inputs": {
|
||||
"systems": "systems_4"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1685518550,
|
||||
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
@@ -523,22 +521,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1686020360,
|
||||
"narHash": "sha256-Wee7lIlZ6DIZHHLiNxU5KdYZQl0iprENXa/czzI6Cj4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4729ffac6fd12e26e5a8de002781ffc49b0e94b7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
@@ -567,21 +549,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nurpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1724012881,
|
||||
"narHash": "sha256-lqn4UX+tvtwOmBZ2Dxh6euXKNcXGEYqPolEdjtONDVY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "8c7136cb22fd96cde881225863b450df75876ebc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
@@ -624,7 +591,6 @@
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixvim": "nixvim",
|
||||
"nurpkgs": "nurpkgs",
|
||||
"sops-nix": "sops-nix",
|
||||
"spicetify-nix": "spicetify-nix"
|
||||
}
|
||||
@@ -700,19 +666,21 @@
|
||||
},
|
||||
"spicetify-nix": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_3",
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"flake-compat": "flake-compat_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1704167711,
|
||||
"narHash": "sha256-kFDq+kf/Di/P8bq5sUP8pVwRkrSVrABksBjMPmLic3s=",
|
||||
"owner": "the-argus",
|
||||
"lastModified": 1723954588,
|
||||
"narHash": "sha256-ZTy0Cfv0WLmsZJnFw3OPefzpFogIZU196twuv2B4iLU=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"rev": "1325416f951d6a82cfddb1289864ad782e2b87c4",
|
||||
"rev": "e8c7709abf6fa96b42b8a175583703d6bad07f21",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "the-argus",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -762,21 +730,6 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_4": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
||||
21
flake.nix
21
flake.nix
@@ -16,13 +16,15 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
|
||||
spicetify-nix.url = "github:the-argus/spicetify-nix";
|
||||
spicetify-nix = {
|
||||
url = "github:Gerg-L/spicetify-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||
nurpkgs.url = "github:nix-community/NUR";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
};
|
||||
|
||||
@@ -32,19 +34,10 @@
|
||||
nixy = nixpkgs.lib.nixosSystem { # CHANGEME
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/laptop/configuration.nix # CHANGE ME
|
||||
inputs.nixos-hardware.nixosModules.omen-16-n0005ne # CHANGE ME
|
||||
{ _module.args = { inherit inputs; }; }
|
||||
inputs.nixos-hardware.nixosModules.omen-16-n0280nd # CHANGEME
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
{
|
||||
nixpkgs.overlays = [ inputs.nurpkgs.overlay ];
|
||||
_module.args = { inherit inputs; };
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users."hadi" = import ./hosts/laptop/home.nix; # CHANGE ME
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
};
|
||||
}
|
||||
./hosts/laptop/configuration.nix # CHANGEME
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
ga = "git add";
|
||||
gc = "git commit";
|
||||
gcm = "git commit -m";
|
||||
gcu = "git commit -am 'Update'";
|
||||
gcu = "git add . && git commit -m 'Update'";
|
||||
gp = "git push";
|
||||
gpl = "git pull";
|
||||
gs = "git status";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ pkgs, config, lib, inputs, ... }:
|
||||
let spicePkgs = inputs.spicetify-nix.packages.${pkgs.system}.default;
|
||||
let spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||
in {
|
||||
|
||||
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
|
||||
@@ -33,6 +33,7 @@ in {
|
||||
lastfm
|
||||
historyShortcut
|
||||
hidePodcasts
|
||||
adblock
|
||||
fullAppDisplay
|
||||
shuffle
|
||||
];
|
||||
|
||||
@@ -12,6 +12,5 @@
|
||||
./battery
|
||||
./compress
|
||||
./misc
|
||||
./tofi
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
# TODO: Broken - hypshot not working (jq error)
|
||||
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
||||
if [[ $2 == "swappy" ]];then
|
||||
folder="/tmp"
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
|
||||
tofi = pkgs.writeShellScriptBin "tofi" ''
|
||||
hyprexec="hyprctl dispatch exec"
|
||||
function exec() {
|
||||
$@
|
||||
}
|
||||
|
||||
function ui(){
|
||||
DEFAULT_ICON=""
|
||||
|
||||
# "icon;name;command"[]
|
||||
apps=(
|
||||
";Nixy;nixy"
|
||||
";Nerdfont FZF;nerdfont-fzf"
|
||||
";Brightness Up;brightness-up"
|
||||
";Brightness Down;brightness-down"
|
||||
";Sound Up;sound-up"
|
||||
";Sound Down;sound-down"
|
||||
";Sound Toggle Mute;sound-toggle"
|
||||
";Sound Change Output;sound-output"
|
||||
";Caffeine;caffeine"
|
||||
";Night Shift Toggle;night-shift-toggle"
|
||||
";Firefox;$hyprexec firefox"
|
||||
";Qutebrowser;$hyprexec qutebrowser"
|
||||
";Kitty;$hyprexec kitty"
|
||||
";Thunar;$hyprexec thunar"
|
||||
";Powermenu;powermenu"
|
||||
";Wofi;menu"
|
||||
";Lock;lock"
|
||||
";Bitwarden;$hyprexec bitwarden"
|
||||
";Clock; peaclock"
|
||||
";Nextcloud;$hyprexec nextcloud"
|
||||
";Spotify;$hyprexec spotify"
|
||||
";Btop;btop"
|
||||
";Cava;cava"
|
||||
";Discord;$hyprexec discord"
|
||||
";Vlc;$hyprexec vlc"
|
||||
";Obsidian;$hyprexec obsidian"
|
||||
)
|
||||
|
||||
# Apply default icons if empty:
|
||||
for i in "''${!apps[@]}"; do
|
||||
apps[i]=$(echo "''${apps[i]}" | sed 's/^;/'$DEFAULT_ICON';/')
|
||||
done
|
||||
|
||||
fzf_result=$(printf "%s\n" "''${apps[@]}" | awk -F ';' '{print $1" "$2}' | fzf)
|
||||
[[ -z $fzf_result ]] && exit 0
|
||||
fzf_result=''${fzf_result/ /;}
|
||||
line=$(printf "%s\n" "''${apps[@]}" | grep "$fzf_result")
|
||||
command=$(echo "$line" | sed 's/^[^;]*;//;s/^[^;]*;//')
|
||||
|
||||
exec "$command"
|
||||
exit 0
|
||||
}
|
||||
|
||||
ui
|
||||
'';
|
||||
|
||||
in { home.packages = [ tofi ]; }
|
||||
@@ -6,7 +6,9 @@
|
||||
home.packages = with pkgs; [
|
||||
hyprshot
|
||||
hyprpicker
|
||||
# hyprcursor
|
||||
swappy
|
||||
imv
|
||||
wf-recorder
|
||||
xdg-desktop-portal-hyprland
|
||||
wlr-randr
|
||||
wl-clipboard
|
||||
@@ -15,7 +17,6 @@
|
||||
wlsunset
|
||||
xwayland
|
||||
xdg-desktop-portal-gtk
|
||||
wlroots
|
||||
qt5ct
|
||||
libva
|
||||
dconf
|
||||
@@ -102,11 +103,13 @@
|
||||
];
|
||||
|
||||
env = [
|
||||
"LIBVA_DRIVER_NAME,nvidia"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"ANKI_WAYLAND,1"
|
||||
"DISABLE_QT5_COMPAT,0"
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"XDG_SESSION_TYPE,wayland"
|
||||
"GBM_BACKEND,nvidia-drm"
|
||||
"XDG_SESSION_DESKTOP,Hyprland"
|
||||
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
||||
"QT_QPA_PLATFORM=wayland,xcb"
|
||||
@@ -115,10 +118,6 @@
|
||||
"GTK_THEME,FlatColor:dark"
|
||||
"GTK2_RC_FILES,/home/hadi/.local/share/themes/FlatColor/gtk-2.0/gtkrc"
|
||||
"NVD_BACKEND,direct"
|
||||
#"WLR_DRM_DEVICES,$HOME/.config/hypr/card"
|
||||
# "HYPRCURSOR_THEME,macOS"
|
||||
# "HYPRCURSOR_SIZE,16"
|
||||
# "XCURSOR_SIZE,16"
|
||||
];
|
||||
|
||||
cursor = { no_hardware_cursors = true; };
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
timeout = 600;
|
||||
on-timeout = pkgs.hyprlock + "/bin/hyprlock";
|
||||
}
|
||||
# FIXME
|
||||
|
||||
# {
|
||||
# timeout = 660;
|
||||
# on-timeout = "systemctl suspend";
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
# package = inputs.waybar.packages."${pkgs.system}".waybar;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = config.var.theme.waybar.position;
|
||||
|
||||
@@ -1,160 +1,28 @@
|
||||
{ pkgs, config, ... }: {
|
||||
{ config, ... }: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../modules/fonts.nix
|
||||
../modules/nvidia.nix
|
||||
# ../modules/prime.nix
|
||||
../modules/zsh.nix
|
||||
../modules/tuigreet.nix
|
||||
../modules/auto-upgrade.nix
|
||||
../modules/timezone.nix
|
||||
../modules/usb.nix
|
||||
../modules/systemd-boot.nix
|
||||
../modules/users.nix
|
||||
../modules/audio.nix
|
||||
../modules/bluetooth.nix
|
||||
../modules/tailscale.nix
|
||||
../modules/nix.nix
|
||||
../modules/network-manager.nix
|
||||
../modules/home-manager.nix
|
||||
../modules/utils.nix
|
||||
|
||||
./hardware-configuration.nix
|
||||
./variables.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot = {
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
tmp.cleanOnBoot = true;
|
||||
kernelPackages =
|
||||
pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc.
|
||||
};
|
||||
|
||||
# Networking
|
||||
networking.networkmanager.enable = true;
|
||||
networking.hostName = config.var.hostname;
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
# Timezone and locale
|
||||
time.timeZone = config.var.timeZone;
|
||||
i18n.defaultLocale = config.var.defaultLocale;
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = config.var.extraLocale;
|
||||
LC_IDENTIFICATION = config.var.extraLocale;
|
||||
LC_MEASUREMENT = config.var.extraLocale;
|
||||
LC_MONETARY = config.var.extraLocale;
|
||||
LC_NAME = config.var.extraLocale;
|
||||
LC_NUMERIC = config.var.extraLocale;
|
||||
LC_PAPER = config.var.extraLocale;
|
||||
LC_TELEPHONE = config.var.extraLocale;
|
||||
LC_TIME = config.var.extraLocale;
|
||||
};
|
||||
|
||||
# Users
|
||||
users.users.${config.var.username} = {
|
||||
isNormalUser = true;
|
||||
description = "${config.var.username} account";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
|
||||
services = {
|
||||
tailscale.enable = config.var.tailscale;
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb.layout = config.var.keyboardLayout;
|
||||
xkb.variant = "";
|
||||
};
|
||||
blueman.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
console.keyMap = config.var.keyboardLayout;
|
||||
|
||||
# Shell
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
loginShellInit = ''
|
||||
dbus-update-activation-environment --systemd DISPLAY
|
||||
'';
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
# Set environment variables
|
||||
environment.variables = {
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
EDITOR = "nvim";
|
||||
ANKI_WAYLAND = "1";
|
||||
DISABLE_QT5_COMPAT = "0";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
"10-disable-camera" = {
|
||||
"wireplumber.profiles" = { main."monitor.libcamera" = "disabled"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
warn-dirty = false
|
||||
'';
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
gc = if config.var.autoGarbageCollector then {
|
||||
automatic = true;
|
||||
persistent = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
} else
|
||||
{ };
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
environment.systemPackages = with pkgs; [ networkmanagerapplet ];
|
||||
nixpkgs.config.permittedInsecurePackages = [ "electron-25.9.0" ];
|
||||
|
||||
system.autoUpgrade = if config.var.autoUpgrade then {
|
||||
enable = true;
|
||||
dates = "04:00";
|
||||
flake = "${config.var.configDirectory}";
|
||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||
allowReboot = false;
|
||||
} else
|
||||
{ };
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
configPackages = with pkgs; [ xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
services.libinput.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# Faster rebuilding
|
||||
documentation = {
|
||||
enable = true;
|
||||
doc.enable = false;
|
||||
man.enable = true;
|
||||
dev.enable = false;
|
||||
};
|
||||
|
||||
services.dbus.enable = true;
|
||||
home-manager.users."${config.var.username}" = import ./home.nix;
|
||||
|
||||
# Don't touch this
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
../../home/programs/nextcloud
|
||||
../../home/programs/nvim
|
||||
../../home/programs/qutebrowser
|
||||
# ../../home/programs/spicetify # TODO: Fix
|
||||
../../home/programs/zathura
|
||||
../../home/programs/spicetify
|
||||
../../home/programs/shell
|
||||
../../home/programs/fetch
|
||||
../../home/programs/lf
|
||||
@@ -24,6 +23,7 @@
|
||||
# System (Desktop environment like stuff)
|
||||
../../home/system/dunst
|
||||
../../home/system/gtk
|
||||
../../home/system/zathura
|
||||
../../home/system/hyprland
|
||||
../../home/system/waybar
|
||||
../../home/system/wlogout
|
||||
@@ -39,10 +39,7 @@
|
||||
inherit (config.var) homeDirectory;
|
||||
|
||||
packages = with pkgs; [
|
||||
swappy
|
||||
imv
|
||||
discord
|
||||
obsidian
|
||||
xfce.thunar
|
||||
bitwarden
|
||||
vlc
|
||||
@@ -55,32 +52,16 @@
|
||||
nodejs
|
||||
python3
|
||||
jq
|
||||
git-ignore
|
||||
nurl
|
||||
prefetch-npm-deps
|
||||
figlet
|
||||
|
||||
# Infosec
|
||||
exegol
|
||||
|
||||
# Utils
|
||||
fd
|
||||
bc
|
||||
gcc
|
||||
blueman
|
||||
zip
|
||||
unzip
|
||||
xdg_utils
|
||||
wget
|
||||
curl
|
||||
wf-recorder
|
||||
glow
|
||||
nwg-displays
|
||||
wireguard-tools
|
||||
bitwarden-cli
|
||||
optipng
|
||||
pfetch
|
||||
usbutils
|
||||
pandoc
|
||||
|
||||
# Just cool
|
||||
@@ -91,7 +72,6 @@
|
||||
|
||||
# Backup
|
||||
vscode
|
||||
tor-browser
|
||||
firefox
|
||||
neovide
|
||||
];
|
||||
@@ -102,6 +82,7 @@
|
||||
source = ../../home/wallpapers;
|
||||
};
|
||||
|
||||
# Don't touch this
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ./laptop.yaml;
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
secrets = {
|
||||
sshconfig = { path = "/home/hadi/.ssh/config"; };
|
||||
github-key = { path = "/home/hadi/.ssh/github"; };
|
||||
|
||||
@@ -18,16 +18,24 @@
|
||||
email = "112569860+anotherhadi@users.noreply.github.com";
|
||||
};
|
||||
|
||||
stateVersion = "24.05";
|
||||
|
||||
autoUpgrade = false;
|
||||
autoGarbageCollector = false;
|
||||
|
||||
# SOPS
|
||||
# Sops is a tool to store secrets in git repositories encrypted with GPG.
|
||||
# change the sops configuration if you want to enable that:
|
||||
sops = true;
|
||||
# change the nvim's obsidian configuration if you want to enable that:
|
||||
obsidian = true;
|
||||
|
||||
# Enable tailscale
|
||||
tailscale = true;
|
||||
|
||||
# USBGuard
|
||||
# If usbguard enabled: set yours pref USB devices (change {id} to your trusted USB device), use `lsusb` command (from usbutils package) to get list
|
||||
# of all connected USB devices including integrated devices like camera, bluetooth, wifi, etc. with their IDs or just disable `usbguard`
|
||||
# allow id {id} # device 1...
|
||||
usbguard = false;
|
||||
usbguardRules = "";
|
||||
|
||||
theme = import ../themes/nixy.nix; # select your theme here
|
||||
};
|
||||
}
|
||||
|
||||
20
hosts/modules/audio.nix
Normal file
20
hosts/modules/audio.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
security.rtkit.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
"10-disable-camera" = {
|
||||
"wireplumber.profiles" = { main."monitor.libcamera" = "disabled"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
9
hosts/modules/auto-upgrade.nix
Normal file
9
hosts/modules/auto-upgrade.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ config, ... }: {
|
||||
system.autoUpgrade = {
|
||||
enable = config.var.autoUpgrade;
|
||||
dates = "04:00";
|
||||
flake = "${config.var.configDirectory}";
|
||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
||||
allowReboot = false;
|
||||
};
|
||||
}
|
||||
9
hosts/modules/bluetooth.nix
Normal file
9
hosts/modules/bluetooth.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }: {
|
||||
environment.systemPackages = with pkgs; [ blueman ];
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
@@ -28,7 +28,6 @@
|
||||
|
||||
enableDefaultPackages = false;
|
||||
|
||||
# this fixes emoji stuff
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
monospace = [ "FiraCode Nerd Font Mono" "Noto Color Emoji" ];
|
||||
@@ -37,6 +36,5 @@
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
7
hosts/modules/home-manager.nix
Normal file
7
hosts/modules/home-manager.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ inputs, ... }: {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
};
|
||||
}
|
||||
6
hosts/modules/network-manager.nix
Normal file
6
hosts/modules/network-manager.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ pkgs, ... }: {
|
||||
networking.networkmanager.enable = true;
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
environment.systemPackages = with pkgs; [ networkmanagerapplet ];
|
||||
}
|
||||
22
hosts/modules/nix.nix
Normal file
22
hosts/modules/nix.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ config, ... }: {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
warn-dirty = false
|
||||
'';
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
gc = {
|
||||
automatic = config.var.autoGarbageCollector;
|
||||
persistent = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{ lib, pkgs, config, ... }:
|
||||
let
|
||||
nvidiaDriverChannel =
|
||||
config.boot.kernelPackages.nvidiaPackages.beta; # stable, latest, etc.
|
||||
config.boot.kernelPackages.nvidiaPackages.beta; # stable, latest, beta, etc.
|
||||
in {
|
||||
# Load nvidia driver for Xorg and Wayland
|
||||
services.xserver.videoDrivers =
|
||||
@@ -14,7 +14,6 @@ in {
|
||||
];
|
||||
environment.variables = {
|
||||
GBM_BACKEND = "nvidia-drm";
|
||||
WLR_NO_HARDWARE_CURSORS = "1";
|
||||
LIBVA_DRIVER_NAME = "nvidia"; # hardware acceleration
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
};
|
||||
|
||||
12
hosts/modules/systemd-boot.nix
Normal file
12
hosts/modules/systemd-boot.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }: {
|
||||
boot = {
|
||||
loader.efi.canTouchEfiVariables = true;
|
||||
loader.systemd-boot = {
|
||||
enable = true;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
tmp.cleanOnBoot = true;
|
||||
kernelPackages =
|
||||
pkgs.linuxPackages_latest; # _zen, _hardened, _rt, _rt_latest, etc.
|
||||
};
|
||||
}
|
||||
1
hosts/modules/tailscale.nix
Normal file
1
hosts/modules/tailscale.nix
Normal file
@@ -0,0 +1 @@
|
||||
{ config, ... }: { services.tailscale.enable = config.var.tailscale; }
|
||||
15
hosts/modules/timezone.nix
Normal file
15
hosts/modules/timezone.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{ config, ... }: {
|
||||
time.timeZone = config.var.timeZone;
|
||||
i18n.defaultLocale = config.var.defaultLocale;
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = config.var.extraLocale;
|
||||
LC_IDENTIFICATION = config.var.extraLocale;
|
||||
LC_MEASUREMENT = config.var.extraLocale;
|
||||
LC_MONETARY = config.var.extraLocale;
|
||||
LC_NAME = config.var.extraLocale;
|
||||
LC_NUMERIC = config.var.extraLocale;
|
||||
LC_PAPER = config.var.extraLocale;
|
||||
LC_TELEPHONE = config.var.extraLocale;
|
||||
LC_TIME = config.var.extraLocale;
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
# USB Automounting
|
||||
@@ -7,16 +7,12 @@
|
||||
# services.devmon.enable = true;
|
||||
|
||||
# Enable USB Guard
|
||||
# services.usbguard = {
|
||||
# enable = true;
|
||||
# dbus.enable = true;
|
||||
# implicitPolicyTarget = "block";
|
||||
# # FIXME: set yours pref USB devices (change {id} to your trusted USB device), use `lsusb` command (from usbutils package) to get list of all connected USB devices including integrated devices like camera, bluetooth, wifi, etc. with their IDs or just disable `usbguard`
|
||||
# rules = ''
|
||||
# allow id {id} # device 1
|
||||
# allow id {id} # device 2
|
||||
# '';
|
||||
# };
|
||||
services.usbguard = {
|
||||
enable = config.var.usbguard;
|
||||
dbus.enable = true;
|
||||
implicitPolicyTarget = "block";
|
||||
rules = config.var.usbguardRules;
|
||||
};
|
||||
|
||||
# Enable USB-specific packages
|
||||
environment.systemPackages = with pkgs; [ usbutils ];
|
||||
|
||||
10
hosts/modules/users.nix
Normal file
10
hosts/modules/users.nix
Normal file
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }: {
|
||||
users = {
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users.${config.var.username} = {
|
||||
isNormalUser = true;
|
||||
description = "${config.var.username} account";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
42
hosts/modules/utils.nix
Normal file
42
hosts/modules/utils.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{ pkgs, config, ... }: {
|
||||
|
||||
networking.hostName = config.var.hostname;
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb.layout = config.var.keyboardLayout;
|
||||
xkb.variant = "";
|
||||
};
|
||||
gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
console.keyMap = config.var.keyboardLayout;
|
||||
|
||||
environment.variables = {
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
services.libinput.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
services.dbus.enable = true;
|
||||
|
||||
# Faster rebuilding
|
||||
documentation = {
|
||||
enable = true;
|
||||
doc.enable = false;
|
||||
man.enable = true;
|
||||
dev.enable = false;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
fd
|
||||
bc
|
||||
gcc
|
||||
git-ignore
|
||||
xdg-utils
|
||||
wget
|
||||
curl
|
||||
];
|
||||
}
|
||||
@@ -1,167 +0,0 @@
|
||||
{ lib, ... }: {
|
||||
options = {
|
||||
var = {
|
||||
hostname = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "nixy";
|
||||
description = "Hostname";
|
||||
};
|
||||
username = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "user";
|
||||
description = "Username";
|
||||
};
|
||||
homeDirectory = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "/home/user";
|
||||
description = "Home directory (/home/user)";
|
||||
};
|
||||
configDirectory = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "/home/user/.config/nixos";
|
||||
description = "NixOS config directory (/home/user/.config/nixos)";
|
||||
};
|
||||
keyboardLayout = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "en";
|
||||
description = "Keyboard layout (en/fr/...)";
|
||||
};
|
||||
timeZone = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "America/New_York";
|
||||
description = "Time Zone";
|
||||
};
|
||||
defaultLocale = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "en_US.UTF-8";
|
||||
description = "Default Locale";
|
||||
};
|
||||
extraLocale = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "fr_FR.UTF-8";
|
||||
description = "Extra Locale";
|
||||
};
|
||||
stateVersion = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "24.05";
|
||||
description = "State Version: Shouldn't be changed once set.";
|
||||
};
|
||||
autoUpgrade = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable auto upgrades";
|
||||
};
|
||||
autoGarbageCollector = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable garbage collector";
|
||||
};
|
||||
sops = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description =
|
||||
"Enable sops (You should set up sops for your own config)";
|
||||
};
|
||||
obsidian = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description =
|
||||
"Enable obsidian.nvim (You should set up obsidian.nvim for your own config)";
|
||||
};
|
||||
tailscale = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Enable tailscale";
|
||||
};
|
||||
git = {
|
||||
username = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "user";
|
||||
description = "Git Username";
|
||||
};
|
||||
email = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "youremail@gmail.com";
|
||||
description = "Git Email";
|
||||
};
|
||||
};
|
||||
theme = {
|
||||
wallpaper = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "magma.png";
|
||||
description = "Wallpaper (Should be in /home/$USER/wallpapers)";
|
||||
};
|
||||
font = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "SFProDisplay Nerd Font";
|
||||
description = "Font";
|
||||
};
|
||||
font-mono = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "FiraCode Nerd Font Mono";
|
||||
description = "Monospace Font";
|
||||
};
|
||||
font-size = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 14;
|
||||
description = "Font Size";
|
||||
};
|
||||
rounding = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 8;
|
||||
description = "Border radius";
|
||||
};
|
||||
gaps-in = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 8;
|
||||
description = "Gaps In";
|
||||
};
|
||||
gaps-out = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 16;
|
||||
description = "Gaps Out";
|
||||
};
|
||||
border-size = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 2;
|
||||
description = "Border Size";
|
||||
};
|
||||
animation-speed = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "medium";
|
||||
description = "Animation Speed (slow/medium/fast)";
|
||||
};
|
||||
fetch = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "neofetch";
|
||||
description = "Fetch (neofetch/nerdfetch/pfetch/none)";
|
||||
};
|
||||
waybar = {
|
||||
transparent = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Transparent Bar";
|
||||
};
|
||||
float = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = true;
|
||||
description = "Floating Bar";
|
||||
};
|
||||
position = lib.mkOption {
|
||||
type = lib.types.string;
|
||||
default = "top";
|
||||
description = "Bar's Position";
|
||||
};
|
||||
font-size = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 16;
|
||||
description = "Waybar text font size";
|
||||
};
|
||||
};
|
||||
colors = {
|
||||
# TODO
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
8
hosts/modules/zsh.nix
Normal file
8
hosts/modules/zsh.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
loginShellInit = ''
|
||||
dbus-update-activation-environment --systemd DISPLAY
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -9,7 +9,6 @@
|
||||
./modules/internal/openssh.nix
|
||||
./modules/internal/adguard.nix
|
||||
./modules/internal/cockpit.nix
|
||||
# ./modules/internal/unifi.nix # FIXME: unifi5 is deprecated
|
||||
|
||||
# exposed
|
||||
./modules/exposed/ntfy-sh.nix
|
||||
@@ -19,7 +18,6 @@
|
||||
./modules/exposed/nginx.nix
|
||||
./modules/exposed/nextcloud.nix
|
||||
./modules/exposed/vaultwarden.nix
|
||||
# ./modules/exposed/bitcoin-git.nix # FIXME: bitcoin-git is deprecated
|
||||
./modules/www
|
||||
|
||||
# jackflix
|
||||
|
||||
@@ -1,15 +1,6 @@
|
||||
{ pkgs, ... }: {
|
||||
systemd.timers."bitcoin-git" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
Unit = "bitcoin-git.service";
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."bitcoin-git" = {
|
||||
script = ''
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
bitcoin-price = pkgs.writeShellScriptBin "bitcoin-price" ''
|
||||
[ ! -d "/home/hadi/btcprice" ] && ${pkgs.git}/bin/git clone git@github.com:anotherhadi/btcprice /home/hadi/btcprice
|
||||
cd "/home/hadi/btcprice"
|
||||
price=$(${pkgs.curl}/bin/curl eur.rate.sx/1BTC)
|
||||
@@ -21,6 +12,20 @@
|
||||
${pkgs.git}/bin/git add .
|
||||
${pkgs.git}/bin/git commit -m "Update price (hadi)"
|
||||
${pkgs.git}/bin/git push -u origin main
|
||||
'';
|
||||
in {
|
||||
systemd.timers."bitcoin-git" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
Unit = "bitcoin-git.service";
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."bitcoin-git" = {
|
||||
script = ''
|
||||
${bitcoin-price}
|
||||
exit 0
|
||||
'';
|
||||
serviceConfig = {
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
# unifi controller service
|
||||
{
|
||||
services.unifi = {
|
||||
enable = true;
|
||||
openFirewall = true; # 8443(webui) and other port use by AP
|
||||
};
|
||||
}
|
||||
@@ -17,7 +17,6 @@
|
||||
# haugene/transmission-openvpn
|
||||
# '';
|
||||
# };
|
||||
# TODO: launch the container at boot
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ 9091 ];
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
sops = {
|
||||
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = ./server.yaml;
|
||||
defaultSopsFile = ./secrets.yaml;
|
||||
defaultSopsFormat = "yaml";
|
||||
secrets = {
|
||||
sshconfig = {
|
||||
@@ -14,15 +14,15 @@
|
||||
owner = "hadi";
|
||||
};
|
||||
nextcloud-adminpass = {
|
||||
mode = "0444"; # FIXME
|
||||
mode = "0444";
|
||||
path = "/etc/nextcloud/adminpassFile";
|
||||
};
|
||||
cloudflare-apitoken = {
|
||||
mode = "0444"; # FIXME
|
||||
mode = "0444";
|
||||
path = "/etc/cloudflare/apiToken";
|
||||
};
|
||||
tailscaled-authKey = {
|
||||
mode = "0444"; # FIXME
|
||||
mode = "0444";
|
||||
path = "/etc/tailscale/authKey";
|
||||
};
|
||||
transmission-script = {
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
{
|
||||
wallpaper = "dark.png";
|
||||
|
||||
font = "SFProDisplay Nerd Font";
|
||||
font-mono = "FiraCode Nerd Font Mono";
|
||||
font-size = 14;
|
||||
|
||||
rounding = 15;
|
||||
gaps-in = 10;
|
||||
gaps-out = 10 * 2;
|
||||
border-size = 3;
|
||||
animation-speed = "fast"; # "fast" | "medium" | "slow"
|
||||
fetch = "nerdfetch"; # "nerdfetch" | "neofetch" | "pfetch" | "none"
|
||||
|
||||
waybar = {
|
||||
transparent = true;
|
||||
float = true;
|
||||
position = "top";
|
||||
font-size = 15;
|
||||
};
|
||||
|
||||
colors = {
|
||||
c0 = "1e1e2e"; # black
|
||||
c1 = "dea2bd"; # red
|
||||
c2 = "a6e3a1"; # green
|
||||
c3 = "fab387"; # yellow
|
||||
c4 = "89b4fa"; # blue
|
||||
c5 = "A594FD"; # magenta
|
||||
c6 = "74c7ec"; # cyan
|
||||
c7 = "cdd6f4"; # white
|
||||
c8 = "313244"; # bright black
|
||||
c9 = "dea2bd"; # bright red
|
||||
c10 = "94e2d5"; # bright green
|
||||
c11 = "f9e2af"; # bright yellow
|
||||
c12 = "b4befe"; # bright blue
|
||||
c13 = "f5c2e7"; # bright magenta
|
||||
c14 = "94e2d5"; # bright cyan
|
||||
c15 = "bac2de"; # bright white
|
||||
|
||||
bg = "0B0B0B";
|
||||
fg = "EAF0F5";
|
||||
bgalt = "121212";
|
||||
fgalt = "EAF0F5";
|
||||
|
||||
accent = "dea2bd";
|
||||
accentFg = "0B0B0B";
|
||||
|
||||
# Should make those automtic
|
||||
accentName = "red";
|
||||
accentNumber = "9";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user