fixes and cleanup after config rename

This commit is contained in:
foglar 2024-12-26 15:56:31 +01:00
parent ec4abe0496
commit a56fc0c35f
9 changed files with 70 additions and 38 deletions

View File

@ -1,14 +1,33 @@
# dotfiles # dotfiles
- my personal nix dotfiles in flake - my personal nix dotfiles in the **flake**
- simple build command for system
```bash ```bash
git clone https://git.foglar.tech/foglar/dotfiles.git $HOME/dotfiles --depth 1 git clone https://git.foglar.tech/foglar/dotfiles.git $HOME/dotfiles
sudo nixos-rebuild switch --flake ~/dotfiles#laptop sudo nixos-rebuild switch --flake ~/dotfiles#laptop
``` ```
- generate a vm of the flake with this command
```bash ```bash
nix run github:nix-community/nixos-generators -- -c ./flake.nix --flake '#leanix' -f vm --disk-size 20480 nix run github:nix-community/nixos-generators -- -c ./flake.nix --flake '#leanix' -f vm --disk-size 20480
``` ```
- deploy configuration on the new system
```bash
# Copy my repository
git clone https://git.foglar.tech/foglar/dotfiles.git $HOME/dotfiles --depth 1
# Generate your own hardware configurations for system
sudo nixos-generate-config --dir ~/dotfiles/zenith
# or
sudo nixos-generate-config --dir ~/dotfiles/leanix
# Rebuild your system from the flake
sudo nixos-rebuild switch --flake ~/dotfiles#zenith
```
## Features ## Features

31
TODO.md
View File

@ -1,11 +1,24 @@
# TODO # TODO
- [ ] Wallpaper switch - [x] wallpaper switch
- [x] Keyboard switch - [x] keyboard switch
- [x] Waybar fix - [x] waybar fix
- [x] Rofi config - [x] rofi config
- [ ] Cliphist manager fix - [x] cliphist manager fix
- [x] Stylix theming to each module - [x] stylix theming to each module
- [ ] Enabling nvidia graphics and disabling it - [x] rofi theme and other themes, where are colors setup declaratively
- [ ] Modularity connected via configuration.nix file with home manager (disable gnome, gnome configuration will be disabled too) - [ ] enabling nvidia graphics and disabling it
- [x] Rofi theme and other themes, where are colors setup declaratively - [ ] modularity connected via configuration.nix file with home manager (disable gnome, gnome configuration will be disabled too)
- [x] custom if else statements
- [ ] neovim
- [ ] librewolf and firefox fix
- [ ] fix kde theme in stylix
- [x] move sops
- [ ] figure out yubico authentication
- [ ] graph of my system structure
- [x] add zsh to my config
- [ ] ?tryout starship?
- [ ] cleanup hyprland subtools (rofi, hyprlock, waybar)
- [ ] auto-cpufreq
- [ ] modularize hyprland config into multiple files
- [ ] consider moving nh config helper into module

View File

