From 7fa2c15c64484367cd825e3417fc54e8c3c59a60 Mon Sep 17 00:00:00 2001 From: Ranomier <> Date: Mon, 13 Jan 2025 03:13:37 +0100 Subject: [PATCH] random stuff --- flake.lock | 30 ++++++++++---------- modules/software/shell.nix | 43 +--------------------------- modules/software/shells/default.nix | 6 ++++ modules/software/shells/fish.nix | 14 +++++++++ modules/software/shells/zsh.nix | 44 +++++++++++++++++++++++++++++ modules/wm_and_de/hyprland.nix | 3 ++ 6 files changed, 83 insertions(+), 57 deletions(-) create mode 100644 modules/software/shells/default.nix create mode 100644 modules/software/shells/fish.nix create mode 100644 modules/software/shells/zsh.nix diff --git a/flake.lock b/flake.lock index 16b04a9..d1a4ddc 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1735344290, - "narHash": "sha256-oJDtWPH1oJT34RJK1FSWjwX4qcGOBRkcNQPD0EbSfNM=", + "lastModified": 1736373539, + "narHash": "sha256-dinzAqCjenWDxuy+MqUQq0I4zUSfaCvN9rzuCmgMZJY=", "owner": "nix-community", "repo": "home-manager", - "rev": "613691f285dad87694c2ba1c9e6298d04736292d", + "rev": "bd65bc3cde04c16755955630b344bc9e35272c56", "type": "github" }, "original": { @@ -23,11 +23,11 @@ }, "nix-flatpak": { "locked": { - "lastModified": 1735500379, - "narHash": "sha256-5qmX6YYjYfVYBbsmd2XxbTi7A59YuuN9IwfXU7qFquQ=", + "lastModified": 1736334301, + "narHash": "sha256-370z+WLVnD7LrN/SvTCZxPl/XPTshS5NS2dHN4iyK6o=", "owner": "gmodena", "repo": "nix-flatpak", - "rev": "c31b6cbd11707fe2c74ad805ef085d59d75116ae", + "rev": "5f4ec93d432cd5288f6fe20d8842dceb5a065885", "type": "github" }, "original": { @@ -74,11 +74,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1735388221, - "narHash": "sha256-e5IOgjQf0SZcFCEV/gMGrsI0gCJyqOKShBQU0iiM3Kg=", + "lastModified": 1736441705, + "narHash": "sha256-OL7leZ6KBhcDF3nEKe4aZVfIm6xQpb1Kb+mxySIP93o=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "7c674c6734f61157e321db595dbfcd8523e04e19", + "rev": "8870dcaff63dfc6647fb10648b827e9d40b0a337", "type": "github" }, "original": { @@ -90,11 +90,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1735669367, - "narHash": "sha256-tfYRbFhMOnYaM4ippqqid3BaLOXoFNdImrfBfCp4zn0=", + "lastModified": 1736200483, + "narHash": "sha256-JO+lFN2HsCwSLMUWXHeOad6QUxOuwe9UOAF/iSl1J4I=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "edf04b75c13c2ac0e54df5ec5c543e300f76f1c9", + "rev": "3f0a8ac25fb674611b98089ca3a5dd6480175751", "type": "github" }, "original": { @@ -106,11 +106,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1735471104, - "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", + "lastModified": 1736344531, + "narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", + "rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912", "type": "github" }, "original": { diff --git a/modules/software/shell.nix b/modules/software/shell.nix index 835fbe0..d14ff01 100644 --- a/modules/software/shell.nix +++ b/modules/software/shell.nix @@ -2,49 +2,8 @@ # everyone should use zsh xD users.defaultUserShell = pkgs.zsh; # Prevent the new user dialog in zsh - system.userActivationScripts.zshrc = "touch .zshrc"; - - programs.zsh = { - enable = true; - shellInit = '' - compinit () { - builtin autoload -XUz /run/current-system/sw/share/zsh/$ZSH_VERSION/functions - } - # config options to make zsh obey XDG base directory standard - ZDOTDIR=$HOME/.config/zsh - [ -d "$HOME"/.config/zsh ] || mkdir -p "$HOME"/.config/zsh - HISTFILE="$XDG_STATE_HOME"/zsh/history - # Completion files: Use XDG dirs - [ -d "$XDG_CACHE_HOME"/zsh ] || mkdir -p "$XDG_CACHE_HOME"/zsh - zstyle ':completion:*' cache-path "$XDG_CACHE_HOME"/zsh/zcompcache - compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-$ZSH_VERSION - - # Note that to manually override this in ~/.zshrc you should run `prompt off` - # before setting your PS1 and etc. Otherwise this will likely to interact with - # your ~/.zshrc configuration in unexpected ways as the default prompt sets - # a lot of different prompt variables. - autoload -U promptinit && promptinit && prompt suse && setopt prompt_sp - - HISTFILE=~/.histfile - HISTSIZE=1000 - SAVEHIST=1000 - - # bindkey - bindkey -e - - bindkey "\e[3~" delete-char - # Home- und End-Keys. - bindkey '\e[1~' beginning-of-line - bindkey '\e[4~' end-of-line - - # to redo the initial zsh installation run these commands - #autoload -Uz zsh-newuser-install - #zsh-newuser-install -f - ''; - - ohMyZsh.enable = true; - }; + # supports many shell so it lives here programs.starship = { enable = true; settings = { diff --git a/modules/software/shells/default.nix b/modules/software/shells/default.nix new file mode 100644 index 0000000..9bc0c56 --- /dev/null +++ b/modules/software/shells/default.nix @@ -0,0 +1,6 @@ +{...}: { + imports = [ + ./zsh.nix + ./fish.nix + ]; +} diff --git a/modules/software/shells/fish.nix b/modules/software/shells/fish.nix new file mode 100644 index 0000000..317e540 --- /dev/null +++ b/modules/software/shells/fish.nix @@ -0,0 +1,14 @@ +{ ... }:{ + programs = { + fish = { + enable = true; + useBabelfish = true; + shellInit = '' + starship init fish | source + ''; + }; + nix-index.enableFishIntegration = true; + direnv.enableFishIntegration = true; + foot.enableFishIntegration = true; + }; +} diff --git a/modules/software/shells/zsh.nix b/modules/software/shells/zsh.nix new file mode 100644 index 0000000..eb0baa8 --- /dev/null +++ b/modules/software/shells/zsh.nix @@ -0,0 +1,44 @@ +{ ... }:{ + system.userActivationScripts.zshrc = "touch .zshrc"; + + programs.zsh = { + enable = true; + shellInit = '' + compinit () { + builtin autoload -XUz /run/current-system/sw/share/zsh/$ZSH_VERSION/functions + } + # config options to make zsh obey XDG base directory standard + ZDOTDIR=$HOME/.config/zsh + [ -d "$HOME"/.config/zsh ] || mkdir -p "$HOME"/.config/zsh + HISTFILE="$XDG_STATE_HOME"/zsh/history + # Completion files: Use XDG dirs + [ -d "$XDG_CACHE_HOME"/zsh ] || mkdir -p "$XDG_CACHE_HOME"/zsh + zstyle ':completion:*' cache-path "$XDG_CACHE_HOME"/zsh/zcompcache + compinit -d "$XDG_CACHE_HOME"/zsh/zcompdump-$ZSH_VERSION + + # Note that to manually override this in ~/.zshrc you should run `prompt off` + # before setting your PS1 and etc. Otherwise this will likely to interact with + # your ~/.zshrc configuration in unexpected ways as the default prompt sets + # a lot of different prompt variables. + autoload -U promptinit && promptinit && prompt suse && setopt prompt_sp + + HISTFILE=~/.histfile + HISTSIZE=1000 + SAVEHIST=1000 + + # bindkey + bindkey -e + + bindkey "\e[3~" delete-char + # Home- und End-Keys. + bindkey '\e[1~' beginning-of-line + bindkey '\e[4~' end-of-line + + # to redo the initial zsh installation run these commands + #autoload -Uz zsh-newuser-install + #zsh-newuser-install -f + ''; + + ohMyZsh.enable = true; + }; +} diff --git a/modules/wm_and_de/hyprland.nix b/modules/wm_and_de/hyprland.nix index 9eb04e7..112817c 100644 --- a/modules/wm_and_de/hyprland.nix +++ b/modules/wm_and_de/hyprland.nix @@ -52,6 +52,9 @@ # List packages installed in system profile. To search, run: # $ nix search wget environment.systemPackages = with pkgs; [ + hyprsunset + hyprpolkitagent + hyprutils # for tiling window manager foot foot.themes