testing nushell

This commit is contained in:
alisceon 2025-08-08 21:43:53 +02:00
parent 183ff23447
commit 96057e337b
5 changed files with 108 additions and 58 deletions

24
flake.lock generated
View file

@ -25,11 +25,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1753056897, "lastModified": 1754613544,
"narHash": "sha256-AVVMBFcuOXqIgmShvRv9TED3fkiZhQ0ZvlhsPoFfkNE=", "narHash": "sha256-ueR1mGX4I4DWfDRRxxMphbKDNisDeMPMusN72VV1+cc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "13a83d1b6545b7f0e8f7689bad62e7a3b1d63771", "rev": "cc2fa2331aebf9661d22bb507d362b39852ac73f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -40,11 +40,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1752950548, "lastModified": 1754498491,
"narHash": "sha256-NS6BLD0lxOrnCiEOcvQCDVPXafX1/ek1dfJHX1nUIzc=", "narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c87b95e25065c028d31a94f06a62927d18763fdf", "rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -54,18 +54,18 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs-stable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1753115646, "lastModified": 1754498491,
"narHash": "sha256-yLuz5cz5Z+sn8DRAfNkrd2Z1cV6DaYO9JMrEz4KZo/c=", "narHash": "sha256-erbiH2agUTD0Z30xcVSFcDHzkRvkRXOQ3lb887bcVrs=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "92c2e04a475523e723c67ef872d8037379073681", "rev": "c2ae88e026f9525daf89587f3cbee584b92b6134",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-25.05", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -75,7 +75,7 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"home-manager": "home-manager", "home-manager": "home-manager",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-unstable": "nixpkgs-unstable"
} }
}, },
"systems": { "systems": {

View file

@ -2,8 +2,8 @@
description = "NixOS configuration for all hosts"; description = "NixOS configuration for all hosts";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; #"github:NixOS/nixpkgs/nixos-25.05";
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.05"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
@ -11,15 +11,32 @@
}; };
}; };
outputs = { self, nixpkgs, flake-utils, home-manager, ... }: outputs = { self, nixpkgs, nixpkgs-unstable, flake-utils, home-manager, ... }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
pkgs-unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
sharedModules = [ sharedModules = [
./hosts/common.nix ./hosts/common.nix
{
nixpkgs.config.allowUnfree = true;
}
home-manager.nixosModules.home-manager
({ config, ...}: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit (config.networking) hostName;
}; # end extraSpecialArgs
home-manager.users.alisceon = import ./home/alisceon.nix;
home-manager.backupFileExtension = "backup";
}) # end home manager
]; ];
in in
{ {
@ -27,39 +44,13 @@
electra = nixpkgs.lib.nixosSystem { electra = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = sharedModules ++ [ modules = sharedModules ++ [
{
nixpkgs.config.allowUnfree = true;
}
./hosts/electra/configuration.nix ./hosts/electra/configuration.nix
home-manager.nixosModules.home-manager
({ config, ...}: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit (config.networking) hostName;
}; # end extraSpecialArgs
home-manager.users.alisceon = import ./home/alisceon.nix;
home-manager.backupFileExtension = "backup";
}) # end home manager
]; # end modules ]; # end modules
}; # end electra }; # end electra
tower = nixpkgs.lib.nixosSystem { tower = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
modules = sharedModules ++ [ modules = sharedModules ++ [
{
nixpkgs.config.allowUnfree = true;
}
./hosts/tower/configuration.nix ./hosts/tower/configuration.nix
home-manager.nixosModules.home-manager
({ config, ...}: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit (config.networking) hostName;
}; #end extraSpecialArgs
home-manager.users.alisceon = import ./home/alisceon.nix;
home-manager.backupFileExtension = "backup";
}) # end home manager
]; # end modules ]; # end modules
}; # end tower }; # end tower
}; # end nixos conf }; # end nixos conf

View file

