From 4c2decf3cd04bc2cc02c4df00f962ae4859a1664 Mon Sep 17 00:00:00 2001 From: Frantisek Bohacek Date: Sat, 11 May 2024 20:57:50 +0200 Subject: [PATCH] feat: use noshell --- flake.lock | 22 ++++++++++++++++++++++ flake.nix | 7 ++++++- home/modules/profiles/base.nix | 12 ++++++++++++ nixos/hosts/configuration.nix | 5 +++-- 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 2558adc..6b47335 100644 --- a/flake.lock +++ b/flake.lock @@ -262,6 +262,27 @@ "type": "github" } }, + "noshell": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1715441577, + "narHash": "sha256-YV67wGW/1qWB6zTIxbbHGmp3nNhoCkhwk3d39O+hMhk=", + "owner": "Rutherther", + "repo": "noshell", + "rev": "48ce746f5a6c3859dd3391eb64ebe2dac9bdefe8", + "type": "github" + }, + "original": { + "owner": "Rutherther", + "ref": "fix/transparent-zeroth-argument", + "repo": "noshell", + "type": "github" + } + }, "nur": { "locked": { "lastModified": 1715414244, @@ -317,6 +338,7 @@ "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs", "nixpkgs-stable": "nixpkgs-stable_2", + "noshell": "noshell", "nur": "nur", "wrapper-manager": "wrapper-manager" } diff --git a/flake.nix b/flake.nix index dafd532..d527bea 100644 --- a/flake.nix +++ b/flake.nix @@ -47,6 +47,11 @@ url = "github:Rutherther/nix-fpga"; inputs.nixpkgs.follows = "nixpkgs"; }; + + noshell = { + url = "github:Rutherther/noshell/fix/transparent-zeroth-argument"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = inputs @ { self, nixpkgs, nixpkgs-stable, nix-index-database, home-manager, nur, nixos-hardware, lanzaboote, ... }: @@ -56,7 +61,7 @@ nixosConfigurations = ( import ./nixos { inherit (nixpkgs) lib; - inherit inputs nixpkgs nixpkgs-stable nix-index-database nur; + inherit inputs; } ); diff --git a/home/modules/profiles/base.nix b/home/modules/profiles/base.nix index cde5dff..2b563a6 100644 --- a/home/modules/profiles/base.nix +++ b/home/modules/profiles/base.nix @@ -18,6 +18,18 @@ in { config = lib.mkIf config.profiles.base.enable { home-config.startup.apps = [ (lib.getExe pkgs.firefox) ]; + home.activation = { + noshellLink = { + after = [ "writeBoundery" "createXdgUserDirectories" ]; + before = []; + data = '' + if [[ ! -f "$HOME/.config/shell" ]]; then + ln -s ${lib.getExe pkgs.zsh} $HOME/.config/shell + fi + ''; + }; + }; + programs = { dircolors = { diff --git a/nixos/hosts/configuration.nix b/nixos/hosts/configuration.nix index b716099..0659dbe 100644 --- a/nixos/hosts/configuration.nix +++ b/nixos/hosts/configuration.nix @@ -4,7 +4,10 @@ imports = [ inputs.home-manager.nixosModules.home-manager ../modules + inputs.noshell.nixosModules.default ]; + users.users.root.shell = pkgs.bash; + programs.noshell.enable = true; services.xserver.displayManager.startx.enable = true; @@ -37,9 +40,7 @@ "wheel" "video" "audio" "camera" "networkmanager" "lp" "scanner" "plex" ]; - shell = pkgs.zsh; }; - programs.zsh.enable = true; networking.networkmanager.enable = true; programs.command-not-found.enable = false; -- 2.48.1