From b754fac210373e3c5be345e9c290c9baacec3d82 Mon Sep 17 00:00:00 2001 From: foglar Date: Sun, 6 Apr 2025 10:41:44 +0200 Subject: [PATCH] fixes and updates, ssh, waydroid, steam, fastfetch --- flake.nix | 10 ++++++-- ginoza/configuration.nix | 2 +- kogami/configuration.nix | 27 ++++++++++++++-------- nixos/home/apps/applications.nix | 1 + nixos/home/desktop/hyprland/hyprland.nix | 2 ++ nixos/home/packages/programming/code.nix | 3 +++ nixos/home/packages/tools/fastfetch.nix | 14 ++++++----- nixos/home/packages/tools/shell.nix | 12 ++++++---- nixos/system/packages.nix | 8 +++++-- nixos/system/packages/sops/sops.nix | 14 +++++++++++ nixos/system/packages/ssh-client.nix | 6 ++++- nixos/system/packages/steam.nix | 5 ++++ nixos/system/packages/virtual-machines.nix | 4 ++++ 13 files changed, 83 insertions(+), 25 deletions(-) diff --git a/flake.nix b/flake.nix index a630406..eecc06a 100644 --- a/flake.nix +++ b/flake.nix @@ -59,7 +59,7 @@ # NixOS Configurations nixosConfigurations = { kogami = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + inherit system; specialArgs = { inherit inputs system pkgs pkgs-stable userSettings; }; @@ -74,7 +74,7 @@ ]; }; ginoza = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; + inherit system; specialArgs = { inherit inputs system pkgs pkgs-stable userSettings; }; @@ -179,6 +179,12 @@ flake = false; }; + #nix-secrets = { + # url = "git+ssh://git@git.foglar.tech:foglar/nix-secrets.git"; + # inputs.nixpkgs.follows = "nixpkgs"; + # flake = false; + #}; + # Nix on Droid Configuration nixpkgs-droid.url = "github:NixOS/nixpkgs/nixos-24.05"; diff --git a/ginoza/configuration.nix b/ginoza/configuration.nix index 6b4b1d9..34d809b 100644 --- a/ginoza/configuration.nix +++ b/ginoza/configuration.nix @@ -12,7 +12,6 @@ ../nixos/system/system.nix inputs.home-manager.nixosModules.home-manager ]; - # Home manager home-manager = { @@ -62,6 +61,7 @@ docker.enable = false; podman.enable = false; steam.enable = false; + steam-tui.enable = false; proxychains.enable = false; tor.enable = false; virt-manager.enable = false; diff --git a/kogami/configuration.nix b/kogami/configuration.nix index 5c8cd74..b461e20 100644 --- a/kogami/configuration.nix +++ b/kogami/configuration.nix @@ -68,10 +68,12 @@ podman.enable = true; ollama.enable = false; steam.enable = true; + steam-tui.enable = true; proxychains.enable = true; tor.enable = true; virt-manager.enable = true; virtualbox.enable = false; + waydroid.enable = true; yubikey = { enable = true; lock-on-remove = false; @@ -91,16 +93,23 @@ nix-ld.dev.enable = true; }; - environment.systemPackages = [ - inputs.install-script.packages.${system}.default - inputs.shinya-nvf.packages.${system}.nvf - inputs.zen-browser.packages.${system}.default + environment.systemPackages = + ( + with inputs; [ + install-script.packages.${system}.default + shinya-nvf.packages.${system}.nvf + zen-browser.packages.${system}.default + ] + ) + ++ ( + with pkgs; [ + gcc + corefonts + uutils-coreutils-noprefix + ] + ); - pkgs.gcc - pkgs.corefonts - ]; - - #services.twingate.enable = true; + #services.twingate.enable = true; # Allow unfree packages nixpkgs.config.allowUnfree = true; diff --git a/nixos/home/apps/applications.nix b/nixos/home/apps/applications.nix index 4903778..d9e8261 100644 --- a/nixos/home/apps/applications.nix +++ b/nixos/home/apps/applications.nix @@ -17,6 +17,7 @@ ferdium bitwarden + proton-pass #bitwarden-cli file-roller diff --git a/nixos/home/desktop/hyprland/hyprland.nix b/nixos/home/desktop/hyprland/hyprland.nix index ac01bee..8bed274 100644 --- a/nixos/home/desktop/hyprland/hyprland.nix +++ b/nixos/home/desktop/hyprland/hyprland.nix @@ -464,6 +464,8 @@ "float,class:^(Bitwarden)$" "float, initialClass:^(PacketTracer)" + "float, initialTitle:^(Open File)" + "float, initialClass:^(xdg-desktop-portal-gtk)" ]; layerrule = [ diff --git a/nixos/home/packages/programming/code.nix b/nixos/home/packages/programming/code.nix index 59ab1f8..c37f72e 100644 --- a/nixos/home/packages/programming/code.nix +++ b/nixos/home/packages/programming/code.nix @@ -200,6 +200,9 @@ "[css]" = { "editor.defaultFormatter" = "esbenp.prettier-vscode"; }; + "[scss]" = { + "editor.defaultFormatter" = "esbenp.prettier-vscode"; + }; }; extensions = with pkgs-stable.vscode-extensions; [ diff --git a/nixos/home/packages/tools/fastfetch.nix b/nixos/home/packages/tools/fastfetch.nix index 3792c90..fa9a5d5 100644 --- a/nixos/home/packages/tools/fastfetch.nix +++ b/nixos/home/packages/tools/fastfetch.nix @@ -24,8 +24,14 @@ if userSettings.theme == "evangelion-blood" || userSettings.theme == "tokyo-night-dark" then { "source" = "/home/shinya/.config/fastfetch/logo.png"; - "width" = 42; - "height" = 19; + "width" = + if userSettings.theme == "evangelion-blood" + then 34 + else 42; + "height" = + if userSettings.theme == "evangelion-blood" + then 18 + else 19; "padding" = { "top" = 1; }; @@ -117,10 +123,6 @@ "key" = "{#separator}│ {#keys}󰋊 Disk (/)"; "folders" = "/"; } - { - "type" = "custom"; - "format" = "{#1}│"; - } { "type" = "custom"; "format" = "{#1}╰───────────────────────────────╯"; diff --git a/nixos/home/packages/tools/shell.nix b/nixos/home/packages/tools/shell.nix index 2f37642..1d7a2e6 100644 --- a/nixos/home/packages/tools/shell.nix +++ b/nixos/home/packages/tools/shell.nix @@ -11,7 +11,7 @@ l = "${pkgs.eza}/bin/eza -lh --icons=auto"; tree = "${pkgs.eza}/bin/eza --tree --icons"; neofetch = "${pkgs.fastfetch}/bin/fastfetch"; - open ="xdg-open"; + open = "xdg-open"; ip = "ip -c"; s = "kitten ssh"; icat = "kitten icat"; @@ -41,8 +41,10 @@ in { bashrcExtra = if userSettings.hostname != "ginoza" - then ''${pkgs.pfetch}/bin/pfetch'' - else ''''; + then '' + TERM=xterm-256color + ${pkgs.pfetch}/bin/pfetch'' + else ''TERM=xterm-256color''; }; home.sessionVariables = { @@ -62,7 +64,9 @@ in { initExtra = '' ${pkgs.pfetch}/bin/pfetch set -o emacs - bindkey "^[[3~" delete-char''; + bindkey "^[[3~" delete-char + TERM=xterm-256color + ''; }; }) ]; diff --git a/nixos/system/packages.nix b/nixos/system/packages.nix index c91d120..63b54c7 100644 --- a/nixos/system/packages.nix +++ b/nixos/system/packages.nix @@ -20,17 +20,21 @@ wakapi.enable = lib.mkDefault true; ollama.enable = lib.mkDefault false; steam.enable = lib.mkDefault true; + steam-tui.enable = lib.mkDefault false; proxychains.enable = lib.mkDefault true; tor.enable = lib.mkDefault true; virt-manager.enable = lib.mkDefault true; virtualbox.enable = lib.mkDefault true; + waydroid.enable = lib.mkDefault false; yubikey = { enable = lib.mkDefault false; lock-on-remove = lib.mkDefault false; notify = lib.mkDefault false; }; - ssh.client.enable = lib.mkDefault true; - ssh.server.enable = lib.mkDefault false; + ssh = { + client.enable = lib.mkDefault true; + server.enable = lib.mkDefault false; + }; syncthing.enable = lib.mkDefault true; }; diff --git a/nixos/system/packages/sops/sops.nix b/nixos/system/packages/sops/sops.nix index b06f232..d2446ce 100644 --- a/nixos/system/packages/sops/sops.nix +++ b/nixos/system/packages/sops/sops.nix @@ -37,6 +37,20 @@ owner = userSettings.username; group = "users"; }; + + # git.hater.dev + "ssh_keys/hater_private" = { + path = "/home/${userSettings.username}/.ssh/id_shinya3"; + owner = userSettings.username; + group = "users"; + }; + + # gitea.homework.zip + "ssh_keys/homework_private" = { + path = "/home/${userSettings.username}/.ssh/id_homework"; + owner = userSettings.username; + group = "users"; + }; "wakapi/salt" = { owner = userSettings.username; diff --git a/nixos/system/packages/ssh-client.nix b/nixos/system/packages/ssh-client.nix index af4cb26..5fa7a40 100644 --- a/nixos/system/packages/ssh-client.nix +++ b/nixos/system/packages/ssh-client.nix @@ -13,10 +13,14 @@ HostName 192.168.8.140 User foglar IdentityFile ~/.ssh/id_masaoka - Host git + Host hater HostName git.hater.dev User foglar IdentityFile ~/.ssh/id_shinya3 + Host homework + Hostname gitea.homework.zip + User shinya + IdentityFile ~/.ssh/id_github ''; }; }; diff --git a/nixos/system/packages/steam.nix b/nixos/system/packages/steam.nix index cff66d7..3ffbb55 100644 --- a/nixos/system/packages/steam.nix +++ b/nixos/system/packages/steam.nix @@ -7,6 +7,8 @@ }: { options = { program.steam.enable = lib.mkEnableOption "Enable Steam module"; + program.steam-tui.enable = lib.mkEnableOption "Enable Steam TUI"; + sys.desktop.steamdeck.enable = lib.mkEnableOption "Enable Steam desktop integration"; }; @@ -29,5 +31,8 @@ ''; }; }) + (lib.mkIf config.program.steam-tui.enable { + environment.systemPackages = with pkgs; [steam-tui steamcmd]; + }) ]; } diff --git a/nixos/system/packages/virtual-machines.nix b/nixos/system/packages/virtual-machines.nix index f5bd878..ccf80af 100644 --- a/nixos/system/packages/virtual-machines.nix +++ b/nixos/system/packages/virtual-machines.nix @@ -7,6 +7,7 @@ options = { program.virt-manager.enable = lib.mkEnableOption "Enable virt-manager"; program.virtualbox.enable = lib.mkEnableOption "Enable VirtualBox"; + program.waydroid.enable = lib.mkEnableOption "Enable Waydroid"; }; config = lib.mkMerge [ (lib.mkIf config.program.virt-manager.enable { @@ -24,5 +25,8 @@ }; users.extraGroups.vboxusers.members = ["${userSettings.username}"]; }) + (lib.mkIf config.program.waydroid.enable { + virtualisation.waydroid.enable = true; + }) ]; }