@ -38,8 +38,40 @@
# Tower commands # Tower commands
weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 && reboot"; weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 && reboot";
# Misc commands
nix-shell = "nix shell";
}; };
}; # end fish }; # end fish
nushell = {
enable = true;
shellAliases = {
tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0";
# NixOS commands
nixoss = "sudo nixos-rebuild switch --flake .#${hostName}";
nixos-main = "git checkout main && git pull && sudo nixos-rebuild switch --flake #${hostName}";
nixossr = "sudo nixos-rebuild switch --flake .#${hostName} && reboot";
nixost = "sudo nixos-rebuild build-vm --flake .#${hostName}";
# Development commands
devt = "devenv test";
devtas = "devenv tasks list";
devtar = "devenv tasks run";
devs = "devenv shell";
devu = "devenv up -d";
devi = "nix flake init -t templates#";
pypod = "podman run --rm -it --network host -v '.:/run' -w '/run' python /run/";
# Tower commands
weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 && reboot";
# Misc commands
nix-shell = "nix shell";
};
};
git = { git = {
enable = true; enable = true;
userName = "alisceon"; userName = "alisceon";

View file

@ -30,7 +30,19 @@
templates.to = { templates.to = {
type = "git"; type = "git";
url = "git+ssh://git@git.malice.zone/alisceon/devenv_templates.git"; url = "git+ssh://git@git.malice.zone/alisceon/devenv_templates.git";
}; }; # end templates.to
nixpkgs.to = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
}; # end nixpkgs.to
nixpkgs-stable.to = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-25.05";
}; # end nixpkgs.to
}; #end registry }; #end registry
}; #end nix }; #end nix
@ -88,12 +100,19 @@
git git
wget wget
curl curl
btop btop # system monitor
ripgrep ripgrep # grep replacement
bat bat # cat replacement
fd fd # find replacement
eza eza # ls replacement
nh # nix helper
jq # JSON processor
# Shells
bash bash
nushell
fish
powershell
# Chat # Chat
discord discord
@ -123,6 +142,7 @@
obsidian obsidian
gparted gparted
]; # end systemPackages ]; # end systemPackages
gnome.excludePackages = with pkgs; [ gnome.excludePackages = with pkgs; [
evolution evolution
geary geary
@ -136,7 +156,12 @@
gnome-initial-setup gnome-initial-setup
gnome-clocks gnome-clocks
]; # end gnome.excludePackages ]; # end gnome.excludePackages
shells = with pkgs; [ fish ]; shells = with pkgs; [
bash
nushell
fish
powershell
];
}; # end environment }; # end environment
virtualisation.podman = { virtualisation.podman = {
@ -148,7 +173,6 @@
users.users.alisceon = { users.users.alisceon = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "podman" ]; extraGroups = [ "wheel" "networkmanager" "podman" ];
shell = pkgs.fish; shell = pkgs.nushell;
}; # end users }; # end users
} #end file } #end file

View file

@ -34,24 +34,27 @@
]; ];
loader.timeout = 0; loader.timeout = 0;
#resumeDevice = "/dev/disk/by-uuid/c49249b9-0d68-44af-97e0-e399c8409408"; #resumeDevice = "/dev/disk/by-uuid/c49249b9-0d68-44af-97e0-e399c8409408";
}; }; # end boot
systemd.services = { systemd.services = {
fprintd = { fprintd = {
wantedBy = [ "multi-user.target" ]; wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "simple"; serviceConfig.Type = "simple";
}; };
}; }; # end systemd.services
services = { services = {
fprintd = { fprintd = {
enable = true; enable = true;
tod.enable = true; tod.enable = true;
tod.driver = pkgs.libfprint-2-tod1-goodix; tod.driver = pkgs.libfprint-2-tod1-goodix;
}; }; # end fprintd
}; tuned = {
enable = true;
}; # end tuned
}; # end services
hardware = { hardware = {
bluetooth = { bluetooth = {
enable = true; enable = true;
powerOnBoot = true; powerOnBoot = true;
}; }; # end bluetooth
}; }; # end hardware
} } # end file