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
- my personal nix dotfiles in flake
- my personal nix dotfiles in the **flake**
- simple build command for system
```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
```
- generate a vm of the flake with this command
```bash
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

31
TODO.md
View File

@ -1,11 +1,24 @@
# TODO
- [ ] Wallpaper switch
- [x] Keyboard switch
- [x] Waybar fix
- [x] Rofi config
- [ ] Cliphist manager fix
- [x] Stylix theming to each module
- [ ] Enabling nvidia graphics and disabling it
- [ ] Modularity connected via configuration.nix file with home manager (disable gnome, gnome configuration will be disabled too)
- [x] Rofi theme and other themes, where are colors setup declaratively
- [x] wallpaper switch
- [x] keyboard switch
- [x] waybar fix
- [x] rofi config
- [x] cliphist manager fix
- [x] stylix theming to each module
- [x] rofi theme and other themes, where are colors setup declaratively
- [ ] enabling nvidia graphics and disabling it
- [ ] 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-stable.url = "github:nixos/nixpkgs/nixos-24.11";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
@ -15,6 +20,12 @@
inputs.nixpkgs.follows = "nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
@ -25,17 +36,6 @@
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 = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
@ -54,10 +54,10 @@
...
} @ inputs: let
userSettings = {
username = "foglar"; # konsta or foglar (else defaulting to foglar or none)
hostname = "laptop";
username = "foglar"; # konsta or shinya (else defaulting to shinya or none)
hostname = "kogami"; # kogami or ginoza
shell = "bash"; # bash, zsh
shell = "zsh"; # bash, zsh, none
terminal = "kitty"; # kitty, alacritty
browser = "librewolf"; # firefox, librewolf, qutebrowser
editor = "neovim"; # neovim, vscode
@ -86,28 +86,28 @@
};
in {
nixosConfigurations = {
laptop = nixpkgs.lib.nixosSystem {
kogami = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs system pkgs pkgs-stable userSettings;
};
modules = [
./zenith/configuration.nix
./kogami/configuration.nix
inputs.stylix.nixosModules.stylix
inputs.nix-ld.nixosModules.nix-ld
inputs.sops-nix.nixosModules.sops
];
};
leanix = nixpkgs.lib.nixosSystem {
ginoza = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit inputs system pkgs pkgs-stable userSettings;
};
modules = [
./leanix/configuration.nix
./ginoza/configuration.nix
inputs.stylix.nixosModules.stylix
];
};

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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