Secrets, scripts, clean..
@ -79,6 +79,7 @@ git clone https://github.com/anotherhadi/nixy ~/.config/nixos
|
|||||||
```
|
```
|
||||||
|
|
||||||
- Every things that you *must* change got a "CHANGEME" comment. You can search for it with ripgrep: `rg "CHANGEME"`
|
- Every things that you *must* change got a "CHANGEME" comment. You can search for it with ripgrep: `rg "CHANGEME"`
|
||||||
|
- Every things that you *must* remove got a "REMOVE" comment. You can search for it with ripgrep: `rg "REMOVE"` (Secrets, own stuff..)
|
||||||
- Change the `nixos/configuration.nix` file to match your system
|
- Change the `nixos/configuration.nix` file to match your system
|
||||||
- Copy your `hardware-configuration.nix` file to the `nixos` folder
|
- Copy your `hardware-configuration.nix` file to the `nixos` folder
|
||||||
|
|
||||||
@ -92,3 +93,5 @@ sudo nixos-rebuild switch --flake ~/.config/nixos#nixy
|
|||||||
- [ ] Custom GTK based on the colorscheme
|
- [ ] Custom GTK based on the colorscheme
|
||||||
- [ ] Obsidian.nvim on every markdown file
|
- [ ] Obsidian.nvim on every markdown file
|
||||||
- [ ] Nextcloud services (Only on my personnal network)
|
- [ ] Nextcloud services (Only on my personnal network)
|
||||||
|
- [ ] Caffeine & Night-Shift replace notif
|
||||||
|
- [ ] Raycast like launcher
|
||||||
|
21
flake.lock
@ -232,6 +232,26 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"homeage": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1669234151,
|
||||||
|
"narHash": "sha256-TwT87E3m2TZLgwYJESlype14HxUOrRGojPM5C2akrMg=",
|
||||||
|
"owner": "jordanisaacs",
|
||||||
|
"repo": "homeage",
|
||||||
|
"rev": "02bfe4ca06962d222e522fff0240c93946b20278",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "jordanisaacs",
|
||||||
|
"repo": "homeage",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nix-darwin": {
|
"nix-darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@ -371,6 +391,7 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"apple-fonts": "apple-fonts",
|
"apple-fonts": "apple-fonts",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"homeage": "homeage",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"spicetify-nix": "spicetify-nix"
|
"spicetify-nix": "spicetify-nix"
|
||||||
|
55
flake.nix
@ -13,30 +13,37 @@
|
|||||||
};
|
};
|
||||||
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
|
apple-fonts.url = "github:Lyndeno/apple-fonts.nix";
|
||||||
spicetify-nix.url = "github:the-argus/spicetify-nix";
|
spicetify-nix.url = "github:the-argus/spicetify-nix";
|
||||||
};
|
homeage = {
|
||||||
|
url = "github:jordanisaacs/homeage";
|
||||||
outputs = inputs@{ nixpkgs, home-manager, nixvim, spicetify-nix, ... }: {
|
# Optional
|
||||||
nixosConfigurations = {
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
nixy = nixpkgs.lib.nixosSystem {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
modules = [
|
|
||||||
./nixos/configuration.nix
|
|
||||||
./hosts
|
|
||||||
{ _module.args = { inherit inputs; }; }
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
users.hadi = import ./home/home.nix; # CHANGEME - replace "hadi"
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
inherit spicetify-nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
inputs@{ nixpkgs, home-manager, homeage, nixvim, spicetify-nix, ... }: {
|
||||||
|
nixosConfigurations = {
|
||||||
|
nixy = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./nixos/configuration.nix
|
||||||
|
./hosts
|
||||||
|
{ _module.args = { inherit inputs; }; }
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
users.hadi = import ./home/home.nix; # CHANGEME - replace "hadi"
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
inherit spicetify-nix;
|
||||||
|
inherit homeage;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
@ -17,8 +17,9 @@
|
|||||||
./neofetch
|
./neofetch
|
||||||
./spicetify
|
./spicetify
|
||||||
./variables/theme
|
./variables/theme
|
||||||
./wallpaper
|
./wallpapers
|
||||||
./lf
|
./lf
|
||||||
|
./secrets # REMOVE
|
||||||
];
|
];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
@ -40,6 +41,7 @@
|
|||||||
python3
|
python3
|
||||||
|
|
||||||
# Utils
|
# Utils
|
||||||
|
age # Secrets
|
||||||
fd
|
fd
|
||||||
bc
|
bc
|
||||||
gcc
|
gcc
|
||||||
|
@ -169,7 +169,6 @@
|
|||||||
animation = [
|
animation = [
|
||||||
"windowsIn, 1, 3, easeOutCubic, popin 30% # window open"
|
"windowsIn, 1, 3, easeOutCubic, popin 30% # window open"
|
||||||
"windowsOut, 1, 3, fluent_decel, popin 70% # window close."
|
"windowsOut, 1, 3, fluent_decel, popin 70% # window close."
|
||||||
"windowsMove, 1, 2, easeinoutsine, slide # everything in between, moving, dragging, resizing."
|
|
||||||
"fadeIn, 1, 3, easeOutCubic # fade in (open) -> layers and windows"
|
"fadeIn, 1, 3, easeOutCubic # fade in (open) -> layers and windows"
|
||||||
"fadeOut, 1, 2, easeOutCubic # fade out (close) -> layers and windows"
|
"fadeOut, 1, 2, easeOutCubic # fade out (close) -> layers and windows"
|
||||||
"fadeSwitch, 0, 1, easeOutCirc # fade on changing activewindow and its opacity"
|
"fadeSwitch, 0, 1, easeOutCirc # fade on changing activewindow and its opacity"
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
xdg.configFile."hypr/hyprlock.conf".text = ''
|
xdg.configFile."hypr/hyprlock.conf".text = ''
|
||||||
background {
|
background {
|
||||||
monitor =
|
monitor =
|
||||||
path = $HOME/.config/wallpaper/${config.theme.wallpaper}
|
path = $HOME/.config/wallpapers/${config.theme.wallpaper}
|
||||||
color = rgb(${config.theme.colors.bg})
|
color = rgb(${config.theme.colors.bg})
|
||||||
|
|
||||||
blur_size = 4
|
blur_size = 4
|
||||||
|
@ -2,8 +2,8 @@
|
|||||||
home.packages = with pkgs; [ hyprpaper ];
|
home.packages = with pkgs; [ hyprpaper ];
|
||||||
|
|
||||||
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
xdg.configFile."hypr/hyprpaper.conf".text = ''
|
||||||
preload = ~/.config/wallpaper/${config.theme.wallpaper}
|
preload = ~/.config/wallpapers/${config.theme.wallpaper}
|
||||||
wallpaper = ,~/.config/wallpaper/${config.theme.wallpaper}
|
wallpaper = ,~/.config/wallpapers/${config.theme.wallpaper}
|
||||||
ipc=true
|
ipc=true
|
||||||
splash=false
|
splash=false
|
||||||
'';
|
'';
|
||||||
|
@ -1 +1,6 @@
|
|||||||
{ imports = [ ./sshconfig.nix ./cava/default.nix ]; }
|
{
|
||||||
|
imports = [
|
||||||
|
./cava/default.nix
|
||||||
|
./nextcloud.nix # REMOVE
|
||||||
|
];
|
||||||
|
}
|
||||||
|
27
home/misc/nextcloud.nix
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
{ pkgs, ... }: {
|
||||||
|
systemd.user.services.watch-nextcloud = {
|
||||||
|
Unit = { Description = "Start Nextcloud if I'm on one of my network"; };
|
||||||
|
Install = { WantedBy = [ "default.target" ]; };
|
||||||
|
Service = {
|
||||||
|
ExecStart = "${pkgs.writeShellScript "watch-nextcloud" ''
|
||||||
|
while 1;do
|
||||||
|
ssid=$(nmcli -t -f name connection show --active | head -n1)
|
||||||
|
if [[ $ssid == "inthecloud" || $ssid == "Wired connection 2" ]]; then
|
||||||
|
status=$(systemctl --user status nextcloud-client)
|
||||||
|
service_status=$(echo "$status" | awk '/Active:/ {print $2}')
|
||||||
|
if [[ $service_status == "inactive" ]]; then
|
||||||
|
systemctl --user start nextcloud-client
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
status=$(systemctl --user status nextcloud-client)
|
||||||
|
service_status=$(echo "$status" | awk '/Active:/ {print $2}')
|
||||||
|
if [[ $service_status == "active" ]]; then
|
||||||
|
systemctl --user stop nextcloud-client
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
sleep 120
|
||||||
|
done
|
||||||
|
''}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
home.file = {
|
|
||||||
".ssh/config" = {
|
|
||||||
text = ''
|
|
||||||
Host github.com
|
|
||||||
User git
|
|
||||||
Hostname github.com
|
|
||||||
PreferredAuthentications publickey
|
|
||||||
IdentityFile ~/.ssh/github
|
|
||||||
'';
|
|
||||||
executable = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
12
home/scripts/age.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, config, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
homedir = config.home.homeDirectory;
|
||||||
|
|
||||||
|
add-secrets = pkgs.writeShellScriptBin "add-secrets" ''
|
||||||
|
file=$1
|
||||||
|
pubkey=$(cat ~/nixy.key | grep "public key" | cut -d':' -f2 | sed 's/ //g')
|
||||||
|
${pkgs.age}/bin/age -r $pubkey -o ~/.config/nixos/home/secrets/$file.age -a $file
|
||||||
|
'';
|
||||||
|
|
||||||
|
in { home.packages = with pkgs; [ add-secrets ]; }
|
@ -7,5 +7,6 @@
|
|||||||
./brightness.nix
|
./brightness.nix
|
||||||
./caffeine.nix
|
./caffeine.nix
|
||||||
./night-shift.nix
|
./night-shift.nix
|
||||||
|
./age.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -3,20 +3,20 @@
|
|||||||
let
|
let
|
||||||
homedir = config.home.homeDirectory;
|
homedir = config.home.homeDirectory;
|
||||||
|
|
||||||
wallpaper = pkgs.writeShellScriptBin "wallpaper" ''
|
#wallpaper = pkgs.writeShellScriptBin "wallpaper" ''
|
||||||
WALLPAPER_FOLDER="${homedir}/Nextcloud/wallpaper"
|
# WALLPAPER_FOLDER="${homedir}/Nextcloud/wallpaper"
|
||||||
|
#
|
||||||
cd $WALLPAPER_FOLDER
|
# cd $WALLPAPER_FOLDER
|
||||||
|
#
|
||||||
choosed_wallpaper=$(fd . |
|
# choosed_wallpaper=$(fd . |
|
||||||
fzf \
|
# fzf \
|
||||||
--preview='kitty icat --clear --transfer-mode=memory --stdin=no --place=''${FZF_PREVIEW_COLUMNS}x''${FZF_PREVIEW_LINES}@0x0 {}' \
|
# --preview='kitty icat --clear --transfer-mode=memory --stdin=no --place=''${FZF_PREVIEW_COLUMNS}x''${FZF_PREVIEW_LINES}@0x0 {}' \
|
||||||
--preview-window=bottom,border-top \
|
# --preview-window=bottom,border-top \
|
||||||
--border-label "Wallpaper" ) || exit 1
|
# --border-label "Wallpaper" ) || exit 1
|
||||||
|
#
|
||||||
swww img $choosed_wallpaper
|
# swww img $choosed_wallpaper
|
||||||
cp $choosed_wallpaper $HOME/.config/wallpaper/default.png
|
# cp $choosed_wallpaper $HOME/.config/wallpaper/default.png
|
||||||
'';
|
#'';
|
||||||
|
|
||||||
menu = pkgs.writeShellScriptBin "menu" ''
|
menu = pkgs.writeShellScriptBin "menu" ''
|
||||||
if pgrep wofi; then
|
if pgrep wofi; then
|
||||||
@ -34,4 +34,4 @@ let
|
|||||||
nmcli connection import type wireguard file "$0"
|
nmcli connection import type wireguard file "$0"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in { home.packages = with pkgs; [ wallpaper menu wireguard-import powermenu ]; }
|
in { home.packages = with pkgs; [ menu wireguard-import powermenu ]; }
|
||||||
|
12
home/secrets/default.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, config, homeage, ... }: {
|
||||||
|
imports = [ homeage.homeManagerModules.homeage ];
|
||||||
|
homeage = {
|
||||||
|
identityPaths = [ "~/nixy.key" ];
|
||||||
|
installationType = "activation";
|
||||||
|
|
||||||
|
file."hadisecretkey" = {
|
||||||
|
source = ./sshconfig.age;
|
||||||
|
symlinks = [ "${config.home.homeDirectory}/.ssh/sshconfig" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
BIN
home/secrets/sshconfig.age
Normal file
@ -12,7 +12,7 @@ with lib;
|
|||||||
|
|
||||||
wallpaper = mkOption {
|
wallpaper = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "Name of the wallpaper (in the wallpaper directory)";
|
description = "Name of the wallpaper (from the wallpapers directory)";
|
||||||
};
|
};
|
||||||
|
|
||||||
font = mkOption {
|
font = mkOption {
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
{ config, ... }: {
|
|
||||||
xdg.configFile."wallpaper" = {
|
|
||||||
recursive = true;
|
|
||||||
source = ./wallpaper;
|
|
||||||
};
|
|
||||||
}
|
|
6
home/wallpapers/default.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{ config, ... }: {
|
||||||
|
xdg.configFile."wallpapers" = {
|
||||||
|
recursive = true;
|
||||||
|
source = ./wallpapers;
|
||||||
|
};
|
||||||
|
}
|
Before Width: | Height: | Size: 826 KiB After Width: | Height: | Size: 826 KiB |
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 12 MiB After Width: | Height: | Size: 12 MiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Before Width: | Height: | Size: 378 KiB After Width: | Height: | Size: 378 KiB |
Before Width: | Height: | Size: 288 KiB After Width: | Height: | Size: 288 KiB |
Before Width: | Height: | Size: 641 KiB After Width: | Height: | Size: 641 KiB |
Before Width: | Height: | Size: 1.0 MiB After Width: | Height: | Size: 1.0 MiB |
Before Width: | Height: | Size: 8.6 MiB After Width: | Height: | Size: 8.6 MiB |