diff --git a/nix/flake.lock b/dotfiles/flake.lock similarity index 100% rename from nix/flake.lock rename to dotfiles/flake.lock diff --git a/nix/flake.nix b/dotfiles/flake.nix similarity index 53% rename from nix/flake.nix rename to dotfiles/flake.nix index f3f7fcaa..93cb4c7e 100644 --- a/nix/flake.nix +++ b/dotfiles/flake.nix @@ -11,6 +11,7 @@ url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixgl.url = "github:nix-community/nixGL"; nix-flatpak.url = "github:gmodena/nix-flatpak"; stylix = { url = "github:danth/stylix"; @@ -25,63 +26,68 @@ inputs.nixpkgs.follows = "nixpkgs"; inputs.home-manager.follows = "home-manager"; }; + sops-nix = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + deploy-rs.url = "github:serokell/deploy-rs"; + vars = { + "joey-laptop" = { + username = "joey"; + hostname = "joey-laptop"; + theme = "gruvbox-warm"; + wm = "hyprland"; + }; + "joey-desktop" = { + realname = "Joey Hafner"; + username = "joey"; + hostname = "joey-desktop"; + email = "joey@jafner.net"; + }; + }; }; outputs = inputs@{ nixpkgs, nixpkgs-unstable, home-manager, + nixgl, + plasma-manager, ... }: let - systemSettings = { - system = "x86_64-linux"; - hostname = "joey-laptop"; - }; - userSettings = { - user = "joey"; - theme = "gruvbox-warm"; - wm = "hyprland"; - }; + system = "x86_64-linux"; lib = nixpkgs.lib; pkgs = import inputs.nixpkgs { - system = systemSettings.system; - config = { allowUnfreePredicate = (_: true); }; + inherit system; + overlays = [ nixgl.overlay ]; + config = { allowUnfreePredicate = (_: true); }; + }; + pkgs-unstable = import nixpkgs-unstable { + inherit system; + overlays = [ nixgl.overlay ]; + config = { allowUnfreePredicate = (_: true); }; }; - pkgs-unstable = nixpkgs-unstable.legacyPackages.${systemSettings.system}; - - in { nixosConfigurations = { - iso = lib.nixosSystem { - modules = [ - "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" - "${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix" - ./iso/server-configuration.nix - inputs.home-manager.nixosModules.home-manager - ]; - specialArgs = {inherit pkgs; }; - }; - ${systemSettings.hostname} = lib.nixosSystem { + joey-laptop = lib.nixosSystem { modules = [ - ./nixos/configuration.nix + ./nixos/joey-laptop/configuration.nix inputs.hyprland.nixosModules.default inputs.stylix.nixosModules.stylix inputs.nix-flatpak.nixosModules.nix-flatpak ]; - system = systemSettings.system; + inherit system; specialArgs = { inherit pkgs; inherit pkgs-unstable; - inherit systemSettings; - inherit userSettings; inherit inputs; }; }; }; homeConfigurations = { - ${userSettings.user} = home-manager.lib.homeManagerConfiguration { + "joey-laptop" = home-manager.lib.homeManagerConfiguration { modules = [ - ./home-manager/home.nix + ./home-manager/joey-laptop/home.nix inputs.stylix.homeManagerModules.stylix inputs.plasma-manager.homeManagerModules.plasma-manager inputs.nix-flatpak.homeManagerModules.nix-flatpak @@ -90,8 +96,21 @@ extraSpecialArgs = { inherit pkgs; inherit pkgs-unstable; - inherit systemSettings; - inherit userSettings; + inherit inputs; + }; + }; + "joey-desktop" = home-manager.lib.homeManagerConfiguration { + modules = [ + ./home-manager/joey-desktop/home.nix + inputs.sops-nix.homeManagerModules.sops + inputs.stylix.homeManagerModules.stylix + inputs.nix-flatpak.homeManagerModules.nix-flatpak + inputs.plasma-manager.homeManagerModules.plasma-manager + ]; + inherit pkgs; + extraSpecialArgs = { + inherit pkgs; + inherit pkgs-unstable; inherit inputs; }; }; diff --git a/nix/dungeon-master/home-manager/.sops.yaml b/dotfiles/home-manager/joey-desktop/.sops.yaml similarity index 100% rename from nix/dungeon-master/home-manager/.sops.yaml rename to dotfiles/home-manager/joey-desktop/.sops.yaml diff --git a/nix/dungeon-master/home-manager/continue-config.json b/dotfiles/home-manager/joey-desktop/continue-config.json similarity index 100% rename from nix/dungeon-master/home-manager/continue-config.json rename to dotfiles/home-manager/joey-desktop/continue-config.json diff --git a/nix/dungeon-master/home-manager/devops.nix b/dotfiles/home-manager/joey-desktop/devops.nix similarity index 100% rename from nix/dungeon-master/home-manager/devops.nix rename to dotfiles/home-manager/joey-desktop/devops.nix diff --git a/nix/dungeon-master/home-manager/flake.lock b/dotfiles/home-manager/joey-desktop/flake.lock similarity index 100% rename from nix/dungeon-master/home-manager/flake.lock rename to dotfiles/home-manager/joey-desktop/flake.lock diff --git a/nix/dungeon-master/home-manager/flake.nix b/dotfiles/home-manager/joey-desktop/flake.nix similarity index 100% rename from nix/dungeon-master/home-manager/flake.nix rename to dotfiles/home-manager/joey-desktop/flake.nix diff --git a/nix/dungeon-master/home-manager/home.nix b/dotfiles/home-manager/joey-desktop/home.nix similarity index 94% rename from nix/dungeon-master/home-manager/home.nix rename to dotfiles/home-manager/joey-desktop/home.nix index 017acf05..1e54e495 100644 --- a/nix/dungeon-master/home-manager/home.nix +++ b/dotfiles/home-manager/joey-desktop/home.nix @@ -1,4 +1,4 @@ -{ config, pkgs, pkgs-unstable, inputs, ... }: +{ pkgs, pkgs-unstable, inputs, ... }: { imports = [ ./unstable.nix @@ -6,7 +6,7 @@ #./scripts.nix ]; sops = { - age.sshKeyPaths = [ "/home/joey/.ssh/main_id_ed25519" ]; + age.sshKeyPaths = [ "/home/${inputs.vars."joey-desktop".username}/.ssh/main_id_ed25519" ]; defaultSopsFile = ./secrets.yaml; }; stylix = { @@ -157,10 +157,10 @@ }; programs.git = { enable = true; - userName = "Joey Hafner"; - userEmail = "joey@jafner.net"; + userName = "${inputs.vars."joey-desktop".realname}"; + userEmail = "${inputs.vars."joey-desktop".email}"; extraConfig = { - core.sshCommand = "ssh -i /home/joey/.ssh/main_id_ed25519"; + core.sshCommand = "ssh -i /home/${inputs.vars."joey-desktop".username}/.ssh/main_id_ed25519"; }; delta.enable = true; delta.options = { @@ -194,7 +194,7 @@ fetch = "fastfetch"; neofetch = "fetch"; find = ''fzf --preview "bat --color=always --style=numbers --line-range=:500 {}"''; - hmu = "home-manager switch -b backup --flake ~/Git/Jafner.net/nix/dungeon-master/home-manager/ --impure"; + hmu = "home-manager switch -b backup --flake ~/Git/Jafner.net/dotfiles#joey-desktop --impure"; nixgc = "nix-env --delete-generations 7d && nix-store --gc --print-dead"; kitty = "nixGL kitty"; fzf-ssh = "ssh $(cat ~/.ssh/profiles | fzf --height 20%)"; @@ -282,14 +282,14 @@ Service = { Restart = "always"; RestartSec = 10; - ExecStart = "${pkgs-unstable.librespot}/bin/librespot --backend pulseaudio --system-cache /home/joey/.spotify -j"; + ExecStart = "${pkgs-unstable.librespot}/bin/librespot --backend pulseaudio --system-cache /home/${inputs.vars."joey-desktop".username}/.spotify -j"; }; }; }; home.enableNixpkgsReleaseCheck = false; home.preferXdgDirectories = true; - home.username = "joey"; - home.homeDirectory = "/home/joey"; + home.username = "${inputs.vars."joey-desktop".username}"; + home.homeDirectory = "/home/${inputs.vars."joey-desktop".username}"; home.stateVersion = "24.05"; home.packages = with pkgs; [ rofi rofi-rbw-wayland rbw pinentry-rofi pinentry-all diff --git a/nix/dungeon-master/home-manager/plasma-manager.nix b/dotfiles/home-manager/joey-desktop/plasma-manager.nix similarity index 100% rename from nix/dungeon-master/home-manager/plasma-manager.nix rename to dotfiles/home-manager/joey-desktop/plasma-manager.nix diff --git a/nix/dungeon-master/home-manager/plasma6.jpg b/dotfiles/home-manager/joey-desktop/plasma6.jpg similarity index 100% rename from nix/dungeon-master/home-manager/plasma6.jpg rename to dotfiles/home-manager/joey-desktop/plasma6.jpg diff --git a/nix/dungeon-master/home-manager/profiles b/dotfiles/home-manager/joey-desktop/profiles similarity index 100% rename from nix/dungeon-master/home-manager/profiles rename to dotfiles/home-manager/joey-desktop/profiles diff --git a/nix/dungeon-master/home-manager/python.nix b/dotfiles/home-manager/joey-desktop/python.nix similarity index 100% rename from nix/dungeon-master/home-manager/python.nix rename to dotfiles/home-manager/joey-desktop/python.nix diff --git a/nix/dungeon-master/home-manager/scripts.nix b/dotfiles/home-manager/joey-desktop/scripts.nix similarity index 100% rename from nix/dungeon-master/home-manager/scripts.nix rename to dotfiles/home-manager/joey-desktop/scripts.nix diff --git a/nix/dungeon-master/home-manager/unstable.nix b/dotfiles/home-manager/joey-desktop/unstable.nix similarity index 100% rename from nix/dungeon-master/home-manager/unstable.nix rename to dotfiles/home-manager/joey-desktop/unstable.nix diff --git a/nix/home-manager/app/bitwarden/bitwarden.nix b/dotfiles/home-manager/joey-laptop/app/bitwarden/bitwarden.nix similarity index 100% rename from nix/home-manager/app/bitwarden/bitwarden.nix rename to dotfiles/home-manager/joey-laptop/app/bitwarden/bitwarden.nix diff --git a/nix/home-manager/app/browser/zen.nix b/dotfiles/home-manager/joey-laptop/app/browser/zen.nix similarity index 100% rename from nix/home-manager/app/browser/zen.nix rename to dotfiles/home-manager/joey-laptop/app/browser/zen.nix diff --git a/nix/home-manager/app/flatpak/flatpak.nix b/dotfiles/home-manager/joey-laptop/app/flatpak/flatpak.nix similarity index 100% rename from nix/home-manager/app/flatpak/flatpak.nix rename to dotfiles/home-manager/joey-laptop/app/flatpak/flatpak.nix diff --git a/nix/home-manager/app/games/games.nix b/dotfiles/home-manager/joey-laptop/app/games/games.nix similarity index 100% rename from nix/home-manager/app/games/games.nix rename to dotfiles/home-manager/joey-laptop/app/games/games.nix diff --git a/nix/home-manager/app/git/git.nix b/dotfiles/home-manager/joey-laptop/app/git/git.nix similarity index 100% rename from nix/home-manager/app/git/git.nix rename to dotfiles/home-manager/joey-laptop/app/git/git.nix diff --git a/nix/home-manager/app/kubectl/kubectl.nix b/dotfiles/home-manager/joey-laptop/app/kubectl/kubectl.nix similarity index 100% rename from nix/home-manager/app/kubectl/kubectl.nix rename to dotfiles/home-manager/joey-laptop/app/kubectl/kubectl.nix diff --git a/nix/home-manager/app/media/media.nix b/dotfiles/home-manager/joey-laptop/app/media/media.nix similarity index 100% rename from nix/home-manager/app/media/media.nix rename to dotfiles/home-manager/joey-laptop/app/media/media.nix diff --git a/nix/home-manager/app/messaging/discord.nix b/dotfiles/home-manager/joey-laptop/app/messaging/discord.nix similarity index 100% rename from nix/home-manager/app/messaging/discord.nix rename to dotfiles/home-manager/joey-laptop/app/messaging/discord.nix diff --git a/nix/home-manager/app/obs-studio/obs-studio.nix b/dotfiles/home-manager/joey-laptop/app/obs-studio/obs-studio.nix similarity index 100% rename from nix/home-manager/app/obs-studio/obs-studio.nix rename to dotfiles/home-manager/joey-laptop/app/obs-studio/obs-studio.nix diff --git a/nix/home-manager/app/plasma-manager/plasma-manager.nix b/dotfiles/home-manager/joey-laptop/app/plasma-manager/plasma-manager.nix similarity index 100% rename from nix/home-manager/app/plasma-manager/plasma-manager.nix rename to dotfiles/home-manager/joey-laptop/app/plasma-manager/plasma-manager.nix diff --git a/nix/home-manager/app/sh/sh.nix b/dotfiles/home-manager/joey-laptop/app/sh/sh.nix similarity index 100% rename from nix/home-manager/app/sh/sh.nix rename to dotfiles/home-manager/joey-laptop/app/sh/sh.nix diff --git a/nix/home-manager/app/vscode/vscode.nix b/dotfiles/home-manager/joey-laptop/app/vscode/vscode.nix similarity index 100% rename from nix/home-manager/app/vscode/vscode.nix rename to dotfiles/home-manager/joey-laptop/app/vscode/vscode.nix diff --git a/dotfiles/home-manager/joey-laptop/home.nix b/dotfiles/home-manager/joey-laptop/home.nix new file mode 100644 index 00000000..8dd0c25b --- /dev/null +++ b/dotfiles/home-manager/joey-laptop/home.nix @@ -0,0 +1,6 @@ +{ inputs, ... }: + +{ + home.stateVersion = "24.05"; + imports = [ ./users/${inputs.homeConf.username}.nix ]; +} \ No newline at end of file diff --git a/nix/home-manager/style.nix b/dotfiles/home-manager/joey-laptop/style.nix similarity index 100% rename from nix/home-manager/style.nix rename to dotfiles/home-manager/joey-laptop/style.nix diff --git a/nix/home-manager/themes/cooper/theme.nix b/dotfiles/home-manager/joey-laptop/themes/cooper/theme.nix similarity index 100% rename from nix/home-manager/themes/cooper/theme.nix rename to dotfiles/home-manager/joey-laptop/themes/cooper/theme.nix diff --git a/nix/home-manager/themes/cooper/wallpaper.png b/dotfiles/home-manager/joey-laptop/themes/cooper/wallpaper.png similarity index 100% rename from nix/home-manager/themes/cooper/wallpaper.png rename to dotfiles/home-manager/joey-laptop/themes/cooper/wallpaper.png diff --git a/nix/home-manager/themes/gruvbox-cool/theme.nix b/dotfiles/home-manager/joey-laptop/themes/gruvbox-cool/theme.nix similarity index 100% rename from nix/home-manager/themes/gruvbox-cool/theme.nix rename to dotfiles/home-manager/joey-laptop/themes/gruvbox-cool/theme.nix diff --git a/nix/home-manager/themes/gruvbox-warm/theme.nix b/dotfiles/home-manager/joey-laptop/themes/gruvbox-warm/theme.nix similarity index 100% rename from nix/home-manager/themes/gruvbox-warm/theme.nix rename to dotfiles/home-manager/joey-laptop/themes/gruvbox-warm/theme.nix diff --git a/nix/home-manager/themes/material-blue/theme.nix b/dotfiles/home-manager/joey-laptop/themes/material-blue/theme.nix similarity index 100% rename from nix/home-manager/themes/material-blue/theme.nix rename to dotfiles/home-manager/joey-laptop/themes/material-blue/theme.nix diff --git a/nix/home-manager/themes/material-blue/wallpaper.jpg b/dotfiles/home-manager/joey-laptop/themes/material-blue/wallpaper.jpg similarity index 100% rename from nix/home-manager/themes/material-blue/wallpaper.jpg rename to dotfiles/home-manager/joey-laptop/themes/material-blue/wallpaper.jpg diff --git a/nix/home-manager/themes/material-red/theme.nix b/dotfiles/home-manager/joey-laptop/themes/material-red/theme.nix similarity index 100% rename from nix/home-manager/themes/material-red/theme.nix rename to dotfiles/home-manager/joey-laptop/themes/material-red/theme.nix diff --git a/nix/home-manager/themes/material-red/wallpaper.jpg b/dotfiles/home-manager/joey-laptop/themes/material-red/wallpaper.jpg similarity index 100% rename from nix/home-manager/themes/material-red/wallpaper.jpg rename to dotfiles/home-manager/joey-laptop/themes/material-red/wallpaper.jpg diff --git a/nix/home-manager/themes/nature-blue/theme.nix b/dotfiles/home-manager/joey-laptop/themes/nature-blue/theme.nix similarity index 100% rename from nix/home-manager/themes/nature-blue/theme.nix rename to dotfiles/home-manager/joey-laptop/themes/nature-blue/theme.nix diff --git a/nix/home-manager/themes/nature-blue/wallpaper.jpg b/dotfiles/home-manager/joey-laptop/themes/nature-blue/wallpaper.jpg similarity index 100% rename from nix/home-manager/themes/nature-blue/wallpaper.jpg rename to dotfiles/home-manager/joey-laptop/themes/nature-blue/wallpaper.jpg diff --git a/nix/home-manager/themes/nature-green/theme.nix b/dotfiles/home-manager/joey-laptop/themes/nature-green/theme.nix similarity index 100% rename from nix/home-manager/themes/nature-green/theme.nix rename to dotfiles/home-manager/joey-laptop/themes/nature-green/theme.nix diff --git a/nix/home-manager/themes/nature-green/wallpaper.jpg b/dotfiles/home-manager/joey-laptop/themes/nature-green/wallpaper.jpg similarity index 100% rename from nix/home-manager/themes/nature-green/wallpaper.jpg rename to dotfiles/home-manager/joey-laptop/themes/nature-green/wallpaper.jpg diff --git a/nix/home-manager/themes/nature-red/theme.nix b/dotfiles/home-manager/joey-laptop/themes/nature-red/theme.nix similarity index 100% rename from nix/home-manager/themes/nature-red/theme.nix rename to dotfiles/home-manager/joey-laptop/themes/nature-red/theme.nix diff --git a/nix/home-manager/themes/nature-red/wallpaper.jpg b/dotfiles/home-manager/joey-laptop/themes/nature-red/wallpaper.jpg similarity index 100% rename from nix/home-manager/themes/nature-red/wallpaper.jpg rename to dotfiles/home-manager/joey-laptop/themes/nature-red/wallpaper.jpg diff --git a/nix/home-manager/themes/temple/theme.nix b/dotfiles/home-manager/joey-laptop/themes/temple/theme.nix similarity index 100% rename from nix/home-manager/themes/temple/theme.nix rename to dotfiles/home-manager/joey-laptop/themes/temple/theme.nix diff --git a/nix/home-manager/themes/temple/wallpaper.png b/dotfiles/home-manager/joey-laptop/themes/temple/wallpaper.png similarity index 100% rename from nix/home-manager/themes/temple/wallpaper.png rename to dotfiles/home-manager/joey-laptop/themes/temple/wallpaper.png diff --git a/nix/home-manager/users/joey.nix b/dotfiles/home-manager/joey-laptop/users/joey.nix similarity index 100% rename from nix/home-manager/users/joey.nix rename to dotfiles/home-manager/joey-laptop/users/joey.nix diff --git a/nix/home-manager/wm/hyprland/hyprland.nix b/dotfiles/home-manager/joey-laptop/wm/hyprland/hyprland.nix similarity index 100% rename from nix/home-manager/wm/hyprland/hyprland.nix rename to dotfiles/home-manager/joey-laptop/wm/hyprland/hyprland.nix diff --git a/nix/home-manager/wm/hyprland/waybar-ml4w.css b/dotfiles/home-manager/joey-laptop/wm/hyprland/waybar-ml4w.css similarity index 100% rename from nix/home-manager/wm/hyprland/waybar-ml4w.css rename to dotfiles/home-manager/joey-laptop/wm/hyprland/waybar-ml4w.css diff --git a/nix/home-manager/wm/hyprland/waybar.css b/dotfiles/home-manager/joey-laptop/wm/hyprland/waybar.css similarity index 100% rename from nix/home-manager/wm/hyprland/waybar.css rename to dotfiles/home-manager/joey-laptop/wm/hyprland/waybar.css diff --git a/nix/home-manager/wm/hyprland/waybar.nix b/dotfiles/home-manager/joey-laptop/wm/hyprland/waybar.nix similarity index 100% rename from nix/home-manager/wm/hyprland/waybar.nix rename to dotfiles/home-manager/joey-laptop/wm/hyprland/waybar.nix diff --git a/nix/home-manager/wm/hyprland/wm.nix b/dotfiles/home-manager/joey-laptop/wm/hyprland/wm.nix similarity index 100% rename from nix/home-manager/wm/hyprland/wm.nix rename to dotfiles/home-manager/joey-laptop/wm/hyprland/wm.nix diff --git a/nix/home-manager/wm/hyprland/wofi.nix b/dotfiles/home-manager/joey-laptop/wm/hyprland/wofi.nix similarity index 100% rename from nix/home-manager/wm/hyprland/wofi.nix rename to dotfiles/home-manager/joey-laptop/wm/hyprland/wofi.nix diff --git a/nix/nixos/configuration.nix b/dotfiles/nixos/joey-laptop/configuration.nix similarity index 75% rename from nix/nixos/configuration.nix rename to dotfiles/nixos/joey-laptop/configuration.nix index 54c830c0..a021d56e 100644 --- a/nix/nixos/configuration.nix +++ b/dotfiles/nixos/joey-laptop/configuration.nix @@ -1,8 +1,8 @@ -{ pkgs, userSettings, ... }: +{ pkgs, inputs, ... }: { imports = [ ./hardware-configuration.nix - ./wm/${userSettings.wm}/desktopEnvironment.nix + ./wm/${inputs.vars."joey-laptop".wm}/desktopEnvironment.nix ./system.nix ./security.nix ./flatpak.nix @@ -13,10 +13,10 @@ # Configure user programs.zsh.enable = true; - users.users.${userSettings.user} = { + users.users.${inputs.vars."joey-laptop".username} = { isNormalUser = true; shell = pkgs.zsh; - description = "${userSettings.user}"; + description = "${inputs.vars."joey-laptop".username}"; extraGroups = [ "networkmanager" "wheel" ]; openssh.authorizedKeys.keys = let authorizedKeys = pkgs.fetchurl { diff --git a/nix/nixos/flatpak.nix b/dotfiles/nixos/joey-laptop/flatpak.nix similarity index 100% rename from nix/nixos/flatpak.nix rename to dotfiles/nixos/joey-laptop/flatpak.nix diff --git a/nix/nixos/fonts.nix b/dotfiles/nixos/joey-laptop/fonts.nix similarity index 100% rename from nix/nixos/fonts.nix rename to dotfiles/nixos/joey-laptop/fonts.nix diff --git a/nix/nixos/hardware-configuration.nix b/dotfiles/nixos/joey-laptop/hardware-configuration.nix similarity index 100% rename from nix/nixos/hardware-configuration.nix rename to dotfiles/nixos/joey-laptop/hardware-configuration.nix diff --git a/nix/nixos/locale.nix b/dotfiles/nixos/joey-laptop/locale.nix similarity index 100% rename from nix/nixos/locale.nix rename to dotfiles/nixos/joey-laptop/locale.nix diff --git a/nix/nixos/security.nix b/dotfiles/nixos/joey-laptop/security.nix similarity index 100% rename from nix/nixos/security.nix rename to dotfiles/nixos/joey-laptop/security.nix diff --git a/nix/nixos/steam.nix b/dotfiles/nixos/joey-laptop/steam.nix similarity index 100% rename from nix/nixos/steam.nix rename to dotfiles/nixos/joey-laptop/steam.nix diff --git a/nix/nixos/system.nix b/dotfiles/nixos/joey-laptop/system.nix similarity index 92% rename from nix/nixos/system.nix rename to dotfiles/nixos/joey-laptop/system.nix index 3bad9694..577bbeaf 100644 --- a/nix/nixos/system.nix +++ b/dotfiles/nixos/joey-laptop/system.nix @@ -1,4 +1,4 @@ -{ pkgs, inputs, systemSettings, ... }: +{ pkgs, inputs, ... }: { # Configure system packages environment.systemPackages = with pkgs; [ @@ -21,7 +21,7 @@ boot.loader.efi.canTouchEfiVariables = true; # Configure networking - networking.hostName = "${systemSettings.hostname}"; + networking.hostName = "${inputs.vars."joey-laptop".hostname}"; networking.networkmanager.enable = true; # Disable systemd's getty and autovt on tty1 diff --git a/nix/nixos/wm/hyprland/desktopEnvironment.nix b/dotfiles/nixos/joey-laptop/wm/hyprland/desktopEnvironment.nix similarity index 85% rename from nix/nixos/wm/hyprland/desktopEnvironment.nix rename to dotfiles/nixos/joey-laptop/wm/hyprland/desktopEnvironment.nix index df384f10..91f8301c 100644 --- a/nix/nixos/wm/hyprland/desktopEnvironment.nix +++ b/dotfiles/nixos/joey-laptop/wm/hyprland/desktopEnvironment.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, inputs, ... }: { environment.systemPackages = with pkgs; [ mako libnotify @@ -18,7 +18,7 @@ services.displayManager = { autoLogin = { enable = true; - user = "joey"; + user = "${inputs.vars."joey-laptop".username}"; }; sddm = { enable = true; diff --git a/nix/nixos/wm/plasma/desktopEnvironment.nix b/dotfiles/nixos/joey-laptop/wm/plasma/desktopEnvironment.nix similarity index 86% rename from nix/nixos/wm/plasma/desktopEnvironment.nix rename to dotfiles/nixos/joey-laptop/wm/plasma/desktopEnvironment.nix index 0e20f831..9cc7562c 100644 --- a/nix/nixos/wm/plasma/desktopEnvironment.nix +++ b/dotfiles/nixos/joey-laptop/wm/plasma/desktopEnvironment.nix @@ -1,4 +1,4 @@ -{ pkgs, lib, ... }: +{ pkgs, lib, inputs, ... }: { # Configure displayManager @@ -6,7 +6,7 @@ services.displayManager = { enable = true; autoLogin.enable = true; - autoLogin.user = "joey"; + autoLogin.user = "${inputs.vars."joey-laptop".username}"; sddm = { enable = true; autoNumlock = true; diff --git a/homelab/silver-flame/configuration.nix b/homelab/local-hosts/silver-flame/configuration.nix similarity index 100% rename from homelab/silver-flame/configuration.nix rename to homelab/local-hosts/silver-flame/configuration.nix diff --git a/homelab/silver-flame/flake.lock b/homelab/local-hosts/silver-flame/flake.lock similarity index 100% rename from homelab/silver-flame/flake.lock rename to homelab/local-hosts/silver-flame/flake.lock diff --git a/homelab/silver-flame/flake.nix b/homelab/local-hosts/silver-flame/flake.nix similarity index 100% rename from homelab/silver-flame/flake.nix rename to homelab/local-hosts/silver-flame/flake.nix diff --git a/homelab/silver-flame/helm/helmfile.yaml b/homelab/local-hosts/silver-flame/helm/helmfile.yaml similarity index 100% rename from homelab/silver-flame/helm/helmfile.yaml rename to homelab/local-hosts/silver-flame/helm/helmfile.yaml diff --git a/homelab/silver-flame/helm/values/metallb.yaml b/homelab/local-hosts/silver-flame/helm/values/metallb.yaml similarity index 100% rename from homelab/silver-flame/helm/values/metallb.yaml rename to homelab/local-hosts/silver-flame/helm/values/metallb.yaml diff --git a/homelab/silver-flame/helm/values/traefik.yaml b/homelab/local-hosts/silver-flame/helm/values/traefik.yaml similarity index 100% rename from homelab/silver-flame/helm/values/traefik.yaml rename to homelab/local-hosts/silver-flame/helm/values/traefik.yaml diff --git a/homelab/silver-flame/hosts/bard/hardware-configuration.nix b/homelab/local-hosts/silver-flame/hosts/bard/hardware-configuration.nix similarity index 100% rename from homelab/silver-flame/hosts/bard/hardware-configuration.nix rename to homelab/local-hosts/silver-flame/hosts/bard/hardware-configuration.nix diff --git a/homelab/silver-flame/hosts/cleric/hardware-configuration.nix b/homelab/local-hosts/silver-flame/hosts/cleric/hardware-configuration.nix similarity index 100% rename from homelab/silver-flame/hosts/cleric/hardware-configuration.nix rename to homelab/local-hosts/silver-flame/hosts/cleric/hardware-configuration.nix diff --git a/homelab/silver-flame/hosts/ranger/hardware-configuration.nix b/homelab/local-hosts/silver-flame/hosts/ranger/hardware-configuration.nix similarity index 100% rename from homelab/silver-flame/hosts/ranger/hardware-configuration.nix rename to homelab/local-hosts/silver-flame/hosts/ranger/hardware-configuration.nix diff --git a/homelab/silver-flame/manifests/cert-manager/cert-manager.yaml b/homelab/local-hosts/silver-flame/manifests/cert-manager/cert-manager.yaml similarity index 100% rename from homelab/silver-flame/manifests/cert-manager/cert-manager.yaml rename to homelab/local-hosts/silver-flame/manifests/cert-manager/cert-manager.yaml diff --git a/homelab/silver-flame/manifests/longhorn/longhorn.yaml b/homelab/local-hosts/silver-flame/manifests/longhorn/longhorn.yaml similarity index 100% rename from homelab/silver-flame/manifests/longhorn/longhorn.yaml rename to homelab/local-hosts/silver-flame/manifests/longhorn/longhorn.yaml diff --git a/homelab/silver-flame/manifests/nginx/nginx.yaml b/homelab/local-hosts/silver-flame/manifests/nginx/nginx.yaml similarity index 100% rename from homelab/silver-flame/manifests/nginx/nginx.yaml rename to homelab/local-hosts/silver-flame/manifests/nginx/nginx.yaml diff --git a/homelab/silver-flame/manifests/send/redis-pod.yaml b/homelab/local-hosts/silver-flame/manifests/send/redis-pod.yaml similarity index 100% rename from homelab/silver-flame/manifests/send/redis-pod.yaml rename to homelab/local-hosts/silver-flame/manifests/send/redis-pod.yaml diff --git a/homelab/silver-flame/manifests/send/send-claim0-persistentvolumeclaim.yaml b/homelab/local-hosts/silver-flame/manifests/send/send-claim0-persistentvolumeclaim.yaml similarity index 100% rename from homelab/silver-flame/manifests/send/send-claim0-persistentvolumeclaim.yaml rename to homelab/local-hosts/silver-flame/manifests/send/send-claim0-persistentvolumeclaim.yaml diff --git a/homelab/silver-flame/manifests/send/send-pod.yaml b/homelab/local-hosts/silver-flame/manifests/send/send-pod.yaml similarity index 100% rename from homelab/silver-flame/manifests/send/send-pod.yaml rename to homelab/local-hosts/silver-flame/manifests/send/send-pod.yaml diff --git a/homelab/silver-flame/manifests/send/send.yaml b/homelab/local-hosts/silver-flame/manifests/send/send.yaml similarity index 100% rename from homelab/silver-flame/manifests/send/send.yaml rename to homelab/local-hosts/silver-flame/manifests/send/send.yaml diff --git a/homelab/silver-flame/manifests/smb/smb.yaml b/homelab/local-hosts/silver-flame/manifests/smb/smb.yaml similarity index 100% rename from homelab/silver-flame/manifests/smb/smb.yaml rename to homelab/local-hosts/silver-flame/manifests/smb/smb.yaml diff --git a/nix/digitalocean/image.nix b/nix/digitalocean/image.nix deleted file mode 100644 index 6fa99796..00000000 --- a/nix/digitalocean/image.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ pkgs ? import { } }: -let config = { - imports = [ ]; -}; -in -(pkgs.nixos config).digitalOceanImage \ No newline at end of file diff --git a/nix/digitalocean/shell.nix b/nix/digitalocean/shell.nix deleted file mode 100644 index 64cc68f4..00000000 --- a/nix/digitalocean/shell.nix +++ /dev/null @@ -1,4 +0,0 @@ -{ pkgs ? import { } }: -pkgs.mkShell { - buildInputs = with pkgs; [ curl morph ]; -} \ No newline at end of file diff --git a/nix/home-manager/home.nix b/nix/home-manager/home.nix deleted file mode 100644 index c9599d62..00000000 --- a/nix/home-manager/home.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ userSettings, ... }: - -{ - home.stateVersion = "24.05"; - imports = [ ./users/${userSettings.user}.nix ]; -} \ No newline at end of file diff --git a/nix/iso/digitalocean.nix b/nix/iso/digitalocean.nix deleted file mode 100644 index 9a31b510..00000000 --- a/nix/iso/digitalocean.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - network = { - pkgs = import - (builtins.fetchGit { - name = "nixos-21.11-2021-12-19"; - url = "https://github.com/NixOS/nixpkgs"; - ref = "refs/heads/nixos-21.11"; - rev = "e6377ff35544226392b49fa2cf05590f9f0c4b43"; - }) - { }; - }; - - nixie = { modulesPath, lib, name, ... }: { - imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [ - (modulesPath + "/virtualisation/digital-ocean-config.nix") - ]; - - deployment.targetHost = "198.51.100.207"; - deployment.targetUser = "root"; - - networking.hostName = name; - - system.stateVersion = "21.11"; # Do not change lightly! - - deployment.healthChecks = { - http = [ - { - scheme = "http"; - port = 80; - path = "/"; - description = "check that nginx is running"; - } - ]; - }; - - networking.firewall.allowedTCPPorts = [ 80 ]; - - services.nginx = { - enable = true; - virtualHosts.default = { - default = true; - locations."/".return = "200 \"Hello from Nixie!\""; - }; - }; - }; -} - diff --git a/nix/iso/pc-configuration.nix b/nix/iso/pc-configuration.nix deleted file mode 100644 index eacc67b4..00000000 --- a/nix/iso/pc-configuration.nix +++ /dev/null @@ -1,413 +0,0 @@ -{ pkgs, ... }: -{ - imports = [ - ]; - services = { - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; - openssh = { - enable = true; - settings.PasswordAuthentication = false; - settings.KbdInteractiveAuthentication = false; - }; - printing.enable = true; - libinput = { - enable = true; - mouse.naturalScrolling = true; - touchpad.naturalScrolling = true; - }; - flatpak = { - enable = true; - update.onActivation = true; - }; - displayManager = { - autoLogin = { - enable = true; - user = "admin"; - }; - sddm = { - enable = true; - wayland.enable = true; - }; - }; - }; - fonts.packages = with pkgs; [ - font-awesome - noto-fonts noto-fonts-cjk noto-fonts-emoji - powerline-symbols - (pkgs.nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; } ) - ]; - home-manager.users.admin = { pkgs, ... }: { - home.packages = with pkgs; [ - vim - fastfetch - tree - btop - bat - fd - eza - fzf - cifs-utils - git - dig - ]; - programs.home-manager.enable = true; - home.stateVersion = "24.05"; - }; - home-manager.users.joey = { pkgs, ... }: { - home.username = "joey"; - home.homeDirectory = "/home/joey"; - home.file = { - rbw-config = { - target = ".config/rbw/config.json"; - text = '' - { - "email": "jafner425@gmail.com", - "sso_id": null, - "base_url": "https://bitwarden.jafner.tools", - "identity_url": null, - "ui_url": null, - "notifications_url": null, - "lock_timeout": 3600, - "sync_interval": 3600, - "pinentry": "pinentry-curses", - "client_cert_path": null - } - ''; - }; - }; - home.packages = with pkgs; [ - fastfetch - tree - btop - bat - fd - eza - fzf-git-sh - wl-clipboard - killall - pkgs-unstable.fzf - git - kdePackages.kdeconnect-kde - base16-schemes - rofi-rbw-wayland - rbw - pinentry-rofi - pinentry-all - nixd - vesktop - vlc - feh - flatpak - ]; - programs = { - home-manager.enable = true; - git = { - enable = true; - userName = "Joey Hafner"; - userEmail = "joey@jafner.net"; - delta.enable = true; - delta.options = { - side-by-side = true; - }; - }; - obs-studio = { - enable = true; - plugins = with pkgs.obs-studio-plugins; [ - obs-vaapi - obs-vkcapture - input-overlay - ]; - }; - rofi = { enable = true; }; - vscode = { - enable = true; - package = pkgs.vscodium; - mutableExtensionsDir = true; - extensions = with pkgs.vscode-extensions; [ - jnoortheen.nix-ide - continue.continue - ]; - userSettings = { - "nix.serverPath" = "nixd"; - "nix.enableLanguageServer" = true; - "explorer.confirmDragAndDrop" = false; - "workbench.colorTheme" = "Stylix"; - "git.autofetch" = true; - "git.confirmSync" = false; - "editor.fontFamily" = lib.mkForce "'Symbols Nerd Font Mono', 'PowerlineSymbols', 'DejaVu Sans Mono'"; - "git.enableSmartCommit" = true; - }; - userTasks = { - version = "2.0.0"; - tasks = [ - { - type = "shell"; - label = "NixOS Rebuild Switch"; - command = "sudo nixos-rebuild switch --flake ~/Jafner.net/nix"; - problemMatcher = []; - } - { - type = "shell"; - label = "Home-Manager Switch"; - command = "home-manager switch -b bak --flake ~/Jafner.net/nix"; - problemMatcher = []; - } - { - label = "System Rebuild"; - dependsOn = ["NixOS Rebuild Switch" "Home-Manager Switch" ]; - dependsOrder = "sequence"; - problemMatcher = []; - } - ]; - }; - }; - kitty = { enable = true; }; - tmux = { - enable = true; - newSession = true; - shell = "$HOME/.nix-profile/bin/zsh"; - }; - zsh = { - enable = true; - dotDir = ".config/zsh"; - enableCompletion = true; - autosuggestion.enable = true; - syntaxHighlighting.enable = true; - shellAliases = { - bat = "bat --paging=never --color=always"; - fd = "fd -Lu"; - ls = "eza"; - lt = "eza --tree"; - fetch = "fastfetch"; - neofetch = "fetch"; - find = ''fzf --preview "bat --color=always --style=numbers --line-range=:500 {}"''; - nu = "sudo nixos-rebuild switch --flake ~/Jafner.net/nix"; - hmu = "home-manager switch -b bak --flake ~/Jafner.net/nix"; - ngls = "nix-env --profile /nix/var/nix/profiles/system --list-generations"; - ngclean = "nix-collect-garbage --delete-old"; - ngcleanboot = "/run/current-system/bin/switch-to-configuration boot"; - }; - history = { - share = true; - save = 10000; - size = 10000; - expireDuplicatesFirst = false; - extended = false; - ignoreAllDups = false; - ignoreDups = true; - }; - initExtra = '' - bindkey '^[[1;5A' history-search-backward # Ctrl+Up-arrow - bindkey '^[[1;5B' history-search-forward # Ctrl+Down-arrow - bindkey '^[[1;5D' backward-word # Ctrl+Left-arrow - bindkey '^[[1;5C' forward-word # Ctrl+Right-arrow - bindkey '^[[H' beginning-of-line # Home - bindkey '^[[F' end-of-line # End - bindkey '^[w' kill-region # Delete - bindkey '^I^I' autosuggest-accept # Tab, Tab - bindkey '^[' autosuggest-clear # Esc - _fzf_compgen_path() { - fd --hidden --exclude .git . "$1" - } - _fzf_compgen_dir() { - fd --hidden --exclude .git . "$1" - } - eval "$(~/.nix-profile/bin/fzf --zsh)" - source ${pkgs.fzf-git-sh}/share/fzf-git-sh/fzf-git.sh - ''; - }; - eza = { - enable = true; - enableZshIntegration = true; - git = true; - extraOptions = [ - "--color=always" - "--long" - "--icons=always" - "--no-time" - "--no-user" - ]; - }; - vim = { - enable = true; - defaultEditor = true; - settings = { - copyindent = true; - relativenumber = true; - expandtab = true; - tabstop = 2; - }; - extraConfig = '' - set nocompatible - filetype on - filetype plugin on - filetype indent on - syntax on - set cursorline - set wildmenu - set wildmode=list:longest - ''; - }; - fzf = { - enable = true; - package = pkgs-unstable.fzf; - }; - }; - services = { - flatpak = { - enable = true; - uninstallUnmanaged = true; - packages = [ - { appId = "io.github.zen_browser.zen"; origin = "flathub"; } - ]; - }; - }; - stylix = { - enable = true; - autoEnable = true; - polarity = "dark"; - targets { - wofi.enable = true; - waybar = { - enableLeftBackColors = true; - enableCenterBackColors = true; - enableRightBackColors = true; - }; - }; - fonts = { - monospace = { - name = "DejaVu Sans Mono"; - package = pkgs.dejavu_fonts; - }; - serif = { - name = "DejaVu Serif"; - package = pkgs.dejavu_fonts; - }; - sansSerif = { - name = "DejaVu Sans"; - package = pkgs.dejavu_fonts; - }; - emoji = { - name = "Noto Color Emoji"; - package = pkgs.noto-fonts-color-emoji; - }; - sizes = { - terminal = 14; - applications = 12; - popups = 12; - desktop = 12; - }; - }; - }; - - home.stateVersion = "24.05"; - }; - users.users = { - admin = { - isNormalUser = true; - shell = pkgs.zsh; - description = "${userSettings.user}"; - extraGroups = [ "networkmanager" "wheel" ]; - openssh.authorizedKeys.keys = let - authorizedKeys = pkgs.fetchurl { - url = "https://github.com/Jafner.keys"; - sha256 = "1i3Vs6mPPl965g3sRmbXGzx6zQBs5geBCgNx2zfpjF4="; - }; - in pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys); - }; - joey = { - isNormalUser = true; - shell = pkgs.zsh; - description = "${userSettings.user}"; - extraGroups = [ "networkmanager" "wheel" ]; - openssh.authorizedKeys.keys = let - authorizedKeys = pkgs.fetchurl { - url = "https://github.com/Jafner.keys"; - sha256 = "1i3Vs6mPPl965g3sRmbXGzx6zQBs5geBCgNx2zfpjF4="; - }; - in pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys); - }; - }; - environment.systemPackages = with pkgs; [ - git - mako - libnotify - swww - wofi - polkit-kde-agent - xfce.thunar - ( writeShellScriptBin "nix-installer" '' - #!/usr/bin/env bash - set -euo pipefail - if [ "$(id -u)" -eq 0 ]; then - echo "$ERROR! $(basename "$0") should be run as a regular user" - exit 1 - fi - if [ ! -d "$HOME/Jafner.net/.git ]; then - git clone https://gitea.jafner.tools "$HOME/Jafner.net" - fi - - - - sudo nixos-install --flake "$HOME/Jafner.net/nix" - '' ) - ]; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - networking = { - hostName = "${systemSettings.hostname}"; - networkmanager.enable = true; - }; - security = { - sudo = { - enable = true; - extraRules = [{ - commands = [ - { - command = "ALL"; - options = [ "NOPASSWD" ]; - } - ]; - groups = [ "wheel" ]; - }]; - }; - rtkit.enable = true; - }; - xdg.portal = { - enable = true; - wlr.enable = true; - extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; - }; - time.timeZone = "America/Los_Angeles"; - i18n = { - defaultLocale = "en_US.UTF-8"; - extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - }; - systemd.services = { - "getty@tty1".enable = false; - "autovt@tty1".enable = false; - }; - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - hardware.pulseaudio.enable = false; - # DO NOT CHANGE - system.stateVersion = "24.05"; -} - diff --git a/nix/iso/server-configuration.nix b/nix/iso/server-configuration.nix deleted file mode 100644 index a1603191..00000000 --- a/nix/iso/server-configuration.nix +++ /dev/null @@ -1,107 +0,0 @@ -{ pkgs, ... }: -{ - nixpkgs = { - hostPlatform = "x86_64-linux"; - config.allowUnfree = true; - }; - imports = [ ]; - services = { - openssh = { - enable = true; - settings.PasswordAuthentication = false; - settings.KbdInteractiveAuthentication = false; - }; - }; - home-manager.users.admin = { pkgs, ... }: { - home.packages = with pkgs; [ ]; - programs.home-manager.enable = true; - home.stateVersion = "24.05"; - }; - users.users = { - admin = { - isNormalUser = true; - extraGroups = [ "networkmanager" "wheel" ]; - openssh.authorizedKeys.keys = let - authorizedKeys = pkgs.fetchurl { - url = "https://github.com/Jafner.keys"; - sha256 = "1i3Vs6mPPl965g3sRmbXGzx6zQBs5geBCgNx2zfpjF4="; - }; - in pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys); - }; - }; - environment.systemPackages = with pkgs; [ - vim - fastfetch - tree - btop - bat - fd - eza - fzf - cifs-utils - dig - git - ( writeShellScriptBin "nix-installer" '' - #!/usr/bin/env bash - set -euo pipefail - if [ "$(id -u)" -eq 0 ]; then - echo "$ERROR! $(basename "$0") should be run as a regular user" - exit 1 - fi - if [ ! -d "$HOME/Jafner.net/.git" ]; then - git clone https://gitea.jafner.tools "$HOME/Jafner.net" - fi - - - - sudo nixos-install --flake "$HOME/Jafner.net/nix" - '' ) - ]; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - networking = { - wireless = { enable = false; }; - hostName = "nixos-installer"; - networkmanager.enable = true; - }; - security = { - sudo = { - enable = true; - extraRules = [{ - commands = [ - { - command = "ALL"; - options = [ "NOPASSWD" ]; - } - ]; - groups = [ "wheel" ]; - }]; - }; - rtkit.enable = true; - }; - time.timeZone = "America/Los_Angeles"; - i18n = { - defaultLocale = "en_US.UTF-8"; - extraLocaleSettings = { - LC_ADDRESS = "en_US.UTF-8"; - LC_IDENTIFICATION = "en_US.UTF-8"; - LC_MEASUREMENT = "en_US.UTF-8"; - LC_MONETARY = "en_US.UTF-8"; - LC_NAME = "en_US.UTF-8"; - LC_NUMERIC = "en_US.UTF-8"; - LC_PAPER = "en_US.UTF-8"; - LC_TELEPHONE = "en_US.UTF-8"; - LC_TIME = "en_US.UTF-8"; - }; - }; - systemd.services = { - "getty@tty1".enable = false; - "autovt@tty1".enable = false; - }; - boot.loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - }; - # DO NOT CHANGE - system.stateVersion = "24.05"; -} -