Add more scripts, more cleanup

This commit is contained in:
Julian Mutter 2024-06-09 09:33:23 +02:00
parent 4e8291bb14
commit 35e84fade2
7 changed files with 74 additions and 33 deletions

View File

@ -27,6 +27,7 @@
home.stateVersion = "23.11";
modules = {
non-nixos.is-nxos = false;
shell = {
# zsh.enable = true;
fish.enable = true;

View File

@ -68,7 +68,6 @@ with pkgs;
doublecmd
mucommander
tree
alacritty
wezterm
kitty
bat

View File

@ -19,19 +19,16 @@
...
}:
with lib;
let
cfg = config.modules.alacritty;
in
{
options.modules.alacritty = {
enable = mkOption { default = false; };
enable = lib.mkOption { default = false; };
};
config = mkIf cfg.enable {
# Does not work on non-nixos due to opengl
# home.packages = with pkgs; [ alacritty ];
config = lib.mkIf cfg.enable {
home.packages = with pkgs; [ (lib.mkIf config.modules.non-nixos.is-nixos alacritty) ];
home.file = {
".config/alacritty/theme".source = "${inputs.alacritty-theme}";

View File

@ -77,6 +77,13 @@ in
run = ''
nix run nixpkgs#"$argv[1]" -- $argv[2..-1]
'';
shell = ''
set args
for arg in $argv
set args $args nixpkgs#$arg
end
nix shell $args
'';
};
};
};

View File

@ -1,28 +1,33 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# You also have access to your flake's inputs.
inputs,
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib.
system, # The system architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
format, # A normalized name for the system target (eg. `iso`).
virtual
, # A boolean to determine whether this system is a virtual target using nixos-generators.
systems, # An attribute map of your defined hosts.
# Additional metadata is provided by Snowfall Lib.
system, # The system architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
format, # A normalized name for the system target (eg. `iso`).
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
systems, # An attribute map of your defined hosts.
# All other arguments come from the module system.
config, ... }:
# All other arguments come from the module system.
config,
...
}:
with lib;
let cfg = config.modules.neovim;
in {
options.modules.neovim = { enable = mkOption { default = false; }; };
let
cfg = config.modules.neovim;
in
{
options.modules.neovim = {
enable = mkOption { default = false; };
};
config = mkIf cfg.enable {
home.sessionVariables = {
@ -30,13 +35,15 @@ in {
VISUAL = "nvim";
};
programs.neovim = let
programs.neovim =
let
toLua = str: ''
lua << EOF
${str}
EOF
'';
in {
in
{
# https://www.youtube.com/watch?v=YZAnJ0rwREA
enable = true;
viAlias = true;
@ -76,8 +83,6 @@ in {
extraLuaConfig = ''
vim.o.termguicolors = true
'';
};
};
};
}

View File

@ -0,0 +1,33 @@
{
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
# as well as the libraries available from your flake's inputs.
lib,
# An instance of `pkgs` with your overlays and packages applied is also available.
pkgs,
# You also have access to your flake's inputs.
inputs,
# Additional metadata is provided by Snowfall Lib.
system, # The system architecture for this host (eg. `x86_64-linux`).
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
format, # A normalized name for the system target (eg. `iso`).
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
systems, # An attribute map of your defined hosts.
# All other arguments come from the module system.
config,
...
}:
with lib;
let
cfg = config.modules.non-nixos;
in
{
options.modules.non-nixos = {
is-nixos = mkOption { default = true; };
};
config = mkIf cfg.is-nixos { };
}

View File

@ -164,8 +164,8 @@
packages = with pkgs; [ ]; # Using home-manager instead
};
home-manager.useGlobalPkgs = true; # make overlays for nixpkgs work for home-manager, not only the system
home-manager.useUserPackages = true;
# home-manager.useGlobalPkgs = true; # make overlays for nixpkgs work for home-manager, not only the system
# home-manager.useUserPackages = true;
programs.fish.enable = true;
programs.zsh.enable = true;
@ -219,7 +219,6 @@
vim
htop
mc
home-manager
];
virtualisation.docker.enable = true;