treewide: remove home-manager (switch to hjem)
As my NixOS configuration kept growing, I noticed that I don't need home-manager as much as I did before. A lot of what I need is just a way to map nix attrsets to the program's respective configuration format, which is something that I can now do myself, as my nix knowledge got more extensive. After all of this, I decided to completely get rid of home-manager, and switch to a simpler solution called hjem, which just lets me write files to my home directory that are automatically symlinked using `systemd-tmpfiles`. This allows me to simplify my configuration, remove the separation between NixOS and home-manager modules, and cut my eval times by quite a lot (which allows for faster `nixos-rebuild switch`!).
This commit is contained in:
parent
7822c4ae84
commit
6ab835555c
126 changed files with 2154 additions and 2534 deletions
141
flake.lock
141
flake.lock
|
@ -344,27 +344,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_6": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"walker",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1629284811,
|
||||
|
@ -460,6 +439,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hjem": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735415443,
|
||||
"narHash": "sha256-t/OSIIGVflXP70kQieq72x+zhLVYfMejRopPgOZnV0s=",
|
||||
"owner": "feel-co",
|
||||
"repo": "hjem",
|
||||
"rev": "2979f66c4a1e6f662e4cb7fa9e20b9a6609919f9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "feel-co",
|
||||
"repo": "hjem",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -481,26 +480,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736785676,
|
||||
"narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"hyprcursor": {
|
||||
"inputs": {
|
||||
"hyprlang": [
|
||||
|
@ -1324,22 +1303,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_10": {
|
||||
"locked": {
|
||||
"lastModified": 1720957393,
|
||||
"narHash": "sha256-oedh2RwpjEa+TNxhg5Je9Ch6d3W1NKi7DbRO1ziHemA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "693bc46d169f5af9c992095736e82c3488bf7dbb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1702272962,
|
||||
|
@ -1629,29 +1592,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plasma-manager": {
|
||||
"inputs": {
|
||||
"home-manager": [
|
||||
"home-manager"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736549395,
|
||||
"narHash": "sha256-XzwkB62Tt5UYoL1jXiHzgk/qz2fUpGHExcSIbyGTtI0=",
|
||||
"owner": "nix-community",
|
||||
"repo": "plasma-manager",
|
||||
"rev": "a53af7f1514ef4cce8620a9d6a50f238cdedec8b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "plasma-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"plugin-aerial-nvim": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -3684,7 +3624,7 @@
|
|||
"basix": "basix",
|
||||
"deploy-rs": "deploy-rs",
|
||||
"firefox-addons": "firefox-addons",
|
||||
"home-manager": "home-manager_2",
|
||||
"hjem": "hjem",
|
||||
"hypridle": "hypridle",
|
||||
"hyprland": "hyprland",
|
||||
"hyprland-qtutils": "hyprland-qtutils_2",
|
||||
|
@ -3700,9 +3640,7 @@
|
|||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"nvf": "nvf",
|
||||
"plasma-manager": "plasma-manager",
|
||||
"treefmt-nix": "treefmt-nix",
|
||||
"walker": "walker"
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
|
@ -3872,21 +3810,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_9": {
|
||||
"locked": {
|
||||
"lastModified": 1689347949,
|
||||
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default-linux",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"tabi": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -3964,26 +3887,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"walker": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_6",
|
||||
"nixpkgs": "nixpkgs_10",
|
||||
"systems": "systems_9"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1736883896,
|
||||
"narHash": "sha256-Lx6MHiRD69xSpneaFTr6wjp9jX28ZkVt+glxTLonJc4=",
|
||||
"owner": "abenz1267",
|
||||
"repo": "walker",
|
||||
"rev": "f8690c097551de73f098ff1ab56ac2f62f821f88",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "abenz1267",
|
||||
"repo": "walker",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"xdph": {
|
||||
"inputs": {
|
||||
"hyprland-protocols": [
|
||||
|
|
15
flake.nix
15
flake.nix
|
@ -36,10 +36,6 @@
|
|||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-index-db = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -97,18 +93,15 @@
|
|||
url = "github:hyprwm/contrib";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hjem = {
|
||||
url = "github:feel-co/hjem";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
niri.url = "github:sodiboo/niri-flake";
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.5.0";
|
||||
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||
nvf.url = "github:notashelf/nvf";
|
||||
plasma-manager = {
|
||||
url = "github:nix-community/plasma-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.home-manager.follows = "home-manager";
|
||||
};
|
||||
treefmt-nix.url = "github:numtide/treefmt-nix";
|
||||
walker.url = "github:abenz1267/walker";
|
||||
nezia_dev.url = "github:nezia1/nezia.dev";
|
||||
};
|
||||
nixConfig = {
|
||||
|
|
|
@ -10,11 +10,15 @@ in {
|
|||
modules = [
|
||||
./vamos
|
||||
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
inputs.hjem.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
solaire = mkSystem {
|
||||
modules = [./solaire];
|
||||
modules = [
|
||||
./solaire
|
||||
inputs.hjem.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
anastacia = mkSystem {
|
||||
|
|
|
@ -13,6 +13,7 @@ _: {
|
|||
homeVars = {
|
||||
fullName = "Anthony Rodriguez";
|
||||
email = "anthony@nezia.dev";
|
||||
signingKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHKEPlN/GU9nJZPleA77HH5NA+6vyhhM84fTSjEwnEgq nezia@vamos";
|
||||
};
|
||||
|
||||
profiles = {
|
||||
|
|
|
@ -4,7 +4,6 @@
|
|||
|
||||
./boot.nix
|
||||
./fonts.nix
|
||||
./home-manager.nix
|
||||
./locales.nix
|
||||
./networking.nix
|
||||
./nix.nix
|
|
@ -2,7 +2,9 @@
|
|||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
in {
|
||||
config = lib.mkIf (!config.local.profiles.server.enable) {
|
||||
users.users.${config.local.systemVars.username} = {
|
||||
isNormalUser = true;
|
||||
|
@ -15,5 +17,14 @@
|
|||
"plugdev"
|
||||
];
|
||||
};
|
||||
|
||||
hjem = {
|
||||
clobberByDefault = true;
|
||||
users.${username} = {
|
||||
enable = true;
|
||||
directory = "/home/${username}";
|
||||
user = "${username}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./core
|
||||
./options
|
||||
./nix
|
||||
./programs
|
||||
./services
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
styleCfg = osConfig.local.style;
|
||||
in {
|
||||
imports = [
|
||||
./programs
|
||||
./services
|
||||
];
|
||||
|
||||
home.pointerCursor = lib.mkIf styleCfg.enable {
|
||||
inherit (styleCfg.cursorTheme) name package size;
|
||||
x11.enable = true;
|
||||
gtk.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,110 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
anyrunPkgs = inputs.anyrun.packages.${pkgs.system};
|
||||
in {
|
||||
imports = [inputs.anyrun.homeManagerModules.default];
|
||||
config = mkIf osConfig.local.modules.hyprland.enable {
|
||||
programs.anyrun = {
|
||||
enable = true;
|
||||
config = {
|
||||
x.fraction = 0.5;
|
||||
y.fraction = 0.3;
|
||||
width.fraction = 0.5;
|
||||
hideIcons = false;
|
||||
ignoreExclusiveZones = false;
|
||||
layer = "overlay";
|
||||
hidePluginInfo = false;
|
||||
closeOnClick = true;
|
||||
showResultsImmediately = true;
|
||||
maxEntries = null;
|
||||
|
||||
plugins = with anyrunPkgs; [
|
||||
applications
|
||||
symbols
|
||||
randr
|
||||
];
|
||||
};
|
||||
|
||||
extraCss =
|
||||
/*
|
||||
css
|
||||
*/
|
||||
''
|
||||
#window {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
box#main {
|
||||
border-radius: 10px;
|
||||
background-color: @theme_bg_color;
|
||||
}
|
||||
|
||||
list#main {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
list#plugin {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
label#match-desc {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
label#plugin {
|
||||
font-size: 14px;
|
||||
}
|
||||
'';
|
||||
|
||||
extraConfigFiles = {
|
||||
"applications.ron".text = ''
|
||||
Config(
|
||||
// Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf
|
||||
desktop_actions: false,
|
||||
max_entries: 5,
|
||||
// The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used
|
||||
// to determine what terminal to use.
|
||||
terminal: Some(Terminal(
|
||||
// The main terminal command
|
||||
command: "foot",
|
||||
// What arguments should be passed to the terminal process to run the command correctly
|
||||
// {} is replaced with the command in the desktop entry
|
||||
args: "uwsm app -- {}",
|
||||
)),
|
||||
)
|
||||
'';
|
||||
|
||||
"symbols.ron".text = ''
|
||||
Config(
|
||||
// The prefix that the search needs to begin with to yield symbol results
|
||||
prefix: ":s",
|
||||
|
||||
// Custom user defined symbols to be included along the unicode symbols
|
||||
symbols: {
|
||||
// "name": "text to be copied"
|
||||
"shrug": "¯\\_(ツ)_/¯",
|
||||
"tableflip": "(╯°□°)╯︵ ┻━┻",
|
||||
"unflip": "┬─┬ノ( º _ ºノ)",
|
||||
},
|
||||
|
||||
// The number of entries to be displayed
|
||||
max_entries: 5,
|
||||
)
|
||||
'';
|
||||
"randr.ron".text = ''
|
||||
Config(
|
||||
prefix: ":d",
|
||||
max_entries: 5,
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
imports = [./firefox.nix];
|
||||
}
|
|
@ -1,176 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
betterfox = pkgs.fetchFromGitHub {
|
||||
owner = "yokoffing";
|
||||
repo = "betterfox";
|
||||
rev = "e026ed7d3a763c5d3f96c2680d7bc3340831af4f";
|
||||
hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs=";
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
extraPolicies = {
|
||||
DisableTelemetry = true;
|
||||
DisablePocket = true;
|
||||
DisableFeedbackCommands = true;
|
||||
DisableFirefoxStudies = true;
|
||||
OfferToSaveLogins = false;
|
||||
OffertosaveloginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
SearchSuggestEnabled = true;
|
||||
|
||||
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163
|
||||
"3rdparty".Extensions = {
|
||||
"addon@darkreader.org" = {
|
||||
permissions = ["internal:privateBrowsingAllowed"];
|
||||
enabled = true;
|
||||
automation = {
|
||||
enabled = true;
|
||||
behavior = "OnOff";
|
||||
mode = "system";
|
||||
};
|
||||
detectDarkTheme = true;
|
||||
enabledByDefault = true;
|
||||
changeBrowserTheme = false;
|
||||
enableForProtectedPages = true;
|
||||
fetchNews = false;
|
||||
previewNewDesign = true;
|
||||
};
|
||||
"uBlock0@raymondhill.net" = {
|
||||
permissions = ["internal:privateBrowsingAllowed"];
|
||||
advancedSettings = [
|
||||
[
|
||||
"userResourcesLocation"
|
||||
"https://raw.githubusercontent.com/pixeltris/TwitchAdSolutions/master/video-swap-new/video-swap-new-ublock-origin.js"
|
||||
]
|
||||
];
|
||||
adminSettings = {
|
||||
userSettings = {
|
||||
uiTheme = "dark";
|
||||
advancedUserEnabled = true;
|
||||
userFiltersTrusted = true;
|
||||
importedLists = [
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
];
|
||||
selectedFilterLists = [
|
||||
"FRA-0"
|
||||
"adguard-cookies"
|
||||
"adguard-mobile-app-banners"
|
||||
"adguard-other-annoyances"
|
||||
"adguard-popup-overlays"
|
||||
"adguard-social"
|
||||
"adguard-spyware-url"
|
||||
"adguard-widgets"
|
||||
"easylist"
|
||||
"easylist-annoyances"
|
||||
"easylist-chat"
|
||||
"easylist-newsletters"
|
||||
"easylist-notifications"
|
||||
"easyprivacy"
|
||||
"fanboy-cookiemonster"
|
||||
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
|
||||
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||||
"plowe-0"
|
||||
"ublock-annoyances"
|
||||
"ublock-badware"
|
||||
"ublock-cookies-adguard"
|
||||
"ublock-cookies-easylist"
|
||||
"ublock-filters"
|
||||
"ublock-privacy"
|
||||
"ublock-quick-fixes"
|
||||
"ublock-unbreak"
|
||||
"urlhaus-1"
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles = {
|
||||
nezia = {
|
||||
settings = {
|
||||
"browser.search.suggest.enabled" = true;
|
||||
"ui.key.menuAccessKeyFocuses" = false;
|
||||
};
|
||||
|
||||
extensions = with inputs.firefox-addons.packages.${pkgs.system}; [
|
||||
darkreader
|
||||
proton-pass
|
||||
shinigami-eyes
|
||||
stylus
|
||||
ublock-origin
|
||||
violentmonkey
|
||||
];
|
||||
# https://git.jacekpoz.pl/poz/niksos/src/commit/a48647a1c5bc6877a1100a65f4dc169b2fc11ed7/hosts/hape/firefox.nix
|
||||
search = {
|
||||
force = true;
|
||||
default = "SearxNG";
|
||||
engines = {
|
||||
"SearxNG" = {
|
||||
urls = [
|
||||
{
|
||||
rels = ["results"];
|
||||
template = "https://search.nezia.dev/search";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
rels = ["suggestions"];
|
||||
template = "https://search.nezia.dev/autocompleter";
|
||||
params = [
|
||||
{
|
||||
name = "q";
|
||||
value = "{searchTerms}";
|
||||
}
|
||||
];
|
||||
"type" = "application/x-suggestions+json";
|
||||
}
|
||||
];
|
||||
};
|
||||
"MyNixOS" = {
|
||||
urls = [{template = "https://mynixos.com/search?q={searchTerms}";}];
|
||||
iconUpdateURL = "https://mynixos.com/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = ["@nx"];
|
||||
};
|
||||
"Noogle" = {
|
||||
urls = [{template = "https://noogle.dev/q?term={searchTerms}";}];
|
||||
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||
definedAliases = ["@ng"];
|
||||
};
|
||||
"GitHub Nix" = {
|
||||
# https://github.com/search?q=language%3Anix+NOT+is%3Afork+programs.neovim&type=code
|
||||
urls = [{template = "https://github.com/search?q=language:nix NOT is:fork {searchTerms}&type=code";}];
|
||||
iconUpdateURL = "https://github.com/favicon.ico";
|
||||
updateInterval = 24 * 60 * 60 * 1000;
|
||||
definedAliases = ["@ghn"];
|
||||
};
|
||||
"Google".metaData.alias = "@g"; # builtin engines only support specifying one additional alias
|
||||
};
|
||||
};
|
||||
# https://github.com/oddlama/nix-config/blob/main/users/myuser/graphical/firefox.nix#L53-L57
|
||||
extraConfig = builtins.concatStringsSep "\n" [
|
||||
(builtins.readFile "${betterfox}/user.js")
|
||||
(builtins.readFile "${betterfox}/Securefox.js")
|
||||
(builtins.readFile "${betterfox}/Fastfox.js")
|
||||
(builtins.readFile "${betterfox}/Peskyfox.js")
|
||||
(builtins.readFile "${betterfox}/Smoothfox.js")
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,116 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
lib',
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib') rgba;
|
||||
styleCfg = osConfig.local.style;
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
home.packages = [pkgs.vesktop];
|
||||
xdg.configFile."vesktop/themes/midnight-base16.css".text = with styleCfg.scheme.palette;
|
||||
lib.mkIf styleCfg.enable ''
|
||||
/**
|
||||
* @name Midnight-base16
|
||||
* @description A dark, rounded discord theme. Updated to use base16 colors.
|
||||
* @author refact0r
|
||||
* @version 1.6.2
|
||||
* @invite nz87hXyvcy
|
||||
* @website https://github.com/refact0r/midnight-discord
|
||||
* @source https://github.com/refact0r/midnight-discord/blob/master/midnight.theme.css
|
||||
* @authorId 508863359777505290
|
||||
* @authorLink https://www.refact0r.dev
|
||||
*/
|
||||
|
||||
/* IMPORTANT: make sure to enable dark mode in discord settings for the theme to apply properly!!! */
|
||||
|
||||
@import url('https://refact0r.github.io/midnight-discord/midnight.css');
|
||||
|
||||
/* customize things here */
|
||||
:root {
|
||||
/* font, change to 'gg sans' for default discord font*/
|
||||
--font: 'gg sans';
|
||||
|
||||
/* top left corner text */
|
||||
--corner-text: '${styleCfg.scheme.name}';
|
||||
|
||||
/* color of status indicators and window controls */
|
||||
--online-indicator: ${base0B}; /* change to #23a55a for default green */
|
||||
--dnd-indicator: ${base08}; /* change to #f13f43 for default red */
|
||||
--idle-indicator: ${base0A}; /* change to #f0b232 for default yellow */
|
||||
--streaming-indicator: ${base0E}; /* change to #593695 for default purple */
|
||||
|
||||
/* accent colors */
|
||||
--accent-1: ${base0D}; /* links */
|
||||
--accent-2: ${base0E}; /* general unread/mention elements, some icons when active */
|
||||
--accent-3: ${base0E}; /* accent buttons */
|
||||
--accent-4: ${base03}; /* accent buttons when hovered */
|
||||
--accent-5: ${base07}; /* accent buttons when clicked */
|
||||
--mention: ${rgba base0E 0.1}; /* mentions & mention messages */
|
||||
--mention-hover: ${rgba base0E 0.05}; /* mentions & mention messages when hovered */
|
||||
|
||||
/* text colors */
|
||||
--text-0: var(--bg-4); /* text on colored elements */
|
||||
--text-1: ${base06}; /* other normally white text */
|
||||
--text-2: ${base06}; /* headings and important text */
|
||||
--text-3: ${base05}; /* normal text */
|
||||
--text-4: ${base05}; /* icon buttons and channels */
|
||||
--text-5: ${base04}; /* muted channels/chats and timestamps */
|
||||
|
||||
/* background and dark colors */
|
||||
--bg-1: ${base03}; /* dark buttons when clicked */
|
||||
--bg-2: ${base02}; /* dark buttons */
|
||||
--bg-3: ${base01}; /* spacing, secondary elements */
|
||||
--bg-4: ${base00}; /* main background color */
|
||||
--hover: ${rgba base03 0.1}; /* channels and buttons when hovered */
|
||||
--active: ${rgba base03 0.2}; /* channels and buttons when clicked or selected */
|
||||
--message-hover: ${rgba base00 0.1}; /* messages when hovered */
|
||||
|
||||
/* amount of spacing and padding */
|
||||
--spacing: 12px;
|
||||
|
||||
/* animations */
|
||||
/* ALL ANIMATIONS CAN BE DISABLED WITH REDUCED MOTION IN DISCORD SETTINGS */
|
||||
--list-item-transition: 0.2s ease; /* channels/members/settings hover transition */
|
||||
--unread-bar-transition: 0.2s ease; /* unread bar moving into view transition */
|
||||
--moon-spin-transition: 0.4s ease; /* moon icon spin */
|
||||
--icon-spin-transition: 1s ease; /* round icon button spin (settings, emoji, etc.) */
|
||||
|
||||
/* corner roundness (border-radius) */
|
||||
--roundness-xl: 22px; /* roundness of big panel outer corners */
|
||||
--roundness-l: 20px; /* popout panels */
|
||||
--roundness-m: 16px; /* smaller panels, images, embeds */
|
||||
--roundness-s: 12px; /* members, settings inputs */
|
||||
--roundness-xs: 10px; /* channels, buttons */
|
||||
--roundness-xxs: 8px; /* searchbar, small elements */
|
||||
|
||||
/* direct messages moon icon */
|
||||
/* change to block to show, none to hide */
|
||||
--discord-icon: none; /* discord icon */
|
||||
--moon-icon: block; /* moon icon */
|
||||
--moon-icon-url: url('https://upload.wikimedia.org/wikipedia/commons/c/c4/Font_Awesome_5_solid_moon.svg'); /* custom icon url */
|
||||
--moon-icon-size: auto;
|
||||
|
||||
/* filter uncolorable elements to fit theme */
|
||||
/* (just set to none, they're too much work to configure) */
|
||||
--login-bg-filter: saturate(0.3) hue-rotate(-15deg) brightness(0.4); /* login background artwork */
|
||||
--green-to-accent-3-filter: hue-rotate(56deg) saturate(1.43); /* add friend page explore icon */
|
||||
--blurple-to-accent-3-filter: hue-rotate(304deg) saturate(0.84) brightness(1.2); /* add friend page school icon */
|
||||
}
|
||||
|
||||
/* Selected chat/friend text */
|
||||
.selected_f5eb4b,
|
||||
.selected_f6f816 .link_d8bfb3 {
|
||||
color: var(--text-0) !important;
|
||||
background: var(--accent-3) !important;
|
||||
}
|
||||
|
||||
.selected_f6f816 .link_d8bfb3 * {
|
||||
color: var(--text-0) !important;
|
||||
fill: var(--text-0) !important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,6 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./helix.nix
|
||||
./neovim.nix
|
||||
];
|
||||
}
|
|
@ -1,64 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
theme = "catppuccin_macchiato";
|
||||
editor = {
|
||||
line-number = "relative";
|
||||
lsp.display-messages = true;
|
||||
auto-format = true;
|
||||
auto-completion = true;
|
||||
completion-timeout = 5;
|
||||
color-modes = true;
|
||||
completion-trigger-len = 1;
|
||||
completion-replace = true;
|
||||
cursorline = true;
|
||||
cursor-shape = {
|
||||
insert = "bar";
|
||||
normal = "block";
|
||||
select = "underline";
|
||||
};
|
||||
indent-guides.render = true;
|
||||
lsp.display-inlay-hints = true;
|
||||
statusline.center = ["position-percentage"];
|
||||
true-color = true;
|
||||
whitespace.characters = {
|
||||
newline = "↴";
|
||||
tab = "⇥";
|
||||
};
|
||||
};
|
||||
|
||||
keys.normal = {
|
||||
space = {
|
||||
space = "file_picker";
|
||||
w = ":w";
|
||||
q = ":q";
|
||||
};
|
||||
esc = ["collapse_selection" "keep_primary_selection"];
|
||||
};
|
||||
};
|
||||
|
||||
languages = {
|
||||
language = [
|
||||
{
|
||||
name = "nix";
|
||||
auto-format = true;
|
||||
}
|
||||
];
|
||||
|
||||
language-server = {
|
||||
nil = {
|
||||
command = lib.getExe pkgs.nil;
|
||||
config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.gaming.enable {
|
||||
home.packages = [
|
||||
pkgs.mangohud
|
||||
pkgs.bolt-launcher
|
||||
pkgs.ankama-launcher
|
||||
pkgs.lutris
|
||||
pkgs.qbittorrent
|
||||
pkgs.protonplus
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,58 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
|
||||
package = inputs.hypridle.packages.${pkgs.system}.hypridle;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
unlock_cmd = "pkill --signal SIGUSR1 hyprlock";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 300; # 5m
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 330; # 5.5m
|
||||
on-timeout = "hyprctl dipsatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 600; # 10m
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
# needed when using uwsm as the session manager
|
||||
systemd.user.services."hypridle" = lib.mkForce {
|
||||
Unit = {
|
||||
Description = "Hyprland's Idle Daemon";
|
||||
After = "graphical-session.target";
|
||||
X-Restart-Triggers = ["${config.xdg.configFile."hypr/hypridle.conf".source}"];
|
||||
};
|
||||
Service = {
|
||||
Type = "exec";
|
||||
ExecStart = lib.getExe pkgs.hypridle;
|
||||
Restart = "on-failure";
|
||||
Slice = "background-graphical.slice";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
# thanks https://github.com/fufexan/dotfiles/blob/c0b3c77d95ce1f574a87e7f7ead672ca0d951245/home/programs/wayland/hyprland/binds.nix#L16-L20
|
||||
toggle = program: uwsm: let
|
||||
prog = builtins.substring 0 14 program;
|
||||
in "pkill ${prog} || ${lib.optionalString uwsm "uwsm app -- "} ${program}";
|
||||
runOnce = program: "pgrep ${program} || uwsm app -- ${program}";
|
||||
run = program: "uwsm app -- ${program}";
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mod" = "SUPER";
|
||||
bindr = [
|
||||
"$mod, SUPER_L, exec, ${toggle "anyrun" true}"
|
||||
];
|
||||
bind = [
|
||||
"$mod, Return, exec, ${run "ghostty"}"
|
||||
"$mod, n, exec, ${run "neovide"}"
|
||||
"$mod, w, exec, ${run "firefox"}"
|
||||
", Print, exec, ${runOnce "grimblast"} --notify --cursor copysave output"
|
||||
"$mod, q, killactive"
|
||||
"$mod SHIFT, q, exec, loginctl terminate-user ''"
|
||||
"$mod, period, exec, ${toggle "anyrun-symbols" true}"
|
||||
"CTRL, Print, exec, ${runOnce "grimblast"} --notify --cursor --freeze copysave area"
|
||||
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, j, movefocus, d"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, l, movefocus, r"
|
||||
|
||||
"$mod SHIFT, h, movewindow, l"
|
||||
"$mod SHIFT, j, movewindow, d"
|
||||
"$mod SHIFT, k, movewindow, u"
|
||||
"$mod SHIFT, l, movewindow, r"
|
||||
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
|
||||
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"$mod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
|
||||
"$mod, t, togglefloating"
|
||||
", F11, fullscreen, 0"
|
||||
"$mod, f, fullscreen, 1"
|
||||
|
||||
"$mod, e, togglespecialworkspace, file_manager_tui"
|
||||
"$mod SHIFT, e, togglespecialworkspace, file_manager_gui"
|
||||
|
||||
", XF86PowerOff, exec, ${toggle "wlogout" true}"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
|
||||
", XF86MonBrightnessUp, exec, brillo -q -u 300000 -A 5"
|
||||
", XF86MonBrightnessDown, exec, brillo -q -u 300000 -U 5"
|
||||
", XF86AudioMedia, exec, XDG_CURRENT_DESKTOP=gnome gnome-control-center"
|
||||
];
|
||||
binde = [
|
||||
"$mod Alt, l, exec, loginctl lock-session"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,140 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) toString;
|
||||
styleCfg = osConfig.local.style;
|
||||
in {
|
||||
imports = [./binds.nix];
|
||||
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
home.packages = [
|
||||
inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast
|
||||
# disable unused panels - https://github.com/maydayv7/dotfiles/blob/4de45008a6915753834aa7e1cbafbacfff8b7adc/modules/gui/desktop/hyprland/apps/utilities.nix#L42-L57
|
||||
(pkgs.gnome-control-center.overrideAttrs (old: {
|
||||
postInstall =
|
||||
old.postInstall
|
||||
+ ''
|
||||
dir=$out/share/applications
|
||||
for panel in $dir/*
|
||||
do
|
||||
[ "$panel" = "$dir/gnome-network-panel.desktop" ] && continue
|
||||
[ "$panel" = "$dir/gnome-bluetooth-panel.desktop" ] && continue
|
||||
[ "$panel" = "$dir/gnome-wifi-panel.desktop" ] && continue
|
||||
[ "$panel" = "$dir/gnome-wwan-panel.desktop" ] && continue
|
||||
[ "$panel" = "$dir/gnome-sharing-panel.desktop" ] && continue
|
||||
[ "$panel" = "$dir/gnome-wacom-panel.desktop" ] && continue
|
||||
rm "$panel"
|
||||
done
|
||||
'';
|
||||
}))
|
||||
];
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
|
||||
systemd.enable = false;
|
||||
|
||||
settings = lib.mkMerge [
|
||||
{
|
||||
xwayland = {
|
||||
force_zero_scaling = true;
|
||||
};
|
||||
|
||||
env = [
|
||||
"GDK_SCALE,1"
|
||||
];
|
||||
|
||||
cursor = {
|
||||
no_hardware_cursors = 1;
|
||||
};
|
||||
|
||||
monitor = [
|
||||
"eDP-1, preferred, auto, 1.33"
|
||||
];
|
||||
workspace = [
|
||||
"special:terminal, on-created-empty:foot"
|
||||
"special:mixer_gui, on-created-empty:pavucontrol"
|
||||
"special:file_manager_gui, on-created-empty:nautilus"
|
||||
"special:file_manager_tui, on-created-empty:foot -- yazi"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
# fixes fullscreen windows (mostly games)
|
||||
"stayfocused, initialtitle:^()$, initialclass:^(steam)$"
|
||||
"minsize 1 1, initialtitle:^()$, initialclass:^(steam)$"
|
||||
"maximize, initialtitle:^(\S+)$, initialclass:^(steamwebhelper)$"
|
||||
|
||||
"immediate, initialclass:^(steam_app_)(.*)$"
|
||||
"fullscreen, initialclass:^(steam_app_)(.*)$"
|
||||
|
||||
# inhibit idle on every fullscreen app except games
|
||||
"idleinhibit fullscreen,class:.*"
|
||||
];
|
||||
|
||||
render = {
|
||||
explicit_sync = 1;
|
||||
explicit_sync_kms = 1;
|
||||
expand_undersized_textures = false;
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.1";
|
||||
animation = [
|
||||
"windows, 1, 5, myBezier"
|
||||
"windowsOut, 1, 5, default, popin 80%"
|
||||
"windowsMove, 1, 5, default, popin 80%"
|
||||
"fade, 1, 5, default"
|
||||
"border, 1, 5, default"
|
||||
"borderangle, 0, 8, default"
|
||||
"workspaces, 0"
|
||||
"specialWorkspace, 0"
|
||||
];
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_options = "compose:ralt";
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
scroll_factor = 0.8;
|
||||
tap-to-click = true;
|
||||
clickfinger_behavior = true;
|
||||
};
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_direction_lock = false;
|
||||
workspace_swipe_cancel_ratio = 0.15;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
middle_click_paste = false;
|
||||
};
|
||||
}
|
||||
|
||||
(lib.mkIf styleCfg.enable {
|
||||
env = [
|
||||
"HYPRCURSOR_THEME,${styleCfg.cursorTheme.name}"
|
||||
"HYPRCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
|
||||
"XCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
|
||||
];
|
||||
general = {
|
||||
border_size = 4;
|
||||
"col.active_border" = "rgb(${lib.removePrefix "#" styleCfg.scheme.palette.base0E})";
|
||||
};
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
blur.enabled = true;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
lib',
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
styleCfg = osConfig.local.style;
|
||||
rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) styleCfg.scheme.palette;
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
package = inputs.hyprlock.packages.${pkgs.system}.hyprlock;
|
||||
|
||||
settings = lib.mkMerge [
|
||||
{
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
};
|
||||
}
|
||||
|
||||
(with rgbaPalette;
|
||||
lib.mkIf styleCfg.enable {
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = "Layout: $LAYOUT";
|
||||
font_size = 25;
|
||||
color = base05;
|
||||
|
||||
position = "30, -30";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "$TIME";
|
||||
font_size = 90;
|
||||
color = base05;
|
||||
|
||||
position = "-30, 0";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
|
||||
font_size = 25;
|
||||
color = base05;
|
||||
|
||||
position = "-30, -150";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
}
|
||||
];
|
||||
|
||||
image = {
|
||||
monitor = "";
|
||||
path = "${styleCfg.avatar}"; # Replace with your avatar path
|
||||
size = 100;
|
||||
border_color = base0D;
|
||||
|
||||
position = "0, 75";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
input-field = [
|
||||
{
|
||||
monitor = "";
|
||||
|
||||
size = "300, 60";
|
||||
outline_thickness = 4;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = true;
|
||||
|
||||
outer_color = base0D;
|
||||
inner_color = base02;
|
||||
font_color = base05;
|
||||
|
||||
fade_on_empty = false;
|
||||
|
||||
# the span elements still use #RRGGBB, so we use scheme directly
|
||||
placeholder_text = "<span foreground=\"#${styleCfg.scheme.palette.base05}\"><i> Logged in as </i><span foreground=\"#${styleCfg.scheme.palette.base0D}\">$USER</span></span>";
|
||||
|
||||
hide_input = false;
|
||||
check_color = base0D;
|
||||
fail_color = base08;
|
||||
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
capslock_color = base0E;
|
||||
|
||||
position = "0, -47";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
package = inputs.hyprpaper.packages.${pkgs.system}.default;
|
||||
|
||||
settings = {
|
||||
preload = ["${osConfig.local.style.wallpaper}"];
|
||||
wallpaper = [", ${osConfig.local.style.wallpaper}"];
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
|
||||
systemd.user.services.hyprpaper.Service.Slice = "background-graphical.slice";
|
||||
};
|
||||
}
|
|
@ -1,196 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
styleCfg = osConfig.local.style;
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
home.packages = [pkgs.tidal-hifi];
|
||||
# based on https://github.com/rose-pine/tidal. adapted to work with base16 colors.
|
||||
xdg.configFile."tidal-hifi/themes/base16.css".text = with styleCfg.scheme.palette;
|
||||
lib.mkIf styleCfg.enable ''
|
||||
:root {
|
||||
--glass-white-1: ${base05};
|
||||
--glass-white-1-hover: ${base06};
|
||||
--glass-white-2: ${base07};
|
||||
--glass-white-2-hover: ${base08};
|
||||
--glass-white-3: ${base07};
|
||||
--glass-white-4: ${base04};
|
||||
--glass-white-5: ${base04};
|
||||
--glass-white-6: ${base05};
|
||||
--snow-white: ${base07};
|
||||
--snow-white-hover: ${base08};
|
||||
--gray-4: ${base00};
|
||||
--gray-5: ${base02};
|
||||
--gray-6: ${base03};
|
||||
--gray-7: ${base04};
|
||||
--cyan-blue: ${base0D};
|
||||
--cyan-blue-hover: ${base0C};
|
||||
--glass-cyan-1: ${base04};
|
||||
--glass-cyan-2: ${base05};
|
||||
--glass-cyan-3: ${base06};
|
||||
--master-gold: ${base0E};
|
||||
--master-gold-hover: ${base08};
|
||||
--glass-master-gold: ${base05};
|
||||
--glass-master-gold-2: ${base06};
|
||||
--raspberry-pink: ${base08};
|
||||
--raspberry-pink-lighter: ${base09};
|
||||
--black: ${base00};
|
||||
--midnight-black: ${base00};
|
||||
--controls-overlay: ${base03};
|
||||
--duration-overlay: ${base02};
|
||||
--background-dark: ${base00};
|
||||
--hoverLighten: brightness(130%);
|
||||
--hoverDarken: brightness(70%);
|
||||
--hoverTransition: filter 0.15s ease;
|
||||
--scrollbar-track: ${base03};
|
||||
--scrollbar-thumb: ${base00};
|
||||
--lighten-25: ${base01};
|
||||
--red-alert: ${base08};
|
||||
--user-profile-linear-gradient: linear-gradient(160deg,${base0D} 1.22%,${base0C} 40.51%,${base00} 79.07%);
|
||||
--wave-border-radius--none: 0px;
|
||||
--wave-border-radius--extra-small: 4px;
|
||||
--wave-border-radius--small: 8px;
|
||||
--wave-border-radius--regular: 12px;
|
||||
--wave-border-radius--full: 1000px;
|
||||
--wave-color-material-dark: ${base00}80;
|
||||
--wave-color-material-light: ${base04}33;
|
||||
--wave-color-opacity-accent-dark-ultra-thick: ${base0C}cc;
|
||||
--wave-color-opacity-accent-darkest-ultra-thick: ${base01};
|
||||
--wave-color-opacity-accent-fill-regular: ${base0C}66;
|
||||
--wave-color-opacity-accent-fill-thin: ${base0C}33;
|
||||
--wave-color-opacity-accent-fill-ultra-thick: ${base0C}cc;
|
||||
--wave-color-opacity-accent-fill-ultra-thin: ${base0C}1a;
|
||||
--wave-color-opacity-base-bright-thick: ${base00}99;
|
||||
--wave-color-opacity-base-bright-thin: ${base00}33;
|
||||
--wave-color-opacity-base-bright-transparent: ${base00};
|
||||
--wave-color-opacity-base-bright-ultra-thick: ${base00}cc;
|
||||
--wave-color-opacity-base-brighter-ultra-thick: ${base01}cc;
|
||||
--wave-color-opacity-base-brightest-regular: ${base02}66;
|
||||
--wave-color-opacity-base-brightest-thin: ${base02}33;
|
||||
--wave-color-opacity-base-brightest-ultra-thin: ${base02}1a;
|
||||
--wave-color-opacity-base-fill-regular: ${base00}66;
|
||||
--wave-color-opacity-base-fill-thick: ${base00}99;
|
||||
--wave-color-opacity-base-fill-thin: ${base00}33;
|
||||
--wave-color-opacity-base-fill-transparent: #000;
|
||||
--wave-color-opacity-base-fill-ultra-thick: ${base00}cc;
|
||||
--wave-color-opacity-base-fill-ultra-thin: ${base00}1a;
|
||||
--wave-color-opacity-contrast-fill-regular: ${base07}66;
|
||||
--wave-color-opacity-contrast-fill-thick: ${base07}99;
|
||||
--wave-color-opacity-contrast-fill-thin: ${base07}33;
|
||||
--wave-color-opacity-contrast-fill-transparent: #fff;
|
||||
--wave-color-opacity-contrast-fill-ultra-thick: ${base07}cc;
|
||||
--wave-color-opacity-contrast-fill-ultra-thin: ${base07}1a;
|
||||
--wave-color-opacity-rainbow-blue-thin: ${base0D}33;
|
||||
--wave-color-opacity-rainbow-yellow-fill-regular: ${base0E}66;
|
||||
--wave-color-opacity-rainbow-yellow-fill-thin: ${base0E}33;
|
||||
--wave-color-opacity-rainbow-yellow-fill-ultra-thick: ${base0E}cc;
|
||||
--wave-color-opacity-rainbow-yellow-fill-ultra-thin: ${base0E}1a;
|
||||
--wave-color-opacity-special-fill-regular: ${base0E}66;
|
||||
--wave-color-opacity-special-fill-thin: ${base0E}33;
|
||||
--wave-color-opacity-special-fill-ultra-thick: ${base0E}cc;
|
||||
--wave-color-opacity-special-fill-ultra-thin: ${base0E}1a;
|
||||
--wave-color-services-facebook: ${base0D};
|
||||
--wave-color-services-instagram-red: ${base08};
|
||||
--wave-color-services-mtn: ${base0E};
|
||||
--wave-color-services-musix-orange: ${base09};
|
||||
--wave-color-services-musix-pink: ${base0E};
|
||||
--wave-color-services-play: ${base0C};
|
||||
--wave-color-services-plus: ${base0B};
|
||||
--wave-color-services-snapchat: ${base0A};
|
||||
--wave-color-services-sprint: ${base0A};
|
||||
--wave-color-services-t-mobile: ${base08};
|
||||
--wave-color-services-tik-tok-blue: ${base0D};
|
||||
--wave-color-services-tik-tok-red: ${base08};
|
||||
--wave-color-services-twitter: ${base0D};
|
||||
--wave-color-services-viacom-1: ${base0D};
|
||||
--wave-color-services-viacom-2: ${base0E};
|
||||
--wave-color-services-viacom-3: ${base08};
|
||||
--wave-color-services-viacom-4: ${base09};
|
||||
--wave-color-services-viacom-5: ${base0E};
|
||||
--wave-color-services-vivo: ${base0E};
|
||||
--wave-color-services-vodafone: ${base08};
|
||||
--wave-color-services-waze: ${base0D};
|
||||
--wave-color-solid-accent-bright: ${base0D};
|
||||
--wave-color-solid-accent-brighter: ${base0D};
|
||||
--wave-color-solid-accent-dark: ${base0C};
|
||||
--wave-color-solid-accent-darker: ${base01};
|
||||
--wave-color-solid-accent-darkest: ${base00};
|
||||
--wave-color-solid-accent-fill: ${base0D};
|
||||
--wave-color-solid-base-bright: ${base00};
|
||||
--wave-color-solid-base-brighter: ${base01};
|
||||
--wave-color-solid-base-brightest: ${base02};
|
||||
--wave-color-solid-base-fill: ${base00};
|
||||
--wave-color-solid-contrast-dark: ${base07};
|
||||
--wave-color-solid-contrast-darker: ${base06};
|
||||
--wave-color-solid-contrast-darkest: ${base05};
|
||||
--wave-color-solid-contrast-fill: ${base07};
|
||||
--wave-color-solid-rainbow-blue-fill: ${base0D};
|
||||
--wave-color-solid-rainbow-green-brighter: ${base0D};
|
||||
--wave-color-solid-rainbow-green-dark: ${base0C};
|
||||
--wave-color-solid-rainbow-green-darker: ${base0C};
|
||||
--wave-color-solid-rainbow-green-darkest: ${base01};
|
||||
--wave-color-solid-rainbow-green-fill: ${base0D};
|
||||
--wave-color-solid-rainbow-orange-fill: ${base09};
|
||||
--wave-color-solid-rainbow-purple-fill: ${base0E};
|
||||
--wave-color-solid-rainbow-red-bright: ${base08};
|
||||
--wave-color-solid-rainbow-red-brighter: ${base08};
|
||||
--wave-color-solid-rainbow-red-dark: ${base09};
|
||||
--wave-color-solid-rainbow-red-darker: ${base01};
|
||||
--wave-color-solid-rainbow-red-darkest: ${base00};
|
||||
--wave-color-solid-rainbow-red-fill: ${base08};
|
||||
--wave-color-solid-rainbow-yellow-bright: ${base0A};
|
||||
--wave-color-solid-rainbow-yellow-brighter: ${base06};
|
||||
--wave-color-solid-rainbow-yellow-dark: ${base09};
|
||||
--wave-color-solid-rainbow-yellow-darker: ${base01};
|
||||
--wave-color-solid-rainbow-yellow-darkest: ${base00};
|
||||
--wave-color-solid-rainbow-yellow-fill: ${base0A};
|
||||
--wave-color-solid-special-bright: ${base09};
|
||||
--wave-color-solid-special-brighter: ${base06};
|
||||
--wave-color-solid-special-dark: ${base09};
|
||||
--wave-color-solid-special-darker: ${base09};
|
||||
--wave-color-solid-special-darkest: ${base00};
|
||||
--wave-color-solid-special-fill: ${base0E};
|
||||
--wave-color-solid-warning-bright: ${base08};
|
||||
--wave-color-solid-warning-brighter: ${base09};
|
||||
--wave-color-solid-warning-dark: ${base09};
|
||||
--wave-color-solid-warning-darker: ${base01};
|
||||
--wave-color-solid-warning-darkest: ${base00};
|
||||
--wave-color-solid-warning-fill: ${base08};
|
||||
--wave-color-text-disabled: ${base02};
|
||||
--wave-color-text-link: ${base0D};
|
||||
--wave-color-text-main: ${base07};
|
||||
--wave-color-text-placeholder: ${base02};
|
||||
--wave-color-text-secondary: ${base06};
|
||||
--wave-color-text-tertiary: ${base05};
|
||||
--wave-font-weight--bold: 700;
|
||||
--wave-font-weight--demi: 600;
|
||||
--wave-font-weight--medium: 500;
|
||||
--wave-opacity--ultra-thin: .05;
|
||||
--wave-opacity--thin: .1;
|
||||
--wave-opacity--regular: .4;
|
||||
--wave-opacity--thick: .6;
|
||||
--wave-opacity--ultra-thick: .8;
|
||||
--wave-spacing--extra-extra-large: 64px;
|
||||
--wave-spacing--extra-large: 40px;
|
||||
--wave-spacing--large: 24px;
|
||||
--wave-spacing--medium: 20px;
|
||||
--wave-spacing--regular: 16px;
|
||||
--wave-spacing--small: 12px;
|
||||
--wave-spacing--extra-small: 8px;
|
||||
--wave-spacing--extra-extra-small: 4px;
|
||||
}
|
||||
|
||||
.wave-text-caption-demi, .tidal-ui__v-stack {
|
||||
color: var(--wave-color-solid-accent-bright) !important;
|
||||
}
|
||||
|
||||
.tidal-ui__icon {
|
||||
fill: var(--wave-color-solid-rainbow-purple-fill) !important;
|
||||
stroke: var(--wave-color-solid-rainbow-purple-fill) !important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
font = "Inter 12";
|
||||
selection-notification = true;
|
||||
|
||||
selection-clipboard = "clipboard";
|
||||
adjust-open = "best-fit";
|
||||
pages-per-row = "1";
|
||||
scroll-page-aware = "true";
|
||||
scroll-full-overlap = "0.01";
|
||||
scroll-step = "100";
|
||||
zoom-min = "10";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
# miscellaneous programs that do not need to be configured
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
home.packages = with pkgs; [
|
||||
cinny-desktop
|
||||
entr
|
||||
fractal
|
||||
geary
|
||||
imhex
|
||||
logisim-evolution
|
||||
mission-center
|
||||
nautilus
|
||||
obsidian
|
||||
playerctl
|
||||
proton-pass
|
||||
simple-scan
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
programs = {
|
||||
fzf.enable = true;
|
||||
fastfetch.enable = true;
|
||||
hyfetch = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preset = "nonbinary";
|
||||
mode = "rgb";
|
||||
backend = "fastfetch";
|
||||
color_align.mode = "horizontal";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./emulators
|
||||
./programs
|
||||
./shell
|
||||
];
|
||||
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,54 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
styleCfg = osConfig.local.style;
|
||||
# because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b
|
||||
palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) styleCfg.scheme.palette;
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
font = "monospace:size=14";
|
||||
shell = "${lib.getExe config.programs.fish.package}";
|
||||
};
|
||||
|
||||
colors = with palette;
|
||||
lib.mkIf styleCfg.enable {
|
||||
background = base00;
|
||||
foreground = base05;
|
||||
|
||||
regular0 = base00;
|
||||
regular1 = base08;
|
||||
regular2 = base0B;
|
||||
regular3 = base0A;
|
||||
regular4 = base0D;
|
||||
regular5 = base0E;
|
||||
regular6 = base0C;
|
||||
regular7 = base05;
|
||||
|
||||
bright0 = base02;
|
||||
bright1 = base08;
|
||||
bright2 = base0B;
|
||||
bright3 = base0A;
|
||||
bright4 = base0D;
|
||||
bright5 = base0E;
|
||||
bright6 = base0C;
|
||||
bright7 = base07;
|
||||
|
||||
"16" = base09;
|
||||
"17" = base0F;
|
||||
"18" = base01;
|
||||
"19" = base02;
|
||||
"20" = base04;
|
||||
"21" = base06;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,109 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mapAttrs mkIf optionalAttrs removePrefix;
|
||||
styleCfg = osConfig.local.style;
|
||||
|
||||
prefix = "ctrl+a";
|
||||
|
||||
mkGhosttyTheme = palette: let
|
||||
colors = mapAttrs (_: value: removePrefix "#" value) palette;
|
||||
in {
|
||||
palette = [
|
||||
"0=#${colors.base00}"
|
||||
"1=#${colors.base08}"
|
||||
"2=#${colors.base0B}"
|
||||
"3=#${colors.base0A}"
|
||||
"4=#${colors.base0D}"
|
||||
"5=#${colors.base0E}"
|
||||
"6=#${colors.base0C}"
|
||||
"7=#${colors.base05}"
|
||||
"8=#${colors.base02}"
|
||||
"9=#${colors.base08}"
|
||||
"10=#${colors.base0B}"
|
||||
"11=#${colors.base0A}"
|
||||
"12=#${colors.base0D}"
|
||||
"13=#${colors.base0E}"
|
||||
"14=#${colors.base0C}"
|
||||
"15=#${colors.base07}"
|
||||
"16=#${colors.base09}"
|
||||
"17=#${colors.base0F}"
|
||||
"18=#${colors.base01}"
|
||||
"19=#${colors.base02}"
|
||||
"20=#${colors.base04}"
|
||||
"21=#${colors.base06}"
|
||||
];
|
||||
background = colors.base00;
|
||||
foreground = colors.base05;
|
||||
cursor-color = colors.base06;
|
||||
selection-background = colors.base02;
|
||||
selection-foreground = colors.base05;
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.ghostty = lib.mkMerge [
|
||||
{
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
font-family = ["monospace" "Symbols Nerd Font"];
|
||||
font-size = 14;
|
||||
gtk-single-instance = true;
|
||||
gtk-adwaita = false;
|
||||
confirm-close-surface = false;
|
||||
|
||||
keybind = [
|
||||
"${prefix}>c=new_tab"
|
||||
"${prefix}>p=move_tab:-1"
|
||||
"${prefix}>n=move_tab:1"
|
||||
|
||||
"${prefix}>\\=new_split:right"
|
||||
"${prefix}>-=new_split:down"
|
||||
"${prefix}>h=goto_split:left"
|
||||
"${prefix}>j=goto_split:bottom"
|
||||
"${prefix}>k=goto_split:top"
|
||||
"${prefix}>l=goto_split:right"
|
||||
"${prefix}>shift+h=resize_split:left,10"
|
||||
"${prefix}>shift+j=resize_split:down,10"
|
||||
"${prefix}>shift+k=resize_split:up,10"
|
||||
"${prefix}>shift+l=resize_split:right,10"
|
||||
"${prefix}>z=toggle_split_zoom"
|
||||
];
|
||||
|
||||
adw-toolbar-style = "flat";
|
||||
gtk-tabs-location = "bottom";
|
||||
gtk-wide-tabs = false;
|
||||
window-decoration = false;
|
||||
|
||||
linux-cgroup = "always";
|
||||
};
|
||||
}
|
||||
|
||||
(optionalAttrs styleCfg.enable {
|
||||
settings.theme = "base16";
|
||||
themes.base16 = mkIf styleCfg.enable (mkGhosttyTheme styleCfg.scheme.palette);
|
||||
})
|
||||
];
|
||||
|
||||
systemd.user.services.ghosttyd = {
|
||||
Unit = {
|
||||
Description = "ghosttyd™";
|
||||
PartOf = "graphical-session.target";
|
||||
After = "graphical-session.target";
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.ghostty}/bin/ghostty --initial-window=false --quit-after-last-window-closed=false";
|
||||
Slice = "background-graphical.slice";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config.theme = "base16";
|
||||
};
|
||||
|
||||
home = {
|
||||
sessionVariables = {
|
||||
MANPAGER = "sh -c 'col -bx | bat --language man' ";
|
||||
MANROFFOPT = "-c";
|
||||
};
|
||||
|
||||
packages = with pkgs.bat-extras; [
|
||||
batman
|
||||
];
|
||||
|
||||
shellAliases.man = "batman";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs = {
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,60 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Anthony Rodriguez";
|
||||
userEmail = "anthony@nezia.dev";
|
||||
signing = {
|
||||
signByDefault = true;
|
||||
key = "EE3BE97C040A86CE";
|
||||
};
|
||||
extraConfig = {
|
||||
push.autoSetupRemote = true;
|
||||
init = {
|
||||
defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
home.shellAliases = {
|
||||
lg = "lazygit";
|
||||
g = "git";
|
||||
gs = "git status";
|
||||
gsh = "git show HEAD";
|
||||
gshs = "DELTA_FEATURES=+side-by-side git show HEAD";
|
||||
ga = "git add";
|
||||
gaa = "git add :/";
|
||||
gap = "git add -p";
|
||||
gc = "git commit";
|
||||
gca = "git commit --amend";
|
||||
gcm = "git commit --message";
|
||||
gcf = "git commit --fixup";
|
||||
gk = "git checkout";
|
||||
gkp = "git checkout -p";
|
||||
gd = "git diff";
|
||||
gds = "DELTA_FEATURES=+side-by-side git diff";
|
||||
gdc = "git diff --cached";
|
||||
gdcs = "DELTA_FEATURES=+side-by-side git diff --cached";
|
||||
gf = "git fetch";
|
||||
gl = "git log";
|
||||
glp = "git log -p";
|
||||
glps = "DELTA_FEATURES=+side-by-side git log -p";
|
||||
gp = "git push";
|
||||
gpf = "git push --force-with-lease";
|
||||
gr = "git reset";
|
||||
gra = "git reset :/";
|
||||
grp = "git reset -p";
|
||||
gt = "git stash";
|
||||
gtp = "git stash pop";
|
||||
gu = "git pull";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.gpg.enable = true;
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableFishIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
home.packages = with pkgs; [
|
||||
# archives
|
||||
zip
|
||||
unzip
|
||||
unrar
|
||||
|
||||
# utils
|
||||
fd
|
||||
file
|
||||
ripgrep
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.nix-index-db.hmModules.nix-index];
|
||||
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs = {
|
||||
nix-index = {
|
||||
enable = true;
|
||||
symlinkToCacheHome = true; # needed for comma
|
||||
};
|
||||
command-not-found.enable = false;
|
||||
nix-index-database.comma.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
programs.yazi = let
|
||||
# https://github.com/iynaix/dotfiles/blob/8bb1568019ea26f034ac1af9c499b3ff102391a5/home-manager/shell/yazi.nix#L9-L11
|
||||
mkYaziPlugin = name: text: {
|
||||
"${name}" = toString (pkgs.writeTextDir "${name}.yazi/init.lua" text) + "/${name}.yazi";
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
plugins = mkYaziPlugin "smart-enter" ''
|
||||
return {
|
||||
entry = function()
|
||||
local h = cx.active.current.hovered
|
||||
ya.manager_emit(h and h.cha.is_dir and "enter" or "open", { hovered = true })
|
||||
end,
|
||||
}
|
||||
'';
|
||||
keymap.manager.prepend_keymap = [
|
||||
{
|
||||
on = "l";
|
||||
run = "plugin --sync smart-enter";
|
||||
desc = "Enter the child directory, or open the file";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
starshipTransient = lib.strings.optionalString config.programs.starship.enableTransience ''
|
||||
function starship_transient_prompt_func
|
||||
starship module character
|
||||
end
|
||||
|
||||
function starship_transient_rprompt_func
|
||||
starship module cmd_duration
|
||||
end
|
||||
'';
|
||||
styleCfg = osConfig.local.style;
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit =
|
||||
starshipTransient
|
||||
+ ''
|
||||
set fish_greeting # Disable greeting
|
||||
fish_vi_key_bindings # Enable Vi mode
|
||||
|
||||
''
|
||||
+ lib.optionalString styleCfg.enable
|
||||
''
|
||||
set fish_cursor_default block blink
|
||||
set fish_cursor_insert line blink
|
||||
set fish_cursor_replace_one underscore blink
|
||||
set fish_cursor_visual block
|
||||
|
||||
set -x fish_color_autosuggestion brblack
|
||||
set -x fish_color_cancel -r
|
||||
set -x fish_color_command brgreen
|
||||
set -x fish_color_comment brmagenta
|
||||
set -x fish_color_cwd green
|
||||
set -x fish_color_cwd_root red
|
||||
set -x fish_color_end brmagenta
|
||||
set -x fish_color_error brred
|
||||
set -x fish_color_escape brcyan
|
||||
set -x fish_color_history_current --bold
|
||||
set -x fish_color_host normal
|
||||
set -x fish_color_host_remote yellow
|
||||
set -x fish_color_match --background=brblue
|
||||
set -x fish_color_normal normal
|
||||
set -x fish_color_operator cyan
|
||||
set -x fish_color_param brblue
|
||||
set -x fish_color_quote yellow
|
||||
set -x fish_color_redirection bryellow
|
||||
set -x fish_color_search_match 'bryellow' '--background=brblack'
|
||||
set -x fish_color_selection 'white' '--bold' '--background=brblack'
|
||||
set -x fish_color_status red
|
||||
set -x fish_color_user brgreen
|
||||
set -x fish_color_valid_path --underline
|
||||
set -x fish_pager_color_completion normal
|
||||
set -x fish_pager_color_description yellow
|
||||
set -x fish_pager_color_prefix 'white' '--bold' '--underline'
|
||||
set -x fish_pager_color_progress 'brwhite' '--background=cyan'
|
||||
'';
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "fzf";
|
||||
inherit (pkgs.fishPlugins.fzf) src;
|
||||
}
|
||||
{
|
||||
name = "autopair";
|
||||
inherit (pkgs.fishPlugins.autopair) src;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||
then
|
||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||
fi
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableTransience = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
|
||||
directory = {
|
||||
style = "bold yellow";
|
||||
};
|
||||
character = {
|
||||
format = "$symbol ";
|
||||
success_symbol = "[➜](bold green)";
|
||||
error_symbol = "[✗](bold red)";
|
||||
vicmd_symbol = "[](bold green)";
|
||||
};
|
||||
cmd_duration = {
|
||||
style = "yellow";
|
||||
format = "[ $duration]($style)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
enableBashIntegration = false;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,184 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
styleCfg = osConfig.local.style;
|
||||
in {
|
||||
imports = [
|
||||
inputs.walker.homeManagerModules.default
|
||||
];
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
programs.walker = {
|
||||
enable = true;
|
||||
runAsService = true;
|
||||
# All options from the config.json can be used here.
|
||||
config = {
|
||||
list = {
|
||||
height = 200;
|
||||
};
|
||||
app_launch_prefix = "uwsm app -- ";
|
||||
websearch.prefix = "?";
|
||||
switcher.prefix = "/";
|
||||
};
|
||||
|
||||
theme = with styleCfg.scheme.palette;
|
||||
lib.mkIf styleCfg.enable {
|
||||
style = ''
|
||||
@define-color foreground ${base05};
|
||||
@define-color background ${base00};
|
||||
@define-color accent ${base0E};
|
||||
|
||||
#window,
|
||||
#box,
|
||||
#aiScroll,
|
||||
#aiList,
|
||||
#search,
|
||||
#password,
|
||||
#input,
|
||||
#prompt,
|
||||
#clear,
|
||||
#typeahead,
|
||||
#list,
|
||||
child,
|
||||
scrollbar,
|
||||
slider,
|
||||
#item,
|
||||
#text,
|
||||
#label,
|
||||
#bar,
|
||||
#sub,
|
||||
#activationlabel {
|
||||
all: unset;
|
||||
}
|
||||
|
||||
#cfgerr {
|
||||
background: rgba(255, 0, 0, 0.4);
|
||||
margin-top: 20px;
|
||||
padding: 8px;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
#window {
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
#box {
|
||||
border-radius: 2px;
|
||||
background: @background;
|
||||
padding: 32px;
|
||||
border: 1px solid ${base01};
|
||||
box-shadow:
|
||||
0 19px 38px rgba(0, 0, 0, 0.3),
|
||||
0 15px 12px rgba(0, 0, 0, 0.22);
|
||||
}
|
||||
|
||||
#search {
|
||||
box-shadow:
|
||||
0 1px 3px rgba(0, 0, 0, 0.1),
|
||||
0 1px 2px rgba(0, 0, 0, 0.22);
|
||||
background: ${base01};
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#prompt {
|
||||
margin-left: 4px;
|
||||
margin-right: 12px;
|
||||
color: @foreground;
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
#clear {
|
||||
color: @foreground;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
#password,
|
||||
#input,
|
||||
#typeahead {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
#input {
|
||||
background: none;
|
||||
}
|
||||
|
||||
#spinner {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#typeahead {
|
||||
color: @foreground;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
#input placeholder {
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
child {
|
||||
padding: 8px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
child:selected,
|
||||
child:hover {
|
||||
background: alpha(@accent, 0.4);
|
||||
}
|
||||
|
||||
#icon {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
#label {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#sub {
|
||||
opacity: 0.5;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.aiItem {
|
||||
padding: 10px;
|
||||
border-radius: 2px;
|
||||
color: @foreground;
|
||||
background: @background;
|
||||
}
|
||||
|
||||
.aiItem.assistant {
|
||||
background: ${base02};
|
||||
}
|
||||
|
||||
.aiItem:hover {
|
||||
background: alpha(@accent, 0.2);
|
||||
color: ${base00};
|
||||
}
|
||||
|
||||
#activationlabel {
|
||||
color: @accent;
|
||||
font-weight: bold;
|
||||
}
|
||||
'';
|
||||
|
||||
layout = {
|
||||
ui.window.box = {
|
||||
v_align = "center";
|
||||
orientation = "vertical";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.walker = {
|
||||
Unit = {
|
||||
PartOf = lib.mkForce [];
|
||||
After = lib.mkForce ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
Slice = lib.mkForce "background-graphical.slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
programs.wlogout = {
|
||||
enable = true;
|
||||
|
||||
layout = let
|
||||
systemd = let
|
||||
systemd = lib.getExe' pkgs.systemd;
|
||||
in {
|
||||
loginctl = systemd "loginctl";
|
||||
systemctl = systemd "systemctl";
|
||||
};
|
||||
in [
|
||||
{
|
||||
action = "${systemd.loginctl} lock-session";
|
||||
keybind = "l";
|
||||
label = "lock";
|
||||
text = "Lock";
|
||||
}
|
||||
|
||||
{
|
||||
action = "${systemd.systemctl} hibernate";
|
||||
keybind = "h";
|
||||
label = "hibernate";
|
||||
text = "Hibernate";
|
||||
}
|
||||
|
||||
{
|
||||
action = "${
|
||||
systemd.loginctl
|
||||
} terminate-user ${
|
||||
config.home.username
|
||||
}";
|
||||
|
||||
keybind = "q";
|
||||
label = "logout";
|
||||
text = "Logout";
|
||||
}
|
||||
|
||||
{
|
||||
action = "${systemd.systemctl} poweroff";
|
||||
keybind = "p";
|
||||
label = "shutdown";
|
||||
text = "Shutdown";
|
||||
}
|
||||
|
||||
{
|
||||
action = "${systemd.systemctl} suspend";
|
||||
keybind = "s";
|
||||
label = "suspend";
|
||||
text = "Suspend";
|
||||
}
|
||||
|
||||
{
|
||||
action = "${systemd.systemctl} reboot";
|
||||
keybind = "r";
|
||||
label = "reboot";
|
||||
text = "Reboot";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,42 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
xdg = {
|
||||
enable = true;
|
||||
cacheHome = config.home.homeDirectory + "/.local/cache";
|
||||
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"default-web-browser" = ["firefox.desktop"];
|
||||
"text/html" = ["firefox.desktop"];
|
||||
"x-scheme-handler/http" = ["firefox.desktop"];
|
||||
"x-scheme-handler/https" = ["firefox.desktop"];
|
||||
"x-scheme-handler/about" = ["firefox.desktop"];
|
||||
"x-scheme-handler/unknown" = ["firefox.desktop"];
|
||||
"x-scheme-handler/chrome" = ["chromium-browser.desktop"];
|
||||
"inode/directory" = ["yazi.desktop"];
|
||||
"application/pdf" = ["org.pwmt.zathura-pdf-mupdf.desktop"];
|
||||
"image/png" = ["org.gnome.gThumb.desktop"];
|
||||
"image/svg" = [" org.gnome.gThumb.desktop"];
|
||||
"image/jpeg" = ["org.gnome.gThumb.desktop"];
|
||||
"image/gif" = [" org.gnome.gThumb.desktop"];
|
||||
"video/mp4" = ["io.github.celluloid_player.Celluloid.desktop"];
|
||||
"video/avi" = ["io.github.celluloid_player.Celluloid.desktop"];
|
||||
"video/mkv" = ["io.github.celluloid_player.Celluloid.desktop"];
|
||||
};
|
||||
};
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./gammastep.nix
|
||||
./gtk.nix
|
||||
./syncthing.nix
|
||||
./swaync
|
||||
./udiskie.nix
|
||||
];
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
tray = true;
|
||||
provider = "geoclue2";
|
||||
};
|
||||
|
||||
systemd.user.services.gammastep = {
|
||||
Unit = {
|
||||
PartOf = lib.mkForce [];
|
||||
After = lib.mkForce ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
Slice = lib.mkForce "background-graphical.slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
styleCfg = osConfig.local.style;
|
||||
in {
|
||||
config = with styleCfg;
|
||||
lib.mkIf styleCfg.enable {
|
||||
gtk = rec {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
inherit (gtk.iconTheme) name package;
|
||||
};
|
||||
theme = {
|
||||
inherit (gtk.theme) name package;
|
||||
};
|
||||
|
||||
gtk3.extraConfig = {
|
||||
gtk-application-prefer-dark-theme = scheme.variant == "dark";
|
||||
};
|
||||
};
|
||||
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-${scheme.variant}";
|
||||
};
|
||||
}
|
|
@ -1,41 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
lib',
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
styleCfg = osConfig.local.style;
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
services.swaync = lib.mkMerge [
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
positionX = "right";
|
||||
positionY = "top";
|
||||
layer = "overlay";
|
||||
control-center-layer = "top";
|
||||
layer-shell = true;
|
||||
cssPriority = "application";
|
||||
control-center-margin-top = 0;
|
||||
control-center-margin-bottom = 0;
|
||||
control-center-margin-right = 0;
|
||||
control-center-margin-left = 0;
|
||||
notification-2fa-action = true;
|
||||
notification-inline-replies = false;
|
||||
notification-icon-size = 64;
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
};
|
||||
}
|
||||
|
||||
(lib.mkIf styleCfg.enable {
|
||||
style =
|
||||
lib'.generateGtkColors lib styleCfg.scheme.palette
|
||||
+ builtins.readFile ./style.css;
|
||||
})
|
||||
];
|
||||
|
||||
systemd.user.services.swaync.Unit.ConditionEnvironment = lib.mkForce "";
|
||||
};
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
osConfig,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
services.udiskie.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
lib' = import ../../../shared/lib inputs.nixpkgs.lib;
|
||||
in {
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
config = lib.mkIf (!config.local.profiles.server.enable) {
|
||||
home-manager = {
|
||||
backupFileExtension = "backup";
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
||||
extraSpecialArgs = {inherit inputs lib';};
|
||||
sharedModules = [../../hm];
|
||||
};
|
||||
|
||||
home-manager.users.${username} = {
|
||||
home = {
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
};
|
||||
|
||||
programs = {
|
||||
# make HM-managed GTK stuff work
|
||||
dconf.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./games.nix
|
||||
./xdg.nix
|
||||
];
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.profiles.gaming.enable {
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
gamemode.enable = true;
|
||||
gamescope.enable = true;
|
||||
|
||||
coolercontrol = {
|
||||
enable = true;
|
||||
nvidiaSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.modules.hyprland.enable {
|
||||
environment.systemPackages = [
|
||||
inputs.hyprland-qtutils.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||
withUWSM = true;
|
||||
systemd.setPath.enable = true;
|
||||
};
|
||||
|
||||
# copied from https://github.com/linyinfeng/dotfiles/blob/91b0363b093303f57885cbae9da7f8a99bbb4432/nixos/profiles/graphical/niri/default.nix#L17-L29
|
||||
security.pam.services.hyprlock.text = lib.mkIf config.services.fprintd.enable ''
|
||||
account required pam_unix.so
|
||||
|
||||
# check passwork before fprintd
|
||||
auth sufficient pam_unix.so try_first_pass likeauth
|
||||
auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
||||
auth required pam_deny.so
|
||||
|
||||
password sufficient pam_unix.so nullok yescrypt
|
||||
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session required pam_unix.so
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
config = {
|
||||
common.default = ["gtk"];
|
||||
hyprland.default = ["gtk" "hyprland"];
|
||||
};
|
||||
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
services = {
|
||||
syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
systemd.services.syncthing.environment.STNODEFAULTFOLDER = "true"; # Don't create default ~/Sync folder
|
||||
};
|
||||
}
|
|
@ -18,6 +18,17 @@ in {
|
|||
description = "your email (used for git commits)";
|
||||
default = null;
|
||||
};
|
||||
signingKey = mkOption {
|
||||
type = str;
|
||||
description = "your ssh public key (used for signing git commits)";
|
||||
};
|
||||
|
||||
userEnvFile = mkOption {
|
||||
type = str;
|
||||
description = "filename where the user environment variables such as EDITOR will be stored, under `$XDG_CONFIG_HOME/environment.d` (needs to be a file name without extension).";
|
||||
default = "99-user-env";
|
||||
example = "99-user-env";
|
||||
};
|
||||
};
|
||||
|
||||
config.assertions = mkIf (!config.local.profiles.server.enable) [
|
||||
|
@ -27,5 +38,11 @@ in {
|
|||
{
|
||||
assertion = options.local.homeVars.email.isDefined;
|
||||
}
|
||||
{
|
||||
assertion = options.local.homeVars.signingKey.isDefined;
|
||||
}
|
||||
{
|
||||
assertion = options.local.homeVars.userEnvFile.isDefined;
|
||||
}
|
||||
];
|
||||
}
|
||||
|
|
38
modules/programs/anyrun/config.ron
Normal file
38
modules/programs/anyrun/config.ron
Normal file
|
@ -0,0 +1,38 @@
|
|||
Config(
|
||||
// Position/size fields use an enum for the value, it can be either:
|
||||
// Absolute(n): The absolute value in pixels
|
||||
// Fraction(n): A fraction of the width or height of the full screen (depends on exclusive zones and the settings related to them) window respectively
|
||||
|
||||
// The horizontal position, adjusted so that Relative(0.5) always centers the runner
|
||||
x: Fraction(0.5),
|
||||
|
||||
// The vertical position, works the same as `x`
|
||||
y: Absolute(0),
|
||||
|
||||
// The width of the runner
|
||||
width: Absolute(800),
|
||||
|
||||
// The minimum height of the runner, the runner will expand to fit all the entries
|
||||
height: Absolute(0),
|
||||
|
||||
// Hide match and plugin info icons
|
||||
hide_icons: false,
|
||||
|
||||
// ignore exclusive zones, f.e. Waybar
|
||||
ignore_exclusive_zones: false,
|
||||
|
||||
// Layer shell layer: Background, Bottom, Top, Overlay
|
||||
layer: Overlay,
|
||||
|
||||
// Hide the plugin info panel
|
||||
hide_plugin_info: false,
|
||||
|
||||
// Close window when a click outside the main box is received
|
||||
close_on_click: false,
|
||||
|
||||
// Show search results immediately when Anyrun starts
|
||||
show_results_immediately: true,
|
||||
|
||||
// Limit amount of entries shown in total
|
||||
max_entries: None,
|
||||
)
|
36
modules/programs/anyrun/default.nix
Normal file
36
modules/programs/anyrun/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.local.systemVars) username;
|
||||
in {
|
||||
config = mkIf config.local.modules.hyprland.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [inputs.anyrun.packages.${pkgs.system}.anyrun-with-all-plugins];
|
||||
files = {
|
||||
".config/anyrun/config.ron".source = ./config.ron;
|
||||
".config/anyrun/applications.ron".text = ''
|
||||
Config(
|
||||
// Also show the Desktop Actions defined in the desktop files, e.g. "New Window" from LibreWolf
|
||||
desktop_actions: true,
|
||||
max_entries: 5,
|
||||
// The terminal used for running terminal based desktop entries, if left as `None` a static list of terminals is used
|
||||
// to determine what terminal to use.
|
||||
terminal: Some(Terminal(
|
||||
// The main terminal command
|
||||
command: "foot",
|
||||
// What arguments should be passed to the terminal process to run the command correctly
|
||||
// {} is replaced with the command in the desktop entry
|
||||
args: "uwsm app -- {}",
|
||||
)),
|
||||
)
|
||||
'';
|
||||
".config/anyrun/style.css".source = ./style.css;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
25
modules/programs/anyrun/style.css
Normal file
25
modules/programs/anyrun/style.css
Normal file
|
@ -0,0 +1,25 @@
|
|||
#window {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
box#main {
|
||||
border-radius: 10px;
|
||||
background-color: @theme_bg_color;
|
||||
}
|
||||
|
||||
list#main {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
list#plugin {
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
label#match-desc {
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
label#plugin {
|
||||
font-size: 14px;
|
||||
}
|
|
@ -1,15 +1,14 @@
|
|||
{
|
||||
imports = [
|
||||
./browsers
|
||||
./anyrun
|
||||
./editors
|
||||
./hypr
|
||||
./media
|
||||
./terminal
|
||||
|
||||
./anyrun.nix
|
||||
./discord.nix
|
||||
./firefox.nix
|
||||
./games.nix
|
||||
./gnome.nix
|
||||
./misc.nix
|
||||
./waybar.nix
|
||||
./wlogout.nix
|
118
modules/programs/discord.nix
Normal file
118
modules/programs/discord.nix
Normal file
|
@ -0,0 +1,118 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.local.systemVars) username;
|
||||
styleCfg = config.local.style;
|
||||
in {
|
||||
config = mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [pkgs.vesktop];
|
||||
files.".config/vesktop/themes/midnight-base16.css".text = with styleCfg.scheme.palette;
|
||||
mkIf styleCfg.enable ''
|
||||
/**
|
||||
* @name Midnight-base16
|
||||
* @description A dark, rounded discord theme. Updated to use base16 colors.
|
||||
* @author refact0r
|
||||
* @version 1.6.2
|
||||
* @invite nz87hXyvcy
|
||||
* @website https://github.com/refact0r/midnight-discord
|
||||
* @source https://github.com/refact0r/midnight-discord/blob/master/midnight.theme.css
|
||||
* @authorId 508863359777505290
|
||||
* @authorLink https://www.refact0r.dev
|
||||
*/
|
||||
|
||||
/* IMPORTANT: make sure to enable dark mode in discord settings for the theme to apply properly!!! */
|
||||
|
||||
@import url('https://refact0r.github.io/midnight-discord/midnight.css');
|
||||
|
||||
/* customize things here */
|
||||
:root {
|
||||
/* font, change to 'gg sans' for default discord font*/
|
||||
--font: 'gg sans';
|
||||
|
||||
/* top left corner text */
|
||||
--corner-text: '${styleCfg.scheme.name}';
|
||||
|
||||
/* color of status indicators and window controls */
|
||||
--online-indicator: ${base0B}; /* change to #23a55a for default green */
|
||||
--dnd-indicator: ${base08}; /* change to #f13f43 for default red */
|
||||
--idle-indicator: ${base0A}; /* change to #f0b232 for default yellow */
|
||||
--streaming-indicator: ${base0E}; /* change to #593695 for default purple */
|
||||
|
||||
/* accent colors */
|
||||
--accent-1: ${base0D}; /* links */
|
||||
--accent-2: ${base0E}; /* general unread/mention elements, some icons when active */
|
||||
--accent-3: ${base0E}; /* accent buttons */
|
||||
--accent-4: ${base03}; /* accent buttons when hovered */
|
||||
--accent-5: ${base07}; /* accent buttons when clicked */
|
||||
--mention: ${base00}1a; /* mentions & mention messages */
|
||||
--mention-hover: ${base00}0d; /* mentions & mention messages when hovered */
|
||||
|
||||
/* text colors */
|
||||
--text-0: var(--bg-4); /* text on colored elements */
|
||||
--text-1: ${base06}; /* other normally white text */
|
||||
--text-2: ${base06}; /* headings and important text */
|
||||
--text-3: ${base05}; /* normal text */
|
||||
--text-4: ${base05}; /* icon buttons and channels */
|
||||
--text-5: ${base04}; /* muted channels/chats and timestamps */
|
||||
|
||||
/* background and dark colors */
|
||||
--bg-1: ${base0E}; /* dark buttons when clicked */
|
||||
--bg-2: ${base02}; /* dark buttons */
|
||||
--bg-3: ${base01}; /* spacing, secondary elements */
|
||||
--bg-4: ${base00}; /* main background color */
|
||||
--hover: ${base03}1a; /* channels and buttons when hovered */
|
||||
--active: ${base03}33; /* channels and buttons when clicked or selected */
|
||||
--message-hover: #0000001a; /* messages when hovered */
|
||||
|
||||
/* amount of spacing and padding */
|
||||
--spacing: 12px;
|
||||
|
||||
/* animations */
|
||||
/* ALL ANIMATIONS CAN BE DISABLED WITH REDUCED MOTION IN DISCORD SETTINGS */
|
||||
--list-item-transition: 0.2s ease; /* channels/members/settings hover transition */
|
||||
--unread-bar-transition: 0.2s ease; /* unread bar moving into view transition */
|
||||
--moon-spin-transition: 0.4s ease; /* moon icon spin */
|
||||
--icon-spin-transition: 1s ease; /* round icon button spin (settings, emoji, etc.) */
|
||||
|
||||
/* corner roundness (border-radius) */
|
||||
--roundness-xl: 22px; /* roundness of big panel outer corners */
|
||||
--roundness-l: 20px; /* popout panels */
|
||||
--roundness-m: 16px; /* smaller panels, images, embeds */
|
||||
--roundness-s: 12px; /* members, settings inputs */
|
||||
--roundness-xs: 10px; /* channels, buttons */
|
||||
--roundness-xxs: 8px; /* searchbar, small elements */
|
||||
|
||||
/* direct messages moon icon */
|
||||
/* change to block to show, none to hide */
|
||||
--discord-icon: none; /* discord icon */
|
||||
--moon-icon: block; /* moon icon */
|
||||
--moon-icon-url: url('https://upload.wikimedia.org/wikipedia/commons/c/c4/Font_Awesome_5_solid_moon.svg'); /* custom icon url */
|
||||
--moon-icon-size: auto;
|
||||
|
||||
/* filter uncolorable elements to fit theme */
|
||||
/* (just set to none, they're too much work to configure) */
|
||||
--login-bg-filter: saturate(0.3) hue-rotate(-15deg) brightness(0.4); /* login background artwork */
|
||||
--green-to-accent-3-filter: hue-rotate(56deg) saturate(1.43); /* add friend page explore icon */
|
||||
--blurple-to-accent-3-filter: hue-rotate(304deg) saturate(0.84) brightness(1.2); /* add friend page school icon */
|
||||
}
|
||||
|
||||
/* Selected chat/friend text */
|
||||
.selected_f5eb4b,
|
||||
.selected_f6f816 .link_d8bfb3 {
|
||||
color: var(--text-0) !important;
|
||||
background: var(--accent-3) !important;
|
||||
}
|
||||
|
||||
.selected_f6f816 .link_d8bfb3 * {
|
||||
color: var(--text-0) !important;
|
||||
fill: var(--text-0) !important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
23
modules/programs/editors/default.nix
Normal file
23
modules/programs/editors/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.local.systemVars) username;
|
||||
inherit (config.local.homeVars) userEnvFile;
|
||||
in {
|
||||
imports = [
|
||||
./neovim.nix
|
||||
];
|
||||
|
||||
config = mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
files = {
|
||||
".config/environment.d/${userEnvFile}.conf".text = ''
|
||||
EDITOR="nvim";
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,17 +2,16 @@
|
|||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
styleCfg = osConfig.local.style;
|
||||
in {
|
||||
imports = [inputs.nvf.homeManagerModules.default];
|
||||
inherit (config.local.systemVars) username;
|
||||
styleCfg = config.local.style;
|
||||
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings.vim = lib.mkMerge [
|
||||
customNeovim = inputs.nvf.lib.neovimConfiguration {
|
||||
inherit pkgs;
|
||||
modules = lib.singleton {
|
||||
config.vim = lib.mkMerge [
|
||||
{
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
@ -229,27 +228,11 @@ in {
|
|||
})
|
||||
];
|
||||
};
|
||||
|
||||
programs.neovide = {
|
||||
enable = true;
|
||||
settings = {
|
||||
fork = false;
|
||||
frame = "full";
|
||||
idle = true;
|
||||
maximized = false;
|
||||
no-multigrid = false;
|
||||
srgb = false;
|
||||
tabs = true;
|
||||
theme = "auto";
|
||||
title-hidden = true;
|
||||
vsync = true;
|
||||
wsl = false;
|
||||
|
||||
font = {
|
||||
normal = [];
|
||||
size = 14.0;
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [customNeovim.neovim];
|
||||
};
|
||||
};
|
||||
}
|
170
modules/programs/firefox.nix
Normal file
170
modules/programs/firefox.nix
Normal file
|
@ -0,0 +1,170 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
toINI = lib.generators.toINI {};
|
||||
|
||||
betterfox = pkgs.fetchFromGitHub {
|
||||
owner = "yokoffing";
|
||||
repo = "betterfox";
|
||||
rev = "e026ed7d3a763c5d3f96c2680d7bc3340831af4f";
|
||||
hash = "sha256-hpkEO5BhMVtINQG8HN4xqfas/R6q5pYPZiFK8bilIDs=";
|
||||
};
|
||||
|
||||
firefox = pkgs.wrapFirefox pkgs.firefox-esr-128-unwrapped {
|
||||
extraPolicies = {
|
||||
SearchEngines.Default = "SearxNG";
|
||||
SearchEngines.Add = [
|
||||
{
|
||||
Name = "SearxNG";
|
||||
URLTemplate = "https://search.nezia.dev/search?q={searchTerms}";
|
||||
Method = "GET";
|
||||
SuggestURLTemplate = "https://search.nezia.dev/autocompleter?q={searchTerms}";
|
||||
}
|
||||
{
|
||||
Name = "Nix Packages";
|
||||
Alias = "@np";
|
||||
URLTemplate = "https://search.nixos.org/packages?channel=unstable&query={searchTerms}";
|
||||
Method = "GET";
|
||||
}
|
||||
{
|
||||
Name = "Nix Options";
|
||||
Alias = "@no";
|
||||
URLTemplate = "https://search.nixos.org/options?channel=unstable&query={searchTerms}";
|
||||
Method = "GET";
|
||||
}
|
||||
{
|
||||
Name = "NixOS Wiki";
|
||||
Alias = "@nw";
|
||||
URLTemplate = "https://wiki.nixos.org/w/index.php?search={searchTerms}";
|
||||
Method = "GET";
|
||||
}
|
||||
{
|
||||
Name = "Home Manager Options";
|
||||
Alias = "@hmo";
|
||||
URLTemplate = "https://home-manager-options.extranix.com/?query={searchTerms}&release=master";
|
||||
Method = "GET";
|
||||
}
|
||||
{
|
||||
Name = "ProtonDB";
|
||||
Alias = "@pdb";
|
||||
URLTemplate = "https://www.protondb.com/search?q={searchTerms}";
|
||||
Method = "GET";
|
||||
}
|
||||
{
|
||||
Name = "Noogle";
|
||||
Alias = "@ng";
|
||||
URLTemplate = "https://noogle.dev/q?term={searchTerms}";
|
||||
}
|
||||
{
|
||||
Name = "GitHub Nix";
|
||||
Alias = "@ghn";
|
||||
URLTemplate = "https://github.com/search?q=language:nix NOT is:fork {searchTerms}&type=code";
|
||||
}
|
||||
];
|
||||
DisableTelemetry = true;
|
||||
DisablePocket = true;
|
||||
DisableFeedbackCommands = true;
|
||||
DisableFirefoxStudies = true;
|
||||
OfferToSaveLogins = false;
|
||||
OffertosaveloginsDefault = false;
|
||||
PasswordManagerEnabled = false;
|
||||
SearchSuggestEnabled = true;
|
||||
|
||||
# https://github.com/Sly-Harvey/NixOS/blob/f9da2691ea46565256ad757959cfc26ec6cee10d/modules/programs/browser/firefox/default.nix#L58-L163
|
||||
"3rdparty".Extensions = {
|
||||
"addon@darkreader.org" = {
|
||||
permissions = ["internal:privateBrowsingAllowed"];
|
||||
enabled = true;
|
||||
automation = {
|
||||
enabled = true;
|
||||
behavior = "OnOff";
|
||||
mode = "system";
|
||||
};
|
||||
detectDarkTheme = true;
|
||||
enabledByDefault = true;
|
||||
changeBrowserTheme = false;
|
||||
enableForProtectedPages = true;
|
||||
fetchNews = false;
|
||||
previewNewDesign = true;
|
||||
};
|
||||
"uBlock0@raymondhill.net" = {
|
||||
permissions = ["internal:privateBrowsingAllowed"];
|
||||
advancedSettings = [
|
||||
[
|
||||
"userResourcesLocation"
|
||||
"https://raw.githubusercontent.com/pixeltris/TwitchAdSolutions/master/video-swap-new/video-swap-new-ublock-origin.js"
|
||||
]
|
||||
];
|
||||
adminSettings = {
|
||||
userSettings = {
|
||||
uiTheme = "dark";
|
||||
advancedUserEnabled = true;
|
||||
userFiltersTrusted = true;
|
||||
importedLists = [
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
];
|
||||
selectedFilterLists = [
|
||||
"FRA-0"
|
||||
"adguard-cookies"
|
||||
"adguard-mobile-app-banners"
|
||||
"adguard-other-annoyances"
|
||||
"adguard-popup-overlays"
|
||||
"adguard-social"
|
||||
"adguard-spyware-url"
|
||||
"adguard-widgets"
|
||||
"easylist"
|
||||
"easylist-annoyances"
|
||||
"easylist-chat"
|
||||
"easylist-newsletters"
|
||||
"easylist-notifications"
|
||||
"easyprivacy"
|
||||
"fanboy-cookiemonster"
|
||||
"https://filters.adtidy.org/extension/ublock/filters/3.txt"
|
||||
"https://github.com/DandelionSprout/adfilt/raw/master/LegitimateURLShortener.txt"
|
||||
"plowe-0"
|
||||
"ublock-annoyances"
|
||||
"ublock-badware"
|
||||
"ublock-cookies-adguard"
|
||||
"ublock-cookies-easylist"
|
||||
"ublock-filters"
|
||||
"ublock-privacy"
|
||||
"ublock-quick-fixes"
|
||||
"ublock-unbreak"
|
||||
"urlhaus-1"
|
||||
"https://raw.githubusercontent.com/laylavish/uBlockOrigin-HUGE-AI-Blocklist/main/list.txt"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [firefox];
|
||||
files = {
|
||||
".mozilla/firefox/profiles.ini".text = toINI {
|
||||
Profile0 = {
|
||||
# creates lunarnova profile and sets it as default
|
||||
Name = "${username}";
|
||||
IsRelative = 1;
|
||||
Path = "${username}";
|
||||
Default = 1;
|
||||
};
|
||||
};
|
||||
".mozilla/firefox/${username}/user.js".text = builtins.concatStringsSep "\n" [
|
||||
(builtins.readFile "${betterfox}/user.js")
|
||||
(builtins.readFile "${betterfox}/Securefox.js")
|
||||
(builtins.readFile "${betterfox}/Fastfox.js")
|
||||
(builtins.readFile "${betterfox}/Peskyfox.js")
|
||||
(builtins.readFile "${betterfox}/Smoothfox.js")
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
36
modules/programs/games.nix
Normal file
36
modules/programs/games.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.local.systemVars) username;
|
||||
in {
|
||||
config = mkIf config.local.profiles.gaming.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [
|
||||
pkgs.mangohud
|
||||
pkgs.bolt-launcher
|
||||
pkgs.ankama-launcher
|
||||
pkgs.lutris
|
||||
pkgs.qbittorrent
|
||||
pkgs.protonplus
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
gamemode.enable = true;
|
||||
gamescope.enable = true;
|
||||
|
||||
coolercontrol = {
|
||||
enable = true;
|
||||
nvidiaSupport = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
_: {
|
||||
{
|
||||
imports = [
|
||||
./land
|
||||
|
||||
./idle.nix
|
||||
./lock.nix
|
||||
./paper.nix
|
62
modules/programs/hypr/idle.nix
Normal file
62
modules/programs/hypr/idle.nix
Normal file
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
lib,
|
||||
lib',
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib'.generators) toHyprConf;
|
||||
inherit (config.local.systemVars) username;
|
||||
inherit (inputs.hypridle.packages.${pkgs.system}) hypridle;
|
||||
|
||||
hyprlock = "${inputs.hyprlock.packages.${pkgs.system}.hyprlock}/bin/hyprlock";
|
||||
in {
|
||||
config = lib.mkIf config.local.modules.hyprland.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [hypridle];
|
||||
files = {
|
||||
".config/hypr/hypridle.conf".text = toHyprConf {
|
||||
attrs = {
|
||||
general = {
|
||||
lock_cmd = "pidof ${hyprlock} || ${hyprlock}";
|
||||
unlock_cmd = "pkill --signal SIGUSR1 ${hyprlock}";
|
||||
before_sleep_cmd = "loginctl lock-session";
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 300; # 5m
|
||||
on-timeout = "loginctl lock-session";
|
||||
}
|
||||
{
|
||||
timeout = 330; # 5.5m
|
||||
on-timeout = "hyprctl dipsatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = 600; # 10m
|
||||
on-timeout = "systemctl suspend";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
# needed when using uwsm as the session manager
|
||||
systemd.user.services.hypridle = {
|
||||
name = "hypridle";
|
||||
after = ["graphical-session.target"];
|
||||
description = "Hyprland's Idle Daemon";
|
||||
wantedBy = ["graphical-session.target"];
|
||||
restartTriggers = ["${config.hjem.users.${username}.files.".config/hypr/hypridle.conf".text}"];
|
||||
serviceConfig = {
|
||||
Type = "exec";
|
||||
ExecStart = "${hypridle}/bin/hypridle";
|
||||
Restart = "on-failure";
|
||||
Slice = "background-graphical.slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
77
modules/programs/hypr/land/binds.nix
Normal file
77
modules/programs/hypr/land/binds.nix
Normal file
|
@ -0,0 +1,77 @@
|
|||
lib: let
|
||||
# thanks https://github.com/fufexan/dotfiles/blob/c0b3c77d95ce1f574a87e7f7ead672ca0d951245/home/programs/wayland/hyprland/binds.nix#L16-L20
|
||||
toggle = program: uwsm: let
|
||||
prog = builtins.substring 0 14 program;
|
||||
in "pkill ${prog} || ${lib.optionalString uwsm "uwsm app -- "} ${program}";
|
||||
runOnce = program: "pgrep ${program} || uwsm app -- ${program}";
|
||||
run = program: "uwsm app -- ${program}";
|
||||
in {
|
||||
"$mod" = "SUPER";
|
||||
bindr = [
|
||||
"$mod, SUPER_L, exec, ${toggle "anyrun" false}"
|
||||
];
|
||||
bind = [
|
||||
"$mod, Return, exec, ${run "ghostty"}"
|
||||
"$mod, n, exec, ${run "neovide"}"
|
||||
"$mod, w, exec, ${run "firefox"}"
|
||||
", Print, exec, ${runOnce "grimblast"} --notify --cursor copysave output"
|
||||
"$mod, q, killactive"
|
||||
"$mod SHIFT, q, exec, loginctl terminate-user ''"
|
||||
"$mod, period, exec, ${toggle "walker -m emojis" false}" # not using uwsm as it already runs as a service
|
||||
"CTRL, Print, exec, ${runOnce "grimblast"} --notify --cursor --freeze copysave area"
|
||||
|
||||
"$mod, h, movefocus, l"
|
||||
"$mod, j, movefocus, d"
|
||||
"$mod, k, movefocus, u"
|
||||
"$mod, l, movefocus, r"
|
||||
|
||||
"$mod SHIFT, h, movewindow, l"
|
||||
"$mod SHIFT, j, movewindow, d"
|
||||
"$mod SHIFT, k, movewindow, u"
|
||||
"$mod SHIFT, l, movewindow, r"
|
||||
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
"$mod, 4, workspace, 4"
|
||||
"$mod, 5, workspace, 5"
|
||||
"$mod, 6, workspace, 6"
|
||||
"$mod, 7, workspace, 7"
|
||||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
|
||||
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
||||
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
||||
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
||||
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
||||
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
||||
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
||||
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
||||
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
||||
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
||||
"$mod SHIFT, 0, movetoworkspacesilent, 10"
|
||||
|
||||
"$mod, t, togglefloating"
|
||||
", F11, fullscreen, 0"
|
||||
"$mod, f, fullscreen, 1"
|
||||
|
||||
"$mod, e, togglespecialworkspace, file_manager_tui"
|
||||
"$mod SHIFT, e, togglespecialworkspace, file_manager_gui"
|
||||
|
||||
", XF86PowerOff, exec, ${toggle "wlogout" true}"
|
||||
];
|
||||
|
||||
bindel = [
|
||||
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
|
||||
", XF86MonBrightnessUp, exec, brillo -q -u 300000 -A 5"
|
||||
", XF86MonBrightnessDown, exec, brillo -q -u 300000 -U 5"
|
||||
", XF86AudioMedia, exec, XDG_CURRENT_DESKTOP=gnome gnome-control-center"
|
||||
];
|
||||
binde = [
|
||||
"$mod Alt, l, exec, loginctl lock-session"
|
||||
];
|
||||
}
|
167
modules/programs/hypr/land/default.nix
Normal file
167
modules/programs/hypr/land/default.nix
Normal file
|
@ -0,0 +1,167 @@
|
|||
{
|
||||
lib,
|
||||
lib',
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) toString;
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib'.generators) toHyprConf;
|
||||
inherit (config.local.systemVars) username;
|
||||
|
||||
styleCfg = config.local.style;
|
||||
gnomeControlCenter = pkgs.gnome-control-center.overrideAttrs (old: {
|
||||
postInstall =
|
||||
old.postInstall
|
||||
+ ''
|
||||
dir=$out/share/applications
|
||||
for panel in $dir/*
|
||||
do
|
||||
[ "$panel" = "$dir/gnome-network-panel.desktop" ] && continue
|
||||
[ "$panel" = "$dir/gnome-bluetooth-panel.desktop" ] && continue
|
||||
[ "$panel" = "$dir/gnome-wifi-panel.desktop" ] && continue
|
||||
[ "$panel" = "$dir/gnome-wwan-panel.desktop" ] && continue
|
||||
[ "$panel" = "$dir/gnome-sharing-panel.desktop" ] && continue
|
||||
[ "$panel" = "$dir/gnome-wacom-panel.desktop" ] && continue
|
||||
rm "$panel"
|
||||
done
|
||||
'';
|
||||
});
|
||||
in {
|
||||
config = mkIf config.local.modules.hyprland.enable {
|
||||
environment.systemPackages = [
|
||||
inputs.hyprland-qtutils.packages.${pkgs.system}.default
|
||||
];
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||
withUWSM = true;
|
||||
systemd.setPath.enable = true;
|
||||
};
|
||||
|
||||
# copied from https://github.com/linyinfeng/dotfiles/blob/91b0363b093303f57885cbae9da7f8a99bbb4432/nixos/profiles/graphical/niri/default.nix#L17-L29
|
||||
security.pam.services.hyprlock.text = mkIf config.services.fprintd.enable ''
|
||||
account required pam_unix.so
|
||||
|
||||
# check passwork before fprintd
|
||||
auth sufficient pam_unix.so try_first_pass likeauth
|
||||
auth sufficient ${pkgs.fprintd}/lib/security/pam_fprintd.so
|
||||
auth required pam_deny.so
|
||||
|
||||
password sufficient pam_unix.so nullok yescrypt
|
||||
|
||||
session required pam_env.so conffile=/etc/pam/environment readenv=0
|
||||
session required pam_unix.so
|
||||
'';
|
||||
|
||||
hjem.users.${username} = {
|
||||
packages = [
|
||||
inputs.hyprwm-contrib.packages.${pkgs.system}.grimblast
|
||||
gnomeControlCenter
|
||||
];
|
||||
files.".config/hypr/hyprland.conf".text = toHyprConf {
|
||||
attrs =
|
||||
{
|
||||
xwayland = {
|
||||
force_zero_scaling = true;
|
||||
};
|
||||
|
||||
env = [
|
||||
"GDK_SCALE,1"
|
||||
];
|
||||
|
||||
cursor = {
|
||||
no_hardware_cursors = 1;
|
||||
};
|
||||
|
||||
monitor = [
|
||||
"eDP-1, preferred, auto, 1.33"
|
||||
];
|
||||
workspace = [
|
||||
"special:terminal, on-created-empty:foot"
|
||||
"special:mixer_gui, on-created-empty:pavucontrol"
|
||||
"special:file_manager_gui, on-created-empty:nautilus"
|
||||
"special:file_manager_tui, on-created-empty:foot -- yazi"
|
||||
];
|
||||
|
||||
windowrulev2 = [
|
||||
# fixes fullscreen windows (mostly games)
|
||||
"stayfocused, initialtitle:^()$, initialclass:^(steam)$"
|
||||
"minsize 1 1, initialtitle:^()$, initialclass:^(steam)$"
|
||||
"maximize, initialtitle:^(\S+)$, initialclass:^(steamwebhelper)$"
|
||||
|
||||
"immediate, initialclass:^(steam_app_)(.*)$"
|
||||
"fullscreen, initialclass:^(steam_app_)(.*)$"
|
||||
|
||||
# inhibit idle on every fullscreen app except games
|
||||
"idleinhibit always, fullscreen:1,!initialclass:^(steam_app_)(.*)$"
|
||||
];
|
||||
|
||||
render = {
|
||||
explicit_sync = 1;
|
||||
explicit_sync_kms = 1;
|
||||
expand_undersized_textures = false;
|
||||
};
|
||||
|
||||
bezier = "overshot, 0.05, 0.9, 0.1, 1.1";
|
||||
|
||||
animations = {
|
||||
enabled = true;
|
||||
animation = [
|
||||
"windows, 1, 5, overshot"
|
||||
"windowsOut, 1, 5, default, popin 80%"
|
||||
"windowsMove, 1, 5, default, popin 80%"
|
||||
"fade, 1, 5, default"
|
||||
"border, 1, 5, default"
|
||||
"borderangle, 0, 8, default"
|
||||
"workspaces, 0"
|
||||
"specialWorkspace, 0"
|
||||
];
|
||||
};
|
||||
|
||||
input = {
|
||||
kb_options = "compose:ralt";
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
scroll_factor = 0.8;
|
||||
tap-to-click = true;
|
||||
clickfinger_behavior = true;
|
||||
};
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
workspace_swipe_direction_lock = false;
|
||||
workspace_swipe_cancel_ratio = 0.15;
|
||||
};
|
||||
|
||||
misc = {
|
||||
force_default_wallpaper = 0;
|
||||
disable_hyprland_logo = true;
|
||||
middle_click_paste = false;
|
||||
};
|
||||
}
|
||||
// lib.optionalAttrs styleCfg.enable {
|
||||
env = [
|
||||
"HYPRCURSOR_THEME,${styleCfg.cursorTheme.name}"
|
||||
"HYPRCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
|
||||
"XCURSOR_SIZE,${toString styleCfg.cursorTheme.size}"
|
||||
];
|
||||
general = {
|
||||
border_size = 4;
|
||||
"col.active_border" = "rgb(${lib.removePrefix "#" styleCfg.scheme.palette.base0E})";
|
||||
};
|
||||
decoration = {
|
||||
rounding = 10;
|
||||
blur.enabled = true;
|
||||
};
|
||||
}
|
||||
// import ./binds.nix lib;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
119
modules/programs/hypr/lock.nix
Normal file
119
modules/programs/hypr/lock.nix
Normal file
|
@ -0,0 +1,119 @@
|
|||
{
|
||||
lib,
|
||||
lib',
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib'.generators) toHyprConf;
|
||||
inherit (config.local.systemVars) username;
|
||||
inherit (inputs.hyprlock.packages.${pkgs.system}) hyprlock;
|
||||
|
||||
styleCfg = config.local.style;
|
||||
rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) styleCfg.scheme.palette;
|
||||
in {
|
||||
config = mkIf config.local.modules.hyprland.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [hyprlock];
|
||||
files = {
|
||||
".config/hypr/hyprlock.conf".text = toHyprConf {
|
||||
attrs =
|
||||
{
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
};
|
||||
}
|
||||
// (with rgbaPalette;
|
||||
lib.optionalAttrs styleCfg.enable {
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = "Layout: $LAYOUT";
|
||||
font_size = 25;
|
||||
color = base05;
|
||||
|
||||
position = "30, -30";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "$TIME";
|
||||
font_size = 90;
|
||||
color = base05;
|
||||
|
||||
position = "-30, 0";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
|
||||
font_size = 25;
|
||||
color = base05;
|
||||
|
||||
position = "-30, -150";
|
||||
halign = "right";
|
||||
valign = "top";
|
||||
}
|
||||
];
|
||||
|
||||
image = {
|
||||
monitor = "";
|
||||
path = "${styleCfg.avatar}"; # Replace with your avatar path
|
||||
size = 100;
|
||||
border_color = base0D;
|
||||
|
||||
position = "0, 75";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
input-field = [
|
||||
{
|
||||
monitor = "";
|
||||
|
||||
size = "300, 60";
|
||||
outline_thickness = 4;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = true;
|
||||
|
||||
outer_color = base0D;
|
||||
inner_color = base02;
|
||||
font_color = base05;
|
||||
|
||||
fade_on_empty = false;
|
||||
|
||||
# the span elements still use #RRGGBB, so we use scheme directly
|
||||
placeholder_text = "<span foreground=\"#${styleCfg.scheme.palette.base05}\"><i> Logged in as </i><span foreground=\"#${styleCfg.scheme.palette.base0D}\">$USER</span></span>";
|
||||
|
||||
hide_input = false;
|
||||
check_color = base0D;
|
||||
fail_color = base08;
|
||||
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
capslock_color = base0E;
|
||||
|
||||
position = "0, -47";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
}
|
||||
];
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
42
modules/programs/hypr/paper.nix
Normal file
42
modules/programs/hypr/paper.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
lib,
|
||||
lib',
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib'.generators) toHyprConf;
|
||||
inherit (config.local.systemVars) username;
|
||||
inherit (config.local.style) wallpaper;
|
||||
inherit (inputs.hyprpaper.packages.${pkgs.system}) hyprpaper;
|
||||
in {
|
||||
config = lib.mkIf config.local.modules.hyprland.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [hyprpaper];
|
||||
files = {
|
||||
".config/hypr/hyprpaper.conf".text = toHyprConf {
|
||||
attrs = {
|
||||
preload = ["${wallpaper}"];
|
||||
wallpaper = [", ${wallpaper}"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.hyprpaper = {
|
||||
name = "hyprpaper";
|
||||
after = ["graphical-session.target"];
|
||||
description = "Fast, IPC-controlled wallpaper utility for Hyprland.";
|
||||
documentation = ["https://wiki.hyprland.org/Hypr-Ecosystem/hyprpaper/"];
|
||||
wantedBy = ["graphical-session.target"];
|
||||
restartTriggers = ["${config.hjem.users.${username}.files.".config/hypr/hyprpaper.conf".text}"];
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${hyprpaper}/bin/hyprpaper";
|
||||
Restart = "on-failure";
|
||||
Slice = "background-graphical.slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,17 +1,18 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
in {
|
||||
imports = [
|
||||
./tidal-hifi.nix
|
||||
./zathura.nix
|
||||
];
|
||||
|
||||
config = lib.mkIf osConfig.local.profiles.desktop.enable {
|
||||
programs.mpv.enable = true;
|
||||
home.packages = [
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username}.packages = [
|
||||
pkgs.gnome-calculator
|
||||
pkgs.gthumb
|
||||
pkgs.spotify
|
201
modules/programs/media/tidal-hifi.nix
Normal file
201
modules/programs/media/tidal-hifi.nix
Normal file
|
@ -0,0 +1,201 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
styleCfg = config.local.style;
|
||||
in {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [pkgs.tidal-hifi];
|
||||
files = {
|
||||
# based on https://github.com/rose-pine/tidal. adapted to work with base16 colors.
|
||||
"tidal-hifi/themes/base16.css".text = with styleCfg.scheme.palette;
|
||||
lib.mkIf styleCfg.enable ''
|
||||
:root {
|
||||
--glass-white-1: ${base05};
|
||||
--glass-white-1-hover: ${base06};
|
||||
--glass-white-2: ${base07};
|
||||
--glass-white-2-hover: ${base08};
|
||||
--glass-white-3: ${base07};
|
||||
--glass-white-4: ${base04};
|
||||
--glass-white-5: ${base04};
|
||||
--glass-white-6: ${base05};
|
||||
--snow-white: ${base07};
|
||||
--snow-white-hover: ${base08};
|
||||
--gray-4: ${base00};
|
||||
--gray-5: ${base02};
|
||||
--gray-6: ${base03};
|
||||
--gray-7: ${base04};
|
||||
--cyan-blue: ${base0D};
|
||||
--cyan-blue-hover: ${base0C};
|
||||
--glass-cyan-1: ${base04};
|
||||
--glass-cyan-2: ${base05};
|
||||
--glass-cyan-3: ${base06};
|
||||
--master-gold: ${base0E};
|
||||
--master-gold-hover: ${base08};
|
||||
--glass-master-gold: ${base05};
|
||||
--glass-master-gold-2: ${base06};
|
||||
--raspberry-pink: ${base08};
|
||||
--raspberry-pink-lighter: ${base09};
|
||||
--black: ${base00};
|
||||
--midnight-black: ${base00};
|
||||
--controls-overlay: ${base03};
|
||||
--duration-overlay: ${base02};
|
||||
--background-dark: ${base00};
|
||||
--hoverLighten: brightness(130%);
|
||||
--hoverDarken: brightness(70%);
|
||||
--hoverTransition: filter 0.15s ease;
|
||||
--scrollbar-track: ${base03};
|
||||
--scrollbar-thumb: ${base00};
|
||||
--lighten-25: ${base01};
|
||||
--red-alert: ${base08};
|
||||
--user-profile-linear-gradient: linear-gradient(160deg,${base0D} 1.22%,${base0C} 40.51%,${base00} 79.07%);
|
||||
--wave-border-radius--none: 0px;
|
||||
--wave-border-radius--extra-small: 4px;
|
||||
--wave-border-radius--small: 8px;
|
||||
--wave-border-radius--regular: 12px;
|
||||
--wave-border-radius--full: 1000px;
|
||||
--wave-color-material-dark: ${base00}80;
|
||||
--wave-color-material-light: ${base04}33;
|
||||
--wave-color-opacity-accent-dark-ultra-thick: ${base0C}cc;
|
||||
--wave-color-opacity-accent-darkest-ultra-thick: ${base01};
|
||||
--wave-color-opacity-accent-fill-regular: ${base0C}66;
|
||||
--wave-color-opacity-accent-fill-thin: ${base0C}33;
|
||||
--wave-color-opacity-accent-fill-ultra-thick: ${base0C}cc;
|
||||
--wave-color-opacity-accent-fill-ultra-thin: ${base0C}1a;
|
||||
--wave-color-opacity-base-bright-thick: ${base00}99;
|
||||
--wave-color-opacity-base-bright-thin: ${base00}33;
|
||||
--wave-color-opacity-base-bright-transparent: ${base00};
|
||||
--wave-color-opacity-base-bright-ultra-thick: ${base00}cc;
|
||||
--wave-color-opacity-base-brighter-ultra-thick: ${base01}cc;
|
||||
--wave-color-opacity-base-brightest-regular: ${base02}66;
|
||||
--wave-color-opacity-base-brightest-thin: ${base02}33;
|
||||
--wave-color-opacity-base-brightest-ultra-thin: ${base02}1a;
|
||||
--wave-color-opacity-base-fill-regular: ${base00}66;
|
||||
--wave-color-opacity-base-fill-thick: ${base00}99;
|
||||
--wave-color-opacity-base-fill-thin: ${base00}33;
|
||||
--wave-color-opacity-base-fill-transparent: #000;
|
||||
--wave-color-opacity-base-fill-ultra-thick: ${base00}cc;
|
||||
--wave-color-opacity-base-fill-ultra-thin: ${base00}1a;
|
||||
--wave-color-opacity-contrast-fill-regular: ${base07}66;
|
||||
--wave-color-opacity-contrast-fill-thick: ${base07}99;
|
||||
--wave-color-opacity-contrast-fill-thin: ${base07}33;
|
||||
--wave-color-opacity-contrast-fill-transparent: #fff;
|
||||
--wave-color-opacity-contrast-fill-ultra-thick: ${base07}cc;
|
||||
--wave-color-opacity-contrast-fill-ultra-thin: ${base07}1a;
|
||||
--wave-color-opacity-rainbow-blue-thin: ${base0D}33;
|
||||
--wave-color-opacity-rainbow-yellow-fill-regular: ${base0E}66;
|
||||
--wave-color-opacity-rainbow-yellow-fill-thin: ${base0E}33;
|
||||
--wave-color-opacity-rainbow-yellow-fill-ultra-thick: ${base0E}cc;
|
||||
--wave-color-opacity-rainbow-yellow-fill-ultra-thin: ${base0E}1a;
|
||||
--wave-color-opacity-special-fill-regular: ${base0E}66;
|
||||
--wave-color-opacity-special-fill-thin: ${base0E}33;
|
||||
--wave-color-opacity-special-fill-ultra-thick: ${base0E}cc;
|
||||
--wave-color-opacity-special-fill-ultra-thin: ${base0E}1a;
|
||||
--wave-color-services-facebook: ${base0D};
|
||||
--wave-color-services-instagram-red: ${base08};
|
||||
--wave-color-services-mtn: ${base0E};
|
||||
--wave-color-services-musix-orange: ${base09};
|
||||
--wave-color-services-musix-pink: ${base0E};
|
||||
--wave-color-services-play: ${base0C};
|
||||
--wave-color-services-plus: ${base0B};
|
||||
--wave-color-services-snapchat: ${base0A};
|
||||
--wave-color-services-sprint: ${base0A};
|
||||
--wave-color-services-t-mobile: ${base08};
|
||||
--wave-color-services-tik-tok-blue: ${base0D};
|
||||
--wave-color-services-tik-tok-red: ${base08};
|
||||
--wave-color-services-twitter: ${base0D};
|
||||
--wave-color-services-viacom-1: ${base0D};
|
||||
--wave-color-services-viacom-2: ${base0E};
|
||||
--wave-color-services-viacom-3: ${base08};
|
||||
--wave-color-services-viacom-4: ${base09};
|
||||
--wave-color-services-viacom-5: ${base0E};
|
||||
--wave-color-services-vivo: ${base0E};
|
||||
--wave-color-services-vodafone: ${base08};
|
||||
--wave-color-services-waze: ${base0D};
|
||||
--wave-color-solid-accent-bright: ${base0D};
|
||||
--wave-color-solid-accent-brighter: ${base0D};
|
||||
--wave-color-solid-accent-dark: ${base0C};
|
||||
--wave-color-solid-accent-darker: ${base01};
|
||||
--wave-color-solid-accent-darkest: ${base00};
|
||||
--wave-color-solid-accent-fill: ${base0D};
|
||||
--wave-color-solid-base-bright: ${base00};
|
||||
--wave-color-solid-base-brighter: ${base01};
|
||||
--wave-color-solid-base-brightest: ${base02};
|
||||
--wave-color-solid-base-fill: ${base00};
|
||||
--wave-color-solid-contrast-dark: ${base07};
|
||||
--wave-color-solid-contrast-darker: ${base06};
|
||||
--wave-color-solid-contrast-darkest: ${base05};
|
||||
--wave-color-solid-contrast-fill: ${base07};
|
||||
--wave-color-solid-rainbow-blue-fill: ${base0D};
|
||||
--wave-color-solid-rainbow-green-brighter: ${base0D};
|
||||
--wave-color-solid-rainbow-green-dark: ${base0C};
|
||||
--wave-color-solid-rainbow-green-darker: ${base0C};
|
||||
--wave-color-solid-rainbow-green-darkest: ${base01};
|
||||
--wave-color-solid-rainbow-green-fill: ${base0D};
|
||||
--wave-color-solid-rainbow-orange-fill: ${base09};
|
||||
--wave-color-solid-rainbow-purple-fill: ${base0E};
|
||||
--wave-color-solid-rainbow-red-bright: ${base08};
|
||||
--wave-color-solid-rainbow-red-brighter: ${base08};
|
||||
--wave-color-solid-rainbow-red-dark: ${base09};
|
||||
--wave-color-solid-rainbow-red-darker: ${base01};
|
||||
--wave-color-solid-rainbow-red-darkest: ${base00};
|
||||
--wave-color-solid-rainbow-red-fill: ${base08};
|
||||
--wave-color-solid-rainbow-yellow-bright: ${base0A};
|
||||
--wave-color-solid-rainbow-yellow-brighter: ${base06};
|
||||
--wave-color-solid-rainbow-yellow-dark: ${base09};
|
||||
--wave-color-solid-rainbow-yellow-darker: ${base01};
|
||||
--wave-color-solid-rainbow-yellow-darkest: ${base00};
|
||||
--wave-color-solid-rainbow-yellow-fill: ${base0A};
|
||||
--wave-color-solid-special-bright: ${base09};
|
||||
--wave-color-solid-special-brighter: ${base06};
|
||||
--wave-color-solid-special-dark: ${base09};
|
||||
--wave-color-solid-special-darker: ${base09};
|
||||
--wave-color-solid-special-darkest: ${base00};
|
||||
--wave-color-solid-special-fill: ${base0E};
|
||||
--wave-color-solid-warning-bright: ${base08};
|
||||
--wave-color-solid-warning-brighter: ${base09};
|
||||
--wave-color-solid-warning-dark: ${base09};
|
||||
--wave-color-solid-warning-darker: ${base01};
|
||||
--wave-color-solid-warning-darkest: ${base00};
|
||||
--wave-color-solid-warning-fill: ${base08};
|
||||
--wave-color-text-disabled: ${base02};
|
||||
--wave-color-text-link: ${base0D};
|
||||
--wave-color-text-main: ${base07};
|
||||
--wave-color-text-placeholder: ${base02};
|
||||
--wave-color-text-secondary: ${base06};
|
||||
--wave-color-text-tertiary: ${base05};
|
||||
--wave-font-weight--bold: 700;
|
||||
--wave-font-weight--demi: 600;
|
||||
--wave-font-weight--medium: 500;
|
||||
--wave-opacity--ultra-thin: .05;
|
||||
--wave-opacity--thin: .1;
|
||||
--wave-opacity--regular: .4;
|
||||
--wave-opacity--thick: .6;
|
||||
--wave-opacity--ultra-thick: .8;
|
||||
--wave-spacing--extra-extra-large: 64px;
|
||||
--wave-spacing--extra-large: 40px;
|
||||
--wave-spacing--large: 24px;
|
||||
--wave-spacing--medium: 20px;
|
||||
--wave-spacing--regular: 16px;
|
||||
--wave-spacing--small: 12px;
|
||||
--wave-spacing--extra-small: 8px;
|
||||
--wave-spacing--extra-extra-small: 4px;
|
||||
}
|
||||
|
||||
.wave-text-caption-demi, .tidal-ui__v-stack {
|
||||
color: var(--wave-color-solid-accent-bright) !important;
|
||||
}
|
||||
|
||||
.tidal-ui__icon {
|
||||
fill: var(--wave-color-solid-rainbow-purple-fill) !important;
|
||||
stroke: var(--wave-color-solid-rainbow-purple-fill) !important;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
modules/programs/media/zathura.nix
Normal file
31
modules/programs/media/zathura.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
toZathura = attrs:
|
||||
builtins.concatStringsSep "\n"
|
||||
(lib.mapAttrsToList (option: value: "set ${option} \"${toString value}\"") attrs);
|
||||
in {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [pkgs.zathura];
|
||||
files = {
|
||||
".config/zathura/zathurarc".text = toZathura {
|
||||
font = "sans-serif 12";
|
||||
selection-notification = true;
|
||||
|
||||
selection-clipboard = "clipboard";
|
||||
adjust-open = "best-fit";
|
||||
pages-per-row = "1";
|
||||
scroll-page-aware = "true";
|
||||
scroll-full-overlap = "0.01";
|
||||
scroll-step = "100";
|
||||
zoom-min = "10";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
42
modules/programs/misc.nix
Normal file
42
modules/programs/misc.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (builtins) toJSON;
|
||||
inherit (lib) mkIf;
|
||||
inherit (config.local.systemVars) username;
|
||||
in {
|
||||
config = mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = with pkgs; [
|
||||
cinny-desktop
|
||||
entr
|
||||
fastfetch
|
||||
fractal
|
||||
fzf
|
||||
geary
|
||||
hyfetch
|
||||
imhex
|
||||
logisim-evolution
|
||||
mission-center
|
||||
nautilus
|
||||
obsidian
|
||||
playerctl
|
||||
proton-pass
|
||||
simple-scan
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
files = {
|
||||
".config/hyfetch.json".text = toJSON {
|
||||
preset = "nonbinary";
|
||||
mode = "rgb";
|
||||
backend = "fastfetch";
|
||||
color_align.mode = "horizontal";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
_: {
|
||||
imports = [
|
||||
./core
|
||||
./emulators
|
||||
./programs
|
||||
./services
|
||||
./shell
|
||||
];
|
||||
}
|
56
modules/programs/terminal/emulators/foot.nix
Normal file
56
modules/programs/terminal/emulators/foot.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) optionalAttrs;
|
||||
inherit (config.local.systemVars) username;
|
||||
|
||||
styleCfg = config.local.style;
|
||||
# because someone thought this was a great idea: https://github.com/tinted-theming/schemes/commit/61058a8d2e2bd4482b53d57a68feb56cdb991f0b
|
||||
palette = builtins.mapAttrs (_: color: lib.removePrefix "#" color) styleCfg.scheme.palette;
|
||||
toINI = lib.generators.toINI {};
|
||||
mkColors = palette: {
|
||||
background = palette.base00;
|
||||
foreground = palette.base05;
|
||||
regular0 = palette.base00;
|
||||
regular1 = palette.base08;
|
||||
regular2 = palette.base0B;
|
||||
regular3 = palette.base0A;
|
||||
regular4 = palette.base0D;
|
||||
regular5 = palette.base0E;
|
||||
regular6 = palette.base0C;
|
||||
regular7 = palette.base05;
|
||||
bright0 = palette.base02;
|
||||
bright1 = palette.base08;
|
||||
bright2 = palette.base0B;
|
||||
bright3 = palette.base0A;
|
||||
bright4 = palette.base0D;
|
||||
bright5 = palette.base0E;
|
||||
bright6 = palette.base0C;
|
||||
bright7 = palette.base07;
|
||||
"16" = palette.base09;
|
||||
"17" = palette.base0F;
|
||||
"18" = palette.base01;
|
||||
"19" = palette.base02;
|
||||
"20" = palette.base04;
|
||||
"21" = palette.base06;
|
||||
};
|
||||
in {
|
||||
config = lib.mkIf config.local.modules.hyprland.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [pkgs.foot];
|
||||
files = {
|
||||
".config/foot/foot.ini".text = toINI {
|
||||
main = {
|
||||
term = "xterm-256color";
|
||||
font = "monospace:size=14";
|
||||
shell = "${pkgs.nushell}/bin/nu";
|
||||
};
|
||||
colors = optionalAttrs styleCfg.enable (mkColors palette);
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
114
modules/programs/terminal/emulators/ghostty.nix
Normal file
114
modules/programs/terminal/emulators/ghostty.nix
Normal file
|
@ -0,0 +1,114 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mapAttrs mkIf mkMerge optionalAttrs removePrefix;
|
||||
inherit (config.local.systemVars) username;
|
||||
toINI = lib.generators.toINIWithGlobalSection {listsAsDuplicateKeys = true;};
|
||||
styleCfg = config.local.style;
|
||||
|
||||
prefix = "ctrl+a";
|
||||
|
||||
mkGhosttyTheme = palette: let
|
||||
colors = mapAttrs (_: value: removePrefix "#" value) palette;
|
||||
in {
|
||||
palette = [
|
||||
"0=#${colors.base00}"
|
||||
"1=#${colors.base08}"
|
||||
"2=#${colors.base0B}"
|
||||
"3=#${colors.base0A}"
|
||||
"4=#${colors.base0D}"
|
||||
"5=#${colors.base0E}"
|
||||
"6=#${colors.base0C}"
|
||||
"7=#${colors.base05}"
|
||||
"8=#${colors.base02}"
|
||||
"9=#${colors.base08}"
|
||||
"10=#${colors.base0B}"
|
||||
"11=#${colors.base0A}"
|
||||
"12=#${colors.base0D}"
|
||||
"13=#${colors.base0E}"
|
||||
"14=#${colors.base0C}"
|
||||
"15=#${colors.base07}"
|
||||
"16=#${colors.base09}"
|
||||
"17=#${colors.base0F}"
|
||||
"18=#${colors.base01}"
|
||||
"19=#${colors.base02}"
|
||||
"20=#${colors.base04}"
|
||||
"21=#${colors.base06}"
|
||||
];
|
||||
background = colors.base00;
|
||||
foreground = colors.base05;
|
||||
cursor-color = colors.base06;
|
||||
selection-background = colors.base02;
|
||||
selection-foreground = colors.base05;
|
||||
};
|
||||
in {
|
||||
config = mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
files = mkMerge [
|
||||
{
|
||||
".config/ghostty/config".text =
|
||||
toINI
|
||||
{
|
||||
globalSection = {
|
||||
font-family = ["monospace" "Symbols Nerd Font"];
|
||||
font-size = 14;
|
||||
gtk-single-instance = true;
|
||||
gtk-adwaita = false;
|
||||
confirm-close-surface = false;
|
||||
|
||||
keybind = [
|
||||
"${prefix}>c=new_tab"
|
||||
"${prefix}>p=move_tab:-1"
|
||||
"${prefix}>n=move_tab:1"
|
||||
|
||||
"${prefix}>\\=new_split:right"
|
||||
"${prefix}>-=new_split:down"
|
||||
"${prefix}>h=goto_split:left"
|
||||
"${prefix}>j=goto_split:bottom"
|
||||
"${prefix}>k=goto_split:top"
|
||||
"${prefix}>l=goto_split:right"
|
||||
"${prefix}>shift+h=resize_split:left,10"
|
||||
"${prefix}>shift+j=resize_split:down,10"
|
||||
"${prefix}>shift+k=resize_split:up,10"
|
||||
"${prefix}>shift+l=resize_split:right,11"
|
||||
"${prefix}>z=toggle_split_zoom"
|
||||
];
|
||||
|
||||
adw-toolbar-style = "flat";
|
||||
gtk-tabs-location = "bottom";
|
||||
gtk-wide-tabs = false;
|
||||
window-decoration = false;
|
||||
|
||||
linux-cgroup = "always";
|
||||
};
|
||||
};
|
||||
}
|
||||
(optionalAttrs styleCfg.enable
|
||||
{
|
||||
".config/ghostty/config".text = toINI {
|
||||
globalSection.theme = "base16";
|
||||
};
|
||||
".config/ghostty/themes/base16".text = toINI {globalSection = mkGhosttyTheme styleCfg.scheme.palette;};
|
||||
})
|
||||
];
|
||||
packages = [pkgs.ghostty];
|
||||
};
|
||||
|
||||
systemd.user.services.ghosttyd = {
|
||||
description = "ghosttyd™";
|
||||
partOf = ["graphical-session.target"];
|
||||
after = ["graphical-session.target"];
|
||||
wantedBy = ["graphical-session.target"];
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.ghostty}/bin/ghostty --initial-window=false --quit-after-last-window-closed=false";
|
||||
Slice = "background-graphical.slice";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
31
modules/programs/terminal/programs/bat.nix
Normal file
31
modules/programs/terminal/programs/bat.nix
Normal file
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
inherit (config.local.homeVars) userEnvFile;
|
||||
toConf = attrs:
|
||||
builtins.concatStringsSep "\n"
|
||||
(lib.mapAttrsToList (option: value: "--${option}=\"${value}\"") attrs);
|
||||
in {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [
|
||||
pkgs.bat
|
||||
pkgs.bat-extras.batman
|
||||
];
|
||||
files = {
|
||||
".config/bat/config".text = toConf {
|
||||
theme = "base16";
|
||||
};
|
||||
|
||||
".config/environment.d/${userEnvFile}.conf".text = ''
|
||||
MANPAGER = "sh -c 'col -bx | bat --language man' ";
|
||||
MANROFFOPT = "-c";
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -3,10 +3,7 @@
|
|||
./bat.nix
|
||||
./direnv.nix
|
||||
./git.nix
|
||||
./gnupg.nix
|
||||
./misc.nix
|
||||
./nix-index.nix
|
||||
./tmux.nix
|
||||
./yazi.nix
|
||||
# ./tmux.nix
|
||||
];
|
||||
}
|
9
modules/programs/terminal/programs/direnv.nix
Normal file
9
modules/programs/terminal/programs/direnv.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
programs.direnv.enable = true;
|
||||
};
|
||||
}
|
29
modules/programs/terminal/programs/git.nix
Normal file
29
modules/programs/terminal/programs/git.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
inherit (config.local.homeVars) signingKey;
|
||||
toINI = lib.generators.toINI {};
|
||||
in {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = with pkgs; [git lazygit];
|
||||
files = {
|
||||
".config/git/config".text = toINI {
|
||||
user = {
|
||||
name = "Anthony Rodriguez";
|
||||
email = "anthony@nezia.dev";
|
||||
signingkey = signingKey;
|
||||
};
|
||||
commit.gpgsign = true;
|
||||
tag.gpgsign = true;
|
||||
gpg.format = "ssh";
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
25
modules/programs/terminal/programs/misc.nix
Normal file
25
modules/programs/terminal/programs/misc.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
in {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = with pkgs; [
|
||||
# archives
|
||||
zip
|
||||
unzip
|
||||
unrar
|
||||
|
||||
# utils
|
||||
fd
|
||||
file
|
||||
ripgrep
|
||||
yazi
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
./fish.nix
|
||||
./starship.nix
|
||||
./nushell.nix
|
||||
./zoxide.nix
|
||||
];
|
||||
}
|
95
modules/programs/terminal/shell/nushell.nix
Normal file
95
modules/programs/terminal/shell/nushell.nix
Normal file
|
@ -0,0 +1,95 @@
|
|||
# simplified version of https://raw.githubusercontent.com/Lunarnovaa/nixconf/3d13d69e9fcf072365935ee9dda719d6b0aa9bc1/modules/programs/terminal/nushell.nix
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
inherit (lib.modules) mkIf;
|
||||
|
||||
carapaceCache = "${config.hjem.users.${username}.directory}/.cache/carapace";
|
||||
starshipCache = "${config.hjem.users.${username}.directory}/.cache/starship";
|
||||
zoxideCache = "${config.hjem.users.${username}.directory}/.cache/zoxide";
|
||||
in {
|
||||
config = mkIf config.local.profiles.desktop.enable {
|
||||
users.users.${username}.shell = pkgs.nushell;
|
||||
hjem.users.${username} = {
|
||||
packages = with pkgs; [carapace nushell];
|
||||
files = {
|
||||
".config/nushell/config.nu".text = ''
|
||||
# disabling the basic banner on startup
|
||||
$env.config = {
|
||||
show_banner: false,
|
||||
edit_mode: vi,
|
||||
hooks: {
|
||||
pre_prompt: [{ ||
|
||||
if (which direnv | is-empty) {
|
||||
return
|
||||
}
|
||||
|
||||
direnv export json | from json | default {} | load-env
|
||||
if 'ENV_CONVERSIONS' in $env and 'PATH' in $env.ENV_CONVERSIONS {
|
||||
$env.PATH = do $env.ENV_CONVERSIONS.PATH.from_string $env.PATH
|
||||
}
|
||||
}]
|
||||
}
|
||||
}
|
||||
$env.SSH_AUTH_SOCK = $"($env.XDG_RUNTIME_DIR)/ssh-agent"
|
||||
|
||||
# aliases
|
||||
alias ll = ls -l
|
||||
alias lg = lazygit
|
||||
|
||||
alias lg = lazygit;
|
||||
alias g = git;
|
||||
alias gs = git status;
|
||||
alias gsh = git show HEAD;
|
||||
alias gshs = DELTA_FEATURES=+side-by-side git show HEAD;
|
||||
alias ga = git add;
|
||||
alias gaa = git add :/;
|
||||
alias gap = git add -p;
|
||||
alias gc = git commit;
|
||||
alias gca = git commit --amend;
|
||||
alias gcm = git commit --message;
|
||||
alias gcf = git commit --fixup;
|
||||
alias gk = git checkout;
|
||||
alias gkp = git checkout -p;
|
||||
alias gd = git diff;
|
||||
alias gds = DELTA_FEATURES=+side-by-side git diff;
|
||||
alias gdc = git diff --cached;
|
||||
alias gdcs = DELTA_FEATURES=+side-by-side git diff --cached;
|
||||
alias gf = git fetch;
|
||||
alias gl = git log;
|
||||
alias glp = git log -p;
|
||||
alias glps = DELTA_FEATURES=+side-by-side git log -p;
|
||||
alias gp = git push;
|
||||
alias gpf = git push --force-with-lease;
|
||||
alias gr = git reset;
|
||||
alias gra = git reset :/;
|
||||
alias grp = git reset -p;
|
||||
alias gt = git stash;
|
||||
alias gtp = git stash pop;
|
||||
alias gu = git pull;
|
||||
|
||||
# carapace init (completion engine)
|
||||
source ${carapaceCache}/init.nu
|
||||
# starship init
|
||||
use ${starshipCache}/init.nu
|
||||
# zoxide init
|
||||
source ${zoxideCache}/init.nu
|
||||
'';
|
||||
|
||||
".config/nushell/env.nu".text = ''
|
||||
mkdir ${carapaceCache}
|
||||
mkdir ${starshipCache}
|
||||
mkdir ${zoxideCache}
|
||||
|
||||
carapace _carapace nushell | save -f ${carapaceCache}/init.nu
|
||||
starship init nu | save -f ${starshipCache}/init.nu
|
||||
zoxide init nushell | save -f ${zoxideCache}/init.nu
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
32
modules/programs/terminal/shell/starship.nix
Normal file
32
modules/programs/terminal/shell/starship.nix
Normal file
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
toTOML = (pkgs.formats.toml {}).generate;
|
||||
in {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [pkgs.starship];
|
||||
files = {
|
||||
".config/starship/config.toml".source = toTOML "starship config" {
|
||||
add_newline = true;
|
||||
directory = {
|
||||
style = "bold yellow";
|
||||
};
|
||||
character = {
|
||||
format = "$symbol ";
|
||||
success_symbol = "[➜](bold green)";
|
||||
error_symbol = "[✗](bold red)";
|
||||
};
|
||||
cmd_duration = {
|
||||
style = "yellow";
|
||||
format = "[ $duration]($style)";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
14
modules/programs/terminal/shell/zoxide.nix
Normal file
14
modules/programs/terminal/shell/zoxide.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
in {
|
||||
config = lib.mkIf config.local.profiles.desktop.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [pkgs.zoxide];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,18 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
styleCfg = osConfig.local.style;
|
||||
inherit (lib) mkIf;
|
||||
inherit (builtins) toJSON;
|
||||
inherit (config.local.systemVars) username;
|
||||
styleCfg = config.local.style;
|
||||
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
|
||||
in {
|
||||
config = lib.mkIf osConfig.local.modules.hyprland.enable {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
config = mkIf config.local.modules.hyprland.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [
|
||||
pkgs.waybar
|
||||
pkgs.pavucontrol
|
||||
];
|
||||
|
||||
files = {
|
||||
".config/waybar/config".text = toJSON {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
|
||||
|
@ -178,100 +184,109 @@ in {
|
|||
on-click-middle = "${pkgs.swaynotificationcenter}/bin/swaync-client --toggle-dnd --skip-wait";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
style = with styleCfg.scheme.palette; ''
|
||||
* {
|
||||
font-family: "0xProto Nerd Font";
|
||||
font-size: 16px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
min-height: 0px;
|
||||
}
|
||||
window#waybar {
|
||||
background: rgba(0,0,0,0);
|
||||
}
|
||||
#workspaces {
|
||||
color: ${base00};
|
||||
background: ${base01};
|
||||
margin: 4px 4px;
|
||||
padding: 5px 5px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
#workspaces button {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: ${base00};
|
||||
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||
opacity: 0.5;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
#workspaces button.active {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: ${base00};
|
||||
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||
transition: ${betterTransition};
|
||||
opacity: 1.0;
|
||||
min-width: 40px;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
font-weight: bold;
|
||||
border-radius: 16px;
|
||||
color: ${base00};
|
||||
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||
opacity: 0.8;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
tooltip {
|
||||
background: ${base00};
|
||||
border: 1px solid ${base0E};
|
||||
border-radius: 12px;
|
||||
}
|
||||
tooltip label {
|
||||
color: ${base0E};
|
||||
}
|
||||
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
|
||||
font-weight: bold;
|
||||
margin: 4px 0px;
|
||||
margin-left: 7px;
|
||||
padding: 0px 18px;
|
||||
background: ${base00};
|
||||
color: ${base05};
|
||||
border-radius: 24px 10px 24px 10px;
|
||||
}
|
||||
#network, #battery,
|
||||
#custom-swaync, #tray, #custom-power {
|
||||
font-weight: bold;
|
||||
background: ${base00};
|
||||
color: ${base05};
|
||||
margin: 4px 0px;
|
||||
margin-right: 7px;
|
||||
border-radius: 10px 24px 10px 24px;
|
||||
padding: 0px 18px;
|
||||
}
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
color: ${base00};
|
||||
background: linear-gradient(90deg, ${base0E}, ${base0C});
|
||||
margin: 0px;
|
||||
padding: 0px 15px 0px 30px;
|
||||
border-radius: 0px 0px 0px 40px;
|
||||
}
|
||||
'';
|
||||
".config/waybar/style.css".text = with styleCfg.scheme.palette;
|
||||
mkIf styleCfg.enable ''
|
||||
* {
|
||||
font-family: "0xProto Nerd Font";
|
||||
font-size: 16px;
|
||||
border-radius: 0px;
|
||||
border: none;
|
||||
min-height: 0px;
|
||||
}
|
||||
window#waybar {
|
||||
background: rgba(0,0,0,0);
|
||||
}
|
||||
#workspaces {
|
||||
color: ${base00};
|
||||
background: ${base01};
|
||||
margin: 4px 4px;
|
||||
padding: 5px 5px;
|
||||
border-radius: 16px;
|
||||
}
|
||||
#workspaces button {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: ${base00};
|
||||
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||
opacity: 0.5;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
#workspaces button.active {
|
||||
font-weight: bold;
|
||||
padding: 0px 5px;
|
||||
margin: 0px 3px;
|
||||
border-radius: 16px;
|
||||
color: ${base00};
|
||||
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||
transition: ${betterTransition};
|
||||
opacity: 1.0;
|
||||
min-width: 40px;
|
||||
}
|
||||
#workspaces button:hover {
|
||||
font-weight: bold;
|
||||
border-radius: 16px;
|
||||
color: ${base00};
|
||||
background: linear-gradient(45deg, ${base08}, ${base0D});
|
||||
opacity: 0.8;
|
||||
transition: ${betterTransition};
|
||||
}
|
||||
tooltip {
|
||||
background: ${base00};
|
||||
border: 1px solid ${base0E};
|
||||
border-radius: 12px;
|
||||
}
|
||||
tooltip label {
|
||||
color: ${base0E};
|
||||
}
|
||||
#window, #pulseaudio, #cpu, #memory, #idle_inhibitor {
|
||||
font-weight: bold;
|
||||
margin: 4px 0px;
|
||||
margin-left: 7px;
|
||||
padding: 0px 18px;
|
||||
background: ${base00};
|
||||
color: ${base05};
|
||||
border-radius: 24px 10px 24px 10px;
|
||||
}
|
||||
#network, #battery,
|
||||
#custom-swaync, #tray, #custom-power {
|
||||
font-weight: bold;
|
||||
background: ${base00};
|
||||
color: ${base05};
|
||||
margin: 4px 0px;
|
||||
margin-right: 7px;
|
||||
border-radius: 10px 24px 10px 24px;
|
||||
padding: 0px 18px;
|
||||
}
|
||||
#clock {
|
||||
font-weight: bold;
|
||||
color: ${base00};
|
||||
background: linear-gradient(90deg, ${base0E}, ${base0C});
|
||||
margin: 0px;
|
||||
padding: 0px 15px 0px 30px;
|
||||
border-radius: 0px 0px 0px 40px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.waybar = {
|
||||
Unit.After = lib.mkForce "graphical-session.target";
|
||||
Service.Slice = "app-graphical.slice";
|
||||
};
|
||||
description = "Highly customizable Wayland bar for Sway and Wlroots based compositors.";
|
||||
documentation = ["https://github.com/Alexays/Waybar/wiki/"];
|
||||
after = ["graphical-session.target"];
|
||||
partOf = ["graphical-session.target"];
|
||||
requisite = ["graphical-session.target"];
|
||||
wantedBy = ["graphical-session.target"];
|
||||
|
||||
home.packages = [
|
||||
pkgs.pavucontrol
|
||||
];
|
||||
reloadTriggers = ["${config.hjem.users.${username}.files.".config/waybar/config".text}"];
|
||||
serviceConfig = {
|
||||
ExecStart = "${pkgs.waybar}/bin/waybar";
|
||||
ExecReload = "kill -SIGUSR2 $MAINPID";
|
||||
Restart = "on-failure";
|
||||
Slice = "app-graphical.slice";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
75
modules/programs/wlogout.nix
Normal file
75
modules/programs/wlogout.nix
Normal file
|
@ -0,0 +1,75 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.local.systemVars) username;
|
||||
|
||||
mkLayout = items: let
|
||||
formatItem = item: ''
|
||||
{
|
||||
"label" : "${item.label}",
|
||||
"action" : "${item.action}",
|
||||
"text" : "${item.text}",
|
||||
"keybind" : "${item.keybind}"
|
||||
}'';
|
||||
in
|
||||
builtins.concatStringsSep "\n" (map formatItem items);
|
||||
in {
|
||||
config = lib.mkIf config.local.modules.hyprland.enable {
|
||||
hjem.users.${username} = {
|
||||
packages = [pkgs.wlogout];
|
||||
files = {
|
||||
".config/wlogout/layout".text = let
|
||||
loginctl = lib.getExe' pkgs.systemd "loginctl";
|
||||
systemctl = lib.getExe' pkgs.systemd "systemctl";
|
||||
in
|
||||
mkLayout [
|
||||
{
|
||||
action = "${loginctl} lock-session";
|
||||
keybind = "l";
|
||||
label = "lock";
|
||||
text = "Lock";
|
||||
}
|
||||
|
||||
{
|
||||
action = "${systemctl} hibernate";
|
||||
keybind = "h";
|
||||
label = "hibernate";
|
||||
text = "Hibernate";
|
||||
}
|
||||
|
||||
{
|
||||
action = "${loginctl} terminate-user ${username}";
|
||||
|
||||
keybind = "q";
|
||||
label = "logout";
|
||||
text = "Logout";
|
||||
}
|
||||
|
||||
{
|
||||
action = "${systemctl} poweroff";
|
||||
keybind = "p";
|
||||
label = "shutdown";
|
||||
text = "Shutdown";
|
||||
}
|
||||
|
||||
{
|
||||
action = "${systemctl} suspend";
|
||||
keybind = "s";
|
||||
label = "suspend";
|
||||
text = "Suspend";
|
||||
}
|
||||
|
||||
{
|
||||
action = "${systemctl} reboot";
|
||||
keybind = "r";
|
||||
label = "reboot";
|
||||
text = "Reboot";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue