Release v2.2.0
This commit is contained in:
parent
caaa500232
commit
e6f66110f0
@ -1,8 +1,8 @@
|
|||||||
[//]: # (Title: Nixy)
|
[//]: # (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.)
|
[//]: # (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)
|
[//]: # (Author: Hadi)
|
||||||
[//]: # (Date: 08/18/24)
|
[//]: # (Date: 08/19/24)
|
||||||
[//]: # (Version: v2.0.1)
|
[//]: # (Version: v2.1.0)
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<img src="https://raw.githubusercontent.com/anotherhadi/nixy/main/docs/src/logo.png" width="100px" />
|
<img src="https://raw.githubusercontent.com/anotherhadi/nixy/main/docs/src/logo.png" width="100px" />
|
||||||
@ -15,7 +15,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://github.com/anotherhadi/nixy">
|
<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>
|
||||||
<a href="https://github.com/anotherhadi/nixy/stargazers">
|
<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">
|
<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
|
- 🏠 `home` are the dotfiles and configuration files for the users
|
||||||
- 'programs' is a collection of apps configured with home-manager
|
- 'programs' is a collection of apps configured with home-manager
|
||||||
- 'scripts' is a folder full of bash scripts (see [SCRIPTS.md](docs/SCRIPTS.md))
|
- '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
|
- 'wallpapers' are... wallpapers
|
||||||
- 💻 `hosts` are the system configuration files
|
- 💻 `hosts` are the system configuration files
|
||||||
- 'laptop' is my configuration for my laptop with Nvidia that you can copy
|
- 'laptop' is my configuration for my laptop with Nvidia that you can copy
|
||||||
|
@ -2,37 +2,37 @@
|
|||||||
|
|
||||||
The list of the keybindings working on Hyprland:
|
The list of the keybindings working on Hyprland:
|
||||||
|
|
||||||
| Description | Keybinding | Command |
|
| Description | Keybinding |
|
||||||
| --------------------------- | ---------------------- | ------------------------------------------------------------------ |
|
|-----------------------------|--------------------------|
|
||||||
| Switch Workspace | SUPER + {Number} | workspace {Number} |
|
| Switch Workspace | SUPER + {Number} |
|
||||||
| Move app to Workspace | SUPER SHIFT + {Number} | movetoworkspace {Number} |
|
| Move app to Workspace | SHIFT + SUPER + {Number} |
|
||||||
| Kitty | SUPER + RETURN | exec \${pkgs.kitty}/bin/kitty |
|
| Kitty | SUPER + RETURN |
|
||||||
| Thunar | SUPER + E | exec \${pkgs.xfce.thunar}/bin/thunar |
|
| Thunar | SUPER + E |
|
||||||
| Qutebrowser | SUPER + B | exec \${pkgs.qutebrowser}/bin/qutebrowser |
|
| Qutebrowser | SUPER + B |
|
||||||
| Bitwarden | SUPER + K | exec \${pkgs.bitwarden}/bin/bitwarden |
|
| Bitwarden | SUPER + K |
|
||||||
| Peaclock | SUPER + C | exec \${pkgs.kitty}/bin/kitty --class peaclock peaclock |
|
| Peaclock | SUPER + C |
|
||||||
| Lock | SUPER + L | exec \${pkgs.hyprlock}/bin/hyprlock |
|
| Lock | SUPER + L |
|
||||||
| Powermenu | SUPER + X | exec powermenu |
|
| Powermenu | SUPER + X |
|
||||||
| Launcher | SUPER + SPACE | exec menu |
|
| Launcher | SUPER + SPACE |
|
||||||
| Close window | SUPER + Q | killactive |
|
| Close window | SUPER + Q |
|
||||||
| Toggle Floating | SUPER + T | togglefloating |
|
| Toggle Floating | SUPER + T |
|
||||||
| Toggle Fullscreen | SUPER + F | fullscreen |
|
| Toggle Fullscreen | SUPER + F |
|
||||||
| Move focus left | SUPER + left | movefocus l |
|
| Move focus left | SUPER + left |
|
||||||
| Move focus Right | SUPER + right | movefocus r |
|
| Move focus Right | SUPER + right |
|
||||||
| Move focus Up | SUPER + up | movefocus u |
|
| Move focus Up | SUPER + up |
|
||||||
| Move focus Down | SUPER + down | movefocus d |
|
| Move focus Down | SUPER + down |
|
||||||
| Screenshot window | SUPER + PRINT | exec screenshot window |
|
| Screenshot window | SUPER + PRINT |
|
||||||
| Screenshot monitor | PRINT | exec screenshot monitor |
|
| Screenshot monitor | PRINT |
|
||||||
| Screenshot region | SUPER SHIFT + PRINT | exec screenshot region |
|
| Screenshot region | SHIFT + SUPER + PRINT |
|
||||||
| Screenshot region then edit | ALT PRINT | exec screenshot region swappy |
|
| Screenshot region then edit | ALT PRINT |
|
||||||
| Turn off night shift | SUPER + F2 | exec night-shift-off |
|
| Turn off night shift | SUPER + F2 |
|
||||||
| Turn on night shift | SUPER + F3 | exec night-shift-on |
|
| Turn on night shift | SUPER + F3 |
|
||||||
| Choose sound output | SUPER + F5 | exec \${pkgs.kitty}/bin/kitty --class floating zsh -c sound-output |
|
| Choose sound output | SUPER + F5 |
|
||||||
| Move Window (mouse) | SUPER + mouse:272 | movewindow |
|
| Move Window (mouse) | SUPER + mouse:272 |
|
||||||
| Resize Window (mouse) | SUPER + R | resizewindow |
|
| Resize Window (mouse) | SUPER + R |
|
||||||
| Toggle Mute | XF86AudioMute | exec sound-toggle |
|
| Toggle Mute | XF86AudioMute |
|
||||||
| Lock when closing Lid | switch:Lid Switch | exec \${pkgs.hyprlock}/bin/hyprlock |
|
| Lock when closing Lid | switch:Lid Switch |
|
||||||
| Sound Up | XF86AudioRaiseVolume | exec sound-up |
|
| Sound Up | XF86AudioRaiseVolume |
|
||||||
| Sound Down | XF86AudioLowerVolume | exec sound-down |
|
| Sound Down | XF86AudioLowerVolume |
|
||||||
| Brightness Up | XF86MonBrightnessUp | exec brightness-up |
|
| Brightness Up | XF86MonBrightnessUp |
|
||||||
| Brightness Down | XF86MonBrightnessDown | exec brightness-down |
|
| Brightness Down | XF86MonBrightnessDown |
|
||||||
|
16
docs/TODO.md
16
docs/TODO.md
@ -10,21 +10,25 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
|
|||||||
|
|
||||||
- [ ] Hyprland
|
- [ ] Hyprland
|
||||||
- [ ] Implement Hyprcursor
|
- [ ] Implement Hyprcursor
|
||||||
- [ ] Animations based on app name
|
echo "Compresing png files..."
|
||||||
- [ ] Wofi: popin
|
- [ ] wofi: popin
|
||||||
- [ ] Wlogout: fade in
|
- [ ] wlogout: fade in
|
||||||
- [ ] Fix screenshots (screenshot region's border shows up in the screenshot)
|
- [ ] Fix screenshots (screenshot region's border shows up in the screenshot, hyprshot jq error?)
|
||||||
- [ ] Hyprlock themes
|
- [ ] Hyprlock themes
|
||||||
|
- [ ] Hypridle fix: suspend not working?
|
||||||
|
|
||||||
- [ ] Nixvim
|
- [ ] Nixvim
|
||||||
- [ ] Keymaps:
|
- [ ] Keymaps:
|
||||||
- Trouble
|
- Trouble
|
||||||
- Tagbar
|
- Tagbar (actually not working)
|
||||||
- [ ] Disable background color for headlines.nvim for titles
|
- [ ] Disable background color for headlines.nvim for titles
|
||||||
|
|
||||||
## Server
|
## Server
|
||||||
|
|
||||||
|
- [ ] Server configuration is actually broken, need to update with the new modules
|
||||||
- [ ] Jackflix V2
|
- [ ] Jackflix V2
|
||||||
- Backup Radarr, Prowlarr, Sonarr config
|
- Backup Radarr, Prowlarr, Sonarr config
|
||||||
- [ ] Bitcoin-git
|
- Take a look into buildarr
|
||||||
|
- [ ] Bitcoin-git: to test
|
||||||
- [ ] Ntfy auth file
|
- [ ] Ntfy auth file
|
||||||
|
- [ ] Secrets mode 0444: not secure
|
||||||
|
@ -7,8 +7,12 @@ echo "Current tag: $TAG"
|
|||||||
|
|
||||||
read -rp "Enter the new tag name: " NEW_TAG
|
read -rp "Enter the new tag name: " NEW_TAG
|
||||||
|
|
||||||
echo "Compresing png files..."
|
read -rp "Do you want to compress the png files? [y/N]: " COMPRESS_PNG
|
||||||
bash ./docs/scripts/compress_png.sh
|
if [[ "$COMPRESS_PNG" == "y" || "$COMPRESS_PNG" == "Y" ]]; then
|
||||||
|
echo "Compresing png files..."
|
||||||
|
bash ./docs/scripts/compress_png.sh
|
||||||
|
fi
|
||||||
|
|
||||||
echo "Creating wallpapers preview..."
|
echo "Creating wallpapers preview..."
|
||||||
bash ./docs/scripts/create_preview_wallpapers.sh
|
bash ./docs/scripts/create_preview_wallpapers.sh
|
||||||
echo "Creating README.md..."
|
echo "Creating README.md..."
|
||||||
|
16
flake.lock
16
flake.lock
@ -549,21 +549,6 @@
|
|||||||
"type": "github"
|
"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": {
|
"nuschtosSearch": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils_2",
|
||||||
@ -606,7 +591,6 @@
|
|||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"nurpkgs": "nurpkgs",
|
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"spicetify-nix": "spicetify-nix"
|
"spicetify-nix": "spicetify-nix"
|
||||||
}
|
}
|
||||||
|
14
flake.nix
14
flake.nix
@ -25,7 +25,6 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||||
nurpkgs.url = "github:nix-community/NUR"; # TODO: test to remove
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -35,19 +34,10 @@
|
|||||||
nixy = nixpkgs.lib.nixosSystem { # CHANGEME
|
nixy = nixpkgs.lib.nixosSystem { # CHANGEME
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/laptop/configuration.nix # CHANGEME
|
{ _module.args = { inherit inputs; }; }
|
||||||
inputs.nixos-hardware.nixosModules.omen-16-n0280nd # CHANGEME
|
inputs.nixos-hardware.nixosModules.omen-16-n0280nd # CHANGEME
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
{
|
./hosts/laptop/configuration.nix # CHANGEME
|
||||||
nixpkgs.overlays = [ inputs.nurpkgs.overlay ];
|
|
||||||
_module.args = { inherit inputs; };
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
users."hadi" = import ./hosts/laptop/home.nix; # CHANGEME
|
|
||||||
extraSpecialArgs = { inherit inputs; };
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# TODO: Broken - hypshot not working (jq error)
|
|
||||||
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
screenshot = pkgs.writeShellScriptBin "screenshot" ''
|
||||||
if [[ $2 == "swappy" ]];then
|
if [[ $2 == "swappy" ]];then
|
||||||
folder="/tmp"
|
folder="/tmp"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
timeout = 600;
|
timeout = 600;
|
||||||
on-timeout = pkgs.hyprlock + "/bin/hyprlock";
|
on-timeout = pkgs.hyprlock + "/bin/hyprlock";
|
||||||
}
|
}
|
||||||
# FIXME
|
|
||||||
# {
|
# {
|
||||||
# timeout = 660;
|
# timeout = 660;
|
||||||
# on-timeout = "systemctl suspend";
|
# on-timeout = "systemctl suspend";
|
||||||
|
@ -1,110 +1,28 @@
|
|||||||
{ pkgs, config, ... }: {
|
{ config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
|
||||||
../modules/fonts.nix
|
../modules/fonts.nix
|
||||||
../modules/nvidia.nix
|
../modules/nvidia.nix
|
||||||
# ../modules/prime.nix
|
# ../modules/prime.nix
|
||||||
|
../modules/zsh.nix
|
||||||
../modules/tuigreet.nix
|
../modules/tuigreet.nix
|
||||||
|
../modules/auto-upgrade.nix
|
||||||
../modules/timezone.nix
|
../modules/timezone.nix
|
||||||
../modules/usb.nix
|
../modules/usb.nix
|
||||||
../modules/systemd-boot.nix
|
../modules/systemd-boot.nix
|
||||||
../modules/users.nix
|
../modules/users.nix
|
||||||
../modules/audio.nix
|
../modules/audio.nix
|
||||||
../modules/bluetooth.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
|
./variables.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
home-manager.users."${config.var.username}" = import ./home.nix;
|
||||||
networking.hostName = config.var.hostname;
|
|
||||||
systemd.services.NetworkManager-wait-online.enable = false;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
loginShellInit = ''
|
|
||||||
dbus-update-activation-environment --systemd DISPLAY
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
users.defaultUserShell = pkgs.zsh;
|
|
||||||
|
|
||||||
environment.variables = {
|
|
||||||
XDG_DATA_HOME = "$HOME/.local/share";
|
|
||||||
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
|
|
||||||
EDITOR = "nvim";
|
|
||||||
};
|
|
||||||
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
networkmanagerapplet
|
|
||||||
fd
|
|
||||||
bc
|
|
||||||
gcc
|
|
||||||
git-ignore
|
|
||||||
xdg-utils
|
|
||||||
wget
|
|
||||||
curl
|
|
||||||
];
|
|
||||||
|
|
||||||
# nixpkgs.config.permittedInsecurePackages =
|
|
||||||
# [ "electron-25.9.0" ]; # TODO: test to remove
|
|
||||||
|
|
||||||
system.autoUpgrade = {
|
|
||||||
enable = config.var.autoUpgrade;
|
|
||||||
dates = "04:00";
|
|
||||||
flake = "${config.var.configDirectory}";
|
|
||||||
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
|
|
||||||
allowReboot = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# xdg.portal = { # TODO: test to remove
|
|
||||||
# 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;
|
|
||||||
|
|
||||||
# Don't touch this
|
# Don't touch this
|
||||||
system.stateVersion = "24.05";
|
system.stateVersion = "24.05";
|
||||||
|
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;
|
||||||
|
};
|
||||||
|
}
|
@ -4,4 +4,6 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
powerOnBoot = true;
|
powerOnBoot = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.blueman.enable = true;
|
||||||
}
|
}
|
||||||
|
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
hosts/modules/tailscale.nix
Normal file
1
hosts/modules/tailscale.nix
Normal file
@ -0,0 +1 @@
|
|||||||
|
{ config, ... }: { services.tailscale.enable = config.var.tailscale; }
|
@ -1,7 +1,10 @@
|
|||||||
{ config, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
users.users.${config.var.username} = {
|
users = {
|
||||||
|
defaultUserShell = pkgs.zsh;
|
||||||
|
users.${config.var.username} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "${config.var.username} account";
|
description = "${config.var.username} account";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
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
|
||||||
|
];
|
||||||
|
}
|
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
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
@ -1,15 +1,6 @@
|
|||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
systemd.timers."bitcoin-git" = {
|
let
|
||||||
wantedBy = [ "timers.target" ];
|
bitcoin-price = pkgs.writeShellScriptBin "bitcoin-price" ''
|
||||||
timerConfig = {
|
|
||||||
Unit = "bitcoin-git.service";
|
|
||||||
OnCalendar = "daily";
|
|
||||||
Persistent = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.services."bitcoin-git" = {
|
|
||||||
script = ''
|
|
||||||
[ ! -d "/home/hadi/btcprice" ] && ${pkgs.git}/bin/git clone git@github.com:anotherhadi/btcprice /home/hadi/btcprice
|
[ ! -d "/home/hadi/btcprice" ] && ${pkgs.git}/bin/git clone git@github.com:anotherhadi/btcprice /home/hadi/btcprice
|
||||||
cd "/home/hadi/btcprice"
|
cd "/home/hadi/btcprice"
|
||||||
price=$(${pkgs.curl}/bin/curl eur.rate.sx/1BTC)
|
price=$(${pkgs.curl}/bin/curl eur.rate.sx/1BTC)
|
||||||
@ -21,6 +12,20 @@
|
|||||||
${pkgs.git}/bin/git add .
|
${pkgs.git}/bin/git add .
|
||||||
${pkgs.git}/bin/git commit -m "Update price (hadi)"
|
${pkgs.git}/bin/git commit -m "Update price (hadi)"
|
||||||
${pkgs.git}/bin/git push -u origin main
|
${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
|
exit 0
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
# haugene/transmission-openvpn
|
# haugene/transmission-openvpn
|
||||||
# '';
|
# '';
|
||||||
# };
|
# };
|
||||||
# TODO: launch the container at boot
|
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 9091 ];
|
networking.firewall.allowedTCPPorts = [ 9091 ];
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
|
||||||
defaultSopsFile = ./server.yaml;
|
defaultSopsFile = ./secrets.yaml;
|
||||||
defaultSopsFormat = "yaml";
|
defaultSopsFormat = "yaml";
|
||||||
secrets = {
|
secrets = {
|
||||||
sshconfig = {
|
sshconfig = {
|
||||||
@ -14,15 +14,15 @@
|
|||||||
owner = "hadi";
|
owner = "hadi";
|
||||||
};
|
};
|
||||||
nextcloud-adminpass = {
|
nextcloud-adminpass = {
|
||||||
mode = "0444"; # FIXME
|
mode = "0444";
|
||||||
path = "/etc/nextcloud/adminpassFile";
|
path = "/etc/nextcloud/adminpassFile";
|
||||||
};
|
};
|
||||||
cloudflare-apitoken = {
|
cloudflare-apitoken = {
|
||||||
mode = "0444"; # FIXME
|
mode = "0444";
|
||||||
path = "/etc/cloudflare/apiToken";
|
path = "/etc/cloudflare/apiToken";
|
||||||
};
|
};
|
||||||
tailscaled-authKey = {
|
tailscaled-authKey = {
|
||||||
mode = "0444"; # FIXME
|
mode = "0444";
|
||||||
path = "/etc/tailscale/authKey";
|
path = "/etc/tailscale/authKey";
|
||||||
};
|
};
|
||||||
transmission-script = {
|
transmission-script = {
|
||||||
|
Loading…
Reference in New Issue
Block a user