This commit is contained in:
Hadi 2024-06-26 10:32:58 +02:00 committed by GitHub
parent bb4617160c
commit 3cfb9e733a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 38 additions and 40 deletions

View File

@ -8,7 +8,6 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
- [ ] Themes - [ ] Themes
- [ ] Upload new wallpapers - [ ] Upload new wallpapers
- [ ] MacOS theme - [ ] MacOS theme
- [ ] GithubFetch: Neofetch like, github calendar in the terminal
- [ ] Write a hyprland shortcuts markdown file (Parse the hyprland settings conf) - [ ] Write a hyprland shortcuts markdown file (Parse the hyprland settings conf)
- [ ] Tofi (Wofi but terminal based) - [ ] Tofi (Wofi but terminal based)

View File

@ -10,13 +10,10 @@
LAPTOP_CONFIG="./hosts/laptop" LAPTOP_CONFIG="./hosts/laptop"
GUEST_CONFIG="./hosts/guest" GUEST_CONFIG="./hosts/guest"
cp "$LAPTOP_CONFIG/configuration.nix" "$GUEST_CONFIG/configuration.nix"
cp "$LAPTOP_CONFIG/variables.nix" "$GUEST_CONFIG/variables.nix"
# Remove the NVIDIA driver import # Remove the NVIDIA driver import
config=$(cat "$LAPTOP_CONFIG/configuration.nix") config=$(cat "$LAPTOP_CONFIG/configuration.nix")
config=$(echo "$config" | sed 's/..\/shared\/nvidia/# ..\/shared\/nvidia/') config=$(echo "$config" | sed 's/..\/modules\/nvidia/# ..\/modules\/nvidia/')
config=$(echo "$config" | sed 's/..\/shared\/prime/# ..\/shared\/prime/') config=$(echo "$config" | sed 's/..\/modules\/prime/# ..\/modules\/prime/')
echo "$config" >"$GUEST_CONFIG/configuration.nix" echo "$config" >"$GUEST_CONFIG/configuration.nix"
variables=$(cat "$LAPTOP_CONFIG/variables.nix") variables=$(cat "$LAPTOP_CONFIG/variables.nix")
@ -27,3 +24,7 @@ variables=$(echo "$variables" | sed 's/sops = true/sops = false/')
variables=$(echo "$variables" | sed 's/obsidian = true/obsidian = false/') variables=$(echo "$variables" | sed 's/obsidian = true/obsidian = false/')
variables=$(echo "$variables" | sed 's/tailscale = true/tailscale = false/') variables=$(echo "$variables" | sed 's/tailscale = true/tailscale = false/')
echo "$variables" >"$GUEST_CONFIG/variables.nix" echo "$variables" >"$GUEST_CONFIG/variables.nix"
home=$(cat "$LAPTOP_CONFIG/home.nix")
home=$(echo "$config" | sed 's/\.\/sops.nix/# .\/sops.nix/')
echo "$home" >"$GUEST_CONFIG/home.nix"

View File

@ -41,7 +41,7 @@
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users."hadi" = import ./home/laptop.nix; users."hadi" = import ./hosts/laptop/home.nix;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
}; };
} }
@ -60,7 +60,7 @@
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users."hadi" = import ./home/server.nix; users."hadi" = import ./hosts/server/home.nix;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
}; };
} }
@ -79,7 +79,7 @@
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
users."yourusername" = import # CHANGEME users."yourusername" = import # CHANGEME
./home/laptop.nix; # you can also create a new ./home/yourhostname.nix ./hosts/yourhostname/home.nix; # CHANGEME
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; };
}; };
} }

View File

@ -1,34 +1,34 @@
{ pkgs, config, ... }: { { pkgs, config, ... }: {
imports = [ imports = [
../hosts/laptop/variables.nix # CHANGEME, replace with your host ./variables.nix
# Programs # Programs
./programs/btop ../../home/programs/btop
./programs/cava ../../home/programs/cava
./programs/kitty ../../home/programs/kitty
./programs/nextcloud ../../home/programs/nextcloud
./programs/nvim ../../home/programs/nvim
./programs/qutebrowser ../../home/programs/qutebrowser
./programs/spicetify ../../home/programs/spicetify
./programs/zathura ../../home/programs/zathura
./programs/shell ../../home/programs/shell
./programs/git ../../home/programs/git
# Scripts # Scripts
./scripts # All scripts ../../home/scripts # All scripts
# System (Desktop environment like stuff) # System (Desktop environment like stuff)
./system/dunst ../../home/system/dunst
./system/gtk ../../home/system/gtk
./system/hyprland ../../home/system/hyprland
./system/waybar ../../home/system/waybar
./system/wlogout ../../home/system/wlogout
./system/wofi ../../home/system/wofi
./system/mime ../../home/system/mime
./system/udiskie ../../home/system/udiskie
./system/sops/laptop.nix # You should probably remove this line ./sops.nix # You should probably remove this line
]; ];
home = { home = {
@ -92,12 +92,11 @@
# Import wallpapers into $HOME/wallpapers # Import wallpapers into $HOME/wallpapers
file."wallpapers" = { file."wallpapers" = {
recursive = true; recursive = true;
source = ./wallpapers; source = ../../home/wallpapers;
}; };
stateVersion = "24.05"; stateVersion = "24.05";
}; };
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }

View File

@ -5,7 +5,7 @@
sops = { sops = {
age.keyFile = "/home/hadi/.config/sops/age/keys.txt"; age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
defaultSopsFile = ../../../secrets/laptop.yaml; defaultSopsFile = ../../secrets/laptop.yaml;
secrets = { secrets = {
sshconfig = { path = "/home/hadi/.ssh/config"; }; sshconfig = { path = "/home/hadi/.ssh/config"; };
github-key = { path = "/home/hadi/.ssh/github"; }; github-key = { path = "/home/hadi/.ssh/github"; };

View File

@ -1,16 +1,16 @@
{ pkgs, config, ... }: { { pkgs, config, ... }: {
imports = [ imports = [
../hosts/server/variables.nix ./variables.nix
# Programs # Programs
./programs/btop ../../home/programs/btop
./programs/nvim ../../home/programs/nvim
./programs/git ../../home/programs/git
./programs/shell ../../home/programs/shell
# Scripts # Scripts
./scripts # All scripts ../../home/scripts # All scripts
]; ];
home = { home = {
@ -42,5 +42,4 @@
}; };
programs.home-manager.enable = true; programs.home-manager.enable = true;
} }