Add more scripts, more cleanup
This commit is contained in:
parent
4e8291bb14
commit
35e84fade2
@ -27,6 +27,7 @@
|
|||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
modules = {
|
modules = {
|
||||||
|
non-nixos.is-nxos = false;
|
||||||
shell = {
|
shell = {
|
||||||
# zsh.enable = true;
|
# zsh.enable = true;
|
||||||
fish.enable = true;
|
fish.enable = true;
|
||||||
|
@ -68,7 +68,6 @@ with pkgs;
|
|||||||
doublecmd
|
doublecmd
|
||||||
mucommander
|
mucommander
|
||||||
tree
|
tree
|
||||||
alacritty
|
|
||||||
wezterm
|
wezterm
|
||||||
kitty
|
kitty
|
||||||
bat
|
bat
|
||||||
|
@ -19,19 +19,16 @@
|
|||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.modules.alacritty;
|
cfg = config.modules.alacritty;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.modules.alacritty = {
|
options.modules.alacritty = {
|
||||||
enable = mkOption { default = false; };
|
enable = lib.mkOption { default = false; };
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
# Does not work on non-nixos due to opengl
|
home.packages = with pkgs; [ (lib.mkIf config.modules.non-nixos.is-nixos alacritty) ];
|
||||||
# home.packages = with pkgs; [ alacritty ];
|
|
||||||
|
|
||||||
home.file = {
|
home.file = {
|
||||||
".config/alacritty/theme".source = "${inputs.alacritty-theme}";
|
".config/alacritty/theme".source = "${inputs.alacritty-theme}";
|
||||||
|
@ -77,6 +77,13 @@ in
|
|||||||
run = ''
|
run = ''
|
||||||
nix run nixpkgs#"$argv[1]" -- $argv[2..-1]
|
nix run nixpkgs#"$argv[1]" -- $argv[2..-1]
|
||||||
'';
|
'';
|
||||||
|
shell = ''
|
||||||
|
set args
|
||||||
|
for arg in $argv
|
||||||
|
set args $args nixpkgs#$arg
|
||||||
|
end
|
||||||
|
nix shell $args
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,28 +1,33 @@
|
|||||||
{
|
{
|
||||||
# Snowfall Lib provides a customized `lib` instance with access to your flake's library
|
# 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.
|
# as well as the libraries available from your flake's inputs.
|
||||||
lib,
|
lib,
|
||||||
# An instance of `pkgs` with your overlays and packages applied is also available.
|
# An instance of `pkgs` with your overlays and packages applied is also available.
|
||||||
pkgs,
|
pkgs,
|
||||||
# You also have access to your flake's inputs.
|
# You also have access to your flake's inputs.
|
||||||
inputs,
|
inputs,
|
||||||
|
|
||||||
# Additional metadata is provided by Snowfall Lib.
|
# Additional metadata is provided by Snowfall Lib.
|
||||||
system, # The system architecture for this host (eg. `x86_64-linux`).
|
system, # The system architecture for this host (eg. `x86_64-linux`).
|
||||||
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
target, # The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||||||
format, # A normalized name for the system target (eg. `iso`).
|
format, # A normalized name for the system target (eg. `iso`).
|
||||||
virtual
|
virtual, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
||||||
, # A boolean to determine whether this system is a virtual target using nixos-generators.
|
systems, # An attribute map of your defined hosts.
|
||||||
systems, # An attribute map of your defined hosts.
|
|
||||||
|
|
||||||
# All other arguments come from the module system.
|
# All other arguments come from the module system.
|
||||||
config, ... }:
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
|
|
||||||
let cfg = config.modules.neovim;
|
let
|
||||||
in {
|
cfg = config.modules.neovim;
|
||||||
options.modules.neovim = { enable = mkOption { default = false; }; };
|
in
|
||||||
|
{
|
||||||
|
options.modules.neovim = {
|
||||||
|
enable = mkOption { default = false; };
|
||||||
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
@ -30,13 +35,15 @@ in {
|
|||||||
VISUAL = "nvim";
|
VISUAL = "nvim";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.neovim = let
|
programs.neovim =
|
||||||
|
let
|
||||||
toLua = str: ''
|
toLua = str: ''
|
||||||
lua << EOF
|
lua << EOF
|
||||||
${str}
|
${str}
|
||||||
EOF
|
EOF
|
||||||
'';
|
'';
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# https://www.youtube.com/watch?v=YZAnJ0rwREA
|
# https://www.youtube.com/watch?v=YZAnJ0rwREA
|
||||||
enable = true;
|
enable = true;
|
||||||
viAlias = true;
|
viAlias = true;
|
||||||
@ -76,8 +83,6 @@ in {
|
|||||||
extraLuaConfig = ''
|
extraLuaConfig = ''
|
||||||
vim.o.termguicolors = true
|
vim.o.termguicolors = true
|
||||||
'';
|
'';
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
33
modules/home/non-nixos/default.nix
Normal file
33
modules/home/non-nixos/default.nix
Normal 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 { };
|
||||||
|
}
|
@ -164,8 +164,8 @@
|
|||||||
packages = with pkgs; [ ]; # Using home-manager instead
|
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.useGlobalPkgs = true; # make overlays for nixpkgs work for home-manager, not only the system
|
||||||
home-manager.useUserPackages = true;
|
# home-manager.useUserPackages = true;
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
@ -219,7 +219,6 @@
|
|||||||
vim
|
vim
|
||||||
htop
|
htop
|
||||||
mc
|
mc
|
||||||
home-manager
|
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user