From 0abf1447af15ab767d4c174572eb7dd0c9da5698 Mon Sep 17 00:00:00 2001 From: lsoriano-mcm Date: Sat, 7 Jun 2025 11:24:52 -0500 Subject: [PATCH] test --- info.default.nix | 58 ++++++++++++++++++--------------- modules/desktop/editor.nix | 11 ------- modules/editor.nix | 2 +- nixos/desktop/configuration.nix | 7 ++-- nixos/macos/darwin.nix | 8 +++-- pkgs/fish/default.nix | 8 +++-- pkgs/kitty/default.nix | 4 +-- pkgs/zsh/default.nix | 8 +++-- system/users.nix | 14 +++++--- 9 files changed, 63 insertions(+), 57 deletions(-) delete mode 100644 modules/desktop/editor.nix diff --git a/info.default.nix b/info.default.nix index 8bf0dfa..3874e84 100644 --- a/info.default.nix +++ b/info.default.nix @@ -8,22 +8,24 @@ vpnSecretFile = "/home/biscuit/Wireguard/secret"; }; - allowUnfree = true; - touchpadSupport = false; - - termFont = "JetBrainsMono Nerd Font"; # e.g., JetBrainsMono Nerd Font - - shellAliases = { - update = '' - if [[ $(uname) == "Darwin" ]]; then - darwin-rebuild switch --flake ~/.config/nixos#macos - else - sudo nixos-rebuild switch --flake ~/.config/nixos#desktop && home-manager switch --flake ~/.config/nixos#desktop - fi - ''; - agu = "pkill gjs & ags run ~/.config/nixos/pkgs/ags/biscuit/app.ts & disown (jobs -p) &"; + terminal = { + termFont = "JetBrainsMono Nerd Font"; # e.g., JetBrainsMono Nerd Font + termShell = "fish"; + shellAliases = { + update = '' + if [[ $(uname) == "Darwin" ]]; then + sudo darwin-rebuild switch --flake ~/.config/nixos#macos + else + sudo nixos-rebuild switch --flake ~/.config/nixos#desktop && home-manager switch --flake ~/.config/nixos#desktop + fi + ''; + agu = "pkill gjs & ags run ~/.config/nixos/pkgs/ags/biscuit/app.ts & disown (jobs -p) &"; + }; }; + allowUnfree = true; # allows installation of commercial apps. + touchpadSupport = false; + # Custom Applications linux-apps = pkgs: with pkgs; [ @@ -37,17 +39,19 @@ ''; # BUILD (optional), you can remove these blocks. - trustedUsers = [ - "@groups" - "biscuit" - ]; - buildMachines = [ - { - hostName = "192.168.68.81"; - sshUser = "biscuit"; - sshKey = "/home/biscuit/.ssh/id_rsa.pub"; - system = "x86_64-linux"; - supportedFeatures = ["big-parallel" "kvm" "nixos-test"]; - } - ]; + builder = { + trustedUsers = [ + "@groups" + "biscuit" + ]; + buildMachines = [ + { + hostName = "192.168.68.81"; + sshUser = "biscuit"; + sshKey = "/home/biscuit/.ssh/id_rsa.pub"; + system = "x86_64-linux"; + supportedFeatures = ["big-parallel" "kvm" "nixos-test"]; + } + ]; + }; } diff --git a/modules/desktop/editor.nix b/modules/desktop/editor.nix deleted file mode 100644 index 9627ac8..0000000 --- a/modules/desktop/editor.nix +++ /dev/null @@ -1,11 +0,0 @@ -{...}: { - imports = [ - ../../pkgs/fastfetch/default.nix - ../../pkgs/git/default.nix - ../../pkgs/kitty/default.nix - ../../pkgs/neovim/default.nix - ../../pkgs/fish/default.nix - ../../pkgs/starship/default.nix - # ../../pkgs/zsh/default.nix - ]; -} diff --git a/modules/editor.nix b/modules/editor.nix index 8877889..25fa28b 100644 --- a/modules/editor.nix +++ b/modules/editor.nix @@ -6,6 +6,6 @@ ../pkgs/neovim/default.nix ../pkgs/fish/default.nix ../pkgs/starship/default.nix - # ../../pkgs/zsh/default.nix + ../pkgs/zsh/default.nix ]; } diff --git a/nixos/desktop/configuration.nix b/nixos/desktop/configuration.nix index 03c5b3a..2cfe914 100644 --- a/nixos/desktop/configuration.nix +++ b/nixos/desktop/configuration.nix @@ -1,8 +1,7 @@ { pkgs, allowUnfree, - buildMachines, - trustedUsers, + builder, sshExtraConfig, ... }: { @@ -22,7 +21,7 @@ nixpkgs.config.allowUnfree = allowUnfree; nix.settings = { - trusted-users = trustedUsers; + trusted-users = builder.trustedUsers; experimental-features = ["nix-command" "flakes"]; }; @@ -31,6 +30,6 @@ nix.distributedBuilds = true; nix.settings.builders-use-substitutes = true; - # nix.buildMachines = buildMachines; + # nix.buildMachines = builder.buildMachines; system.stateVersion = "25.05"; } diff --git a/nixos/macos/darwin.nix b/nixos/macos/darwin.nix index 3c892cc..f5299e9 100644 --- a/nixos/macos/darwin.nix +++ b/nixos/macos/darwin.nix @@ -1,6 +1,7 @@ { pkgs, - trustedUsers, + builder, + terminal, ... }: { # List packages installed in system profile. To search by name, run: @@ -17,11 +18,11 @@ # Necessary for using flakes on this system. nix.settings.experimental-features = "nix-command flakes"; - nix.settings.trusted-users = trustedUsers; + nix.settings.trusted-users = builder.trustedUsers; # Create /etc/zshrc that loads the nix-darwin environment. programs.zsh.enable = true; # default shell on catalina - # programs.fish.enable = true; + programs.fish.enable = true; # $ darwin-rebuild changelog system.stateVersion = 5; @@ -32,6 +33,7 @@ users.users.lsoriano = { name = "lsoriano"; home = "/Users/lsoriano"; + shell = pkgs.${terminal.termShell}; }; home-manager.users.lsoriano = import ../../home/macos/home.nix; diff --git a/pkgs/fish/default.nix b/pkgs/fish/default.nix index b6feffc..c618985 100644 --- a/pkgs/fish/default.nix +++ b/pkgs/fish/default.nix @@ -1,4 +1,8 @@ -{pkgs, shellAliases, ...}: { +{ + pkgs, + terminal, + ... +}: { programs.zoxide.enable = true; programs.fish = { enable = true; @@ -8,7 +12,7 @@ zoxide init fish | source ''; - shellAliases = shellAliases; + shellAliases = terminal.shellAliases; plugins = with pkgs.fishPlugins; [ ]; diff --git a/pkgs/kitty/default.nix b/pkgs/kitty/default.nix index f8a7658..e298bcc 100755 --- a/pkgs/kitty/default.nix +++ b/pkgs/kitty/default.nix @@ -1,4 +1,4 @@ -{termFont, ...}: { +{terminal, ...}: { programs.kitty = { enable = true; themeFile = "Catppuccin-Mocha"; @@ -7,7 +7,7 @@ window_padding_width = 10; font_size = 12.0; - font_family = termFont; + font_family = terminal.termFont; bold_font = "auto"; italic_font = "auto"; bold_italic_font = "auto"; diff --git a/pkgs/zsh/default.nix b/pkgs/zsh/default.nix index a4f1d5b..976def6 100644 --- a/pkgs/zsh/default.nix +++ b/pkgs/zsh/default.nix @@ -1,4 +1,8 @@ -{pkgs, shellAliases,...}: { +{ + pkgs, + terminal, + ... +}: { home.packages = with pkgs; [ zoxide oh-my-posh @@ -28,7 +32,7 @@ ]; enableCompletion = true; syntaxHighlighting.enable = true; - shellAliases = shellAliases; + shellAliases = terminal.shellAliases; history.size = 10000; oh-my-zsh = { plugins = []; diff --git a/system/users.nix b/system/users.nix index f601629..4a78671 100644 --- a/system/users.nix +++ b/system/users.nix @@ -1,11 +1,15 @@ -{ pkgs, username, ... }: { +{ + pkgs, + username, + terminal, + ... +}: { users.users.${username} = { isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; + extraGroups = ["wheel" "networkmanager"]; initialHashedPassword = "$6$Qab6SSvEJM2YRtVA$7Oyl7E3pp/FKtCC.2Tb2tyzp3yp7BFHFAKngUYJssQJ.v1Q2mqsgW9m7njpaKNcka2vyCwrnmw1R.YPlFqR0p1"; # shell = pkgs.zsh; - shell = pkgs.fish; - packages = with pkgs; [ - ]; + shell = pkgs.${terminal.termShell}; + packages = []; }; }