@ -5,6 +5,11 @@
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = { hyprland = {
url = "github:hyprwm/Hyprland"; url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -15,6 +20,12 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
spicetify-nix = { spicetify-nix = {
url = "github:Gerg-L/spicetify-nix"; url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -25,17 +36,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
firefox-addons = { firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons"; url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -54,10 +54,10 @@
... ...
} @ inputs: let } @ inputs: let
userSettings = { userSettings = {
username = "foglar"; # konsta or foglar (else defaulting to foglar or none) username = "foglar"; # konsta or shinya (else defaulting to shinya or none)
hostname = "laptop"; hostname = "kogami"; # kogami or ginoza
shell = "bash"; # bash, zsh shell = "zsh"; # bash, zsh, none
terminal = "kitty"; # kitty, alacritty terminal = "kitty"; # kitty, alacritty
browser = "librewolf"; # firefox, librewolf, qutebrowser browser = "librewolf"; # firefox, librewolf, qutebrowser
editor = "neovim"; # neovim, vscode editor = "neovim"; # neovim, vscode
@ -86,28 +86,28 @@
}; };
in { in {
nixosConfigurations = { nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem { kogami = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit inputs system pkgs pkgs-stable userSettings; inherit inputs system pkgs pkgs-stable userSettings;
}; };
modules = [ modules = [
./zenith/configuration.nix ./kogami/configuration.nix
inputs.stylix.nixosModules.stylix inputs.stylix.nixosModules.stylix
inputs.nix-ld.nixosModules.nix-ld inputs.nix-ld.nixosModules.nix-ld
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
]; ];
}; };
leanix = nixpkgs.lib.nixosSystem { ginoza = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = { specialArgs = {
inherit inputs system pkgs pkgs-stable userSettings; inherit inputs system pkgs pkgs-stable userSettings;
}; };
modules = [ modules = [
./leanix/configuration.nix ./ginoza/configuration.nix
inputs.stylix.nixosModules.stylix inputs.stylix.nixosModules.stylix
]; ];
}; };

View File

@ -26,11 +26,6 @@
# Bootloader # Bootloader
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
# Environment variables
environment.sessionVariables = {
FLAKE = "/home/${userSettings.username}/.dotfiles";
};
# System level configuration # System level configuration
sys = { sys = {
audio.enable = true; audio.enable = true;

View File

@ -137,7 +137,7 @@
ublock-origin ublock-origin
] ]
++ ( ++ (
if (userSettings.username == "foglar") if (userSettings.username == "shinya")
then [ then [
inputs.firefox-addons.packages."x86_64-linux".simple-translate inputs.firefox-addons.packages."x86_64-linux".simple-translate
inputs.firefox-addons.packages."x86_64-linux".duckduckgo-privacy-essentials inputs.firefox-addons.packages."x86_64-linux".duckduckgo-privacy-essentials

View File

@ -3,6 +3,7 @@
pkgs-stable, pkgs-stable,
lib, lib,
config, config,
userSettings,
... ...
}: { }: {
options = { options = {
@ -141,7 +142,7 @@
}; };
"options" = { "options" = {
"nixos" = { "nixos" = {
"expr" = "(builtins.getFlake \"~/dotfiles/\").nixosConfigurations.laptop.options"; "expr" = "(builtins.getFlake \"~/.dotfiles/\").nixosConfigurations.${userSettings.hostname}.options";
}; };
}; };
# "home_manager": { # "home_manager": {

View File

@ -1,4 +1,7 @@
{lib, ...}: { {
lib,
...
}: {
imports = [ imports = [
./packages/docker.nix ./packages/docker.nix
./packages/podman.nix ./packages/podman.nix

View File

@ -14,7 +14,7 @@
sops.age.keyFile = "/home/${userSettings.username}/.config/sops/age/keys.txt"; sops.age.keyFile = "/home/${userSettings.username}/.config/sops/age/keys.txt";
sops.secrets."zenith/password-hash" = { sops.secrets."${userSettings.hostname}/password-hash" = {
neededForUsers = true; neededForUsers = true;
}; };

View File

@ -19,6 +19,7 @@
DEFAULT_BROWSER = "${pkgs."${userSettings.browser}"}/bin/${userSettings.browser}"; DEFAULT_BROWSER = "${pkgs."${userSettings.browser}"}/bin/${userSettings.browser}";
TERMINAL = "${pkgs."${userSettings.terminal}"}/bin/${userSettings.terminal}"; TERMINAL = "${pkgs."${userSettings.terminal}"}/bin/${userSettings.terminal}";
EDITOR = "${pkgs."${userSettings.editor}"}/bin/${userSettings.editor}"; EDITOR = "${pkgs."${userSettings.editor}"}/bin/${userSettings.editor}";
FLAKE = "/home/${userSettings.username}/.dotfiles";
}; };
# Default applications configuration # Default applications configuration