diff --git a/README.md b/README.md new file mode 100644 index 0000000..cd20646 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +first install enable lanzaboote 'sudo sbctl create-keys' + +rebuild 'sudo nixos-rebuild switch --flake .# --no-write-lock-file -L --builders ""' + + diff --git a/flake.nix b/flake.nix index a07b888..9573ed1 100644 --- a/flake.nix +++ b/flake.nix @@ -70,7 +70,7 @@ # aragon - nixosConfigurations.legolas = nixpkgs.lib.nixosSystem { + nixosConfigurations.aragon = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { inherit inputs; }; modules = [ diff --git a/home/bash.nix b/home/bash.nix index c3c4fca..a7ff3a9 100644 --- a/home/bash.nix +++ b/home/bash.nix @@ -8,11 +8,11 @@ { sops.secrets = { "ai/openai" = { }; + "ai/openrouter" = { }; "ai/fireworks" = { }; "ai/cerebras" = { }; "ai/groq" = { }; "ai/mistral" = { }; - "ai/aistudio" = { }; }; programs.bash = { enable = true; @@ -31,6 +31,7 @@ "rm" = "rm -i"; # help me awoid accidental removals. + "cim" = "neovim"; "sl" = "eza"; "ls" = "eza"; "lls" = "ls"; @@ -42,11 +43,40 @@ bashrcExtra = '' # Export AI API keys from decrypted sops-nix secrets export OPENAI_API_KEY="$(cat ${config.sops.secrets."ai/openai".path})" + export OPENROUTER_API_KEY="$(cat ${config.sops.secrets."ai/openrouter".path})" export FIREWORKS_API_KEY="$(cat ${config.sops.secrets."ai/fireworks".path})" export CEREBRAS_API_KEY="$(cat ${config.sops.secrets."ai/cerebras".path})" export GROQ_API_KEY="$(cat ${config.sops.secrets."ai/groq".path})" export MISTRAL_API_KEY="$(cat ${config.sops.secrets."ai/mistral".path})" - export AISTUDIO_API_KEY="$(cat ${config.sops.secrets."ai/aistudio".path})" + + + #PS1 section + RESET='\[\e[0m\]' + BOLD='\[\e[1m\]' + CYAN='\[\e[36m\]' + GREEN='\[\e[32m\]' + BLUE='\[\e[34m\]' + YELLOW='\[\e[33m\]' + MAGENTA='\[\e[35m\]' + RED='\[\e[31m\]' + + if [[ -n "$SSH_CONNECTION" ]]; then + REMOTE_LABEL="\[''${YELLOW}\] (ssh)\[''${RESET}\]" + else + REMOTE_LABEL="" + fi + + # Git branch function + parse_git_branch() { + git branch --show-current 2>/dev/null | awk '{print " (" $1 ")"}' + } + + # Set prompt + if [[ $EUID -eq 0 ]]; then + PS1="''${BOLD}''${RED}\u''${RESET}:''${BOLD}''${RED}\h''${REMOTE_LABEL}''${RESET}:''${BOLD}''${GREEN}\w''${MAGENTA}\$(parse_git_branch) ''${BLUE}\A''${RESET}\$ " + else + PS1="''${BOLD}''${CYAN}\u''${RESET}:''${BOLD}''${CYAN}\h''${REMOTE_LABEL}''${RESET}:''${BOLD}''${GREEN}\w''${MAGENTA}\$(parse_git_branch) ''${BLUE}\A''${RESET}\$ " + fi ''; historyControl = [ "ignoredups" diff --git a/hosts/aragon/configuration.nix b/hosts/aragon/configuration.nix index edc0657..d5d4ff3 100644 --- a/hosts/aragon/configuration.nix +++ b/hosts/aragon/configuration.nix @@ -23,6 +23,7 @@ ../../modules/xdg.nix ../../modules/bluetooth.nix ../../modules/powerprofiles.nix + ../../modules/basePackages.nix ../../modules/develPackages.nix ../../modules/desktopApplications.nix diff --git a/hosts/legolas/configuration.nix b/hosts/legolas/configuration.nix index 143f7c8..2fa7dc9 100644 --- a/hosts/legolas/configuration.nix +++ b/hosts/legolas/configuration.nix @@ -29,6 +29,7 @@ ../../modules/xdg.nix ../../modules/bluetooth.nix ../../modules/powerprofiles.nix + ../../modules/basePackages.nix ../../modules/develPackages.nix ../../modules/desktopApplications.nix @@ -50,40 +51,12 @@ services.libinput.enable = true; - programs.firefox.enable = true; - - # List packages installed in system profile. - # You can use https://search.nixos.org/ to find more packages (and options). - environment.systemPackages = with pkgs; [ - vim - git - alacritty - foot - firefox - fuzzel - niri - - nixfmt-rfc-style - nixfmt-tree - - ]; - - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. programs.mtr.enable = true; programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; # This option defines the first version of NixOS you have installed on this particular machine, # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. diff --git a/modules/basePackages.nix b/modules/basePackages.nix new file mode 100644 index 0000000..6918c07 --- /dev/null +++ b/modules/basePackages.nix @@ -0,0 +1,18 @@ +{ + config, + pkgs, + lib, + ... +}: +{ + environment.systemPackages = with pkgs; [ + vim + git + nixfmt-rfc-style + nixfmt-tree + + zip + unzip + ]; + +} diff --git a/secrets/secrets.yaml b/secrets/secrets.yaml index cb677a3..a4f0c3e 100644 --- a/secrets/secrets.yaml +++ b/secrets/secrets.yaml @@ -12,11 +12,11 @@ miniflux: adminCredentialsFile: ENC[AES256_GCM,data:FPcdTiJqbI6MloU9JqAYPABoD/odegXks+JyEeCri8hOV0dPMd0TNDV8fN1bbIiJ4llzaclZbjl0HKM=,iv:5fd3O008aP34+7lGlG8vBPAIdmEjFPoneH+rJ6d9TI0=,tag:HKOHjGLiAIDBR54HJv9teA==,type:str] ai: openai: ENC[AES256_GCM,data:aFNl4S66JSpP94Lky0x10F5mAJMQ7XWIOTmFjq0IdZYoxqjHZW8nnwbUcsU4zHjBNrFwEyZJNw8QWWoA0LHYRIJzdiCOFk/xWTgAssaDSbXnozIYsa14RkHUma4fho1s/g6QgwFLtgtv1Qr/nlunwjp+m1d34w4MHjSNQnwcGl14ib3suvzorTkCZKI3tg1JGi3cCva0vYzpAACIT54dfaqM0tsoq3w=,iv:rFad2sTdvNHZ5n/DgTLUfHe1qjR8O9nTagsWO5qvbJs=,tag:HFEtMDWis+7N/+ULl7Fu5A==,type:str] + openrouter: ENC[AES256_GCM,data:KCxE/tf/5wXmCuEIN4dXExUki18hcbTOYWFuNIT3T4+HsZ0/Y/FkTmlivjYsYmgdZlA+o/Pb2i1nnkAVruIZJkl3xOK+10LeVQ==,iv:pvVc8JThQL+adYo3lyM2N+RrM1rVL8IqN25R6DTplsQ=,tag:6DuvUBY9PgFXL40Tv4SPlA==,type:str] fireworks: ENC[AES256_GCM,data:NRMhwIzashk1oKPB4A8ExFa3K8bE7kWqLSzL,iv:awolsk2O0nx/8UutC4DDxxNcQCMMt376pbtBUFbkjkw=,tag:BzbZmZhLZ1rMXtZCwfdW1g==,type:str] cerebras: ENC[AES256_GCM,data:WcdDsWIgKr0lRb/daoqmzl6E5q3ToICHMLJKrj2rW7pdDpEIZ95DtdNFGQE8Vpy3u9x/SA==,iv:1tZU5nfWCur/Uk54RccS7ldv+94D3CKPgAeK30PB8j4=,tag:IeCgemTemEcKr94YwQKevQ==,type:str] groq: ENC[AES256_GCM,data:m/BTJoBCP6pxM9zPsf2V78BaHGrueakFjtqkut4fuXxluSlEXVDCCupWVbKF2Eo8phrOhxGcgVc=,iv:taiWwphOVhbLuO5ygf5iDIvhEoAxncTEQ8CFNKOObP4=,tag:VFU4ORxUodiGf9dNINYoww==,type:str] mistral: ENC[AES256_GCM,data:tZ7gZatfyhffKyKmlbtiNEp9MaIp4cVvSkZbrHFaAKE=,iv:r9QSqstFiR9QrLehHrQu09iaF0PYroz/p1ENChch/I0=,tag:iOjSupJ5ZFAyAcuxXcjNpg==,type:str] - aistudio: ENC[AES256_GCM,data:UEYpuq3SWlpxSgZUWSKLeW2RvPXVC4Zz1r26cZqc/ttGiS4vHlN+,iv:e2IOtS4HbdqMxysus+M7CRIuu7dC/bQnzPQxhJ8LLbQ=,tag:+uUKk5XnFgyOhTeZKLAimA==,type:str] openvpn: galadriel: config: ENC[AES256_GCM,data:f9uDYNLHP63oee5lGMPsmZ76f80n51eYxd3hvF5ZhPGtCspBEOMLHRonTSEril1wKCT3i1DWR967lWTdjJs6KOpoX5JqKz2Qj9tkpXS5jnHZAf0JQg1l7jmf9/a2OKJparVCFJyNPTN5mzl3gGOyDGe0TIT+ZtP8/PCWsQNjB89Crd/kHSSAmIUb2fcNXEkxs6XwgsBAlhbR69e+06NYaRyX5ydVV/kDekx+ixpx2bIqMQqIdEk358RLCauP3wAh1FoqTTJ2eqLcDhuPySFol9cLCInWnColNdyb/0+czrEa4DiLrbFVXx7bUVwjd9rb+eoajC1e09d41aJkVHG1LxlSRjq1sBlI3v3E1vaUBJWegZBROEpqEOCKfHSagkmaanaBv/KMq1MFmXJ1MzyskDJb9MdNFKRQBjQLwBXnURts/Yj9ChrT51z+/bwItxt8XmlwIEgL65F/8h1+bUJGOi27ZAvfkixflff0ELYSPvQI+N1vFlF9QP6AmIFxF2SdmOSlYzTYIz0+LMejLltCEUdU2qdlZ0a9DuYlsxvnZ75JgWXviw==,iv:C2Zb1DLTMlsEqQ5/UUrpT9k5Z51YYGu3SUcu1F20ydc=,tag:wGkQ7LWgCfy0K3zM38JxHQ==,type:str] @@ -35,7 +35,7 @@ sops: OHNBdXMzZTN0VEVTYkVSbUVRYmo3eUUKvRiPgmrCCK1F5QoSHlV89C2MPl5FvU5i z61NMJu68UEDsDu8qNRaW3aqpT+1GYsr1evi5imzNwr0qTM2oRwkFQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-08-24T09:52:43Z" - mac: ENC[AES256_GCM,data:yMmdK28YRNHXIrgG0QzF0r71+XwmZiVkbwBees+VJB2MLL6/zrXGB171r7Rr8XDILVAnBS5UXusIw7fa9OMaLIIMVA6CjTG1Qy21INKS8b/XUz2s0c67eRbhkV6Si9oC4bEnBg/hoazPclvB/uTFkQLbHAAdf8wBd6oSxRE7b9I=,iv:i6ZeKs9aItbE0SS9/BQyGXeSui/jDHEj+/+UIEcFNdg=,tag:RMHX4nKxXBKM7Jfq0uu3QA==,type:str] + lastmodified: "2025-09-29T18:54:55Z" + mac: ENC[AES256_GCM,data:mju2fz9txxzB28V3JkPYdbLrrgiSLNo95urNMr5B4eWJViln0oW5VYJsrO0nVg3QKrVWg3bVo4Bhoxo2r8QBQTxSwHobjX9nWd4fBsQZ59PqhSVSG2xmza+8SX4NgovPoLeT4h475l2Y1MmFs+LFqTtjgRv3t0xjHDMle/FhXuk=,iv:RJIEdz/eni3Gmn5i49N0MgMIKqF3Z62yx615Qor7MIY=,tag:/3w1JrnOVNq8KLDO9vxhWA==,type:str] unencrypted_suffix: _unencrypted version: 3.10.2