Add all of iogamaster modules
@ -117,6 +117,8 @@
|
|||||||
permittedInsecurePackages = [ ];
|
permittedInsecurePackages = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
systems.modules.nixos = with inputs; [ nix-topology.nixosModules.default ];
|
||||||
|
|
||||||
topology =
|
topology =
|
||||||
with inputs;
|
with inputs;
|
||||||
let
|
let
|
||||||
|
15
lib/module/default.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
with lib;
|
||||||
|
rec {
|
||||||
|
mkOpt =
|
||||||
|
type: default: description:
|
||||||
|
mkOption { inherit type default description; };
|
||||||
|
|
||||||
|
mkOpt' = type: default: mkOpt type default null;
|
||||||
|
|
||||||
|
mkBoolOpt = mkOpt types.bool;
|
||||||
|
|
||||||
|
mkBoolOpt' = mkOpt' types.bool;
|
||||||
|
|
||||||
|
mkEnableOpt = mkBoolOpt' false;
|
||||||
|
}
|
23
modules/nixos/apps/brave/default.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.apps.brave;
|
||||||
|
in {
|
||||||
|
options.apps.brave = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable brave browser";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [pkgs.brave];
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".local/share/BraveSoftware"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
26
modules/nixos/apps/discord/default.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.apps.discord;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.apps.discord = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable discord";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [
|
||||||
|
(pkgs.discord.override { withOpenASAR = true; })
|
||||||
|
pkgs.xwaylandvideobridge
|
||||||
|
];
|
||||||
|
|
||||||
|
home.persist.directories = [ ".config/discord" ];
|
||||||
|
};
|
||||||
|
}
|
29
modules/nixos/apps/firefox/default.nix
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.apps.firefox;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.apps.firefox = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable firefox browser";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.librewolf;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".librewolf"
|
||||||
|
".cache/librewolf"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
47
modules/nixos/apps/foot/default.nix
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.apps.foot;
|
||||||
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.apps.foot = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable the foot terminal.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ pkgs.foot ];
|
||||||
|
|
||||||
|
home.configFile."foot/foot.ini".text = ''
|
||||||
|
font=JetBrains Mono Nerd Font:size=12
|
||||||
|
pad=5x5
|
||||||
|
[colors]
|
||||||
|
foreground=${palette.base05}
|
||||||
|
background=${palette.base00}
|
||||||
|
regular0=${palette.base03}
|
||||||
|
regular1=${palette.base08}
|
||||||
|
regular2=${palette.base0B}
|
||||||
|
regular3=${palette.base0A}
|
||||||
|
regular4=${palette.base0D}
|
||||||
|
regular5=${palette.base0F}
|
||||||
|
regular6=${palette.base0C}
|
||||||
|
regular7=${palette.base05}
|
||||||
|
bright0=${palette.base04}
|
||||||
|
bright1=${palette.base08}
|
||||||
|
bright2=${palette.base0B}
|
||||||
|
bright3=${palette.base0A}
|
||||||
|
bright4=${palette.base0D}
|
||||||
|
bright5=${palette.base0F}
|
||||||
|
bright6=${palette.base0C}
|
||||||
|
bright7=${palette.base05}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
38
modules/nixos/apps/lutris/default.nix
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.apps.lutris;
|
||||||
|
in {
|
||||||
|
options.apps.lutris = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable lutris";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.lutris
|
||||||
|
pkgs.fuse
|
||||||
|
];
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".local/share/lutris"
|
||||||
|
".cache/lutris"
|
||||||
|
"Games"
|
||||||
|
];
|
||||||
|
|
||||||
|
# Appimages for certain games
|
||||||
|
boot.binfmt.registrations.appimage = {
|
||||||
|
wrapInterpreterInShell = false;
|
||||||
|
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
|
||||||
|
recognitionType = "magic";
|
||||||
|
offset = 0;
|
||||||
|
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
|
||||||
|
magicOrExtension = ''\x7fELF....AI\x02'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
45
modules/nixos/apps/misc/default.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.apps.misc;
|
||||||
|
in {
|
||||||
|
options.apps.misc = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable misc apps";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
# Development
|
||||||
|
git
|
||||||
|
git-remote-gcrypt
|
||||||
|
bat
|
||||||
|
eza
|
||||||
|
fzf
|
||||||
|
fd
|
||||||
|
|
||||||
|
# Util
|
||||||
|
unzip
|
||||||
|
sshfs
|
||||||
|
btop
|
||||||
|
ffmpeg
|
||||||
|
python3
|
||||||
|
wl-clipboard
|
||||||
|
|
||||||
|
obsidian
|
||||||
|
pandoc
|
||||||
|
bookworm
|
||||||
|
|
||||||
|
kjv
|
||||||
|
];
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".config/obsidian"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
37
modules/nixos/apps/neovim/default.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.apps.neovim;
|
||||||
|
in {
|
||||||
|
options.apps.neovim = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable neovim";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.variables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.neovim
|
||||||
|
|
||||||
|
pkgs.lazygit
|
||||||
|
pkgs.stylua
|
||||||
|
pkgs.sumneko-lua-language-server
|
||||||
|
pkgs.ripgrep
|
||||||
|
];
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".local/share/nvim"
|
||||||
|
".vim"
|
||||||
|
".wakatime"
|
||||||
|
];
|
||||||
|
|
||||||
|
home.persist.files = [".wakatime.cfg" ".wakatime.bdb"];
|
||||||
|
};
|
||||||
|
}
|
33
modules/nixos/apps/pass/default.nix
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.apps.pass;
|
||||||
|
in {
|
||||||
|
options.apps.pass = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable pass";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
apps.tools.gnupg.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
(writeShellScriptBin "pass" ''
|
||||||
|
GNUPGHOME="$XDG_DATA_HOME/gnupg" PASSWORD_STORE_DIR="$XDG_DATA_HOME/pass" ${pkgs.pass.withExtensions (exts: [
|
||||||
|
exts.pass-otp
|
||||||
|
exts.pass-update
|
||||||
|
exts.pass-audit
|
||||||
|
])}/bin/pass $@
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".local/share/pass"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
40
modules/nixos/apps/steam/default.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.apps.steam;
|
||||||
|
in {
|
||||||
|
options.apps.steam = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable steam";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.steam.enable = true;
|
||||||
|
programs.steam.remotePlay.openFirewall = true;
|
||||||
|
programs.steam.gamescopeSession.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.steam
|
||||||
|
pkgs.mangohud
|
||||||
|
pkgs.protonup
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
STEAM_EXTRA_COMPAT_TOOLS_PATHS = "/home/${config.user.name}/.steam/root/compatibilitytools.d";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.gamemode.enable = true;
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".local/share/Steam"
|
||||||
|
".steam"
|
||||||
|
|
||||||
|
".local/share/Terraria"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
28
modules/nixos/apps/tools/direnv/default.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.apps.tools.direnv;
|
||||||
|
in {
|
||||||
|
options.apps.tools.direnv = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable direnv";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
enableNushellIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables.DIRENV_LOG_FORMAT = ""; # Blank so direnv will shut up
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".local/share/direnv"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
19
modules/nixos/apps/tools/git/config.nix
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{sshKeyPath}: ''
|
||||||
|
[user]
|
||||||
|
name = IogaMaster
|
||||||
|
email = iogamastercode@gmail.com
|
||||||
|
signingkey = ${sshKeyPath}
|
||||||
|
[pull]
|
||||||
|
rebase = true
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
[filter "lfs"]
|
||||||
|
process = git-lfs filter-process
|
||||||
|
required = true
|
||||||
|
clean = git-lfs clean -- %f
|
||||||
|
smudge = git-lfs smudge -- %f
|
||||||
|
[gpg]
|
||||||
|
format = ssh
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
|
''
|
45
modules/nixos/apps/tools/git/default.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.apps.tools.git;
|
||||||
|
in {
|
||||||
|
options.apps.tools.git = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable git";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
git-remote-gcrypt
|
||||||
|
|
||||||
|
gh # GitHub cli
|
||||||
|
|
||||||
|
lazygit
|
||||||
|
commitizen
|
||||||
|
];
|
||||||
|
|
||||||
|
environment.shellAliases = {
|
||||||
|
# Git aliases
|
||||||
|
ga = "git add .";
|
||||||
|
gc = "git commit -m ";
|
||||||
|
gp = "git push -u origin";
|
||||||
|
|
||||||
|
g = "lazygit";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.configFile."git/config".text = import ./config.nix {sshKeyPath = "/home/${config.user.name}/.ssh/key.pub";};
|
||||||
|
home.configFile."lazygit/config.yml".source = ./lazygitConfig.yml;
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".config/gh"
|
||||||
|
".config/lazygit"
|
||||||
|
".config/systemd" # For git maintainance
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
26
modules/nixos/apps/tools/git/lazygitConfig.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
gui:
|
||||||
|
nerdFontsVersion: "3"
|
||||||
|
|
||||||
|
git:
|
||||||
|
overrideGpg: true
|
||||||
|
|
||||||
|
customCommands:
|
||||||
|
- key: "C"
|
||||||
|
command: "git cz c"
|
||||||
|
description: "commit with commitizen"
|
||||||
|
context: "files"
|
||||||
|
loadingText: "opening commitizen commit tool"
|
||||||
|
subprocess: true
|
||||||
|
- key: 'D'
|
||||||
|
command: >-
|
||||||
|
git push {{ .SelectedLocalBranch.UpstreamRemote }} --delete {{ .SelectedLocalBranch.UpstreamBranch }} &&
|
||||||
|
git branch -D {{ .SelectedLocalBranch.Name }}
|
||||||
|
description: "delete local AND remote branch"
|
||||||
|
context: 'localBranches'
|
||||||
|
stream: true
|
||||||
|
- key: 'T'
|
||||||
|
command: >-
|
||||||
|
for branch in $(git branch --all | grep '^\s*remotes' | egrep --invert-match '(:?HEAD|master)$'); do git branch --track "${branch##*/}" "$branch"; done
|
||||||
|
description: "add ALL remote branches to the list"
|
||||||
|
context: 'localBranches'
|
||||||
|
stream: true
|
44
modules/nixos/apps/tools/gnupg/default.nix
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.apps.tools.gnupg;
|
||||||
|
in {
|
||||||
|
options.apps.tools.gnupg = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable gnupg";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.pinentry
|
||||||
|
pkgs.pinentry-curses
|
||||||
|
|
||||||
|
(pkgs.writeShellScriptBin "gpg" ''
|
||||||
|
GNUPGHOME=${config.environment.variables.GNUPGHOME} ${pkgs.gnupg}/bin/gpg $@
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
services.pcscd.enable = true;
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
pinentryPackage = pkgs.pinentry-curses;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".local/share/gnupg/gpg-agent.conf".source = ./gpg-agent.conf;
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GNUPGHOME = "$XDG_DATA_HOME/gnupg";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".local/share/gnupg"
|
||||||
|
".pki"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
1
modules/nixos/apps/tools/gnupg/gpg-agent.conf
Normal file
@ -0,0 +1 @@
|
|||||||
|
pinentry-program /run/current-system/sw/bin/pinentry-curses
|
22
modules/nixos/apps/tools/nix-ld/default.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.apps.tools.nix-ld;
|
||||||
|
in {
|
||||||
|
imports = with inputs; [
|
||||||
|
nix-ld.nixosModules.nix-ld
|
||||||
|
];
|
||||||
|
options.apps.tools.nix-ld = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable nix-ld";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
};
|
||||||
|
}
|
14
modules/nixos/desktop/addons/eww/config/env.yuck
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
(defpoll hostname :interval "1000s" "hostnamectl hostname")
|
||||||
|
(defpoll username :interval "1000s" "echo $USER")
|
||||||
|
|
||||||
|
(defpoll net :interval "100s" `nmcli -terse -fields SIGNAL,ACTIVE device wifi | awk --field-separator ':' '{if($2=="yes")print$1}'`)
|
||||||
|
(defpoll ssid :interval "100s" `nmcli -terse -fields SSID,ACTIVE device wifi | awk --field-separator ':' '{if($2=="yes")print$1}'`)
|
||||||
|
|
||||||
|
(defvar profile "~/.face")
|
||||||
|
|
||||||
|
(defpoll dunst :interval "1s" "[ $(dunstctl is-paused) = false ] && echo || echo ")
|
||||||
|
|
||||||
|
(defpoll time :interval "1s" `date +'{"hour":"%H","min":"%M","sec":"%S","pretty":"%a, %e %b","day":"%A","month":"%B","dom":"%e","year":"%Y","day_num":"%d","month_num":"%m","year_num":"%y"}'`)
|
||||||
|
|
||||||
|
(deflisten music :initial ""
|
||||||
|
"playerctl --follow metadata --format '{{ title }} - {{ artist }}' || true")
|
113
modules/nixos/desktop/addons/eww/config/eww.scss
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
* {
|
||||||
|
all: unset; //Unsets everything so you can style everything from scratch
|
||||||
|
}
|
||||||
|
|
||||||
|
$bg: #1e1e2e;
|
||||||
|
$black: #313244;
|
||||||
|
$red: #f38ba8;
|
||||||
|
$green: #a6e3a1;
|
||||||
|
$yellow: #f9e2af;
|
||||||
|
$pink: #f5c2e7;
|
||||||
|
$blue: #89b4fa;
|
||||||
|
$purple: #cba6f7;
|
||||||
|
$cyan: #89dceb;
|
||||||
|
$white: #cdd6f4;
|
||||||
|
$gray: #313244;
|
||||||
|
|
||||||
|
* {
|
||||||
|
transition: 200ms ease;
|
||||||
|
font-family: "JetBrainsMono Nerd Font";
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar {
|
||||||
|
background-color: $bg;
|
||||||
|
color: $white;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar2 {
|
||||||
|
background-color: $bg;
|
||||||
|
color: $white;
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.workspaces {
|
||||||
|
padding-left: 10;
|
||||||
|
font-size: 20;
|
||||||
|
}
|
||||||
|
|
||||||
|
.system {
|
||||||
|
padding-right: 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module { margin: 0 5px; }
|
||||||
|
|
||||||
|
.metric scale trough highlight {
|
||||||
|
all: unset;
|
||||||
|
background-color: $blue;
|
||||||
|
color: $black;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric scale trough {
|
||||||
|
all: unset;
|
||||||
|
background-color: $gray;
|
||||||
|
border-radius: 50px;
|
||||||
|
min-height: 3px;
|
||||||
|
min-width: 50px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric scale trough highlight {
|
||||||
|
all: unset;
|
||||||
|
background-color: $blue;
|
||||||
|
color: $black;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.metric scale trough {
|
||||||
|
all: unset;
|
||||||
|
background-color: $gray;
|
||||||
|
border-radius: 50px;
|
||||||
|
min-height: 3px;
|
||||||
|
min-width: 50px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bat-box scale trough highlight {
|
||||||
|
all: unset;
|
||||||
|
background-color: $blue;
|
||||||
|
color: $black;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bat-box scale trough {
|
||||||
|
all: unset;
|
||||||
|
background-color: $gray;
|
||||||
|
border-radius: 50px;
|
||||||
|
min-height: 3px;
|
||||||
|
min-width: 50px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bat-box scale trough highlight {
|
||||||
|
all: unset;
|
||||||
|
background-color: $blue;
|
||||||
|
color: $black;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bat-box scale trough {
|
||||||
|
all: unset;
|
||||||
|
background-color: $gray;
|
||||||
|
border-radius: 50px;
|
||||||
|
min-height: 3px;
|
||||||
|
min-width: 50px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
39
modules/nixos/desktop/addons/eww/config/eww.yuck
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
(include "./widgets/workspaces.yuck")
|
||||||
|
(include "./widgets/music.yuck")
|
||||||
|
(include "./widgets/metrics.yuck")
|
||||||
|
|
||||||
|
(defwidget bar []
|
||||||
|
(centerbox :orientation "h"
|
||||||
|
(box
|
||||||
|
:space-evenly false
|
||||||
|
:halign "start"
|
||||||
|
(workspaces))
|
||||||
|
(label :text "")
|
||||||
|
(metrics)))
|
||||||
|
|
||||||
|
;; Windows
|
||||||
|
(defwindow bar
|
||||||
|
:monitor 0
|
||||||
|
:geometry (geometry :x "0%"
|
||||||
|
:y "0px"
|
||||||
|
:width "100%"
|
||||||
|
:height "4%"
|
||||||
|
:anchor "top center")
|
||||||
|
:stacking "fg"
|
||||||
|
:windowtype "dock"
|
||||||
|
:wm-ignore false
|
||||||
|
:exclusive true
|
||||||
|
(bar))
|
||||||
|
(defwindow bar2
|
||||||
|
:monitor 1
|
||||||
|
:geometry (geometry :x "0%"
|
||||||
|
:y "0px"
|
||||||
|
:width "100%"
|
||||||
|
:height "4%"
|
||||||
|
:anchor "top center")
|
||||||
|
:stacking "fg"
|
||||||
|
:windowtype "dock"
|
||||||
|
:wm-ignore false
|
||||||
|
:exclusive true
|
||||||
|
(bar))
|
||||||
|
|
8
modules/nixos/desktop/addons/eww/config/scripts/battery-percent
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
if [ -f /sys/class/power_supply/BAT0/capacity ]; then
|
||||||
|
cat /sys/class/power_supply/BAT0/capacity
|
||||||
|
fi
|
||||||
|
|
8
modules/nixos/desktop/addons/eww/config/scripts/battery-status
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
if [ -f /sys/class/power_supply/BAT0/status]; then
|
||||||
|
cat /sys/class/power_supply/BAT0/status
|
||||||
|
fi
|
||||||
|
|
83
modules/nixos/desktop/addons/eww/config/scripts/workspace
Executable file
@ -0,0 +1,83 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
source ~/.config/theme/workspace_colors
|
||||||
|
|
||||||
|
# get initial focused workspace
|
||||||
|
focusedws=$(hyprctl -j monitors | jaq -r '.[] | select(.focused == true) | .activeWorkspace.id')
|
||||||
|
|
||||||
|
declare -A o=([1]=0 [2]=0 [3]=0 [4]=0 [5]=0 [6]=0 [7]=0 [8]=0 [9]=0 [10]=0)
|
||||||
|
declare -A monitormap
|
||||||
|
declare -A workspaces
|
||||||
|
|
||||||
|
# set color for each workspace
|
||||||
|
status() {
|
||||||
|
if [ "${o[$1]}" -eq 1 ]; then
|
||||||
|
mon=${monitormap[${workspaces[$1]}]}
|
||||||
|
|
||||||
|
if [ $focusedws -eq "$1" ]; then
|
||||||
|
echo -n "${colors[$mon]}"
|
||||||
|
else
|
||||||
|
echo -n "${dimmed[$mon]}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n "$empty"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# handle workspace create/destroy
|
||||||
|
workspace_event() {
|
||||||
|
o[$1]=$2
|
||||||
|
while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"')
|
||||||
|
}
|
||||||
|
# handle monitor (dis)connects
|
||||||
|
monitor_event() {
|
||||||
|
while read -r k v; do monitormap["$k"]=$v; done < <(hyprctl -j monitors | gojq -r '.[]|"\(.name) \(.id) "')
|
||||||
|
}
|
||||||
|
|
||||||
|
# generate the json for eww
|
||||||
|
generate() {
|
||||||
|
echo -n '['
|
||||||
|
|
||||||
|
for i in {1..10}; do
|
||||||
|
echo -n ''$([ $i -eq 1 ] || echo ,) '{ "number": "'"$i"'", "color": "'$(status "$i")'" }'
|
||||||
|
done
|
||||||
|
|
||||||
|
echo ']'
|
||||||
|
}
|
||||||
|
|
||||||
|
# setup
|
||||||
|
|
||||||
|
# add monitors
|
||||||
|
monitor_event
|
||||||
|
|
||||||
|
# add workspaces
|
||||||
|
while read -r k v; do workspaces[$k]="$v"; done < <(hyprctl -j workspaces | gojq -r '.[]|"\(.id) \(.monitor)"')
|
||||||
|
|
||||||
|
# check occupied workspaces
|
||||||
|
for num in "${!workspaces[@]}"; do
|
||||||
|
o[$num]=1
|
||||||
|
done
|
||||||
|
# generate initial widget
|
||||||
|
generate
|
||||||
|
|
||||||
|
# main loop
|
||||||
|
socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r line; do
|
||||||
|
case ${line%>>*} in
|
||||||
|
"workspace")
|
||||||
|
focusedws=${line#*>>}
|
||||||
|
;;
|
||||||
|
"focusedmon")
|
||||||
|
focusedws=${line#*,}
|
||||||
|
;;
|
||||||
|
"createworkspace")
|
||||||
|
workspace_event "${line#*>>}" 1
|
||||||
|
;;
|
||||||
|
"destroyworkspace")
|
||||||
|
workspace_event "${line#*>>}" 0
|
||||||
|
;;
|
||||||
|
"monitor"*)
|
||||||
|
monitor_event
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
generate
|
||||||
|
done
|
48
modules/nixos/desktop/addons/eww/config/widgets/metrics.yuck
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
(defwidget metrics []
|
||||||
|
(box :class "system" :orientation "h" :space-evenly false :halign "end"
|
||||||
|
(_battery)
|
||||||
|
(metric :label ""
|
||||||
|
:value {EWW_RAM.used_mem_perc}
|
||||||
|
:onchange "")
|
||||||
|
(metric :label ""
|
||||||
|
:value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
|
||||||
|
:onchange "")
|
||||||
|
))
|
||||||
|
|
||||||
|
(defwidget metric [label value onchange]
|
||||||
|
(box :orientation "h"
|
||||||
|
:class "metric"
|
||||||
|
:space-evenly false
|
||||||
|
(box :class "label" label)
|
||||||
|
(scale :min 0
|
||||||
|
:max 151
|
||||||
|
:active {onchange != ""}
|
||||||
|
:value value
|
||||||
|
:onchange onchange)))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(defpoll battery-percent :interval "30s"
|
||||||
|
:initial ''
|
||||||
|
"./scripts/battery-percent")
|
||||||
|
(defpoll battery-status :interval "5s"
|
||||||
|
:initial ''
|
||||||
|
"./scripts/battery-status")
|
||||||
|
|
||||||
|
(defwidget _battery []
|
||||||
|
(box :class "bat-box" :space-evenly false :spacing 8
|
||||||
|
:visable {battery-status != ''}
|
||||||
|
(label :text {battery-status == 'Charging' ? "" :
|
||||||
|
battery-percent < 10 ? "" :
|
||||||
|
battery-percent < 20 ? "" :
|
||||||
|
battery-percent < 30 ? "" :
|
||||||
|
battery-percent < 40 ? "" :
|
||||||
|
battery-percent < 50 ? "" :
|
||||||
|
battery-percent < 60 ? "" :
|
||||||
|
battery-percent < 70 ? "" :
|
||||||
|
battery-percent < 80 ? "" :
|
||||||
|
battery-percent < 90 ? "" : ""})))
|
||||||
|
|
||||||
|
(defpoll time :interval "1s"
|
||||||
|
"date '+%H:%M'")
|
@ -0,0 +1,9 @@
|
|||||||
|
(defwidget music []
|
||||||
|
(box :class "music"
|
||||||
|
:orientation "h"
|
||||||
|
:space-evenly false
|
||||||
|
:halign "center"
|
||||||
|
{music != "" ? " ${music}" : ""}))
|
||||||
|
|
||||||
|
(deflisten music :initial ""
|
||||||
|
"playerctl --follow metadata --format '{{ title }} - {{ artist }}' || true")
|
@ -0,0 +1,13 @@
|
|||||||
|
(defwidget workspaces []
|
||||||
|
(eventbox
|
||||||
|
:onscroll "echo {} | sed -e \"s/up/-1/g\" -e \"s/down/+1/g\" | xargs hyprctl dispatch workspace"
|
||||||
|
(box
|
||||||
|
:class "module workspaces"
|
||||||
|
:spacing 10
|
||||||
|
(for i in workspace
|
||||||
|
(button
|
||||||
|
:onclick "hyprctl dispatch workspace ${i.number}"
|
||||||
|
:class "ws"
|
||||||
|
:style "color: ${i.color};"
|
||||||
|
"●")))))
|
||||||
|
(deflisten workspace "./scripts/workspace")
|
32
modules/nixos/desktop/addons/eww/default.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.desktop.addons.eww;
|
||||||
|
in {
|
||||||
|
options.desktop.addons.eww = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable EWW.";
|
||||||
|
wayland = mkBoolOpt false "Enable wayland support";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
eww-wayland
|
||||||
|
|
||||||
|
playerctl
|
||||||
|
gojq
|
||||||
|
jaq
|
||||||
|
socat
|
||||||
|
];
|
||||||
|
|
||||||
|
home.configFile."eww/" = {
|
||||||
|
recursive = true;
|
||||||
|
source = ./config;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
37
modules/nixos/desktop/addons/gtklock/default.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.desktop.addons.gtklock;
|
||||||
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
|
||||||
|
in {
|
||||||
|
options.desktop.addons.gtklock = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable the gtklock screen locker.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gtklock
|
||||||
|
];
|
||||||
|
security.pam.services.gtklock = {};
|
||||||
|
|
||||||
|
home.configFile."gtklock/style.css".text = ''
|
||||||
|
window {
|
||||||
|
background-size: cover;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-color: #${palette.base00};
|
||||||
|
}
|
||||||
|
|
||||||
|
clock-label {
|
||||||
|
color: #${palette.base05};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
41
modules/nixos/desktop/addons/mako/default.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.desktop.addons.mako;
|
||||||
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.desktop.addons.mako = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable mako";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mako
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
|
||||||
|
home.configFile."mako/config" = {
|
||||||
|
text = ''
|
||||||
|
background-color=#${palette.base00}
|
||||||
|
text-color=#${palette.base05}
|
||||||
|
border-color=#${palette.base0D}
|
||||||
|
progress-color=over #${palette.base02}
|
||||||
|
|
||||||
|
[urgency=high]
|
||||||
|
border-color=#${palette.base09}
|
||||||
|
'';
|
||||||
|
onChange = ''
|
||||||
|
${pkgs.busybox}/bin/pkill -SIGUSR2 mako
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
22
modules/nixos/desktop/addons/swaync/default.nix
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.desktop.addons.swaync;
|
||||||
|
in {
|
||||||
|
options.desktop.addons.swaync = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable swaync";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
swaync
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
31
modules/nixos/desktop/addons/swww/default.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.desktop.addons.swww;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.desktop.addons.swww = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable SWWW";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.swww
|
||||||
|
(pkgs.writeShellScriptBin "wallpaper" ''
|
||||||
|
/usr/bin/env ls ~/.config/wallpapers/ | sort -R | tail -1 |while read file; do
|
||||||
|
swww img ~/.config/wallpapers/$file --transition-fps 255 --transition-type wipe
|
||||||
|
echo "$file"
|
||||||
|
done
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
|
||||||
|
home.persist.directories = [ ".cache/swww" ];
|
||||||
|
};
|
||||||
|
}
|
80
modules/nixos/desktop/addons/waybar/config.jsonc
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
"layer": "top",
|
||||||
|
"position": "top",
|
||||||
|
"mod": "dock",
|
||||||
|
"exclusive": true,
|
||||||
|
"passtrough": false,
|
||||||
|
"gtk-layer-shell": true,
|
||||||
|
"height": 32,
|
||||||
|
|
||||||
|
"modules-left": [
|
||||||
|
"hyprland/workspaces"
|
||||||
|
],
|
||||||
|
|
||||||
|
"modules-center": [],
|
||||||
|
|
||||||
|
"modules-right": [
|
||||||
|
"tray",
|
||||||
|
"network",
|
||||||
|
"battery",
|
||||||
|
"clock"
|
||||||
|
],
|
||||||
|
|
||||||
|
"hyprland/window": {
|
||||||
|
"format": "{}"
|
||||||
|
},
|
||||||
|
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"on-scroll-up": "hyprctl dispatch workspace e+1",
|
||||||
|
"on-scroll-down": "hyprctl dispatch workspace e-1",
|
||||||
|
"all-outputs": true,
|
||||||
|
"on-click": "activate",
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"1": "1",
|
||||||
|
"2": "2",
|
||||||
|
"3": "3",
|
||||||
|
"4": "4",
|
||||||
|
"5": "5",
|
||||||
|
"6": "6",
|
||||||
|
"7": "7",
|
||||||
|
"8": "8",
|
||||||
|
"9": "9",
|
||||||
|
"10": "10"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 12,
|
||||||
|
"tooltip": false,
|
||||||
|
"spacing": 10
|
||||||
|
},
|
||||||
|
|
||||||
|
"clock": {
|
||||||
|
"format": "{:%H:%M}",
|
||||||
|
},
|
||||||
|
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": " {volume}%",
|
||||||
|
"tooltip": false,
|
||||||
|
"format-muted": " N/A",
|
||||||
|
"on-click": "pavucontrol &",
|
||||||
|
"scroll-step": 5
|
||||||
|
},
|
||||||
|
|
||||||
|
"network": {
|
||||||
|
"format-wifi": " {essid} {signalStrength}%",
|
||||||
|
"format-ethernet": "",
|
||||||
|
"format-disconnected": ""
|
||||||
|
},
|
||||||
|
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
"warning": 20,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": " {capacity}%",
|
||||||
|
"format-charging": " {capacity}%",
|
||||||
|
"format-plugged": " {capacity}%"
|
||||||
|
}
|
||||||
|
}
|
223
modules/nixos/desktop/addons/waybar/default.nix
Normal file
@ -0,0 +1,223 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.desktop.addons.waybar;
|
||||||
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.desktop.addons.waybar = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable waybar";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [ pkgs.waybar ];
|
||||||
|
|
||||||
|
home.configFile."waybar/config.jsonc" = {
|
||||||
|
source = ./config.jsonc;
|
||||||
|
onChange = ''
|
||||||
|
${pkgs.busybox}/bin/pkill -SIGUSR2 waybar
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
home.configFile."waybar/style.css" = {
|
||||||
|
text = ''
|
||||||
|
* {
|
||||||
|
/* `otf-font-awesome` is required to be installed for icons */
|
||||||
|
font-family: JetBrainsMono Nerd Font;
|
||||||
|
font-size: 13px;
|
||||||
|
border-radius: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#custom-notification,
|
||||||
|
#custom-launcher,
|
||||||
|
#custom-power-menu,
|
||||||
|
/*#custom-colorpicker,*/
|
||||||
|
#custom-window,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#network,
|
||||||
|
#battery,
|
||||||
|
#custom-spotify,
|
||||||
|
#pulseaudio,
|
||||||
|
#window,
|
||||||
|
#tray {
|
||||||
|
padding: 5 15px;
|
||||||
|
border-radius: 12px;
|
||||||
|
background: #${palette.base00};
|
||||||
|
color: #${palette.base07};
|
||||||
|
margin-top: 8px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
margin-right: 2px;
|
||||||
|
margin-left: 2px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
background-color: transparent;
|
||||||
|
box-shadow: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: rgba(0, 0, 0, 0.096);
|
||||||
|
border-radius: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window * {
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button label {
|
||||||
|
color: #${palette.base07};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active label {
|
||||||
|
color: #${palette.base00};
|
||||||
|
font-weight: bolder;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
box-shadow: #${palette.base07} 0 0 0 1.5px;
|
||||||
|
background-color: #${palette.base00};
|
||||||
|
min-width: 50px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
background-color: transparent;
|
||||||
|
border-radius: 17px;
|
||||||
|
padding: 5 0px;
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-bottom: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
background-color: #${palette.base00};
|
||||||
|
border-radius: 12px;
|
||||||
|
margin-left: 10px;
|
||||||
|
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
min-width: 50px;
|
||||||
|
box-shadow: rgba(0, 0, 0, 0.288) 2 2 5 2px;
|
||||||
|
background-color: #${palette.base0F};
|
||||||
|
background-size: 400% 400%;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
background: linear-gradient(
|
||||||
|
58deg,
|
||||||
|
#${palette.base0E},
|
||||||
|
#${palette.base0E},
|
||||||
|
#${palette.base0E},
|
||||||
|
#${palette.base0D},
|
||||||
|
#${palette.base0D},
|
||||||
|
#${palette.base0E},
|
||||||
|
#${palette.base08}
|
||||||
|
);
|
||||||
|
background-size: 300% 300%;
|
||||||
|
animation: colored-gradient 20s ease infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes colored-gradient {
|
||||||
|
0% {
|
||||||
|
background-position: 71% 0%;
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
background-position: 30% 100%;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background-position: 71% 0%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-power-menu {
|
||||||
|
margin-right: 10px;
|
||||||
|
padding-left: 12px;
|
||||||
|
padding-right: 15px;
|
||||||
|
padding-top: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-spotify {
|
||||||
|
margin-left: 5px;
|
||||||
|
padding-left: 15px;
|
||||||
|
padding-right: 15px;
|
||||||
|
padding-top: 3px;
|
||||||
|
color: #${palette.base07};
|
||||||
|
background-color: #${palette.base00};
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-spotify.playing {
|
||||||
|
color: rgb(180, 190, 254);
|
||||||
|
background: rgba(30, 30, 46, 0.6);
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#${palette.base02},
|
||||||
|
#${palette.base00},
|
||||||
|
#${palette.base00},
|
||||||
|
#${palette.base00},
|
||||||
|
#${palette.base00},
|
||||||
|
#${palette.base02}
|
||||||
|
);
|
||||||
|
background-size: 400% 100%;
|
||||||
|
animation: grey-gradient 3s linear infinite;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes grey-gradient {
|
||||||
|
0% {
|
||||||
|
background-position: 100% 50%;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
background-position: -33% 50%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray menu {
|
||||||
|
background-color: #${palette.base00};
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
color: #${palette.base08};
|
||||||
|
padding-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-notification.collapsed,
|
||||||
|
#custom-notification.waiting_done {
|
||||||
|
min-width: 12px;
|
||||||
|
padding-right: 17px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-notification.waiting_start,
|
||||||
|
#custom-notification.expanded {
|
||||||
|
background-color: transparent;
|
||||||
|
background: linear-gradient(
|
||||||
|
90deg,
|
||||||
|
#${palette.base02},
|
||||||
|
#${palette.base00},
|
||||||
|
#${palette.base00},
|
||||||
|
#${palette.base00},
|
||||||
|
#${palette.base00},
|
||||||
|
#${palette.base02}
|
||||||
|
);
|
||||||
|
background-size: 400% 100%;
|
||||||
|
animation: grey-gradient 3s linear infinite;
|
||||||
|
min-width: 500px;
|
||||||
|
border-radius: 17px;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
onChange = ''
|
||||||
|
${pkgs.busybox}/bin/pkill -SIGUSR2 waybar
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
74
modules/nixos/desktop/addons/wlogout/default.nix
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.desktop.addons.wlogout;
|
||||||
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
|
||||||
|
in {
|
||||||
|
options.desktop.addons.wlogout = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable wlogout.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wlogout
|
||||||
|
];
|
||||||
|
|
||||||
|
home.configFile."wlogout/style.css".text = ''
|
||||||
|
* {
|
||||||
|
all: unset;
|
||||||
|
font-family: JetBrains Mono Nerd Font;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
background-color: #${palette.base00};
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
color: #${palette.base01};
|
||||||
|
font-size: 64px;
|
||||||
|
background-color: rgba(0,0,0,0);
|
||||||
|
outline-style: none;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus, button:active, button:hover {
|
||||||
|
color: #${palette.base0D};
|
||||||
|
transition: ease 0.4s;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
|
||||||
|
home.configFile."wlogout/layout".text = ''
|
||||||
|
{
|
||||||
|
"label" : "lock",
|
||||||
|
"action" : "gtklock",
|
||||||
|
"text" : "",
|
||||||
|
"keybind" : ""
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "logout",
|
||||||
|
"action" : "loginctl terminate-user $USER",
|
||||||
|
"text" : "",
|
||||||
|
"keybind" : ""
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "shutdown",
|
||||||
|
"action" : "systemctl poweroff",
|
||||||
|
"text" : "",
|
||||||
|
"keybind" : ""
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "reboot",
|
||||||
|
"action" : "systemctl reboot",
|
||||||
|
"text" : "",
|
||||||
|
"keybind" : ""
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
15
modules/nixos/desktop/addons/wofi/config
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
width=900
|
||||||
|
height=600
|
||||||
|
location=center
|
||||||
|
show=drun
|
||||||
|
prompt=Search...
|
||||||
|
filter_rate=100
|
||||||
|
allow_markup=true
|
||||||
|
no_actions=true
|
||||||
|
halign=fill
|
||||||
|
orientation=vertical
|
||||||
|
content_halign=fill
|
||||||
|
insensitive=true
|
||||||
|
allow_images=true
|
||||||
|
image_size=35
|
||||||
|
gtk_dark=true
|
94
modules/nixos/desktop/addons/wofi/default.nix
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.desktop.addons.wofi;
|
||||||
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.desktop.addons.wofi = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable the wofi run launcher.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [ wofi ];
|
||||||
|
|
||||||
|
home.configFile."wofi/config".source = ./config;
|
||||||
|
home.configFile."wofi/style.css".text = ''
|
||||||
|
window {
|
||||||
|
margin: 5px;
|
||||||
|
border: 5px solid #181926;
|
||||||
|
background-color: #${palette.base00};
|
||||||
|
border-radius: 15px;
|
||||||
|
font-family: "JetBrainsMono";
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#input {
|
||||||
|
all: unset;
|
||||||
|
min-height: 36px;
|
||||||
|
padding: 4px 10px;
|
||||||
|
margin: 4px;
|
||||||
|
border: none;
|
||||||
|
color: #${palette.base05};
|
||||||
|
font-weight: bold;
|
||||||
|
background-color: #${palette.base01};
|
||||||
|
outline: none;
|
||||||
|
border-radius: 15px;
|
||||||
|
margin: 10px;
|
||||||
|
margin-bottom: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#inner-box {
|
||||||
|
margin: 4px;
|
||||||
|
padding: 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#outer-box {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 3px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 15px;
|
||||||
|
border: 5px solid #${palette.base01};
|
||||||
|
}
|
||||||
|
|
||||||
|
#scroll {
|
||||||
|
margin-top: 5px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 15px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#text:selected {
|
||||||
|
color: #${palette.base01};
|
||||||
|
margin: 0px 0px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry {
|
||||||
|
margin: 0px 0px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 15px;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#entry:selected {
|
||||||
|
margin: 0px 0px;
|
||||||
|
border: none;
|
||||||
|
border-radius: 15px;
|
||||||
|
background: #${palette.base0D};
|
||||||
|
background-size: 400% 400%;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
49
modules/nixos/desktop/default.nix
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) gtkThemeFromScheme;
|
||||||
|
cfg = config.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.desktop = with types; {
|
||||||
|
colorscheme = mkOpt str "catppuccin-mocha" "Theme to use for the desktop";
|
||||||
|
autoLogin = mkBoolOpt false "Do auto login";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
prism = {
|
||||||
|
enable = true;
|
||||||
|
wallpapers = ./wallpapers;
|
||||||
|
colorscheme = inputs.nix-colors.colorschemes.${cfg.colorscheme};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
GTK_THEME = "Catppuccin-Mocha-Compact-Blue-dark";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.extraOptions.gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = inputs.nix-colors.colorschemes.${cfg.colorscheme}.slug;
|
||||||
|
package = gtkThemeFromScheme { scheme = inputs.nix-colors.colorschemes.${cfg.colorscheme}; };
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
name = "Papirus-Dark";
|
||||||
|
package = pkgs.papirus-icon-theme;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.xserver.displayManager.autoLogin = mkIf cfg.autoLogin {
|
||||||
|
enable = true;
|
||||||
|
user = config.user.name;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
69
modules/nixos/desktop/hyprland/default.nix
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.desktop.hyprland;
|
||||||
|
inherit (inputs.nix-colors.colorschemes.${builtins.toString config.desktop.colorscheme}) palette;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.desktop.hyprland = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable the hyprland window manager.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# Desktop additions
|
||||||
|
desktop.addons = {
|
||||||
|
waybar.enable = true;
|
||||||
|
swww.enable = true;
|
||||||
|
wofi.enable = true;
|
||||||
|
mako.enable = true;
|
||||||
|
gtklock.enable = true;
|
||||||
|
wlogout.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
apps.foot.enable = true;
|
||||||
|
|
||||||
|
programs.hyprland.enable = true;
|
||||||
|
programs.hyprland.xwayland.enable = true;
|
||||||
|
xdg.portal.enable = true;
|
||||||
|
|
||||||
|
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Hint electron apps to use wayland
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
swappy
|
||||||
|
imagemagick
|
||||||
|
|
||||||
|
(writeShellScriptBin "screenshot" ''
|
||||||
|
grim -g "$(slurp)" - | convert - -shave 1x1 PNG:- | wl-copy
|
||||||
|
'')
|
||||||
|
(writeShellScriptBin "screenshot-edit" ''
|
||||||
|
wl-paste | swappy -f -
|
||||||
|
'')
|
||||||
|
|
||||||
|
pulseaudio
|
||||||
|
];
|
||||||
|
|
||||||
|
# Hyprland configuration files
|
||||||
|
home.configFile = {
|
||||||
|
"hypr/launch".source = ./launch;
|
||||||
|
"hypr/hyprland.conf".source = ./hyprland.conf;
|
||||||
|
"hypr/colors.conf" = {
|
||||||
|
text = ''
|
||||||
|
general {
|
||||||
|
col.active_border = 0xff${palette.base0C} 0xff${palette.base0D} 270deg
|
||||||
|
col.inactive_border = 0xff${palette.base00}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
140
modules/nixos/desktop/hyprland/hyprland.conf
Normal file
@ -0,0 +1,140 @@
|
|||||||
|
source = ~/.config/hypr/colors.conf
|
||||||
|
|
||||||
|
monitor=,preferred,auto,auto
|
||||||
|
monitor=Unknown-1,disable # Freaking ghost monitor after update
|
||||||
|
exec-once = exec ~/.config/hypr/launch
|
||||||
|
|
||||||
|
input {
|
||||||
|
kb_layout = us
|
||||||
|
|
||||||
|
follow_mouse = 1
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = yes
|
||||||
|
}
|
||||||
|
|
||||||
|
kb_options = caps:escape
|
||||||
|
|
||||||
|
sensitivity = -0.5 # -1.0 - 1.0, 0 means no modification.
|
||||||
|
}
|
||||||
|
|
||||||
|
general {
|
||||||
|
gaps_in = 5
|
||||||
|
gaps_out = 20
|
||||||
|
border_size = 3
|
||||||
|
layout = dwindle
|
||||||
|
}
|
||||||
|
|
||||||
|
decoration {
|
||||||
|
rounding = 10
|
||||||
|
|
||||||
|
drop_shadow = yes
|
||||||
|
shadow_range = 4
|
||||||
|
shadow_render_power = 3
|
||||||
|
col.shadow = rgba(1a1a1aee)
|
||||||
|
}
|
||||||
|
|
||||||
|
animations {
|
||||||
|
enabled=1
|
||||||
|
# bezier=overshot,0.05,0.9,0.1,1.1
|
||||||
|
bezier=overshot,0.13,0.99,0.29,1.1
|
||||||
|
animation=windows,1,4,overshot,slide
|
||||||
|
animation=fade,1,10,default
|
||||||
|
animation=workspaces,1,6,overshot,slide
|
||||||
|
|
||||||
|
bezier = linear, 0.0, 0.0, 1.0, 1.iii0
|
||||||
|
animation = borderangle, 1, 100, linear, loop
|
||||||
|
}
|
||||||
|
dwindle {
|
||||||
|
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||||
|
preserve_split = yes # you probably want this
|
||||||
|
}
|
||||||
|
|
||||||
|
master {
|
||||||
|
new_is_master = true
|
||||||
|
}
|
||||||
|
|
||||||
|
gestures {
|
||||||
|
workspace_swipe = on
|
||||||
|
}
|
||||||
|
|
||||||
|
$mainMod = SUPER
|
||||||
|
bind = $mainMod, RETURN, exec, foot
|
||||||
|
bind = $mainMod, Q, killactive,
|
||||||
|
bind = $mainMod, SPACE, togglefloating,
|
||||||
|
bind = $mainMod, P, exec, wofi --show drun
|
||||||
|
bind = $mainMod, F, fullscreen
|
||||||
|
bind = $mainMod, TAB, pseudo
|
||||||
|
|
||||||
|
bind = $mainMod_SHIFT, E, exec, wlogout -b 1 -p layer-shell
|
||||||
|
bind = $mainMod_SHIFT, Q, exec, gtklock
|
||||||
|
bind = $mainMod_SHIFT, C, exec, wallpaper
|
||||||
|
|
||||||
|
bind = , code:107, exec, screenshot
|
||||||
|
bind = $mainMod, code:107, exec, screenshot-edit
|
||||||
|
|
||||||
|
bindl = , code:127, exec, wpctl set-volume @DEFAULT_SOURCE@ 100%
|
||||||
|
bindrl = , code:127, exec, wpctl set-volume @DEFAULT_SOURCE@ 0%
|
||||||
|
|
||||||
|
# Move focus with mainMod + arrow keys
|
||||||
|
bind = $mainMod, h, movefocus, l
|
||||||
|
bind = $mainMod, l, movefocus, r
|
||||||
|
bind = $mainMod, k, movefocus, u
|
||||||
|
bind = $mainMod, j, movefocus, d
|
||||||
|
|
||||||
|
# Move window with mainMod_SHIFT + arrow keys
|
||||||
|
bind = $mainMod_SHIFT, h, movewindow, l
|
||||||
|
bind = $mainMod_SHIFT, l, movewindow, r
|
||||||
|
bind = $mainMod_SHIFT, k, movewindow, u
|
||||||
|
bind = $mainMod_SHIFT, j, movewindow, d
|
||||||
|
|
||||||
|
# Switch workspaces with mainMod + [0-9]
|
||||||
|
bind = $mainMod, 1, workspace, 1
|
||||||
|
bind = $mainMod, 2, workspace, 2
|
||||||
|
bind = $mainMod, 3, workspace, 3
|
||||||
|
bind = $mainMod, 4, workspace, 4
|
||||||
|
bind = $mainMod, 5, workspace, 5
|
||||||
|
bind = $mainMod, 6, workspace, 6
|
||||||
|
bind = $mainMod, 7, workspace, 7
|
||||||
|
bind = $mainMod, 8, workspace, 8
|
||||||
|
bind = $mainMod, 9, workspace, 9
|
||||||
|
bind = $mainMod, 0, workspace, 10
|
||||||
|
|
||||||
|
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
|
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||||
|
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||||
|
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||||
|
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||||
|
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||||
|
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||||
|
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||||
|
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||||
|
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
|
# Scroll through existing workspaces with mainMod + scroll
|
||||||
|
bind = $mainMod, mouse_down, workspace, e+1
|
||||||
|
bind = $mainMod, mouse_up, workspace, e-1
|
||||||
|
|
||||||
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
|
# Audio binds
|
||||||
|
binde=, XF86AudioRaiseVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ +5%
|
||||||
|
binde=, XF86AudioLowerVolume, exec, pactl set-sink-volume @DEFAULT_SINK@ -5%
|
||||||
|
|
||||||
|
# Per device settings
|
||||||
|
# device:elan-touchpad {
|
||||||
|
# accel_profile = adaptive
|
||||||
|
# sensitivity = -0.3
|
||||||
|
# }
|
||||||
|
|
||||||
|
# Extra window rules
|
||||||
|
|
||||||
|
# Allow hiding xwaylandvideobridge window correctly
|
||||||
|
windowrulev2 = opacity 0.0 override 0.0 override,class:^(xwaylandvideobridge)$
|
||||||
|
windowrulev2 = noanim,class:^(xwaylandvideobridge)$
|
||||||
|
windowrulev2 = noinitialfocus,class:^(xwaylandvideobridge)$
|
||||||
|
windowrulev2 = maxsize 1 1,class:^(xwaylandvideobridge)$
|
||||||
|
windowrulev2 = noblur,class:^(xwaylandvideobridge)$
|
5
modules/nixos/desktop/hyprland/launch
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
rm -rf $XDG_RUNTIME_DIR/swww.socket
|
||||||
|
|
||||||
|
swww init & waybar & mako & xwaylandvideobridge
|
BIN
modules/nixos/desktop/wallpapers/32j4hjkl4j4hkl.png
Normal file
After Width: | Height: | Size: 182 KiB |
BIN
modules/nixos/desktop/wallpapers/Bridge.jpg
Normal file
After Width: | Height: | Size: 177 KiB |
BIN
modules/nixos/desktop/wallpapers/astronaut.png
Normal file
After Width: | Height: | Size: 823 KiB |
BIN
modules/nixos/desktop/wallpapers/astronaut_ultra.png
Normal file
After Width: | Height: | Size: 759 KiB |
BIN
modules/nixos/desktop/wallpapers/babel.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
modules/nixos/desktop/wallpapers/blockwavemoon.png
Normal file
After Width: | Height: | Size: 1024 KiB |
BIN
modules/nixos/desktop/wallpapers/cat_Japanese_Neon.png
Normal file
After Width: | Height: | Size: 2.8 MiB |
BIN
modules/nixos/desktop/wallpapers/cat_leaves.png
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
modules/nixos/desktop/wallpapers/colorful-planets.jpg
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
modules/nixos/desktop/wallpapers/finalizer.png
Normal file
After Width: | Height: | Size: 499 KiB |
BIN
modules/nixos/desktop/wallpapers/gruv-material.png
Normal file
After Width: | Height: | Size: 607 KiB |
BIN
modules/nixos/desktop/wallpapers/ign-0002.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
modules/nixos/desktop/wallpapers/ign-0008.png
Normal file
After Width: | Height: | Size: 719 KiB |
BIN
modules/nixos/desktop/wallpapers/ign-0011.png
Normal file
After Width: | Height: | Size: 464 KiB |
BIN
modules/nixos/desktop/wallpapers/ign_car.png
Normal file
After Width: | Height: | Size: 831 KiB |
BIN
modules/nixos/desktop/wallpapers/ign_city.png
Normal file
After Width: | Height: | Size: 159 KiB |
BIN
modules/nixos/desktop/wallpapers/ign_cityRainOther.png
Normal file
After Width: | Height: | Size: 354 KiB |
BIN
modules/nixos/desktop/wallpapers/ign_herakles.png
Normal file
After Width: | Height: | Size: 861 KiB |
BIN
modules/nixos/desktop/wallpapers/ign_stuff.png
Normal file
After Width: | Height: | Size: 98 KiB |
BIN
modules/nixos/desktop/wallpapers/ign_unsplash16.png
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
modules/nixos/desktop/wallpapers/koi2.png
Normal file
After Width: | Height: | Size: 267 KiB |
After Width: | Height: | Size: 239 KiB |
BIN
modules/nixos/desktop/wallpapers/nord_buildings.png
Normal file
After Width: | Height: | Size: 299 KiB |
BIN
modules/nixos/desktop/wallpapers/outer-space.png
Normal file
After Width: | Height: | Size: 10 MiB |
BIN
modules/nixos/desktop/wallpapers/platform.jpg
Normal file
After Width: | Height: | Size: 2.7 MiB |
BIN
modules/nixos/desktop/wallpapers/result2.png
Normal file
After Width: | Height: | Size: 126 KiB |
BIN
modules/nixos/desktop/wallpapers/result5.png
Normal file
After Width: | Height: | Size: 537 KiB |
BIN
modules/nixos/desktop/wallpapers/rolly.png
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
modules/nixos/desktop/wallpapers/rose_pine_contourline.png
Normal file
After Width: | Height: | Size: 4.0 MiB |
BIN
modules/nixos/desktop/wallpapers/rose_pine_shape.png
Normal file
After Width: | Height: | Size: 261 KiB |
BIN
modules/nixos/desktop/wallpapers/shiny-colors.png
Normal file
After Width: | Height: | Size: 269 KiB |
BIN
modules/nixos/desktop/wallpapers/skullcat.png
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
modules/nixos/desktop/wallpapers/space324dhsj.png
Normal file
After Width: | Height: | Size: 216 KiB |
BIN
modules/nixos/desktop/wallpapers/spiral.jpg
Normal file
After Width: | Height: | Size: 342 KiB |
BIN
modules/nixos/desktop/wallpapers/spooky_spill.jpg
Normal file
After Width: | Height: | Size: 412 KiB |
BIN
modules/nixos/desktop/wallpapers/wallpaper.jpg
Normal file
After Width: | Height: | Size: 595 KiB |
32
modules/nixos/hardware/audio/default.nix
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.hardware.audio;
|
||||||
|
in {
|
||||||
|
options.hardware.audio = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable pipewire";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
wireplumber.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
programs.noisetorch.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
pavucontrol
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
21
modules/nixos/hardware/networking/default.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.hardware.networking;
|
||||||
|
in {
|
||||||
|
options.hardware.networking = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable networkmanager";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
environment.persist.directories = [
|
||||||
|
"/etc/NetworkManager"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
30
modules/nixos/hardware/nvidia/default.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.hardware.nvidia;
|
||||||
|
in {
|
||||||
|
options.hardware.nvidia = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable drivers and patches for Nvidia hardware.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
hardware.nvidia.modesetting.enable = true;
|
||||||
|
|
||||||
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||||
|
|
||||||
|
environment.variables = {
|
||||||
|
CUDA_CACHE_PATH = "$XDG_CACHE_HOME/nv";
|
||||||
|
};
|
||||||
|
environment.shellAliases = {nvidia-settings = "nvidia-settings --config='$XDG_CONFIG_HOME'/nvidia/settings";};
|
||||||
|
|
||||||
|
# Hyprland settings
|
||||||
|
environment.sessionVariables.WLR_NO_HARDWARE_CURSORS = "1"; # Fix cursor rendering issue on wlr nvidia.
|
||||||
|
};
|
||||||
|
}
|
54
modules/nixos/home/default.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.modules.nixos.home;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = with inputs; [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
nix-colors.homeManagerModules.default
|
||||||
|
prism.homeModules.prism
|
||||||
|
];
|
||||||
|
|
||||||
|
options.modules.nixos.home = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable or disable nixos home";
|
||||||
|
};
|
||||||
|
|
||||||
|
options.home = with types; {
|
||||||
|
file = mkOpt attrs { } "A set of files to be managed by home-manager's <option>home.file</option>.";
|
||||||
|
configFile =
|
||||||
|
mkOpt attrs { }
|
||||||
|
"A set of files to be managed by home-manager's <option>xdg.configFile</option>.";
|
||||||
|
programs = mkOpt attrs { } "Programs to be managed by home-manager.";
|
||||||
|
extraOptions = mkOpt attrs { } "Options to pass directly to home-manager.";
|
||||||
|
|
||||||
|
persist = mkOpt attrs { } "Files and directories to persist in the home";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
home.extraOptions = {
|
||||||
|
home.stateVersion = config.system.stateVersion;
|
||||||
|
home.file = mkAliasDefinitions options.home.file;
|
||||||
|
xdg.enable = true;
|
||||||
|
xdg.configFile = mkAliasDefinitions options.home.configFile;
|
||||||
|
programs = mkAliasDefinitions options.home.programs;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
useUserPackages = true;
|
||||||
|
|
||||||
|
users.${config.user.name} = mkAliasDefinitions options.home.extraOptions;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.persistence."/persist".users.${config.user.name} = mkIf options.impermanence.enable.value (
|
||||||
|
mkAliasDefinitions options.home.persist
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
55
modules/nixos/impermanence/default.nix
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.impermanence;
|
||||||
|
in {
|
||||||
|
imports = with inputs; [
|
||||||
|
impermanence.nixosModules.impermanence
|
||||||
|
persist-retro.nixosModules.persist-retro
|
||||||
|
];
|
||||||
|
options.impermanence = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable impermanence";
|
||||||
|
removeTmpFilesOlderThan = mkOpt int 14 "Number of days to keep old btrfs_tmp files";
|
||||||
|
};
|
||||||
|
|
||||||
|
options.environment = with types; {
|
||||||
|
persist = mkOpt attrs {} "Files and directories to persist in the home";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
# This script does the actual wipe of the system
|
||||||
|
# So if it doesn't run, the btrfs system effectively acts like a normal system
|
||||||
|
boot.initrd.postDeviceCommands = mkIf cfg.enable (lib.mkAfter ''
|
||||||
|
mkdir /btrfs_tmp
|
||||||
|
mount /dev/pool/root /btrfs_tmp
|
||||||
|
if [[ -e /btrfs_tmp/root ]]; then
|
||||||
|
mkdir -p /btrfs_tmp/old_roots
|
||||||
|
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
|
||||||
|
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
|
||||||
|
fi
|
||||||
|
|
||||||
|
delete_subvolume_recursively() {
|
||||||
|
IFS=$'\n'
|
||||||
|
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
|
||||||
|
delete_subvolume_recursively "/btrfs_tmp/$i"
|
||||||
|
done
|
||||||
|
btrfs subvolume delete "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +${builtins.toString cfg.removeTmpFilesOlderThan}); do
|
||||||
|
delete_subvolume_recursively "$i"
|
||||||
|
done
|
||||||
|
|
||||||
|
btrfs subvolume create /btrfs_tmp/root
|
||||||
|
umount /btrfs_tmp
|
||||||
|
'');
|
||||||
|
|
||||||
|
environment.persistence."/persist" = mkIf cfg.enable (mkAliasDefinitions options.environment.persist);
|
||||||
|
};
|
||||||
|
}
|
30
modules/nixos/services/arion/filebrowser/default.nix
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.services.arion.filebrowser;
|
||||||
|
in {
|
||||||
|
options.services.arion.filebrowser = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable the filebrowser docker service";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation.arion.enable = true;
|
||||||
|
virtualisation.arion.projects.filebrowser.settings = {
|
||||||
|
project.name = "filebrowser";
|
||||||
|
services.filebrowser.service = {
|
||||||
|
image = "filebrowser/filebrowser";
|
||||||
|
ports = [
|
||||||
|
"8080:80"
|
||||||
|
];
|
||||||
|
volumes = [
|
||||||
|
"/home/${config.user.name}:/srv"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
37
modules/nixos/services/arion/jellyfin/default.nix
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.services.arion.jellyfin;
|
||||||
|
in {
|
||||||
|
options.services.arion.jellyfin = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable jellyfin";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation.arion.enable = true;
|
||||||
|
virtualisation.arion.projects.jellyfin.settings = {
|
||||||
|
project.name = "jellyfin";
|
||||||
|
services.jellyfin.service = {
|
||||||
|
image = "jellyfin/jellyfin";
|
||||||
|
ports = [
|
||||||
|
"8096:8096"
|
||||||
|
];
|
||||||
|
volumes = [
|
||||||
|
"/home/${config.user.name}/.local/share/jellyfin/config:/config"
|
||||||
|
"/home/${config.user.name}/.local/share/jellyfin/cache:/cache"
|
||||||
|
"/home/${config.user.name}/.local/share/jellyfin/media:/media"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".local/share/jellyfin/config"
|
||||||
|
".local/share/jellyfin/cache"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
48
modules/nixos/services/arion/servers/terraria/default.nix
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.services.arion.terraria.vanilla;
|
||||||
|
in {
|
||||||
|
options.services.arion.terraria.vanilla = with types; {
|
||||||
|
enable = mkBoolOpt false "";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation.arion.enable = true;
|
||||||
|
virtualisation.arion.projects.terraria-vanilla.settings = {
|
||||||
|
project.name = "vanilla";
|
||||||
|
services.terraria.service = {
|
||||||
|
image = "ryshe/terraria:latest";
|
||||||
|
environment = {
|
||||||
|
WORLD_FILENAME = "world.wld";
|
||||||
|
CONFIGPATH = "config.json";
|
||||||
|
};
|
||||||
|
ports = [
|
||||||
|
"7777:7777"
|
||||||
|
];
|
||||||
|
volumes = [
|
||||||
|
"/home/${config.user.name}/.local/share/terraria/vanilla/worlds:/root/.local/share/Terraria/Worlds"
|
||||||
|
];
|
||||||
|
# For the first run you will need to generate a new world with a size where: 1 = Small, 2=Medium, 3=Large
|
||||||
|
command = [
|
||||||
|
"-autocreate"
|
||||||
|
"2"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services.ngrok.service = {
|
||||||
|
image = "ngrok/ngrok";
|
||||||
|
env_file = ["${config.sops.secrets."ngrok/terraria".path}"];
|
||||||
|
command = ["tcp" "terraria:7777"];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".local/share/terraria/vanilla/worlds"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
40
modules/nixos/services/arion/windows/default.nix
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.services.arion.windows;
|
||||||
|
in {
|
||||||
|
options.services.arion.windows = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable the windows docker service";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
virtualisation.arion.enable = true;
|
||||||
|
virtualisation.arion.projects.windows.settings = {
|
||||||
|
project.name = "windows";
|
||||||
|
services.windows.service = {
|
||||||
|
image = "dockurr/windows";
|
||||||
|
environment.VERSION = "win11";
|
||||||
|
ports = [
|
||||||
|
"8006:8006"
|
||||||
|
"3389:3389/tcp"
|
||||||
|
"3389:3389/udp"
|
||||||
|
];
|
||||||
|
devices = [
|
||||||
|
"/dev/kvm"
|
||||||
|
];
|
||||||
|
capabilities = {
|
||||||
|
NET_ADMIN = true;
|
||||||
|
};
|
||||||
|
stop_grace_period = "2m";
|
||||||
|
volumes = [
|
||||||
|
"/home/${config.user.name}:/srv"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
52
modules/nixos/services/internalDomain/default.nix
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.services.internalDomain;
|
||||||
|
in {
|
||||||
|
options.services.internalDomain = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable dnsmasq, a custom internalDomain server";
|
||||||
|
domain = mkOpt str "home.lan" "Internal Domain to use, defaults to home.lan";
|
||||||
|
reverseProxyIp = mkOpt str "127.0.0.1" "IP address for the reverse proxy";
|
||||||
|
};
|
||||||
|
|
||||||
|
config =
|
||||||
|
(mkIf cfg.enable {
|
||||||
|
services.caddy.enable = true;
|
||||||
|
|
||||||
|
services.caddy.virtualHosts."*.home.lan".extraConfig = ''
|
||||||
|
tls internal
|
||||||
|
'';
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [53];
|
||||||
|
networking.firewall.allowedUDPPorts = [53];
|
||||||
|
|
||||||
|
services.dnsmasq = {
|
||||||
|
enable = true;
|
||||||
|
resolveLocalQueries = true;
|
||||||
|
alwaysKeepRunning = true;
|
||||||
|
settings = {
|
||||||
|
server = ["9.9.9.9"];
|
||||||
|
inherit (cfg) domain;
|
||||||
|
local = "/${cfg.domain}/";
|
||||||
|
|
||||||
|
bogus-priv = true;
|
||||||
|
expand-hosts = true;
|
||||||
|
no-hosts = true;
|
||||||
|
domain-needed = true;
|
||||||
|
no-resolv = true;
|
||||||
|
no-poll = true;
|
||||||
|
|
||||||
|
address = [
|
||||||
|
"/${cfg.domain}/${cfg.reverseProxyIp}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
// {
|
||||||
|
};
|
||||||
|
}
|
50
modules/nixos/services/ssh/default.nix
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.services.ssh;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services.ssh = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable ssh";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
ports = [ 22 ];
|
||||||
|
|
||||||
|
passwordAuthentication = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users = {
|
||||||
|
root.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9nKsW0v9SMQo86fxHlX5gnS/ELlWqAS/heyzZ+oPzd iogamastercode@gmail.com"
|
||||||
|
];
|
||||||
|
${config.user.name}.openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIL9nKsW0v9SMQo86fxHlX5gnS/ELlWqAS/heyzZ+oPzd iogamastercode@gmail.com"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".ssh/config".text = ''
|
||||||
|
identityfile ~/.ssh/key
|
||||||
|
'';
|
||||||
|
|
||||||
|
home.persist.directories = [ ".ssh" ];
|
||||||
|
|
||||||
|
environment.persist.directories = [ "/root/ssh" ];
|
||||||
|
|
||||||
|
environment.persist.files = [
|
||||||
|
"/etc/machine-id"
|
||||||
|
"/etc/ssh/ssh_host_ed25519_key"
|
||||||
|
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||||
|
"/etc/ssh/ssh_host_rsa_key"
|
||||||
|
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
@ -24,11 +24,11 @@ let
|
|||||||
cfg = config.modules.sops;
|
cfg = config.modules.sops;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ inputs.sops-nix.nixosModules.sops ];
|
# imports = [ inputs.sops-nix.nixosModules.sops ];
|
||||||
|
|
||||||
options.modules.sops = { };
|
# options.modules.sops = { };
|
||||||
|
|
||||||
config = {
|
# config = {
|
||||||
#sops.defaultSopsFile = ../../../secrets/secrets.yaml;
|
#sops.defaultSopsFile = ../../../secrets/secrets.yaml;
|
||||||
#sops.defaultSopsFormat = "yaml";
|
#sops.defaultSopsFormat = "yaml";
|
||||||
#sops.age.keyFile = "/home/julian/.config/sops/age/keys.txt";
|
#sops.age.keyFile = "/home/julian/.config/sops/age/keys.txt";
|
||||||
@ -42,5 +42,5 @@ in
|
|||||||
# neededForUsers = true;
|
# neededForUsers = true;
|
||||||
# };
|
# };
|
||||||
# sops.secrets."ngrok/terraria" = { };
|
# sops.secrets."ngrok/terraria" = { };
|
||||||
};
|
# };
|
||||||
}
|
}
|
||||||
|
65
modules/nixos/suites/common/default.nix
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.suites.common;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.suites.common = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable the common suite";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
system.nix.enable = true;
|
||||||
|
system.security.doas.enable = true;
|
||||||
|
|
||||||
|
hardware.audio.enable = true;
|
||||||
|
hardware.networking.enable = true;
|
||||||
|
|
||||||
|
apps.misc.enable = true;
|
||||||
|
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
hardware.bluetooth.settings = {
|
||||||
|
General = {
|
||||||
|
FastConnectable = true;
|
||||||
|
JustWorksRepairing = "always";
|
||||||
|
Privacy = "device";
|
||||||
|
};
|
||||||
|
Policy = {
|
||||||
|
AutoEnable = true;
|
||||||
|
};
|
||||||
|
inputs = {
|
||||||
|
UserSpaceHID = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.persist.directories = [ "/etc/bluetooth" ];
|
||||||
|
|
||||||
|
apps.pass.enable = true;
|
||||||
|
apps.tools.git.enable = true;
|
||||||
|
apps.tools.nix-ld.enable = true;
|
||||||
|
|
||||||
|
services.ssh.enable = true;
|
||||||
|
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.bluetuith
|
||||||
|
pkgs.nh # pkgs.custom.sys
|
||||||
|
pkgs.deploy-rs
|
||||||
|
];
|
||||||
|
|
||||||
|
system = {
|
||||||
|
fonts.enable = true;
|
||||||
|
locale.enable = true;
|
||||||
|
time.enable = true;
|
||||||
|
xkb.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
43
modules/nixos/suites/desktop/default.nix
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.suites.desktop;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.suites.desktop = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable the desktop suite";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
desktop.hyprland.enable = true;
|
||||||
|
apps.firefox.enable = true;
|
||||||
|
apps.discord.enable = true;
|
||||||
|
|
||||||
|
apps.tools.gnupg.enable = true;
|
||||||
|
apps.pass.enable = true;
|
||||||
|
|
||||||
|
suites.common.enable = true;
|
||||||
|
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.persist.directories = [ "/etc/gdm" ];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
cinnamon.nemo
|
||||||
|
xclip
|
||||||
|
xarchiver
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
41
modules/nixos/suites/development/default.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.suites.development;
|
||||||
|
in {
|
||||||
|
options.suites.development = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable the development suite";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
apps.neovim.enable = true;
|
||||||
|
apps.tools.direnv.enable = true;
|
||||||
|
|
||||||
|
apps.misc.enable = true;
|
||||||
|
|
||||||
|
home.configFile."nix-init/config.toml".text = ''
|
||||||
|
maintainers = ["iogamaster"]
|
||||||
|
commit = true
|
||||||
|
'';
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
licensor
|
||||||
|
|
||||||
|
# Nix Utils
|
||||||
|
nix-index
|
||||||
|
nix-init
|
||||||
|
nix-melt
|
||||||
|
nix-update
|
||||||
|
nixpkgs-fmt
|
||||||
|
nixpkgs-hammering
|
||||||
|
nixpkgs-review
|
||||||
|
nurl
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
36
modules/nixos/suites/editing/default.nix
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.suites.editing;
|
||||||
|
in {
|
||||||
|
options.suites.editing = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable the editing suite";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
obs-studio
|
||||||
|
audacity
|
||||||
|
chromium
|
||||||
|
inkscape
|
||||||
|
mediainfo
|
||||||
|
vhs
|
||||||
|
];
|
||||||
|
|
||||||
|
# OBS
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
|
||||||
|
boot.kernelModules = [
|
||||||
|
"v4l2loopback"
|
||||||
|
];
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".config/obs-studio"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
64
modules/nixos/suites/gaming/default.nix
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.suites.gaming;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = with inputs; [ dzgui-nix.nixosModules.default ];
|
||||||
|
options.suites.gaming = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable the gaming suite";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
apps.steam.enable = true;
|
||||||
|
|
||||||
|
hardware.opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
intel-media-driver
|
||||||
|
intel-ocl
|
||||||
|
vaapiIntel
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.dzgui.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.prismlauncher
|
||||||
|
pkgs.lutris
|
||||||
|
pkgs.heroic
|
||||||
|
|
||||||
|
pkgs.gamemode
|
||||||
|
pkgs.mangohud
|
||||||
|
|
||||||
|
pkgs.gamescope
|
||||||
|
|
||||||
|
# pkgs.custom.relive
|
||||||
|
|
||||||
|
pkgs.r2modman
|
||||||
|
|
||||||
|
pkgs.bottles
|
||||||
|
];
|
||||||
|
|
||||||
|
home.persist.directories = [
|
||||||
|
".config/r2modman"
|
||||||
|
".config/r2modmanPlus-local"
|
||||||
|
".config/dztui"
|
||||||
|
".local/share/lutris"
|
||||||
|
".local/share/aspyr-media"
|
||||||
|
".local/share/bottles"
|
||||||
|
".local/share/PrismLauncher"
|
||||||
|
".local/share/dzgui"
|
||||||
|
"Games"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
21
modules/nixos/suites/server/default.nix
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul; let
|
||||||
|
cfg = config.suites.server;
|
||||||
|
in {
|
||||||
|
options.suites.server = with types; {
|
||||||
|
enable = mkBoolOpt false "Enable the server suite";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
suites.common.enable = true;
|
||||||
|
suites.development.enable = true;
|
||||||
|
environment.systemPackages = with pkgs; [];
|
||||||
|
};
|
||||||
|
}
|
41
modules/nixos/system/battery/default.nix
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.modules.system.battery;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.system.battery = with types; {
|
||||||
|
enable = mkBoolOpt false "Whether or not to enable battery optimizations and utils.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
# Better scheduling for CPU cycles - thanks System76!!!
|
||||||
|
services.system76-scheduler.settings.cfsProfiles.enable = true;
|
||||||
|
|
||||||
|
# Enable TLP (better than gnomes internal power manager)
|
||||||
|
services.tlp = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
CPU_BOOST_ON_AC = 0;
|
||||||
|
CPU_BOOST_ON_BAT = 0;
|
||||||
|
CPU_SCALING_GOVERNOR_ON_AC = "powersave";
|
||||||
|
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Disable GNOMEs power management
|
||||||
|
services.power-profiles-daemon.enable = false;
|
||||||
|
|
||||||
|
# Enable powertop
|
||||||
|
powerManagement.powertop.enable = true;
|
||||||
|
|
||||||
|
# Enable thermald (only necessary if on Intel CPUs)
|
||||||
|
services.thermald.enable = true;
|
||||||
|
};
|
||||||
|
}
|
23
modules/nixos/system/boot/bios/default.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
options,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib;
|
||||||
|
with lib.frajul;
|
||||||
|
let
|
||||||
|
cfg = config.modules.system.boot.bios;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.modules.system.boot.bios = with types; {
|
||||||
|
enable = mkBoolOpt false "Whether or not to enable bios booting.";
|
||||||
|
device = mkOpt str "/dev/sda" "Disk that grub will be installed to.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|