Refactor codebase to use nix modules
This commit is contained in:
parent
a4735423b4
commit
ffada2703c
114 changed files with 1018 additions and 744 deletions
46
flake.lock
generated
46
flake.lock
generated
|
|
@ -7,11 +7,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712250145,
|
||||
"narHash": "sha256-8WTGn7It2kZfAmN97Epi3g/Su/w3Hbw/T4dWxE7OrBw=",
|
||||
"lastModified": 1712834339,
|
||||
"narHash": "sha256-gRYAbyxx4Z2s4hMoXHSu3wv2+VSiiR2Nk+AZmCZ6kc4=",
|
||||
"owner": "Aylur",
|
||||
"repo": "ags",
|
||||
"rev": "d589077199ec8a055ef936bf8a1f051b7a0c7e34",
|
||||
"rev": "c13bcba224f9ecaaa2f22b1d2895bb62e8face19",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -27,11 +27,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712462372,
|
||||
"narHash": "sha256-WA3bbBWhd3o1wAgyHZNypjb/LG4oq+IWxFq8ey8yNPU=",
|
||||
"lastModified": 1713077896,
|
||||
"narHash": "sha256-Noot8H0EZEAFRQWyGxh9ryvhK96xpIqKbh78X447JWs=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "a561ad6ab38578c812cc9af3b04f2cc60ebf48c9",
|
||||
"rev": "630a0992b3627c64e34f179fab68e3d48c6991c0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -82,11 +82,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1712528342,
|
||||
"narHash": "sha256-5tRzlHnhk28M2ClRshRAEANGE/GF9A1Cl36OXAmi+Ig=",
|
||||
"lastModified": 1713050186,
|
||||
"narHash": "sha256-AKdzVa0Zz5PQ1ptQgD0jj8J+UZUW9OeKGZ0mNVnkyI4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "43b96f03b5af60586a864ea64e8c71b11ea6eb85",
|
||||
"rev": "0634aaeac6cca12e4f72174c431c2db9da9c0072",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -167,11 +167,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1712439257,
|
||||
"narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=",
|
||||
"lastModified": 1712791164,
|
||||
"narHash": "sha256-3sbWO1mbpWsLepZGbWaMovSO7ndZeFqDSdX0hZ9nVyw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599",
|
||||
"rev": "1042fd8b148a9105f3c0aca3a6177fd1d9360ba5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -207,20 +207,18 @@
|
|||
"wlroots": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"lastModified": 1709983277,
|
||||
"narHash": "sha256-wXWIJLd4F2JZeMaihWVDW/yYXCLEC8OpeNJZg9a9ly8=",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b",
|
||||
"type": "gitlab"
|
||||
"lastModified": 1712935342,
|
||||
"narHash": "sha256-zzIbTFNFd/as42jyGx23fil2uBDYYv+8GA5JmRq5y9c=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "wlroots-hyprland",
|
||||
"rev": "62eeffbe233d199f520a5755c344e85f8eab7940",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"host": "gitlab.freedesktop.org",
|
||||
"owner": "wlroots",
|
||||
"repo": "wlroots",
|
||||
"rev": "50eae512d9cecbf0b3b1898bb1f0b40fa05fe19b",
|
||||
"type": "gitlab"
|
||||
"owner": "hyprwm",
|
||||
"repo": "wlroots-hyprland",
|
||||
"rev": "62eeffbe233d199f520a5755c344e85f8eab7940",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
|
|
|
|||
13
flake.nix
13
flake.nix
|
|
@ -17,17 +17,18 @@
|
|||
ags.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, hyprland, ... }@inputs: let
|
||||
outputs = { nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations."pan" = home-manager.lib.homeManagerConfiguration {
|
||||
defaultConfig = extraModules: home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
hyprland.homeManagerModules.default
|
||||
./home.nix
|
||||
];
|
||||
./hmModules
|
||||
] ++ extraModules;
|
||||
};
|
||||
in {
|
||||
homeConfigurations.pan = defaultConfig [ ./systems/pan ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
13
hmModules/apps/chat/beeper/default.nix
Normal file
13
hmModules/apps/chat/beeper/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.beeper = {
|
||||
enable = lib.mkEnableOption "Enables beeper";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.beeper.enable {
|
||||
home.packages = with pkgs; [
|
||||
beeper
|
||||
];
|
||||
};
|
||||
}
|
||||
8
hmModules/apps/chat/default.nix
Normal file
8
hmModules/apps/chat/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./discord
|
||||
./beeper
|
||||
];
|
||||
}
|
||||
12
hmModules/apps/chat/discord/default.nix
Normal file
12
hmModules/apps/chat/discord/default.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
options.discord = {
|
||||
enable = lib.mkEnableOption "Enables discord";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.discord.enable {
|
||||
home.packages = with pkgs; [
|
||||
vesktop # Base app
|
||||
];
|
||||
};
|
||||
}
|
||||
18
hmModules/apps/default.nix
Normal file
18
hmModules/apps/default.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./chat
|
||||
./file-browsers
|
||||
./gimp
|
||||
./git
|
||||
./hypr
|
||||
./lutris
|
||||
./media-viewers
|
||||
./neovim
|
||||
./obs
|
||||
./rofi
|
||||
./shells
|
||||
./terminal-emulators
|
||||
];
|
||||
}
|
||||
8
hmModules/apps/file-browsers/default.nix
Normal file
8
hmModules/apps/file-browsers/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./lf
|
||||
./nnn
|
||||
];
|
||||
}
|
||||
82
hmModules/apps/file-browsers/lf/default.nix
Normal file
82
hmModules/apps/file-browsers/lf/default.nix
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.lf = {
|
||||
enable = lib.mkEnableOption "Enables lf";
|
||||
hiddenfiles = lib.mkOption { default = [ ".*" ]; };
|
||||
leader = lib.mkOption { default = "<space>"; };
|
||||
};
|
||||
|
||||
config = lib.mkIf config.lf.enable {
|
||||
xdg.configFile."lf/icons".source = ./icons;
|
||||
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Hide specific files rather than "hidden" files
|
||||
hiddenfiles = config.lf.hiddenfiles;
|
||||
ratios = [
|
||||
2
|
||||
3
|
||||
];
|
||||
preview = true;
|
||||
ignorecase = true;
|
||||
icons = true;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
};
|
||||
commands = {
|
||||
dragon-out = ''%${pkgs.xdragon}/bin/xdragon -a -x "$fx"'';
|
||||
mkdir = ''
|
||||
''${{
|
||||
printf "Directory Name: "
|
||||
read DIR
|
||||
mkdir $DIR
|
||||
}}
|
||||
'';
|
||||
mkfile = ''
|
||||
''${{
|
||||
printf "File Name: "
|
||||
read FILE
|
||||
mkdir $FILE
|
||||
}}
|
||||
'';
|
||||
};
|
||||
keybindings = let
|
||||
leader = config.lf.leader;
|
||||
in {
|
||||
"${leader}" = "";
|
||||
"v" = ":toggle; down";
|
||||
"." = "set hidden!";
|
||||
"${leader}d" = "mkdir";
|
||||
"${leader}f" = "mkfile";
|
||||
"${leader}m" = "dragon-out";
|
||||
};
|
||||
extraConfig =
|
||||
let
|
||||
previewer =
|
||||
pkgs.writeShellScriptBin "pv.sh" ''
|
||||
file=$1
|
||||
w=$2
|
||||
h=$3
|
||||
x=$4
|
||||
y=$5
|
||||
|
||||
if [[ "$( ${pkgs.file}/bin/file -Lb --mime-type "$file")" =~ ^image ]]; then
|
||||
${pkgs.kitty}/bin/kitty +kitten icat --silent --stdin no --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file" < /dev/null > /dev/tty
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${pkgs.pistol}/bin/pistol "$file"
|
||||
'';
|
||||
cleaner = pkgs.writeShellScriptBin "clean.sh" ''
|
||||
${pkgs.kitty}/bin/kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty
|
||||
'';
|
||||
in
|
||||
''
|
||||
set cleaner ${cleaner}/bin/clean.sh
|
||||
set previewer ${previewer}/bin/pv.sh
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
17
hmModules/apps/file-browsers/nnn/default.nix
Normal file
17
hmModules/apps/file-browsers/nnn/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.nnn = {
|
||||
enable = lib.mkEnableOption "Enables nnn";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.nnn.enable {
|
||||
programs.nnn.enable = true;
|
||||
home.sessionVariables = {
|
||||
NNN_FCOLORS = "0000E6310000000000000000";
|
||||
NNN_OPTS = "eH";
|
||||
NNN_FIFO = "/tmp/nnn.fifo";
|
||||
NNN_TRASH = lib.mkIf config.trash.enable "1";
|
||||
};
|
||||
};
|
||||
}
|
||||
13
hmModules/apps/gimp/default.nix
Normal file
13
hmModules/apps/gimp/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.gimp = {
|
||||
enable = lib.mkEnableOption "Enables gimp";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.gimp.enable {
|
||||
home.packages = with pkgs; [
|
||||
gimp
|
||||
];
|
||||
};
|
||||
}
|
||||
19
hmModules/apps/git/default.nix
Normal file
19
hmModules/apps/git/default.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.git = {
|
||||
enable = lib.mkEnableOption "Enables git";
|
||||
username = lib.mkOption { default = config.home.username; };
|
||||
email = lib.mkOption {
|
||||
default = "git@" + config.home.username + ".com";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.git.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = config.git.username;
|
||||
userEmail = config.git.email;
|
||||
};
|
||||
};
|
||||
}
|
||||
50
hmModules/apps/hypr/default.nix
Normal file
50
hmModules/apps/hypr/default.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
{ config, inputs, pkgs, lib, ... }:
|
||||
let rootPath = ./.; in
|
||||
{
|
||||
options.hypr = {
|
||||
enable = lib.mkEnableOption "Enables hyprland";
|
||||
};
|
||||
|
||||
imports = [ inputs.hyprland.homeManagerModules.default ];
|
||||
|
||||
config = lib.mkIf config.hypr.enable {
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
${builtins.readFile ./window_rules.conf}
|
||||
${builtins.readFile ./league_rules.conf}
|
||||
${builtins.readFile ./settings.conf}
|
||||
${builtins.readFile ./nvidia.conf}
|
||||
${builtins.readFile ./keybinds.conf}
|
||||
${builtins.readFile ./xwaylandvideobridge.conf}
|
||||
exec-once=${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1
|
||||
|
||||
env = HYPRCURSOR_THEME,miku
|
||||
env = HYPRCURSOR_SIZE,64
|
||||
'';
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
socat # For hyprland scripts
|
||||
swww # Wallpaper engine
|
||||
wlr-randr # Xrandr for wayland
|
||||
wl-clipboard # Clipboard manager for wayland
|
||||
xdg-desktop-portal-hyprland # XDP for hyprland
|
||||
hyprpicker # Colorpicker, needed for screenshot tool
|
||||
hyprcursor # Hyprland cursor
|
||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast # Screenshot tool
|
||||
polkit-kde-agent # Polkit handler
|
||||
];
|
||||
# Hyprland screenshot tool
|
||||
xdg.configFile."hypr-scripts" = {
|
||||
source = rootPath + "/scripts";
|
||||
target = "hypr/scripts";
|
||||
executable = true;
|
||||
};
|
||||
|
||||
xdg.dataFile."hypr-icons" = {
|
||||
source = rootPath + "/icons";
|
||||
target = "icons/";
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
16
hmModules/apps/librewolf/default.nix
Normal file
16
hmModules/apps/librewolf/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.librewolf = {
|
||||
enable = lib.mkEnableOption "Enables librewolf";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.librewolf.enable {
|
||||
home.packages = with pkgs; [
|
||||
librewolf
|
||||
];
|
||||
home.sessionVariables = {
|
||||
BROWSER = "librewolf";
|
||||
};
|
||||
};
|
||||
}
|
||||
22
hmModules/apps/lutris/default.nix
Normal file
22
hmModules/apps/lutris/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.lutris = {
|
||||
enable = lib.mkEnableOption "Enables lutris";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.lutris.enable {
|
||||
home.packages = with pkgs; [
|
||||
lutris
|
||||
wineWowPackages.stable
|
||||
# (lutris.override {
|
||||
# extraLibraries = pkgs: [
|
||||
# # List library dependencies here
|
||||
# ];
|
||||
# extraPkgs = pkgs: [
|
||||
# # List package dependencies here
|
||||
# ];
|
||||
# })
|
||||
];
|
||||
};
|
||||
}
|
||||
9
hmModules/apps/media-viewers/default.nix
Normal file
9
hmModules/apps/media-viewers/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./feh
|
||||
./mpv
|
||||
./zathura
|
||||
];
|
||||
}
|
||||
13
hmModules/apps/media-viewers/feh/default.nix
Normal file
13
hmModules/apps/media-viewers/feh/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.feh = {
|
||||
enable = lib.mkEnableOption "Enables feh";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.feh.enable {
|
||||
programs.feh = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
22
hmModules/apps/media-viewers/mpv/default.nix
Normal file
22
hmModules/apps/media-viewers/mpv/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.mpv = {
|
||||
enable = lib.mkEnableOption "Enables mpv";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mpv.enable {
|
||||
home.packages = with pkgs; [
|
||||
yt-dlp
|
||||
];
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
config = {
|
||||
volume-max = 150;
|
||||
force-window = "yes";
|
||||
script-opts = "ytdl_hook-ytdl_path=yt-dlp";
|
||||
ytdl-format = "bestvideo[height<=?1080][vcodec!=vp9]+bestaudio/best";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
13
hmModules/apps/media-viewers/zathura/default.nix
Normal file
13
hmModules/apps/media-viewers/zathura/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.zathura = {
|
||||
enable = lib.mkEnableOption "Enables zathura";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.zathura.enable {
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
86
hmModules/apps/neovim/default.nix
Normal file
86
hmModules/apps/neovim/default.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.neovim = {
|
||||
enable = lib.mkEnableOption "Enables neovim";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.neovim.enable {
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
};
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
${builtins.readFile ./init.vim}
|
||||
'';
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
{ # Personal Wiki
|
||||
plugin = vimwiki;
|
||||
config = ''
|
||||
let g:vimwiki_list = [{'path': '~/dox/wiki', 'links_space_char': '_',
|
||||
\ 'ext': '.md', 'syntax': 'markdown'}]
|
||||
'';
|
||||
}
|
||||
{ # NNN in vim
|
||||
plugin = nnn-vim;
|
||||
config = ''
|
||||
let g:nnn#layout = { 'window': {
|
||||
\ 'width': 0.35,
|
||||
\ 'height': 0.5,
|
||||
\ 'xoffset': 1.0,
|
||||
\ 'highlight': 'Debug' } } " hover window
|
||||
let g:nnn#action = {
|
||||
\ '<c-t>': 'tab split',
|
||||
\ '<c-s>': 'split',
|
||||
\ '<c-v>': 'vsplit' }
|
||||
let g:nnn#command = 'nnn -HoeT v'
|
||||
let g:nnn#replace_netrw = 1
|
||||
'';
|
||||
}
|
||||
{ # Fuzzy searches
|
||||
plugin = fzf-vim;
|
||||
config = ''
|
||||
map <C-f> :Files<CR>
|
||||
map <C-a> :Ag<CR>
|
||||
'';
|
||||
}
|
||||
{ # Auto completions
|
||||
plugin = coc-nvim;
|
||||
config = ''
|
||||
function! s:check_back_space() abort
|
||||
let col = col('.') - 1
|
||||
return !col || getline('.')[col - 1] =~# '\s'
|
||||
endfunction
|
||||
|
||||
inoremap <silent><expr> <TAB>
|
||||
\ pumvisible() ? "\<C-n>" :
|
||||
\ <SID>check_back_space() ? "\<TAB>" :
|
||||
\ coc#refresh()
|
||||
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
||||
'';
|
||||
}
|
||||
vim-commentary # multi-line comments
|
||||
vim-fugitive # Git Plugin
|
||||
vimtex # Latex support
|
||||
tagbar # File tagging
|
||||
|
||||
# === LOOK AND FEEL ===
|
||||
{ # Status Bar
|
||||
plugin = vim-airline;
|
||||
config = ''
|
||||
let g:airline#extensions#tagbar#flags = 'fs'
|
||||
'';
|
||||
}
|
||||
{ # Rainbow Parenthesis
|
||||
plugin = rainbow;
|
||||
config = ''
|
||||
let g:rainbow_actve = 1
|
||||
'';
|
||||
}
|
||||
vim-polyglot # Syntax Highlighting
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -14,7 +14,8 @@ nnoremap <C-L> <C-W><C-L>
|
|||
nnoremap <C-H> <C-W><C-H>
|
||||
|
||||
" Indentation
|
||||
set tabstop=2 softtabstop=0 shiftwidth=2 smarttab expandtab
|
||||
" set tabstop=2 softtabstop=0 shiftwidth=2 smarttab expandtab
|
||||
set tabstop=8 softtabstop=0 shiftwidth=8
|
||||
|
||||
" Searching
|
||||
set smartcase
|
||||
17
hmModules/apps/obs/default.nix
Normal file
17
hmModules/apps/obs/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
options.obs = {
|
||||
enable = lib.mkEnableOption "Enables obs";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.obs.enable {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
obs-backgroundremoval
|
||||
obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
14
hmModules/apps/rofi/default.nix
Normal file
14
hmModules/apps/rofi/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.rofi = {
|
||||
enable = lib.mkEnableOption "Enables rofi";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.rofi.enable {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
};
|
||||
};
|
||||
}
|
||||
9
hmModules/apps/shells/default.nix
Normal file
9
hmModules/apps/shells/default.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./fish
|
||||
./xonsh
|
||||
./zsh
|
||||
];
|
||||
}
|
||||
45
hmModules/apps/shells/fish/default.nix
Normal file
45
hmModules/apps/shells/fish/default.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.fish = {
|
||||
enable = lib.mkEnableOption "Enables fish";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.fish.enable {
|
||||
programs.fish.enable = true;
|
||||
|
||||
programs.fish.functions = {
|
||||
fish_greeting = "";
|
||||
fish_prompt = ''
|
||||
${builtins.readFile ./functions/fish_prompt.fish}
|
||||
'';
|
||||
fish_right_prompt = ''
|
||||
${builtins.readFile ./functions/fish_right_prompt.fish}
|
||||
'';
|
||||
git_branch_name = ''
|
||||
${builtins.readFile ./functions/git_branch_name.fish}
|
||||
'';
|
||||
git_is_dirty = ''
|
||||
${builtins.readFile ./functions/git_is_dirty.fish}
|
||||
'';
|
||||
git_is_repo = ''
|
||||
${builtins.readFile ./functions/git_is_repo.fish}
|
||||
'';
|
||||
git_is_staged = ''
|
||||
${builtins.readFile ./functions/git_is_staged.fish}
|
||||
'';
|
||||
git_is_touched = ''
|
||||
${builtins.readFile ./functions/git_is_touched.fish}
|
||||
'';
|
||||
git_is_worktree = ''
|
||||
${builtins.readFile ./functions/git_is_worktree.fish}
|
||||
'';
|
||||
ssh = ''
|
||||
${builtins.readFile ./functions/ssh.fish}
|
||||
'';
|
||||
n = lib.mkIf config.nnn.enable ''
|
||||
${builtins.readFile ./functions/n.fish}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
22
hmModules/apps/shells/xonsh/default.nix
Normal file
22
hmModules/apps/shells/xonsh/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let rootPath = ./.; in
|
||||
{
|
||||
options.xonsh = {
|
||||
enable = lib.mkEnableOption "Enables xonsh";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.xonsh.enable {
|
||||
home.packages = with pkgs; [
|
||||
xonsh
|
||||
];
|
||||
home.sessionVariables = {
|
||||
PROMPT = "τ ";
|
||||
RIGHT_PROMPT = "{YELLOW}{gitstatus: {} }{BLUE}{short_cwd}{DEFAULT}";
|
||||
VI_MODE = 1;
|
||||
};
|
||||
xdg.configFile."xonshrc" = {
|
||||
source = rootPath + "/rc.xsh";
|
||||
target = "xonsh/rc.xsh";
|
||||
};
|
||||
};
|
||||
}
|
||||
47
hmModules/apps/shells/zsh/default.nix
Normal file
47
hmModules/apps/shells/zsh/default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.zsh = {
|
||||
enable = lib.mkEnableOption "Enable zsh";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.zsh.enable {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
|
||||
history.save = 10000;
|
||||
history.size = 10000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
initExtra = let
|
||||
lf = lib.optionalString config.lf.enable ''
|
||||
# Lf change directory command
|
||||
lfcd () {
|
||||
cd "$(command lf -print-last-dir "$@")"
|
||||
}
|
||||
bindkey -s '^o' 'lfcd\n'
|
||||
'';
|
||||
|
||||
in lf + ''
|
||||
# Nix-shell
|
||||
${pkgs.nix-your-shell}/bin/nix-your-shell zsh | source /dev/stdin
|
||||
|
||||
# Prompt
|
||||
autoload -U colors && colors
|
||||
autoload -Uz vcs_info
|
||||
precmd_vcs_info() { vcs_info }
|
||||
precmd_functions+=( precmd_vcs_info )
|
||||
setopt prompt_subst
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' unstagedstr '·*'
|
||||
zstyle ':vcs_info:*' stagedstr '·+'
|
||||
zstyle ':vcs_info:git:*' formats '%b%u%c'
|
||||
export PROMPT="%(0?.%F{white}.%? %F{red})τ%f "
|
||||
export RPROMPT="%F{yellow}\$vcs_info_msg_0_%f %F{blue}%~%f"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
39
hmModules/apps/terminal-emulators/alacritty/default.nix
Normal file
39
hmModules/apps/terminal-emulators/alacritty/default.nix
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.alacritty = {
|
||||
enable = lib.mkEnableOption "Enables alacritty";
|
||||
font = lib.mkOption { default = ""; };
|
||||
font_size = lib.mkOption { default = 18; };
|
||||
};
|
||||
|
||||
config = lib.mkIf config.alacritty.enable {
|
||||
programs.alacritty.enable = true;
|
||||
|
||||
programs.alacritty.settings = {
|
||||
font = let fam = config.alacritty.font; in {
|
||||
normal = {
|
||||
family = fam;
|
||||
style = "Regular";
|
||||
};
|
||||
bold = {
|
||||
family = fam;
|
||||
style = "Bold";
|
||||
};
|
||||
italic = {
|
||||
family = fam;
|
||||
style = "Italic";
|
||||
};
|
||||
bold_italic = {
|
||||
family = fam;
|
||||
style = "Bold Italic";
|
||||
};
|
||||
offset = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
size = config.alacritty.font_size;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
8
hmModules/apps/terminal-emulators/default.nix
Normal file
8
hmModules/apps/terminal-emulators/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./kitty
|
||||
./alacritty
|
||||
];
|
||||
}
|
||||
20
hmModules/apps/terminal-emulators/kitty/default.nix
Normal file
20
hmModules/apps/terminal-emulators/kitty/default.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.kitty = {
|
||||
enable = lib.mkEnableOption "Enables kitty";
|
||||
font = lib.mkOption { default = ""; };
|
||||
font_size = lib.mkOption { default = 18; };
|
||||
};
|
||||
|
||||
config = lib.mkIf config.kitty.enable {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font_family = config.kitty.font;
|
||||
font_size = config.kitty.font_size;
|
||||
enable_audio_bell = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
8
hmModules/default.nix
Normal file
8
hmModules/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./apps
|
||||
./services
|
||||
];
|
||||
}
|
||||
14
hmModules/services/default.nix
Normal file
14
hmModules/services/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./dunst
|
||||
./home
|
||||
./manpages
|
||||
./ssh
|
||||
./timers
|
||||
./trash
|
||||
./wal
|
||||
./widgets
|
||||
];
|
||||
}
|
||||
49
hmModules/services/dunst/default.nix
Normal file
49
hmModules/services/dunst/default.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.dunst = {
|
||||
enable = lib.mkEnableOption "Enables dunst";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.dunst.enable {
|
||||
home.packages = with pkgs; [
|
||||
libnotify
|
||||
];
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
settings = {
|
||||
global = {
|
||||
width = 280;
|
||||
height = 240;
|
||||
origin = "bottom-right";
|
||||
offset = "0x300";
|
||||
|
||||
notification_limit = 3;
|
||||
|
||||
progress_bar_max_width = 280;
|
||||
|
||||
gap_size = 4;
|
||||
corner_radius = 20;
|
||||
};
|
||||
|
||||
urgency_low = {
|
||||
background = "#FFFFFFCC";
|
||||
foreground = "#000000";
|
||||
frame_color = "#0000";
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
background = "#FFFFFFCC";
|
||||
foreground = "#000000";
|
||||
frame_color = "#0000";
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
background = "#FFFFFFCC";
|
||||
foreground = "#000000";
|
||||
frame_color = "#0000";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
38
hmModules/services/home/default.nix
Normal file
38
hmModules/services/home/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
extraPkgs = lib.mkOption { default = []; };
|
||||
};
|
||||
|
||||
config = {
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.sessionVariables = {
|
||||
GRADLE_USER_HOME = "${config.xdg.dataHome}/gradle";
|
||||
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
|
||||
};
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
mimeApps.enable = true;
|
||||
userDirs = let
|
||||
home = config.home.homeDirectory;
|
||||
in {
|
||||
enable = true;
|
||||
documents = "${home}/dox";
|
||||
publicShare = "${home}/dox/public";
|
||||
templates = "${home}/dox/templates";
|
||||
music = "${home}/med/mus";
|
||||
pictures = "${home}/med/pix";
|
||||
videos = "${home}/med/vid";
|
||||
desktop = "${home}/dwn";
|
||||
download = "${home}/dwn";
|
||||
};
|
||||
};
|
||||
|
||||
home.homeDirectory = "/home/" + config.home.username;
|
||||
home.packages = config.extraPkgs;
|
||||
};
|
||||
}
|
||||
15
hmModules/services/manpages/default.nix
Normal file
15
hmModules/services/manpages/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.manpages = {
|
||||
enable = lib.mkEnableOption "Enables manpager";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.manpages.enable {
|
||||
programs.man.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
man-pages
|
||||
man-pages-posix
|
||||
];
|
||||
};
|
||||
}
|
||||
14
hmModules/services/ssh/default.nix
Normal file
14
hmModules/services/ssh/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.ssh = {
|
||||
enable = lib.mkEnableOption "Enables ssh";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.ssh.enable {
|
||||
programs.ssh.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
sshfs # SSH File system
|
||||
];
|
||||
};
|
||||
}
|
||||
60
hmModules/services/timers/default.nix
Normal file
60
hmModules/services/timers/default.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let rootPath = ./.; in
|
||||
{
|
||||
options.timer = {
|
||||
enableHourly = lib.mkEnableOption "Enables an hourly notification";
|
||||
enableQuarterly = lib.mkEnableOption "Enables a quarterly notification";
|
||||
};
|
||||
|
||||
config = {
|
||||
systemd.user.timers = {
|
||||
hourly-time = lib.mkIf config.timer.enableHourly {
|
||||
Timer = {
|
||||
OnCalendar = "hourly";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [
|
||||
"timers.target"
|
||||
];
|
||||
};
|
||||
};
|
||||
quarterly-time = lib.mkIf config.timer.enableQuarterly {
|
||||
Timer = {
|
||||
OnCalendar = "*-*-* *:15,30,45:00";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [
|
||||
"timers.target"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services = {
|
||||
hourly-time = lib.mkIf config.timer.enableHourly {
|
||||
Unit = {
|
||||
Description = "Notify the user every hour of time passing";
|
||||
};
|
||||
Service = {
|
||||
Type="simple";
|
||||
ExecStart="/home/pan/.config/timer_scripts/notify-time.sh 60000 1";
|
||||
};
|
||||
};
|
||||
quarterly-time = lib.mkIf config.timer.enableQuarterly {
|
||||
Unit = {
|
||||
Description = "Notify the user every 15 minutes of time passing, \
|
||||
skips hours";
|
||||
};
|
||||
Service = {
|
||||
Type="simple";
|
||||
ExecStart="/home/pan/.config/timer_scripts/notify-time.sh 10000 0";
|
||||
};
|
||||
};
|
||||
};
|
||||
xdg.configFile."timer-scripts" = {
|
||||
source = rootPath + "/scripts";
|
||||
target = "timer_scripts/";
|
||||
executable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
13
hmModules/services/trash/default.nix
Normal file
13
hmModules/services/trash/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.trash = {
|
||||
enable = lib.mkEnableOption "Enables trash";
|
||||
};
|
||||
|
||||
config = {
|
||||
home.packages = [
|
||||
pkgs.trash-cli
|
||||
];
|
||||
};
|
||||
}
|
||||
34
hmModules/services/wal/default.nix
Normal file
34
hmModules/services/wal/default.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let rootPath = ./.; in
|
||||
{
|
||||
options.colors = {
|
||||
enable = lib.mkEnableOption "Enables setting colors using wallust";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.colors.enable {
|
||||
home.packages = with pkgs; [
|
||||
wallust # A better pywal
|
||||
pywalfox-native # Update librewolf's colorscheme based on wal
|
||||
];
|
||||
xdg.configFile."wallust-config" = {
|
||||
target = "wallust/wallust.toml";
|
||||
text = ''
|
||||
backend = "wal"
|
||||
color_space = "lab"
|
||||
threshold = 20
|
||||
filter = "dark16"
|
||||
|
||||
# [[entry]]
|
||||
# # a relative path to a file where wallust.toml is (~/.config/wallust/)
|
||||
# template = "dunstrc"
|
||||
#
|
||||
# # absolute path to the file to write the template (after templating)
|
||||
# target = "~/.config/dunst/dunstrc"
|
||||
'';
|
||||
};
|
||||
#xdg.configFile."wallust-templates" = {
|
||||
# source = rootPath + "/templates";
|
||||
# target = "wallust/";
|
||||
#};
|
||||
};
|
||||
}
|
||||
25
hmModules/services/widgets/ags/default.nix
Normal file
25
hmModules/services/widgets/ags/default.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, inputs, pkgs, lib, ... }:
|
||||
{
|
||||
|
||||
options.ags = {
|
||||
enable = lib.mkEnableOption "Enable ags";
|
||||
};
|
||||
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
config = lib.mkIf config.ags.enable {
|
||||
home.packages = with pkgs; [
|
||||
libnotify # Notifications through ags
|
||||
];
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
configDir = ./config;
|
||||
|
||||
extraPackages = with pkgs; [
|
||||
gtksourceview
|
||||
webkitgtk
|
||||
accountsservice
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
8
hmModules/services/widgets/default.nix
Normal file
8
hmModules/services/widgets/default.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./ags
|
||||
./eww
|
||||
];
|
||||
}
|
||||
13
hmModules/services/widgets/eww/default.nix
Normal file
13
hmModules/services/widgets/eww/default.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options.eww = {
|
||||
enable = lib.mkEnableOption "Enables eww";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.eww.enable {
|
||||
programs.eww.enable = true;
|
||||
programs.eww.package = pkgs.eww-wayland;
|
||||
programs.eww.configDir = ./config;
|
||||
};
|
||||
}
|
||||
77
home.nix
77
home.nix
|
|
@ -1,77 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
home.username = "pan";
|
||||
home.homeDirectory = "/home/pan";
|
||||
|
||||
imports = [
|
||||
# ./programs/dunst
|
||||
# ./programs/eww
|
||||
# ./programs/spotify
|
||||
./programs/ags
|
||||
./programs/alacritty
|
||||
./programs/discord
|
||||
./programs/fish
|
||||
./programs/git
|
||||
./programs/hypr
|
||||
./programs/lutris
|
||||
./programs/mpv
|
||||
./programs/nnn
|
||||
./programs/nvim
|
||||
./programs/rofi
|
||||
./programs/ssh
|
||||
./programs/wal
|
||||
./programs/xdg
|
||||
./programs/xonsh
|
||||
./programs/obs
|
||||
./programs/kitty
|
||||
./programs/zsh
|
||||
./programs/lf
|
||||
|
||||
# ./services/scripts
|
||||
./services/timers
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Applications
|
||||
beeper # Better Chat App
|
||||
gimp # Photo editting
|
||||
pamixer # Volume control
|
||||
playerctl # Control media
|
||||
wget # Download web stuff
|
||||
feh # Image viewer
|
||||
appimage-run # Lets you run app images
|
||||
zathura # PDF viewer
|
||||
ani-cli # Easy anime player
|
||||
lutgen # LUT generator
|
||||
prismlauncher # Minecraft launcher
|
||||
unzip # Unzip utility
|
||||
|
||||
texlive.combined.scheme-full # Latex
|
||||
|
||||
# Development stuff
|
||||
nodejs # For compiling JS stuff
|
||||
jq # May be critical for scripts?
|
||||
];
|
||||
# home.file = {};
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
BROWSER = "librewolf";
|
||||
GRADLE_USER_HOME = "/home/pan/.local/share" + "/gradle";
|
||||
CUDA_CACHE_PATH = "/home/pan/.cache" + "/nv";
|
||||
};
|
||||
|
||||
home.sessionPath = [
|
||||
"$HOME/prog/scripts"
|
||||
];
|
||||
|
||||
# Enable man pages, but ensure ~/.manpage isn't created
|
||||
programs.man.enable = true;
|
||||
programs.man.generateCaches = false;
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
home.stateVersion = "23.05";
|
||||
}
|
||||
|
|
@ -1,23 +0,0 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
# add the home manager module
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
libnotify # Notifications through ags
|
||||
];
|
||||
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
|
||||
# null or path, leave as null if you don't want hm to manage the config
|
||||
configDir = ./config;
|
||||
|
||||
# additional packages to add to ags's runtime
|
||||
extraPackages = with pkgs; [
|
||||
gtksourceview
|
||||
webkitgtk
|
||||
accountsservice
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.alacritty.enable = true;
|
||||
|
||||
|
||||
programs.alacritty.settings = {
|
||||
font = let fam = "Cascadia Code"; in {
|
||||
normal = {
|
||||
family = fam;
|
||||
style = "Regular";
|
||||
};
|
||||
bold = {
|
||||
family = fam;
|
||||
style = "Bold";
|
||||
};
|
||||
italic = {
|
||||
family = fam;
|
||||
style = "Italic";
|
||||
};
|
||||
bold_italic = {
|
||||
family = fam;
|
||||
style = "Bold Italic";
|
||||
};
|
||||
offset = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
size = 18.0;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
vesktop # Base app
|
||||
];
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
libnotify
|
||||
];
|
||||
services.dunst.enable = true;
|
||||
services.dunst.settings = {
|
||||
global = {
|
||||
width = 280;
|
||||
height = 240;
|
||||
origin = "bottom-right";
|
||||
offset = "0x300";
|
||||
|
||||
notification_limit = 3;
|
||||
|
||||
progress_bar_max_width = 280;
|
||||
|
||||
gap_size = 4;
|
||||
corner_radius = 20;
|
||||
};
|
||||
|
||||
urgency_low = {
|
||||
background = "#FFFFFFCC";
|
||||
foreground = "#000000";
|
||||
frame_color = "#0000";
|
||||
};
|
||||
|
||||
urgency_normal = {
|
||||
background = "#FFFFFFCC";
|
||||
foreground = "#000000";
|
||||
frame_color = "#0000";
|
||||
};
|
||||
|
||||
urgency_critical = {
|
||||
background = "#FFFFFFCC";
|
||||
foreground = "#000000";
|
||||
frame_color = "#0000";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.eww.enable = true;
|
||||
programs.eww.package = pkgs.eww-wayland;
|
||||
programs.eww.configDir = ./config;
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.fish.enable = true;
|
||||
|
||||
programs.fish.interactiveShellInit = ''
|
||||
cat ~/.cache/wal/sequences
|
||||
'';
|
||||
|
||||
programs.fish.functions = {
|
||||
fish_greeting = "";
|
||||
fish_prompt = ''
|
||||
${builtins.readFile ./functions/fish_prompt.fish}
|
||||
'';
|
||||
fish_right_prompt = ''
|
||||
${builtins.readFile ./functions/fish_right_prompt.fish}
|
||||
'';
|
||||
git_branch_name = ''
|
||||
${builtins.readFile ./functions/git_branch_name.fish}
|
||||
'';
|
||||
git_is_dirty = ''
|
||||
${builtins.readFile ./functions/git_is_dirty.fish}
|
||||
'';
|
||||
git_is_repo = ''
|
||||
${builtins.readFile ./functions/git_is_repo.fish}
|
||||
'';
|
||||
git_is_staged = ''
|
||||
${builtins.readFile ./functions/git_is_staged.fish}
|
||||
'';
|
||||
git_is_touched = ''
|
||||
${builtins.readFile ./functions/git_is_touched.fish}
|
||||
'';
|
||||
git_is_worktree = ''
|
||||
${builtins.readFile ./functions/git_is_worktree.fish}
|
||||
'';
|
||||
n = ''
|
||||
${builtins.readFile ./functions/n.fish}
|
||||
'';
|
||||
ssh = ''
|
||||
${builtins.readFile ./functions/ssh.fish}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git.enable = true;
|
||||
programs.git.userName = "JuliaLange";
|
||||
programs.git.userEmail = "git@julialange.com";
|
||||
programs.git.extraConfig = {
|
||||
safe = {
|
||||
directory = "/etc/nixos";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
let rootPath = ./.; in
|
||||
{
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
wayland.windowManager.hyprland.extraConfig = ''
|
||||
${builtins.readFile ./window_rules.conf}
|
||||
${builtins.readFile ./league_rules.conf}
|
||||
${builtins.readFile ./settings.conf}
|
||||
${builtins.readFile ./nvidia.conf}
|
||||
${builtins.readFile ./keybinds.conf}
|
||||
${builtins.readFile ./xwaylandvideobridge.conf}
|
||||
exec-once=${pkgs.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1
|
||||
|
||||
env = HYPRCURSOR_THEME,miku
|
||||
env = HYPRCURSOR_SIZE,64
|
||||
'';
|
||||
# wayland.windowManager.hyprland.enableNvidiaPatches = true;
|
||||
home.packages = with pkgs; [
|
||||
socat # For hyprland scripts
|
||||
swww # Wallpaper engine
|
||||
wlr-randr # Xrandr for wayland
|
||||
wl-clipboard # Clipboard manager for wayland
|
||||
xdg-desktop-portal-hyprland # XDP for hyprland
|
||||
hyprpicker # Colorpicker, needed for screenshot tool
|
||||
hyprcursor # Hyprland cursor
|
||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast # Screenshot tool
|
||||
xwaylandvideobridge # Allows screensharing with xwayland apps
|
||||
polkit-kde-agent # Polkit handler
|
||||
];
|
||||
|
||||
# Hyprland screenshot tool
|
||||
xdg.configFile."hypr-scripts" = {
|
||||
source = rootPath + "/scripts";
|
||||
target = "hypr/scripts";
|
||||
executable = true;
|
||||
};
|
||||
|
||||
xdg.dataFile."hypr-icons" = {
|
||||
source = rootPath + "/icons";
|
||||
target = "icons/";
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
font_family = "Cascadia Code";
|
||||
font_size = 18;
|
||||
enable_audio_bell = "no";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,85 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
xdg.configFile."lf/icons".source = ./icons;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
trash-cli # Trash program for lf
|
||||
];
|
||||
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
# Hide specific files rather than "hidden" files
|
||||
hiddenfiles = [
|
||||
"${config.home.homeDirectory}/.librewolf"
|
||||
"${config.home.homeDirectory}/.nix-defexpr"
|
||||
"${config.home.homeDirectory}/.nix-profile"
|
||||
"${config.home.homeDirectory}/.nv"
|
||||
"${config.home.homeDirectory}/.pki"
|
||||
"${config.home.homeDirectory}/.steam*"
|
||||
"${config.home.homeDirectory}/.zshenv"
|
||||
];
|
||||
ratios = [
|
||||
2
|
||||
3
|
||||
];
|
||||
preview = true;
|
||||
ignorecase = true;
|
||||
icons = true;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
};
|
||||
commands = {
|
||||
dragon-out = ''%${pkgs.xdragon}/bin/xdragon -a -x "$fx"'';
|
||||
mkdir = ''
|
||||
''${{
|
||||
printf "Directory Name: "
|
||||
read DIR
|
||||
mkdir $DIR
|
||||
}}
|
||||
'';
|
||||
mkfile = ''
|
||||
''${{
|
||||
printf "File Name: "
|
||||
read FILE
|
||||
mkdir $FILE
|
||||
}}
|
||||
'';
|
||||
trash = ''trash "$fx"'';
|
||||
};
|
||||
keybindings = {
|
||||
";" = "";
|
||||
x = "trash";
|
||||
"." = "set hidden!";
|
||||
";d" = "mkdir";
|
||||
";f" = "mkfile";
|
||||
";m" = "dragon-out";
|
||||
};
|
||||
extraConfig =
|
||||
let
|
||||
previewer =
|
||||
pkgs.writeShellScriptBin "pv.sh" ''
|
||||
file=$1
|
||||
w=$2
|
||||
h=$3
|
||||
x=$4
|
||||
y=$5
|
||||
|
||||
if [[ "$( ${pkgs.file}/bin/file -Lb --mime-type "$file")" =~ ^image ]]; then
|
||||
${pkgs.kitty}/bin/kitty +kitten icat --silent --stdin no --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file" < /dev/null > /dev/tty
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${pkgs.pistol}/bin/pistol "$file"
|
||||
'';
|
||||
cleaner = pkgs.writeShellScriptBin "clean.sh" ''
|
||||
${pkgs.kitty}/bin/kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty
|
||||
'';
|
||||
in
|
||||
''
|
||||
set cleaner ${cleaner}/bin/clean.sh
|
||||
set previewer ${previewer}/bin/pv.sh
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
lutris
|
||||
wineWowPackages.stable
|
||||
# (lutris.override {
|
||||
# extraLibraries = pkgs: [
|
||||
# # List library dependencies here
|
||||
# ];
|
||||
# extraPkgs = pkgs: [
|
||||
# # List package dependencies here
|
||||
# ];
|
||||
# })
|
||||
];
|
||||
}
|
||||
|
|
@ -1,14 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.mpv.enable = true;
|
||||
programs.mpv.config = {
|
||||
volume-max = 150;
|
||||
force-window = "yes";
|
||||
script-opts = "ytdl_hook-ytdl_path=yt-dlp";
|
||||
ytdl-format = "bestvideo[height<=?1080][vcodec!=vp9]+bestaudio/best";
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
yt-dlp
|
||||
];
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue