mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
finished switching to modules
This commit is contained in:
parent
99e7bf43e3
commit
87ca412366
12 changed files with 172 additions and 144 deletions
|
|
@ -1,7 +1,7 @@
|
|||
inputs: {
|
||||
imports = [
|
||||
(import ./dwm.nix inputs)
|
||||
(import ./gnome.nix inputs)
|
||||
(import ./xfce.nix inputs)
|
||||
(import ./dwm.nix inputs)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
inputs: {
|
||||
imports = [
|
||||
(import ./lightDM.nix inputs)
|
||||
(import ./autoLogin.nix inputs)
|
||||
(import ./lightDM.nix inputs)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,17 @@
|
|||
inputs: {
|
||||
imports = [
|
||||
(import ./boot.nix inputs)
|
||||
(import ./misc.nix inputs)
|
||||
(import ./packages.nix inputs)
|
||||
(import ./X11.nix inputs)
|
||||
(import ./nix.nix inputs)
|
||||
(import ./unfree.nix inputs)
|
||||
(import ./DE inputs)
|
||||
(import ./DM inputs)
|
||||
|
||||
(import ./boot.nix inputs)
|
||||
(import ./git.nix inputs)
|
||||
(import ./hardware.nix inputs)
|
||||
(import ./misc.nix inputs)
|
||||
(import ./nix.nix inputs)
|
||||
(import ./packages.nix inputs)
|
||||
(import ./shell.nix inputs)
|
||||
(import ./theming.nix inputs)
|
||||
(import ./unfree.nix inputs)
|
||||
(import ./X11.nix inputs)
|
||||
];
|
||||
}
|
||||
|
|
|
|||
35
modules/git.nix
Normal file
35
modules/git.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
_: {
|
||||
pkgs,
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.localModules.git;
|
||||
in {
|
||||
options.localModules.git = {
|
||||
disable = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
config = mkIf (! cfg.disable) {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
package = pkgs.gitMinimal;
|
||||
config = {
|
||||
user = {
|
||||
name = "Gerg-L";
|
||||
email = "GregLeyda@proton.me";
|
||||
};
|
||||
init = {
|
||||
defaultBranch = "master";
|
||||
};
|
||||
push = {
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
112
modules/shell.nix
Normal file
112
modules/shell.nix
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
{fetch-rs, ...}: {pkgs, ...}: rec {
|
||||
#put:
|
||||
#source /run/current-system/sw/share/nix-direnv/direnvrc
|
||||
#in ~/.direnvrc
|
||||
#do i need to do this^?
|
||||
environment = {
|
||||
systemPackages = [
|
||||
pkgs.page
|
||||
pkgs.exa
|
||||
pkgs.direnv
|
||||
pkgs.nix-direnv
|
||||
pkgs.neovim
|
||||
fetch-rs.packages.${pkgs.system}.default
|
||||
];
|
||||
binsh = "${pkgs.dash}/bin/dash"; #use dash for speed
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
PAGER = "page";
|
||||
SYSTEMD_PAGERSECURE = "true";
|
||||
TERMINAL = "st";
|
||||
NIX_BUILD_SHELL = "zsh";
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
};
|
||||
shellAliases = {
|
||||
#make sudo use aliases
|
||||
sudo = "sudo ";
|
||||
#paste link trick
|
||||
pastebin = "curl -F 'clbin=<-' https://clbin.com";
|
||||
#nix stuff
|
||||
nix-update = "nix flake update /etc/nixos/# ";
|
||||
nix-switch = "nixos-rebuild switch --use-remote-sudo";
|
||||
nix-boot = "nixos-rebuild boot --use-remote-sudo";
|
||||
nix-clean = "nix-collect-garbage -d";
|
||||
nix-gc-force = "rm /nix/var/nix/gcroots/auto/*";
|
||||
nix-gc-check = "nix-store --gc --print-roots | egrep -v \"^(/nix/var|/run/\w+-system|\{memory|/proc)\"";
|
||||
#vim stuff
|
||||
vi = "nvim";
|
||||
vim = "nvim";
|
||||
vimdiff = "nvim -d";
|
||||
#exa is 1 too many letters
|
||||
ls = "exa";
|
||||
l = "exa -lbF --git";
|
||||
ll = "exa -lbGF --git";
|
||||
llm = "exa -lbGd --git --sort=modified";
|
||||
la = "exa -lbhHigUmuSa --time-style=long-iso --git --color-scale";
|
||||
lx = "exa -lbhHigUmuSa@ --time-style=long-iso --git --color-scale";
|
||||
lS = "exa -1";
|
||||
lt = "exa --tree --level=2";
|
||||
};
|
||||
interactiveShellInit = "fetch-rs";
|
||||
pathsToLink = [
|
||||
"/share/nix-direnv"
|
||||
];
|
||||
};
|
||||
security.sudo = {
|
||||
enable = true;
|
||||
execWheelOnly = true;
|
||||
extraConfig = ''
|
||||
Defaults env_keep += "${builtins.concatStringsSep " " (builtins.attrNames environment.variables)}"
|
||||
'';
|
||||
};
|
||||
|
||||
#zsh stuff
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
environment.shells = [pkgs.zsh];
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
autosuggestions = {
|
||||
enable = true;
|
||||
};
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
};
|
||||
shellInit = ''
|
||||
eval "$(direnv hook zsh)"
|
||||
'';
|
||||
};
|
||||
#starship
|
||||
starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = "$sudo\${custom.direnv} $cmd_duration \n $directory$git_branch$character";
|
||||
character = {
|
||||
success_symbol = "[ ](#9ece6a bold)";
|
||||
error_symbol = "[ ](#db4b4b bold)";
|
||||
};
|
||||
directory = {
|
||||
read_only = " ";
|
||||
};
|
||||
git_branch = {
|
||||
style = "bold red";
|
||||
};
|
||||
sudo = {
|
||||
format = "[ ](#7aa2f7)";
|
||||
disabled = false;
|
||||
};
|
||||
cmd_duration = {
|
||||
min_time = 5000;
|
||||
style = "bold #9ece6a";
|
||||
};
|
||||
custom.direnv = {
|
||||
format = "[\\[direnv\\]]($style)";
|
||||
style = "#36c692";
|
||||
detect_folders = [".direnv"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
109
modules/theming.nix
Normal file
109
modules/theming.nix
Normal file
|
|
@ -0,0 +1,109 @@
|
|||
_: {
|
||||
pkgs,
|
||||
options,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.localModules.theming;
|
||||
in {
|
||||
options.localModules.theming = {
|
||||
enable = mkEnableOption "";
|
||||
kmscon.enable = mkEnableOption "";
|
||||
};
|
||||
config = mkMerge [
|
||||
(
|
||||
mkIf cfg.enable {
|
||||
environment = {
|
||||
systemPackages = [
|
||||
pkgs.flat-remix-gtk
|
||||
pkgs.flat-remix-icon-theme
|
||||
pkgs.quintom-cursor-theme
|
||||
];
|
||||
etc = {
|
||||
"xdg/gtk-4.0/settings.ini".text = ''
|
||||
[Settings]
|
||||
gtk-cursor-theme-name=Quintom_Ink
|
||||
gtk-cursor-theme-size=16
|
||||
gtk-font-name = "Overpass Nerd Font 10"
|
||||
gtk-icon-theme-name=Flat-Remix-Blue-Dark
|
||||
gtk-theme-name=Flat-Remix-GTK-Blue-Darkest
|
||||
'';
|
||||
"xdg/gtk-3.0/settings.ini".text = ''
|
||||
[Settings]
|
||||
gtk-cursor-theme-name=Quintom_Ink
|
||||
gtk-cursor-theme-size=16
|
||||
gtk-font-name = "Overpass Nerd Font 10"
|
||||
gtk-icon-theme-name=Flat-Remix-Blue-Dark
|
||||
gtk-theme-name=Flat-Remix-GTK-Blue-Darkest
|
||||
'';
|
||||
"xdg/gtk-2.0/gtkrc".text = ''
|
||||
gtk-cursor-theme-name = "Quintom_Ink"
|
||||
gtk-cursor-theme-size = 16
|
||||
gtk-font-name = "Overpass Nerd Font 10"
|
||||
gtk-icon-theme-name = "Flat-Remix-Blue-Dark"
|
||||
gtk-theme-name = "Flat-Remix-GTK-Blue-Darkest"
|
||||
'';
|
||||
"xdg/Xresources".text = ''
|
||||
Xcursor.size: 16
|
||||
Xcursor.theme: Quintom_Ink
|
||||
'';
|
||||
};
|
||||
};
|
||||
qt = {
|
||||
enable = true;
|
||||
style = "gtk2";
|
||||
platformTheme = "gtk2";
|
||||
};
|
||||
services.xserver.displayManager.sessionCommands = ''
|
||||
xrdb -load /etc/xdg/Xresources
|
||||
'';
|
||||
}
|
||||
)
|
||||
(mkIf cfg.kmscon.enable {
|
||||
services.kmscon = {
|
||||
enable = true;
|
||||
hwRender = true;
|
||||
extraConfig = ''
|
||||
font-size=10
|
||||
'';
|
||||
fonts = [
|
||||
{
|
||||
name = "OverpassMono Nerd Font";
|
||||
package =
|
||||
pkgs.nerdfonts.override
|
||||
{
|
||||
fonts = ["Overpass"];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
systemd.services = {
|
||||
"autovt@tty1".enable = false;
|
||||
"kmsconvt@tty1".enable = false;
|
||||
};
|
||||
|
||||
fonts = {
|
||||
fonts = [
|
||||
(pkgs.nerdfonts.override
|
||||
{
|
||||
fonts = ["Overpass"];
|
||||
})
|
||||
];
|
||||
enableDefaultFonts = false;
|
||||
fontDir.enable = true;
|
||||
fontconfig = {
|
||||
enable = true;
|
||||
defaultFonts = {
|
||||
serif = ["Overpass Nerd Font"];
|
||||
sansSerif = ["Overpass Nerd Font"];
|
||||
monospace = ["OverpassMono Nerd Font"];
|
||||
};
|
||||
hinting.enable = true;
|
||||
antialias = true;
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue