Compare commits
10 Commits
79e3c5c266
...
e91da8ca95
Author | SHA1 | Date |
---|---|---|
Ricard Illa | e91da8ca95 | |
Ricard Illa | 936b7a3202 | |
Ricard Illa | 4cf2bd1775 | |
Ricard Illa | 47c5f29379 | |
Ricard Illa | 0e81b3822d | |
Ricard Illa | ad6be17486 | |
Ricard Illa | 7e562a8bc6 | |
Ricard Illa | 8fb7204fee | |
Ricard Illa | 280853dc66 | |
Ricard Illa | 6ab585ff13 |
98
flake.lock
98
flake.lock
|
@ -1,17 +1,82 @@
|
|||
{
|
||||
"nodes": {
|
||||
"agenix": {
|
||||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690228878,
|
||||
"narHash": "sha256-9Xe7JV0krp4RJC9W9W9WutZVlw6BlHTFMiUP/k48LQY=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "d8c973fd228949736dedf61b7f8cc1ece3236792",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1673295039,
|
||||
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"ref": "master",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"agenix",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1682203081,
|
||||
"narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1690629157,
|
||||
"narHash": "sha256-hsZC4tPH4Ab/ynuswApNFzshbfG79Ctbrc4Qa0z9sek=",
|
||||
"lastModified": 1691882297,
|
||||
"narHash": "sha256-e1/LAQSGLnBywfA1TfMl0Vj3tvYka73XOZ/D2/CJowE=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "5c23226768abd3402636f4d3c65aea8450997102",
|
||||
"rev": "c3ab5ea047e6dc73df530948f7367455749d8906",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -23,11 +88,11 @@
|
|||
},
|
||||
"impermanence": {
|
||||
"locked": {
|
||||
"lastModified": 1684264534,
|
||||
"narHash": "sha256-K0zr+ry3FwIo3rN2U/VWAkCJSgBslBisvfRIPwMbuCQ=",
|
||||
"lastModified": 1690797372,
|
||||
"narHash": "sha256-GImz19e33SeVcIvBB7NnhbJSbTpFFmNtWLh7Z85Y188=",
|
||||
"owner": "nix-community",
|
||||
"repo": "impermanence",
|
||||
"rev": "89253fb1518063556edd5e54509c30ac3089d5e6",
|
||||
"rev": "e3a7acd113903269a1b5c8b527e84ce7ee859851",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -38,11 +103,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1690200740,
|
||||
"narHash": "sha256-aRkEXGmCbAGcvDcdh/HB3YN+EvoPoxmJMOaqRZmf6vM=",
|
||||
"lastModified": 1691871742,
|
||||
"narHash": "sha256-6yDNjfbAMpwzWL4y75fxs6beXHRANfYX8BNSPjYehck=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "ba9650b14e83b365fb9e731f7d7c803f22d2aecf",
|
||||
"rev": "430a56dd16fe583a812b2df44dca002acab2f4f6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -54,11 +119,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1690548937,
|
||||
"narHash": "sha256-x3ZOPGLvtC0/+iFAg9Kvqm/8hTAIkGjc634SqtgaXTA=",
|
||||
"lastModified": 1691654369,
|
||||
"narHash": "sha256-gSILTEx1jRaJjwZxRlnu3ZwMn1FVNk80qlwiCX8kmpo=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2a9d660ff0f7ffde9d73be328ee6e6f10ef66b28",
|
||||
"rev": "ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -69,11 +134,11 @@
|
|||
},
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1690558459,
|
||||
"narHash": "sha256-5W7y1l2cLYPkpJGNlAja7XW2X2o9rjf0O1mo9nxS9jQ=",
|
||||
"lastModified": 1691831739,
|
||||
"narHash": "sha256-6e12VCvA7jOjhzJ1adLiUV1GTPXGBcCfhggsDwiuNB4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "48e82fe1b1c863ee26a33ce9bd39621d2ada0a33",
|
||||
"rev": "3fe694c4156b84dac12627685c7ae592a71e2206",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -84,7 +149,8 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"agenix": "agenix",
|
||||
"home-manager": "home-manager_2",
|
||||
"impermanence": "impermanence",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs",
|
||||
|
|
58
flake.nix
58
flake.nix
|
@ -9,6 +9,10 @@
|
|||
};
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
agenix = {
|
||||
url = "github:ryantm/agenix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
@ -18,6 +22,7 @@
|
|||
, nixos-hardware
|
||||
, home-manager
|
||||
, impermanence
|
||||
, agenix
|
||||
, ...
|
||||
}@inputs:
|
||||
let
|
||||
|
@ -25,72 +30,41 @@
|
|||
in
|
||||
rec {
|
||||
overlays = import ./overlays { inherit inputs; };
|
||||
nixosModules = import ./modules/nixos;
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
secrets = import ./secrets;
|
||||
stablePkgs = nixpkgs-stable.legacyPackages."x86_64-linux";
|
||||
|
||||
nixosConfigurations = {
|
||||
trantor = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
# unstablePkgs = nixpkgs-unstable.legacyPackages."x86_64-linux";
|
||||
stablePkgs = nixpkgs-stable.legacyPackages."x86_64-linux";
|
||||
impermanence = impermanence;
|
||||
};
|
||||
|
||||
modules = [
|
||||
./nixos/hosts/trantor
|
||||
./nixos/modules/common.nix
|
||||
./nixos/modules/desktop.nix
|
||||
./hosts/trantor
|
||||
home-manager.nixosModules.home-manager
|
||||
impermanence.nixosModules.impermanence
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
capibara = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
stablePkgs = nixpkgs-stable.legacyPackages."x86_64-linux";
|
||||
impermanence = impermanence;
|
||||
};
|
||||
|
||||
specialArgs = { inherit stablePkgs impermanence inputs outputs; };
|
||||
modules = [
|
||||
./nixos/hosts/capibara
|
||||
./nixos/modules/common.nix
|
||||
./nixos/modules/desktop.nix
|
||||
./hosts/capibara
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-x230
|
||||
home-manager.nixosModules.home-manager
|
||||
impermanence.nixosModules.impermanence
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
|
||||
"rilla@capibara" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
modules = [
|
||||
./home/hosts/capibara.nix
|
||||
./home/modules/common
|
||||
./home/modules/desktop-river
|
||||
./home/modules/theming
|
||||
];
|
||||
};
|
||||
|
||||
"rilla@trantor" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
modules = [
|
||||
./home/hosts/trantor.nix
|
||||
./home/modules/common
|
||||
./home/modules/desktop-river
|
||||
./home/modules/theming/trantor.nix
|
||||
];
|
||||
};
|
||||
|
||||
"rilla@echidna" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
modules = [ ./home/hosts/echidna.nix ];
|
||||
modules = [ ./hosts/echidna/home.nix ];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
}
|
|
@ -1,90 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.username = "rilla";
|
||||
home.homeDirectory = "/home/rilla";
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
nixpkgs.config = { allowUnfree = true; };
|
||||
|
||||
imports = [
|
||||
../modules/cheat
|
||||
../modules/foot
|
||||
../modules/dav
|
||||
../modules/fonts
|
||||
../modules/git
|
||||
../modules/gpg
|
||||
../modules/lf
|
||||
../modules/mail
|
||||
../modules/neovim
|
||||
../modules/pass
|
||||
../modules/rss
|
||||
../modules/ssh
|
||||
../modules/tmux
|
||||
../modules/vitetris
|
||||
../modules/xdg
|
||||
../modules/zsh
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "${pkgs.neovim}/bin/nvim";
|
||||
VISUAL = "${pkgs.neovim}/bin/nvim";
|
||||
BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||
# OPENER = "todo"; # todo
|
||||
TERMINAL = "${pkgs.alacritty}/bin/alacritty";
|
||||
CM_LAUNCHER = "rofi"; # for clipmenu
|
||||
LEDGER_FILE = "${config.home.homeDirectory}/finance/2021.journal";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
R
|
||||
ansible
|
||||
bind.dnsutils
|
||||
docker-compose
|
||||
file
|
||||
just
|
||||
gnumake
|
||||
html-tidy
|
||||
htop
|
||||
inetutils # telnet
|
||||
j2cli
|
||||
jq
|
||||
killall
|
||||
kubectl
|
||||
libnotify
|
||||
mosh
|
||||
neofetch
|
||||
pandoc
|
||||
podman-compose
|
||||
pv
|
||||
ripgrep
|
||||
sassc
|
||||
screen
|
||||
shellcheck
|
||||
signify
|
||||
unzip
|
||||
wget
|
||||
];
|
||||
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = { theme = "gruvbox-dark"; };
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# defaultOptions = [
|
||||
# "--preview --preview 'bat --color=always --style=header,grid --line-range :300 {}'"
|
||||
# ];
|
||||
tmux.enableShellIntegration = true;
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./common.nix
|
||||
../modules/desktop-river
|
||||
../modules/theming/trantor.nix
|
||||
];
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# imports = [ ./firefox ];
|
||||
|
||||
home.packages = [ pkgs.librewolf pkgs.firefox pkgs.tor-browser-bundle-bin ];
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
};
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# nix-env -f '<nixpkgs>' -qaP -A nur.repos.rycee.firefox-addons
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
# maybe enable tridactyl?
|
||||
# nix-env -f '<nixpkgs>' -qaP -A nur.repos.rycee.firefox-addons
|
||||
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
# browserpass
|
||||
# canvasblocker
|
||||
# clearurls
|
||||
# cookie-autodelete
|
||||
# darkreader
|
||||
# floccus
|
||||
# foxyproxy-standard
|
||||
# https-everywhere
|
||||
# i-dont-care-about-cookies
|
||||
# localcdn
|
||||
# noscript
|
||||
# privacy-possum
|
||||
# privacy-redirect
|
||||
# ublock-origin
|
||||
# vimium
|
||||
# # todo: AdNauseam, wallabagger, DownThemAll! Wayback Machine
|
||||
# ];
|
||||
profiles = {
|
||||
default = {
|
||||
id = 0;
|
||||
name = "default";
|
||||
isDefault = true;
|
||||
settings = {
|
||||
# change some values from arkenfox's defaults
|
||||
"privacy.resistFingerprinting" =
|
||||
false; # if true, this would the window size to rounded dimensions, which is too annoying on a tiling window manager
|
||||
"extensions.pocket.enabled" = false;
|
||||
"identity.fxaccounts.enabled" = false;
|
||||
"browser.search.suggest.enabled" = true;
|
||||
"browser.urlbar.suggest.searches" = true;
|
||||
"keyword.enable" = true;
|
||||
|
||||
# for Firefox-UI-Fix
|
||||
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
|
||||
"browser.proton.enabled" = true;
|
||||
"svg.context-properties.content.enabled" = true;
|
||||
"layout.css.backdrop-filter.enabled" = true;
|
||||
"browser.compactmode.show" = true;
|
||||
"browser.urlbar.suggest.calculator" = true;
|
||||
|
||||
"browser.uidensity" = 1;
|
||||
|
||||
# "browser.search.region" = "GB";
|
||||
# "browser.search.isUS" = false;
|
||||
# "distribution.searchplugins.defaultLocale" = "en-GB";
|
||||
# "general.useragent.locale" = "en-GB";
|
||||
# "browser.bookmarks.showMobileBookmarks" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,147 +0,0 @@
|
|||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.modifications
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
username = "rilla";
|
||||
homeDirectory = "/home/rilla";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
# ./minidisc
|
||||
../arduino
|
||||
../browsers
|
||||
../cheat
|
||||
../dav
|
||||
../drawterm
|
||||
../fonts
|
||||
../foot
|
||||
../git
|
||||
../gotify
|
||||
../gpg
|
||||
../idasen
|
||||
../lf
|
||||
../mail
|
||||
../maker
|
||||
../mpd
|
||||
../msg
|
||||
../music
|
||||
../neovim
|
||||
../pass
|
||||
../rss
|
||||
../snapcast
|
||||
../sound
|
||||
../ssh
|
||||
../syncthing
|
||||
../tmux
|
||||
../vitetris
|
||||
../wallets
|
||||
../wine
|
||||
../xdg
|
||||
../zsh
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||
TERMINAL = "${pkgs.alacritty}/bin/alacritty";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# calibre
|
||||
R
|
||||
acpi
|
||||
android-tools
|
||||
ansible
|
||||
bind.dnsutils
|
||||
# pyenv
|
||||
docker-compose
|
||||
file
|
||||
gimp
|
||||
gnumake
|
||||
html-tidy
|
||||
htop
|
||||
inetutils # telnet
|
||||
j2cli
|
||||
john
|
||||
jq
|
||||
killall
|
||||
kubectl
|
||||
libnotify
|
||||
libreoffice
|
||||
lxqt.pcmanfm-qt
|
||||
mosh
|
||||
mpv
|
||||
neofetch
|
||||
pynitrokey
|
||||
networkmanagerapplet
|
||||
nextcloud-client
|
||||
pandoc
|
||||
podman-compose
|
||||
pv
|
||||
ripgrep
|
||||
sassc
|
||||
screen
|
||||
shellcheck
|
||||
signify
|
||||
unzip
|
||||
vagrant
|
||||
virt-manager
|
||||
virtiofsd
|
||||
wget
|
||||
];
|
||||
|
||||
# services.kdeconnect = {
|
||||
# enable = true;
|
||||
# indicator = true;
|
||||
# };
|
||||
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = { theme = "gruvbox-dark"; };
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# defaultOptions = [
|
||||
# "--preview --preview 'bat --color=always --style=header,grid --line-range :300 {}'"
|
||||
# ];
|
||||
tmux.enableShellIntegration = true;
|
||||
};
|
||||
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = [ "secrets" ];
|
||||
};
|
||||
|
||||
services.nextcloud-client = {
|
||||
enable = true;
|
||||
startInBackground = true;
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
"autoconnect" = [ "qemu:///system" ];
|
||||
"uris" = [ "qemu:///system" ];
|
||||
};
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
home.stateVersion = "22.11";
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
{ config, pkgs, contacts, addressbook, ... }:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
vdirsyncer = "${pkgs.vdirsyncer}/bin/vdirsyncer";
|
||||
mkdir = "${pkgs.coreutils}/bin/mkdir";
|
||||
cat = "${pkgs.coreutils}/bin/cat";
|
||||
abook = "${pkgs.abook}/bin/abook";
|
||||
dirname = "${pkgs.coreutils}/bin/dirname";
|
||||
in
|
||||
pkgs.writeScriptBin "davsync" ''
|
||||
#!${shell}
|
||||
${vdirsyncer} discover && \
|
||||
${vdirsyncer} sync && \
|
||||
${mkdir} -p "$(${dirname} ${addressbook})" && \
|
||||
${cat} "${contacts}"/*/*/* | \
|
||||
${abook} \
|
||||
--convert \
|
||||
--informat vcard \
|
||||
--outformat abook > \
|
||||
"${config.home.homeDirectory}/.abook/adressbook"
|
||||
''
|
|
@ -1,48 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
ext_monitor_fingerprint =
|
||||
"00ffffffffffff0009d1e67845540000261d0103803c22782e4825a756529c270f5054a56b80d1c0b300a9c08180810081c001010101023a801871382d40582c450056502100001e000000ff004c394b30303333313031510a20000000fd00324c1e5311000a202020202020000000fc0042656e51204757323738300a200117020322f14f901f04130312021101140607151605230907078301000065030c001000023a801871382d40582c450056502100001f011d8018711c1620582c250056502100009f011d007251d01e206e28550056502100001e8c0ad08a20e02d10103e960056502100001800000000000000000000000000000000000000000047";
|
||||
lvds_fingerprint =
|
||||
"00ffffffffffff0030e4d8020000000000160103801c1078ea8855995b558f261d505400000001010101010101010101010101010101601d56d85000183030404700159c1000001b000000000000000000000000000000000000000000fe004c4720446973706c61790a2020000000fe004c503132355748322d534c42330059";
|
||||
lvds_config = {
|
||||
enable = true;
|
||||
crtc = 0;
|
||||
mode = "1366x768";
|
||||
position = "0x0";
|
||||
rate = "60.00";
|
||||
};
|
||||
hdmi_config = {
|
||||
enable = true;
|
||||
primary = true;
|
||||
crtc = 0;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
rate = "60.00";
|
||||
};
|
||||
in {
|
||||
imports = [ ./common.nix ];
|
||||
programs.autorandr.profiles = {
|
||||
|
||||
default = {
|
||||
fingerprint."LVDS-1" = lvds_fingerprint;
|
||||
config."LVDS-1" = lvds_config;
|
||||
};
|
||||
|
||||
docked = {
|
||||
fingerprint = {
|
||||
"HDMI-2" = ext_monitor_fingerprint;
|
||||
"LVDS-1" = lvds_fingerprint;
|
||||
};
|
||||
config = {
|
||||
"LVDS-1" = lvds_config // { position = "1920x0"; };
|
||||
"HDMI-2" = hdmi_config;
|
||||
};
|
||||
};
|
||||
docked_closed = {
|
||||
fingerprint."HDMI-2" = ext_monitor_fingerprint;
|
||||
config."HDMI-2" = hdmi_config;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.autorandr = {
|
||||
enable = true;
|
||||
hooks.postswitch = {
|
||||
"change-background" =
|
||||
"/run/current-system/sw/bin/systemctl --user restart random-background.service";
|
||||
"restart-xmonad" = "${pkgs.xmonad-with-packages}/bin/xmonad --restart";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,69 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
ext_monitor_fingerprint =
|
||||
"00ffffffffffff0009d1e67845540000261d0103803c22782e4825a756529c270f5054a56b80d1c0b300a9c08180810081c001010101023a801871382d40582c450056502100001e000000ff004c394b30303333313031510a20000000fd00324c1e5311000a202020202020000000fc0042656e51204757323738300a200117020322f14f901f04130312021101140607151605230907078301000065030c001000023a801871382d40582c450056502100001f011d8018711c1620582c250056502100009f011d007251d01e206e28550056502100001e8c0ad08a20e02d10103e960056502100001800000000000000000000000000000000000000000047";
|
||||
edp_fingerprint =
|
||||
"00ffffffffffff0030e46e040000000000180104a52615780a0bb5a35955a0270c5054000000010101010101010101010101010101012e3680a070381f40302035007ed71000001b1f2480a070381f40302035007ed71000001b00000000000000000000000000000000000000000002000a30ff0a3c96191d4896000000003f";
|
||||
edp_config = {
|
||||
enable = true;
|
||||
crtc = 0;
|
||||
# mode = "1368x768";
|
||||
mode = "1920x1080";
|
||||
# position = "1920x0";
|
||||
position = "0x0";
|
||||
rate = "60.00";
|
||||
# rotate = "left";
|
||||
};
|
||||
hdmi_config = {
|
||||
enable = true;
|
||||
primary = true;
|
||||
crtc = 0;
|
||||
mode = "1920x1080";
|
||||
position = "0x0";
|
||||
rate = "60.00";
|
||||
};
|
||||
in {
|
||||
imports = [ ./common.nix ];
|
||||
programs.autorandr.profiles = {
|
||||
|
||||
default = {
|
||||
fingerprint = {
|
||||
"HDMI-1-1" = ext_monitor_fingerprint;
|
||||
"eDP-1-1" = edp_fingerprint;
|
||||
};
|
||||
config = {
|
||||
"HDMI-1-1" = hdmi_config;
|
||||
"eDP-1-1" = edp_config;
|
||||
};
|
||||
};
|
||||
|
||||
default_intel = {
|
||||
fingerprint = {
|
||||
"HDMI-1" = ext_monitor_fingerprint;
|
||||
"eDP-1" = edp_fingerprint;
|
||||
};
|
||||
config = {
|
||||
"HDMI-1" = hdmi_config;
|
||||
"eDP-1" = edp_config;
|
||||
};
|
||||
};
|
||||
|
||||
nomonitor_intel = {
|
||||
fingerprint."eDP-1" = edp_fingerprint;
|
||||
config."eDP-1" = edp_config // { position = "0x0"; };
|
||||
};
|
||||
onlymonitor_intel = {
|
||||
fingerprint = { "HDMI-1" = ext_monitor_fingerprint; };
|
||||
config = { "HDMI-1" = hdmi_config; };
|
||||
};
|
||||
nomonitor_nvidia = {
|
||||
fingerprint."eDP-1-1" = edp_fingerprint;
|
||||
config."eDP-1-1" = edp_config // { position = "0x0"; };
|
||||
};
|
||||
onlymonitor_nvidia = {
|
||||
fingerprint = { "HDMI-1-1" = ext_monitor_fingerprint; };
|
||||
config = { "HDMI-1-1" = hdmi_config; };
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
desktopConfig = import ./desktop_config.nix {
|
||||
config = config;
|
||||
pkgs = pkgs;
|
||||
};
|
||||
in desktopConfig // {
|
||||
imports = [ ./common.nix ./autorandr/capibara.nix ];
|
||||
home.file.".xinitrc".text = ''
|
||||
exec ${config.home.homeDirectory}/.xsession
|
||||
'';
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
fade = false;
|
||||
shadow = true;
|
||||
shadowExclude = [ "name ~= 'stalonetray'" ];
|
||||
vSync = true;
|
||||
};
|
||||
}
|
|
@ -1,51 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
obtoxmd = pkgs.callPackage ./obtoxmd.nix { inherit config pkgs; };
|
||||
in {
|
||||
imports = [ ./rofi.nix ./misc.nix ];
|
||||
home = {
|
||||
keyboard = {
|
||||
layout = "us";
|
||||
options = [ "caps:escape" ];
|
||||
variant = "altgr-intl";
|
||||
};
|
||||
packages = [ obtoxmd pkgs.openbox pkgs.xsel ];
|
||||
file = {
|
||||
".xmonad/icons/3cols.xpm".source = ./icons/3cols.xpm;
|
||||
".xmonad/icons/float.xpm".source = ./icons/float.xpm;
|
||||
".xmonad/icons/full.xpm".source = ./icons/full.xpm;
|
||||
".xmonad/icons/grid.xpm".source = ./icons/grid.xpm;
|
||||
".xmonad/icons/mtall.xpm".source = ./icons/mtall.xpm;
|
||||
".xmonad/icons/tabs.xpm".source = ./icons/tabs.xpm;
|
||||
".xmonad/icons/tall.xpm".source = ./icons/tall.xpm;
|
||||
};
|
||||
};
|
||||
|
||||
xsession = {
|
||||
enable = true;
|
||||
initExtra = ''
|
||||
xset s off -dpms
|
||||
${pkgs.autorandr}/bin/autorandr --change --default default
|
||||
export WINIT_X11_SCALE_FACTOR=1.33
|
||||
'';
|
||||
};
|
||||
|
||||
services.stalonetray = {
|
||||
enable = true;
|
||||
config = {
|
||||
icon_size = 16;
|
||||
background = "#282828"; # todo
|
||||
sticky = true;
|
||||
geometry = "3x1-350+0";
|
||||
icon_gravity = "E";
|
||||
grow_gravity = "E";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.loginExtra = ''
|
||||
[[ -z "''${DISPLAY}" ]] && [[ "$(tty)" = "/dev/tty1" ]] && \
|
||||
exec "${pkgs.xorg.xinit}/bin/startx" 1> "${config.home.homeDirectory}/.xsession-errors" 2>&1
|
||||
'';
|
||||
|
||||
}
|
|
@ -1,249 +0,0 @@
|
|||
{ config, pkgs, fontSize ? "10", monoFontSize ? "9", ... }:
|
||||
|
||||
let
|
||||
gruvbox-dark = {
|
||||
bg = "#282828";
|
||||
bg1 = "#3c3836";
|
||||
bg2 = "#504945";
|
||||
|
||||
fg = "#ebdbb2";
|
||||
fg0 = "#fbf1c7";
|
||||
fg3 = "#bdae93";
|
||||
|
||||
red = "#cc241d";
|
||||
green = "#98971a";
|
||||
yellow = "#d79921";
|
||||
blue = "#458588";
|
||||
purple = "#b16286";
|
||||
aqua = "#689d6a";
|
||||
gray = "#a89984";
|
||||
|
||||
gray2 = "#928374";
|
||||
red-light = "#fb4934";
|
||||
green-light = "#b8bb26";
|
||||
yellow-light = "#fabd2f";
|
||||
blue-light = "#83a598";
|
||||
purple-light = "#d3869b";
|
||||
aqua-light = "#8ec07c";
|
||||
|
||||
};
|
||||
colors = {
|
||||
fg = gruvbox-dark.fg;
|
||||
selFg = gruvbox-dark.fg0;
|
||||
bg = gruvbox-dark.bg;
|
||||
sel = gruvbox-dark.blue;
|
||||
inactive = gruvbox-dark.gray;
|
||||
inactiveBorder = gruvbox-dark.bg2;
|
||||
urgent = gruvbox-dark.red;
|
||||
};
|
||||
rofiTransparency = "96";
|
||||
font = {
|
||||
name = "Inter";
|
||||
size = fontSize;
|
||||
};
|
||||
monoFont = {
|
||||
name = "Hack";
|
||||
size = monoFontSize;
|
||||
};
|
||||
|
||||
hmonitors = pkgs.haskellPackages.callPackage ./hmonitors.nix { };
|
||||
|
||||
hmonitorsQuery = "${hmonitors}/bin/hmonitors-query";
|
||||
acpi = "${pkgs.acpi}/bin/acpi";
|
||||
nmcli = "${pkgs.networkmanager}/bin/nmcli";
|
||||
pamixer = "${pkgs.pamixer}/bin/pamixer";
|
||||
|
||||
in {
|
||||
|
||||
xsession.windowManager.xmonad = {
|
||||
enable = true;
|
||||
enableContribAndExtras = true;
|
||||
extraPackages = haskellPackages: [
|
||||
haskellPackages.monad-logger
|
||||
haskellPackages.dbus
|
||||
];
|
||||
config = ./xmonad/xmonad.hs;
|
||||
libFiles = {
|
||||
"Bindings.hs" = ./xmonad/lib/Bindings.hs;
|
||||
"DefaultConfig.hs" = ./xmonad/lib/DefaultConfig.hs;
|
||||
"Layouts.hs" = ./xmonad/lib/Layouts.hs;
|
||||
"ManageHook.hs" = ./xmonad/lib/ManageHook.hs;
|
||||
"Prompts.hs" = ./xmonad/lib/Prompts.hs;
|
||||
"Utils.hs" = ./xmonad/lib/Utils.hs;
|
||||
"Xmobar.hs" = ./xmonad/lib/Xmobar.hs;
|
||||
"HostConfig.hs" = pkgs.writeText "HostConfig.hs" ''
|
||||
module HostConfig
|
||||
( fontConfig
|
||||
, colorConfig
|
||||
, FontConfig (FontConfig)
|
||||
, fontSize
|
||||
, fontName
|
||||
, ColorConfig (ColorConfig)
|
||||
, fgColor
|
||||
, selFgColor
|
||||
, bgColor
|
||||
, selColor
|
||||
, inactiveColor
|
||||
, inactiveBorderColor
|
||||
, urgentColor
|
||||
) where
|
||||
|
||||
fontConfig :: FontConfig
|
||||
fontConfig = FontConfig
|
||||
{ fontSize = ${font.size}
|
||||
, fontName = "${font.name}"
|
||||
}
|
||||
|
||||
colorConfig :: ColorConfig
|
||||
colorConfig = ColorConfig
|
||||
{ fgColor = "${colors.fg}"
|
||||
, selFgColor = "${colors.selFg}"
|
||||
, bgColor = "${colors.bg}"
|
||||
, selColor = "${colors.sel}"
|
||||
, inactiveColor = "${colors.inactive}"
|
||||
, inactiveBorderColor = "${colors.inactiveBorder}"
|
||||
, urgentColor = "${colors.urgent}"
|
||||
}
|
||||
|
||||
data FontConfig = FontConfig
|
||||
{ fontSize :: Int
|
||||
, fontName :: String
|
||||
} deriving Show
|
||||
|
||||
data ColorConfig = ColorConfig
|
||||
{ fgColor :: String
|
||||
, selFgColor :: String
|
||||
, bgColor :: String
|
||||
, selColor :: String
|
||||
, inactiveColor :: String
|
||||
, inactiveBorderColor :: String
|
||||
, urgentColor :: String
|
||||
} deriving Show
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.xmobar = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
Config
|
||||
{ font = "${font.name} ${font.size}"
|
||||
, additionalFonts = ["mplus Nerd Font 12"]
|
||||
, bgColor = "${colors.bg}"
|
||||
, fgColor = "${colors.fg}"
|
||||
, alignSep = "}{"
|
||||
, sepChar = "%"
|
||||
, template = "%StdinReader% }{ %vol%%bat%%net%%date%"
|
||||
, lowerOnStart = True
|
||||
, hideOnStart = False
|
||||
, persistent = True
|
||||
, allDesktops = True
|
||||
, position = TopW L 100
|
||||
, commands =
|
||||
[ Run Com "${hmonitorsQuery}" ["date"] "date" 10
|
||||
, Run Com "${hmonitorsQuery}" ["bat"] "bat" 10
|
||||
-- , Run Com "${hmonitorsQuery}" ["net"] "net" 20
|
||||
, Run Com "${hmonitorsQuery}" ["vol"] "vol" 5
|
||||
, Run StdinReader
|
||||
]
|
||||
}
|
||||
, wmClass = "xmobar"
|
||||
, wmName = "xmobar"
|
||||
, border = NoBorder
|
||||
, borderColor = "${colors.bg}"
|
||||
, pickBroadest = False
|
||||
, alpha = 255
|
||||
, iconRoot = "."
|
||||
'';
|
||||
};
|
||||
|
||||
services.dunst = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
settings = {
|
||||
global = {
|
||||
font = "${font.name} ${font.size}";
|
||||
format = "<b>%s</b>\\n%b";
|
||||
sort = "yes";
|
||||
indicate_hidden = "yes";
|
||||
alignment = "left";
|
||||
bounce_freq = 0;
|
||||
show_age_threshold = 60;
|
||||
word_wrap = "yes";
|
||||
ignore_newline = "no";
|
||||
geometry = "300x5-30+20";
|
||||
shrink = "yes";
|
||||
transparency = 0;
|
||||
idle_threshold = 10;
|
||||
monitor = 0;
|
||||
follow = "mouse";
|
||||
sticky_history = "yes";
|
||||
history_length = 20;
|
||||
show_indicators = "yes";
|
||||
line_height = 0;
|
||||
separator_height = 2;
|
||||
padding = 8;
|
||||
horizontal_padding = 8;
|
||||
separator_color = "frame";
|
||||
startup_notification = false;
|
||||
dmenu = "${pkgs.rofi}/bin/rofi -dmenu -p dunst:";
|
||||
browser = "${pkgs.firefox}/bin/firefox";
|
||||
icon_position = "left";
|
||||
frame_width = 0;
|
||||
frame_color = colors.inactive;
|
||||
};
|
||||
shortcuts = {
|
||||
close = "ctrl+space";
|
||||
close_all = "ctrl+shift+space";
|
||||
context = "ctrl+shift+period";
|
||||
};
|
||||
urgency_low = {
|
||||
background = "${colors.bg}${rofiTransparency}";
|
||||
foreground = colors.fg;
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_normal = {
|
||||
background = "${colors.sel}${rofiTransparency}";
|
||||
foreground = colors.selFg;
|
||||
timeout = 10;
|
||||
};
|
||||
urgency_critical = {
|
||||
background = "${colors.urgent}${rofiTransparency}";
|
||||
foreground = colors.selFg;
|
||||
timeout = 10;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.zathura = {
|
||||
enable = true;
|
||||
options = {
|
||||
font = "${monoFont.name} ${monoFont.size}";
|
||||
default-bg = colors.bg;
|
||||
default-fg = gruvbox-dark.bg1;
|
||||
statusbar-fg = gruvbox-dark.fg3;
|
||||
statusbar-bg = gruvbox-dark.bg2;
|
||||
inputbar-bg = colors.bg;
|
||||
inputbar-fg = colors.sel;
|
||||
notification-bg = colors.bg;
|
||||
notification-fg = colors.sel;
|
||||
notification-error-bg = colors.bg;
|
||||
notification-error-fg = gruvbox-dark.red-light;
|
||||
notification-warning-bg = colors.bg;
|
||||
notification-warning-fg = gruvbox-dark.red-light;
|
||||
highlight-color = gruvbox-dark.yellow-light;
|
||||
highlight-active-color = gruvbox-dark.blue-light;
|
||||
completion-bg = gruvbox-dark.bg1;
|
||||
completion-fg = gruvbox-dark.blue-light;
|
||||
completion-highlight-fg = colors.selFg;
|
||||
completion-highlight-bg = gruvbox-dark.blue-light;
|
||||
recolor-lightcolor = colors.bg;
|
||||
recolor-darkcolor = colors.fg;
|
||||
recolor = false;
|
||||
recolor-keephue = false;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ mkDerivation, base, containers, lib, process, regex-compat, split, time }:
|
||||
mkDerivation {
|
||||
pname = "hmonitors";
|
||||
version = "0.1.0.0";
|
||||
src = builtins.fetchGit {
|
||||
name = "hmonitors";
|
||||
url = "https://git.monotremata.xyz/rilla/hmonitors.git";
|
||||
ref = "main";
|
||||
rev = "a17f3f0e273b44c021d42c68f186fe1ae4149102";
|
||||
};
|
||||
isLibrary = true;
|
||||
isExecutable = true;
|
||||
libraryHaskellDepends = [ base containers process regex-compat split time ];
|
||||
executableHaskellDepends = [ base ];
|
||||
license = lib.licenses.bsd3;
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *_cols[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *float[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
".. ",
|
||||
".. ",
|
||||
".. ",
|
||||
".. ",
|
||||
".. ",
|
||||
".. ",
|
||||
".. ",
|
||||
"......... ",
|
||||
"......... ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .........",
|
||||
" ........."
|
||||
};
|
|
@ -1,23 +0,0 @@
|
|||
/* XPM */
|
||||
static char *full[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 1 1 ",
|
||||
" c #EBDBB2",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *grid[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
"................",
|
||||
"................",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *mtall[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
"................",
|
||||
"................",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. ",
|
||||
" .. .. "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *tabs[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
" ",
|
||||
" .............. ",
|
||||
" ",
|
||||
"................",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
/* XPM */
|
||||
static char *tall[] = {
|
||||
/* columns rows colors chars-per-pixel */
|
||||
"16 16 2 1 ",
|
||||
" c #EBDBB2",
|
||||
". c None",
|
||||
/* pixels */
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .........",
|
||||
" .........",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .........",
|
||||
" .........",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. ",
|
||||
" .. "
|
||||
};
|
|
@ -1,24 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let wallpapers = "${config.home.homeDirectory}/Images/wallpapers/enabled";
|
||||
in {
|
||||
services.random-background = {
|
||||
enable = true;
|
||||
enableXinerama = true;
|
||||
display = "fill";
|
||||
imageDirectory = wallpapers;
|
||||
};
|
||||
|
||||
systemd.user.services.xbanish = {
|
||||
Unit = {
|
||||
Description = "Xbanish";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.xbanish}/bin/xbanish";
|
||||
};
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
};
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
{ config, pkgs, ...}:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
xmonad = "${pkgs.haskellPackages.xmonad}/bin/xmonad";
|
||||
openbox = "${pkgs.openbox}/bin/openbox";
|
||||
in
|
||||
pkgs.writeScriptBin "obtoxmd" ''
|
||||
#!${shell}
|
||||
${openbox}
|
||||
${xmonad}
|
||||
''
|
|
@ -1,140 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
gruvbox-dark = {
|
||||
bg = "#282828";
|
||||
bg1 = "#3c3836";
|
||||
bg2 = "#504945";
|
||||
|
||||
fg = "#ebdbb2";
|
||||
fg0 = "#fbf1c7";
|
||||
fg3 = "#bdae93";
|
||||
|
||||
red = "#cc241d";
|
||||
green = "#98971a";
|
||||
yellow = "#d79921";
|
||||
blue = "#458588";
|
||||
purple = "#b16286";
|
||||
aqua = "#689d6a";
|
||||
gray = "#a89984";
|
||||
|
||||
gray2 = "#928374";
|
||||
red-light = "#fb4934";
|
||||
green-light = "#b8bb26";
|
||||
yellow-light = "#fabd2f";
|
||||
blue-light = "#83a598";
|
||||
purple-light = "#d3869b";
|
||||
aqua-light = "#8ec07c";
|
||||
|
||||
};
|
||||
colors = {
|
||||
fg = gruvbox-dark.fg;
|
||||
selFg = gruvbox-dark.fg0;
|
||||
bg = gruvbox-dark.bg;
|
||||
sel = gruvbox-dark.blue;
|
||||
inactive = gruvbox-dark.gray;
|
||||
inactiveBorder = gruvbox-dark.bg2;
|
||||
urgent = gruvbox-dark.red;
|
||||
};
|
||||
rofiTransparency = "96";
|
||||
font = {
|
||||
name = "Inter";
|
||||
size = "10";
|
||||
};
|
||||
monoFont = {
|
||||
name = "Hack";
|
||||
size = "9";
|
||||
};
|
||||
|
||||
in {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
font = "${font.name} ${font.size}";
|
||||
extraConfig = {
|
||||
display-run = " ";
|
||||
# display-drun = " ";
|
||||
display-window = " ";
|
||||
drun-display-format = "{name}";
|
||||
modi = "window,run,drun,ssh";
|
||||
show-icons = false;
|
||||
};
|
||||
theme = let inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
background-color = mkLiteral "transparent";
|
||||
border = 0;
|
||||
margin = 0;
|
||||
padding = 0;
|
||||
spacing = 0;
|
||||
};
|
||||
element = {
|
||||
padding = 2;
|
||||
orientation = "vertical";
|
||||
};
|
||||
"element-text" = { text-color = mkLiteral colors.fg; };
|
||||
|
||||
"element selected" = {
|
||||
text-color = mkLiteral colors.selFg;
|
||||
background-color = mkLiteral "${colors.sel}A0";
|
||||
};
|
||||
entry = {
|
||||
padding = mkLiteral "0 0 6 3";
|
||||
text-color = mkLiteral colors.fg;
|
||||
};
|
||||
inputbar = {
|
||||
children = map mkLiteral [ "prompt" "entry" ];
|
||||
border = mkLiteral "0 0 1 0";
|
||||
border-color = mkLiteral gruvbox-dark.gray2;
|
||||
margin = mkLiteral "0 0 5 0";
|
||||
};
|
||||
listview = {
|
||||
columns = 1;
|
||||
fixed-height = false;
|
||||
};
|
||||
mainbox = {
|
||||
children = map mkLiteral [ "inputbar" "listview" ];
|
||||
margin = 6;
|
||||
};
|
||||
prompt = {
|
||||
padding = mkLiteral "0 0 0 6";
|
||||
text-color = mkLiteral colors.fg;
|
||||
background-color = mkLiteral "transparent";
|
||||
};
|
||||
window = {
|
||||
transparency = "real";
|
||||
background-color = mkLiteral "${colors.bg}D0";
|
||||
y-offset = mkLiteral "-25%";
|
||||
border = 2;
|
||||
border-color = mkLiteral colors.sel;
|
||||
};
|
||||
};
|
||||
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||
pass = {
|
||||
enable = true;
|
||||
extraConfig = ''
|
||||
URL_field='url'
|
||||
USERNAME_field='user'
|
||||
AUTOTYPE_field='autotype'
|
||||
delay=2
|
||||
wait=0.2
|
||||
xdotool_delay=12
|
||||
EDITOR='gvim -f'
|
||||
BROWSER='xdg-open'
|
||||
default_do='typePass' # menu, autotype, copyPass, typeUser, typePass, copyUser, copyUrl, viewEntry, typeMenu, actionMenu, copyMenu, openUrl
|
||||
auto_enter='false'
|
||||
notify='false'
|
||||
default_autotype='user :tab pass'
|
||||
help_color="${gruvbox-dark.blue-light}"
|
||||
clip=primary
|
||||
clip_clear=45
|
||||
edit_new_pass="true"
|
||||
default_user=":filename"
|
||||
autotype="Alt+1"
|
||||
type_user="Alt+u"
|
||||
type_pass="Alt+p"
|
||||
copy_name=""
|
||||
copy_pass=""
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
desktopConfig = import ./desktop_config.nix {
|
||||
config = config;
|
||||
pkgs = pkgs;
|
||||
fontSize = "11";
|
||||
monoFontSize = "13";
|
||||
};
|
||||
in desktopConfig // {
|
||||
imports = [ ./common.nix ./autorandr/trantor.nix ];
|
||||
|
||||
services.picom = {
|
||||
enable = true;
|
||||
fade = false;
|
||||
shadow = true;
|
||||
backend = "glx";
|
||||
shadowExclude = [ "name ~= 'stalonetray'" ];
|
||||
settings.unredir-if-possible = false;
|
||||
vSync = true;
|
||||
};
|
||||
|
||||
home.file.".xinitrc".text = ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --setprovideroutputsource modesetting NVIDIA-0
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --auto
|
||||
${pkgs.acpilight}/bin/xbacklight -set 100
|
||||
exec ${config.home.homeDirectory}/.xsession
|
||||
'';
|
||||
}
|
|
@ -1,376 +0,0 @@
|
|||
module Bindings
|
||||
( keybinds
|
||||
, mousebinds
|
||||
) where
|
||||
|
||||
--
|
||||
-- q , w , e : screen naviagation
|
||||
-- h , j , k , l : vim-style 2D navitgation
|
||||
-- n , p : next/previous
|
||||
-- r : run
|
||||
-- t : tile
|
||||
-- g : toggle spacing (gaps)
|
||||
-- b " toggle bar
|
||||
-- x , y : reflect
|
||||
-- z : minimize
|
||||
-- [ , ] : tab navigation
|
||||
|
||||
import System.Exit (exitSuccess)
|
||||
|
||||
import Data.Monoid ( appEndo )
|
||||
import Data.Ratio ( (%) )
|
||||
import qualified Data.Map as M
|
||||
|
||||
import XMonad ( (.|.) , gets )
|
||||
import XMonad.Util.Types ( Direction2D (U, D, L, R) )
|
||||
import XMonad.Hooks.ManageDocks ( ToggleStruts (ToggleStruts) )
|
||||
import XMonad.Util.Run ( safeSpawn )
|
||||
import XMonad.Util.Paste ( pasteSelection )
|
||||
import XMonad.Layout.ResizableTile ( MirrorResize (MirrorShrink, MirrorExpand) )
|
||||
import XMonad.Layout.Reflect ( REFLECTX (REFLECTX) , REFLECTY (REFLECTY) )
|
||||
import XMonad.Layout.MultiToggle ( Toggle (Toggle) )
|
||||
import XMonad.Layout.BoringWindows ( focusUp , focusDown )
|
||||
import XMonad.Layout.Maximize ( maximizeRestore )
|
||||
import XMonad.Actions.CopyWindow ( kill1 )
|
||||
-- import XMonad.Actions.FloatKeys ( keysResizeWindow, keysMoveWindow, ChangeDim )
|
||||
import XMonad.Actions.FloatKeys
|
||||
import XMonad.Actions.Navigation2D ( switchLayer , windowGo , windowSwap )
|
||||
import XMonad.Hooks.ManageHelpers ( doRectFloat )
|
||||
|
||||
import XMonad.Core
|
||||
( Layout
|
||||
, X
|
||||
, terminal
|
||||
, modMask
|
||||
, layoutHook
|
||||
, XConfig (XConfig)
|
||||
, whenJust
|
||||
, runQuery
|
||||
, windowset
|
||||
, io
|
||||
, ScreenId
|
||||
, WindowSpace
|
||||
)
|
||||
|
||||
import XMonad.Layout.IndependentScreens
|
||||
( workspaces'
|
||||
, onCurrentScreen
|
||||
, unmarshallS
|
||||
)
|
||||
|
||||
import XMonad.Layout.SubLayouts
|
||||
( onGroup
|
||||
, pushGroup
|
||||
, GroupMsg (MergeAll, UnMerge)
|
||||
)
|
||||
|
||||
import Graphics.X11.Types
|
||||
( Window , ButtonMask , KeyMask , KeySym , Button
|
||||
, button1 , button2 , button3
|
||||
, shiftMask , controlMask
|
||||
, xK_Return , xK_Escape , xK_Insert , xK_Right , xK_Left
|
||||
, xK_space , xK_plus , xK_minus , xK_comma , xK_period
|
||||
, xK_bracketleft , xK_bracketright
|
||||
, xK_1 , xK_9 , xK_0
|
||||
, xK_b , xK_c , xK_e , xK_g , xK_h , xK_j , xK_k , xK_l , xK_m
|
||||
, xK_n , xK_o , xK_p , xK_q , xK_r , xK_t , xK_u , xK_w , xK_x
|
||||
, xK_y , xK_z
|
||||
, xK_KP_End , xK_KP_Down , xK_KP_Next
|
||||
, xK_KP_Add, xK_KP_Subtract, xK_KP_Insert, xK_KP_Enter
|
||||
)
|
||||
|
||||
import Graphics.X11.ExtraTypes.XF86
|
||||
( xF86XK_AudioMute
|
||||
, xF86XK_AudioLowerVolume , xF86XK_AudioRaiseVolume
|
||||
, xF86XK_AudioPlay , xF86XK_AudioStop
|
||||
, xF86XK_AudioPrev , xF86XK_AudioNext
|
||||
, xF86XK_RotateWindows
|
||||
, xF86XK_MonBrightnessUp , xF86XK_MonBrightnessDown
|
||||
)
|
||||
|
||||
import XMonad.Layout
|
||||
( IncMasterN (..)
|
||||
, Resize (Shrink, Expand)
|
||||
, ChangeLayout (NextLayout)
|
||||
)
|
||||
|
||||
import XMonad.Operations
|
||||
( windows
|
||||
, sendMessage
|
||||
, setLayout
|
||||
, withFocused
|
||||
, screenWorkspace
|
||||
, restart
|
||||
, mouseResizeWindow
|
||||
, mouseMoveWindow
|
||||
, focus
|
||||
, D
|
||||
)
|
||||
|
||||
import XMonad.StackSet
|
||||
( StackSet (..)
|
||||
, RationalRect (..)
|
||||
, Workspace (..)
|
||||
, shift
|
||||
, view
|
||||
, swapUp
|
||||
, swapDown
|
||||
, sink
|
||||
, view
|
||||
, floating
|
||||
, screen
|
||||
, shiftMaster
|
||||
, focusDown'
|
||||
, focusUp'
|
||||
)
|
||||
|
||||
import XMonad.Layout.Spacing
|
||||
( toggleScreenSpacingEnabled
|
||||
, toggleWindowSpacingEnabled
|
||||
)
|
||||
|
||||
import XMonad.Actions.Minimize
|
||||
( minimizeWindow
|
||||
, withLastMinimized
|
||||
, maximizeWindowAndFocus
|
||||
)
|
||||
|
||||
import XMonad.Actions.CycleWS
|
||||
( toggleWS'
|
||||
, WSType (WSIs)
|
||||
, shiftTo
|
||||
, moveTo
|
||||
, Direction1D (Next, Prev)
|
||||
)
|
||||
|
||||
import ManageHook ( scratchpadKeybinds )
|
||||
import Prompts ( promptKeybinds )
|
||||
import Utils ( mkSubmap )
|
||||
|
||||
mousebinds :: XConfig Layout -> M.Map (KeyMask, Button) (Window -> X ())
|
||||
mousebinds XConfig {modMask = modm} = M.fromList bindings
|
||||
where
|
||||
bindings =
|
||||
[ ((modm, button1), move)
|
||||
, ((modm, button2), toMaster)
|
||||
, ((modm, button3), resize)
|
||||
]
|
||||
move = mouseDo mouseMoveWindow
|
||||
resize = mouseDo mouseResizeWindow
|
||||
toMaster = mouseDo return
|
||||
mouseDo f w = focus w >> f w >> windows shiftMaster
|
||||
|
||||
keybinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
keybinds = foldr1 keyComb
|
||||
[ wmBinds
|
||||
, spawnBinds
|
||||
, promptKeybinds
|
||||
, scratchpadKeybinds
|
||||
, workspaceBinds
|
||||
, screenBinds
|
||||
]
|
||||
where
|
||||
keyComb f g conf = M.union (f conf) (g conf)
|
||||
|
||||
spawnBinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
spawnBinds conf = M.fromList . map mkSpawn $ bindList
|
||||
where
|
||||
bindList = singles ++ playerctl ++ xbacklight ++ pamixer
|
||||
singles =
|
||||
[ ((modm, xK_Return), terminal conf, [])
|
||||
, ((0, xF86XK_RotateWindows), "thinkpad-rotate", [])
|
||||
, ((modm, xK_Escape), "slock", [])
|
||||
]
|
||||
-- mpc = withCmd "mpc"
|
||||
-- [ ((0, xK_KP_End), ["prev"])
|
||||
-- , ((0, xK_KP_Down), ["toggle"])
|
||||
-- , ((0, xK_KP_Next), ["next"])
|
||||
-- , ((0, xF86XK_AudioPlay), ["toggle"])
|
||||
-- , ((0, xF86XK_AudioStop), ["stop"])
|
||||
-- , ((0, xF86XK_AudioPrev), ["prev"])
|
||||
-- , ((0, xF86XK_AudioNext), ["next"])
|
||||
-- ]
|
||||
playerctl = withCmd "playerctl"
|
||||
[ ((0, xK_KP_End), ["previous"])
|
||||
, ((0, xK_KP_Down), ["play-pause"])
|
||||
, ((0, xK_KP_Next), ["next"])
|
||||
, ((0, xF86XK_AudioPlay), ["play-pause"])
|
||||
, ((0, xF86XK_AudioStop), ["stop"])
|
||||
, ((0, xF86XK_AudioPrev), ["previous"])
|
||||
, ((0, xF86XK_AudioNext), ["next"])
|
||||
]
|
||||
xbacklight = withCmd "xbacklight"
|
||||
[ ((0, xF86XK_MonBrightnessUp), ["-inc", "10"])
|
||||
, ((0, xF86XK_MonBrightnessDown), ["-dec", "10"])
|
||||
]
|
||||
pamixer = withCmd "pamixer"
|
||||
[ ((0, xK_KP_Subtract), ["--decrease", "5"])
|
||||
, ((0, xK_KP_Add), ["--increase", "5", "--allow-boost"])
|
||||
, ((0, xK_KP_Enter), ["--set-volume", "100"])
|
||||
, ((0, xK_KP_Insert), ["--togle-mute"])
|
||||
, ((0, xF86XK_AudioLowerVolume), ["--decrease", "5"])
|
||||
, ((0, xF86XK_AudioRaiseVolume), ["--increase", "5", "--allow-boost"])
|
||||
, ((0, xF86XK_AudioMute), ["--toggle-mute"])
|
||||
]
|
||||
mkSpawn (comb,cmd,args) = (comb, safeSpawn cmd args)
|
||||
withCmd cmd = map (\(comb,args) -> (comb,cmd,args))
|
||||
modm = modMask conf
|
||||
|
||||
wmBinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
wmBinds conf@XConfig {modMask = modm} = M.fromList
|
||||
[ ((0, xK_Insert), pasteSelection)
|
||||
|
||||
, ((modm .|. shiftMask, xK_o), restart "obtoxmd" True)
|
||||
, ((modm .|. shiftMask, xK_r), restart "xmonad" True)
|
||||
, ((modm .|. shiftMask, xK_Escape), io exitSuccess)
|
||||
|
||||
-- navigating windows
|
||||
, ((modm, xK_j), windowGo D False)
|
||||
, ((modm, xK_k), windowGo U False)
|
||||
, ((modm, xK_h), windowGo L False)
|
||||
, ((modm, xK_l), windowGo R False)
|
||||
, ((modm, xK_n), focusDown)
|
||||
, ((modm, xK_p), focusUp)
|
||||
|
||||
-- sublayout things
|
||||
, ((modm .|. controlMask, xK_m), withFocused (sendMessage . MergeAll))
|
||||
, ((modm .|. controlMask, xK_u), withFocused (sendMessage . UnMerge))
|
||||
, ((modm .|. controlMask, xK_h), sendMessage $ pushGroup L)
|
||||
, ((modm .|. controlMask, xK_l), sendMessage $ pushGroup R)
|
||||
, ((modm .|. controlMask, xK_k), sendMessage $ pushGroup U)
|
||||
, ((modm .|. controlMask, xK_j), sendMessage $ pushGroup D)
|
||||
, ((modm, xK_bracketleft), onGroup focusUp')
|
||||
, ((modm, xK_bracketright), onGroup focusDown')
|
||||
|
||||
-- moving windows
|
||||
, ((modm .|. shiftMask, xK_j), move M.! "D")
|
||||
, ((modm .|. shiftMask, xK_k), move M.! "U")
|
||||
, ((modm .|. shiftMask, xK_h), move M.! "L")
|
||||
, ((modm .|. shiftMask, xK_l), move M.! "R")
|
||||
, ((modm .|. shiftMask, xK_n), windows swapDown)
|
||||
, ((modm .|. shiftMask, xK_p), windows swapUp)
|
||||
|
||||
-- resizing windows
|
||||
, ((modm, xK_plus ), resize M.! "+")
|
||||
, ((modm, xK_minus), resize M.! "-")
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_h), resize M.! "L")
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_l), resize M.! "R")
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_j), resize M.! "D")
|
||||
, ((modm .|. shiftMask .|. controlMask, xK_k), resize M.! "U")
|
||||
|
||||
, ((modm .|. controlMask, xK_space), switchLayer)
|
||||
|
||||
, ((modm .|. shiftMask, xK_c ), kill1)
|
||||
, ((modm, xK_space ), sendMessage NextLayout)
|
||||
, ((modm .|. shiftMask, xK_space ), setLayout $ layoutHook conf)
|
||||
, ((modm, xK_x ), sendMessage $ Toggle REFLECTX)
|
||||
, ((modm, xK_y ), sendMessage $ Toggle REFLECTY)
|
||||
, ((modm, xK_z ), withFocused minimizeWindow)
|
||||
, ((modm .|. shiftMask, xK_z ), unminimize)
|
||||
, ((modm, xK_m ), toggleMax)
|
||||
|
||||
, ((modm, xK_t ), withFocused $ windows . sink)
|
||||
, ((modm .|. shiftMask, xK_t ), untile)
|
||||
|
||||
, ((modm, xK_comma ), sendMessage (IncMasterN 1))
|
||||
, ((modm, xK_period), sendMessage (IncMasterN (-1)))
|
||||
, ((modm, xK_g ), toggleSpacing)
|
||||
, ((modm, xK_b ), sendMessage ToggleStruts)
|
||||
|
||||
, ((modm, xK_Right ), moveTo Next spacesOnCurrentScreen)
|
||||
, ((modm, xK_Left ), moveTo Prev spacesOnCurrentScreen)
|
||||
, ((modm .|. shiftMask, xK_Right ), shiftTo Next spacesOnCurrentScreen)
|
||||
, ((modm .|. shiftMask, xK_Left ), shiftTo Prev spacesOnCurrentScreen)
|
||||
|
||||
, ((modm, xK_0), toggleWS' ["NSP"])
|
||||
]
|
||||
|
||||
where
|
||||
toggleSpacing = toggleWindowSpacingEnabled >> toggleScreenSpacingEnabled
|
||||
toggleMax = withFocused (sendMessage . maximizeRestore)
|
||||
unminimize = withLastMinimized maximizeWindowAndFocus
|
||||
|
||||
untile = withFocused rectFloatFocused
|
||||
where
|
||||
rectFloatFocused focused = action focused >>= windows
|
||||
action = fmap appEndo . doIt
|
||||
doIt = runQuery $ doRectFloat rect
|
||||
rect = RationalRect 0.05 0.05 0.9 0.9
|
||||
|
||||
resize :: M.Map [Char] (X())
|
||||
resize = M.intersectionWith onFloat flt tilling
|
||||
where
|
||||
|
||||
flt :: M.Map [Char] (Window -> X())
|
||||
flt = M.fromList
|
||||
[ ("L", keysResizeWindow (-n, 0) (0, 0))
|
||||
, ("R", keysResizeWindow ( n, 0) (0, 0))
|
||||
, ("D", keysResizeWindow ( 0, n) (0, 0))
|
||||
, ("U", keysResizeWindow ( 0, -n) (0, 0))
|
||||
, ("+", keysResizeWindow ( n, n) (1%2, 1%2))
|
||||
, ("-", keysResizeWindow (-n, -n) (1%2, 1%2))
|
||||
]
|
||||
|
||||
tilling :: M.Map [Char] (X())
|
||||
tilling = M.fromList
|
||||
[ ("L", sendMessage Shrink)
|
||||
, ("R", sendMessage Expand)
|
||||
, ("D", sendMessage MirrorShrink)
|
||||
, ("U", sendMessage MirrorExpand)
|
||||
, ("+", return ())
|
||||
, ("-", return ())
|
||||
]
|
||||
n = 10
|
||||
|
||||
move :: M.Map [Char] (X())
|
||||
move = M.intersectionWith onFloat flt tilling
|
||||
where
|
||||
|
||||
flt :: M.Map [Char] (Window -> X())
|
||||
flt = M.fromList
|
||||
[ ("L", keysMoveWindow (-n, 0))
|
||||
, ("R", keysMoveWindow ( n, 0))
|
||||
, ("D", keysMoveWindow ( 0, n))
|
||||
, ("U", keysMoveWindow ( 0, -n))
|
||||
]
|
||||
|
||||
tilling :: M.Map [Char] (X())
|
||||
tilling = M.fromList
|
||||
[ ("L", windowSwap L False)
|
||||
, ("R", windowSwap R False)
|
||||
, ("D", windowSwap D False)
|
||||
, ("U", windowSwap U False)
|
||||
]
|
||||
n = 10
|
||||
|
||||
onFloat a b = withFocused $ ifFloat a (const b)
|
||||
where
|
||||
ifFloat x y w = isFloat w >>= picker x y w
|
||||
|
||||
picker x _ w True = x w
|
||||
picker _ y w False = y w
|
||||
|
||||
isFloat :: Window -> X Bool
|
||||
isFloat w = M.member w . floating <$> gets windowset
|
||||
|
||||
spacesOnCurrentScreen :: WSType
|
||||
spacesOnCurrentScreen = WSIs $ isOnScreen <$> currentScreen
|
||||
where
|
||||
|
||||
isOnScreen :: ScreenId -> WindowSpace -> Bool
|
||||
isOnScreen s = (s ==) . unmarshallS . tag
|
||||
|
||||
currentScreen :: X ScreenId
|
||||
currentScreen = gets $ screen . current . windowset
|
||||
|
||||
workspaceBinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
workspaceBinds conf@XConfig {modMask = modm} = M.fromList $
|
||||
[((m .|. modm, k), windows $ onCurrentScreen f i)
|
||||
| (i, k) <- zip (workspaces' conf) [xK_1 .. xK_9]
|
||||
, (f, m) <- [(view, 0), (shift, shiftMask)]]
|
||||
|
||||
screenBinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
screenBinds XConfig {modMask = modm} = M.fromList $
|
||||
[((m .|. modm, k), screenWorkspace i >>= flip whenJust (windows . f))
|
||||
| (i, k) <- zip [0,1] [xK_w, xK_e]
|
||||
, (f, m) <- [(view, 0), (shift, shiftMask)]]
|
|
@ -1,85 +0,0 @@
|
|||
module DefaultConfig
|
||||
( mkPP
|
||||
, wsNamer
|
||||
, defaultPP
|
||||
) where
|
||||
|
||||
import MyConfig
|
||||
( workspaceLog
|
||||
, layoutLog
|
||||
, taskbar
|
||||
)
|
||||
|
||||
import Theme
|
||||
( inactiveColor
|
||||
, urgentColor
|
||||
, selFg
|
||||
, selectionColor
|
||||
)
|
||||
|
||||
import GHC.IO.Handle.Types (Handle)
|
||||
|
||||
import XMonad.Hooks.DynamicLog
|
||||
( ppCurrent
|
||||
, ppOutput
|
||||
, ppExtras
|
||||
, ppVisible
|
||||
, ppHidden
|
||||
, ppHiddenNoWindows
|
||||
, ppUrgent
|
||||
, ppOrder
|
||||
, ppTitle
|
||||
, ppSep
|
||||
, ppLayout
|
||||
, PP
|
||||
, xmobarColor
|
||||
, wrap
|
||||
, shorten
|
||||
)
|
||||
|
||||
import XMonad.Config (def)
|
||||
|
||||
import XMonad.Util.Run (hPutStrLn)
|
||||
|
||||
|
||||
mkPP :: (String -> String) -> Bool -> Handle -> Int -> PP
|
||||
mkPP workspaceNamer complete bar screen = common
|
||||
{ ppOutput = hPutStrLn bar
|
||||
, ppExtras = extras complete
|
||||
}
|
||||
where
|
||||
common = def
|
||||
{ ppCurrent = const ""
|
||||
, ppVisible = const ""
|
||||
, ppHidden = const ""
|
||||
, ppHiddenNoWindows = const ""
|
||||
, ppUrgent = xmobarColor urgentColor ""
|
||||
, ppOrder = order complete
|
||||
, ppTitle = title complete
|
||||
, ppSep = xmobarColor inactiveColor "" "|"
|
||||
, ppLayout = const ""
|
||||
}
|
||||
|
||||
extras True =
|
||||
[ workspaceLog workspaceNamer screen
|
||||
, layoutLog screen
|
||||
, taskbar screen
|
||||
]
|
||||
extras False =
|
||||
[ workspaceLog workspaceNamer screen
|
||||
, layoutLog screen
|
||||
]
|
||||
|
||||
order True (_:_:_:xs) = xs
|
||||
order False (_:_:t:ws:l:_) = [ws, l, t]
|
||||
order _ _ = []
|
||||
|
||||
title True = const ""
|
||||
title False = wrap " " "" . xmobarColor selFg selectionColor . wrap " " " " . shorten 80
|
||||
|
||||
wsNamer :: String -> String
|
||||
wsNamer "NSP" = ""
|
||||
wsNamer x = x
|
||||
|
||||
defaultPP :: Handle -> Int -> PP
|
||||
defaultPP = mkPP wsNamer True
|
|
@ -1,124 +0,0 @@
|
|||
{-# LANGUAGE FlexibleContexts #-}
|
||||
{-# OPTIONS_GHC -fno-warn-missing-signatures #-}
|
||||
|
||||
module Layouts (myLayoutHook) where
|
||||
|
||||
import Text.Printf (printf)
|
||||
|
||||
import XMonad.Config (def)
|
||||
import XMonad.Core ( LayoutClass )
|
||||
import XMonad.Hooks.ManageDocks (avoidStruts)
|
||||
|
||||
import XMonad.Layout ( Mirror (Mirror) , (|||) )
|
||||
import XMonad.Layout.PerWorkspace ( onWorkspaces )
|
||||
import XMonad.Layout.LayoutModifier ( ModifiedLayout , LayoutModifier )
|
||||
import XMonad.Layout.BoringWindows ( boringWindows )
|
||||
import XMonad.Layout.Decoration ( Theme , DefaultShrinker , Decoration )
|
||||
import XMonad.Layout.Maximize ( maximizeWithPadding )
|
||||
import XMonad.Layout.Minimize ( minimize )
|
||||
import XMonad.Layout.MultiToggle ( mkToggle , single )
|
||||
import XMonad.Layout.Renamed ( renamed, Rename (Replace) )
|
||||
import XMonad.Layout.NoBorders ( smartBorders )
|
||||
import XMonad.Layout.ResizableTile ( ResizableTall (..) )
|
||||
import XMonad.Layout.Spacing ( Spacing , spacingRaw , Border (..) )
|
||||
import XMonad.Layout.WindowNavigation ( windowNavigation )
|
||||
import XMonad.Layout.SubLayouts ( subLayout , Sublayout )
|
||||
import XMonad.Layout.Simplest ( Simplest(Simplest) )
|
||||
import XMonad.Layout.Grid ( Grid(Grid) )
|
||||
import XMonad.Layout.Reflect
|
||||
( REFLECTX (REFLECTX)
|
||||
, REFLECTY (REFLECTY)
|
||||
)
|
||||
import XMonad.Layout.Tabbed
|
||||
( shrinkText
|
||||
, addTabs
|
||||
, TabbedDecoration
|
||||
)
|
||||
import qualified XMonad.Layout.Tabbed as T
|
||||
( activeColor
|
||||
, inactiveColor
|
||||
, activeBorderColor
|
||||
, inactiveBorderColor
|
||||
, urgentColor
|
||||
, activeTextColor
|
||||
, inactiveTextColor
|
||||
, urgentTextColor
|
||||
, fontName
|
||||
)
|
||||
|
||||
import XMonad.Layout.PositionStoreFloat (positionStoreFloat)
|
||||
import XMonad.Layout.NoFrillsDecoration (noFrillsDeco)
|
||||
import XMonad.Layout.BorderResize (borderResize)
|
||||
|
||||
import HostConfig
|
||||
( FontConfig
|
||||
, fontName
|
||||
, fontSize
|
||||
, ColorConfig
|
||||
, fgColor
|
||||
, selFgColor
|
||||
, bgColor
|
||||
, selColor
|
||||
, inactiveColor
|
||||
, inactiveBorderColor
|
||||
, urgentColor
|
||||
, colorConfig
|
||||
, fontConfig
|
||||
)
|
||||
|
||||
named :: String -> l a -> ModifiedLayout Rename l a
|
||||
named x = renamed [Replace x]
|
||||
|
||||
myLayoutHook = commonMods mainLayouts
|
||||
where
|
||||
tileMods = mkToggle (single REFLECTX) . mkToggle (single REFLECTY)
|
||||
. smartBorders
|
||||
. windowNavigation . mySubTabbed theme
|
||||
. spaces
|
||||
commonMods = avoidStruts
|
||||
. maximizeWithPadding 0
|
||||
. minimize
|
||||
. boringWindows
|
||||
tLayouts = tileMods $ named "tall" tall ||| named "mtall" mtall
|
||||
mainLayouts = tLayouts ||| floating theme
|
||||
|
||||
floating theme = named "float" . floatingDeco . borderResize $ positionStoreFloat
|
||||
where
|
||||
floatingDeco = noFrillsDeco shrinkText theme
|
||||
|
||||
mySubTabbed
|
||||
:: (Eq a, LayoutModifier (Sublayout Simplest) a, LayoutClass l a)
|
||||
=> Theme
|
||||
-> l a
|
||||
-> ModifiedLayout
|
||||
(Decoration TabbedDecoration DefaultShrinker)
|
||||
(ModifiedLayout (Sublayout Simplest) l)
|
||||
a
|
||||
mySubTabbed theme x = addTabs shrinkText theme $ subLayout [] Simplest x
|
||||
|
||||
spaces :: l a -> ModifiedLayout Spacing l a
|
||||
spaces = spacingRaw False b False b False
|
||||
where
|
||||
b = Border defSpacing defSpacing defSpacing defSpacing
|
||||
defSpacing = 5
|
||||
|
||||
tall :: ResizableTall a
|
||||
tall = ResizableTall 1 (3/100) (1/2) []
|
||||
|
||||
mtall :: Mirror ResizableTall a
|
||||
mtall = Mirror tall
|
||||
|
||||
theme :: Theme
|
||||
theme = def
|
||||
{ T.activeColor = selColor colorConfig
|
||||
, T.activeBorderColor = inactiveColor colorConfig
|
||||
, T.activeTextColor = selFgColor colorConfig
|
||||
|
||||
, T.inactiveColor = bgColor colorConfig
|
||||
, T.inactiveBorderColor = inactiveBorderColor colorConfig
|
||||
, T.inactiveTextColor = fgColor colorConfig
|
||||
|
||||
, T.urgentColor = urgentColor colorConfig
|
||||
, T.urgentTextColor = urgentColor colorConfig
|
||||
, T.fontName = printf "xft:%s:size=%d" (fontName fontConfig) (fontSize fontConfig)
|
||||
}
|
|
@ -1,135 +0,0 @@
|
|||
module ManageHook
|
||||
( myManageHook
|
||||
, scratchpadKeybinds
|
||||
) where
|
||||
|
||||
import Text.Printf (printf)
|
||||
import qualified Data.Map as M
|
||||
|
||||
import XMonad.Core
|
||||
( ManageHook
|
||||
, X
|
||||
, XConfig(XConfig)
|
||||
, modMask
|
||||
, Layout
|
||||
)
|
||||
|
||||
import XMonad.StackSet (RationalRect (RationalRect))
|
||||
import XMonad.Hooks.ManageHelpers (isFullscreen, doFullFloat)
|
||||
|
||||
import Graphics.X11.Types
|
||||
( KeySym , ButtonMask
|
||||
, xK_s , xK_t , xK_m
|
||||
, xK_Return
|
||||
)
|
||||
|
||||
import XMonad.ManageHook
|
||||
( className
|
||||
, (=?)
|
||||
, resource
|
||||
, composeAll
|
||||
, (-->)
|
||||
, doFloat
|
||||
, doShift
|
||||
, stringProperty
|
||||
)
|
||||
|
||||
import XMonad.Util.NamedScratchpad
|
||||
( NamedScratchpad (NS)
|
||||
, customFloating
|
||||
, namedScratchpadManageHook
|
||||
, namedScratchpadAction
|
||||
)
|
||||
|
||||
import Utils ( mkSubmap )
|
||||
|
||||
scratchpadKeybinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
scratchpadKeybinds XConfig {modMask = modm} = M.fromList
|
||||
[ ((modm, xK_s), mkSubmap modm . map buildSubmap $
|
||||
[ (xK_Return, "scratchpad")
|
||||
, (xK_m, "mixer")
|
||||
-- , (xK_p, "player")
|
||||
, (xK_t, "top")
|
||||
-- , (xK_w, "whatsapp")
|
||||
-- , (xK_g, "hangouts")
|
||||
])
|
||||
]
|
||||
where
|
||||
buildSubmap (key,name) = ((0,key), namedScratchpadAction myScratchpads name)
|
||||
|
||||
myScratchpads :: [NamedScratchpad]
|
||||
myScratchpads =
|
||||
[ termApp "scratchpad" "zsh" mngTopScratch
|
||||
, termApp "top" "top" mngBigFloat
|
||||
--, termApp "player" "ncmpcpp" mngBiggerFloat
|
||||
|
||||
--, NS "mixer" "pavucontrol" (className =? "Pavucontrol") mngSmallerFloat
|
||||
|
||||
-- , chromiumApp "whatsapp" "web.whatsapp.com" mngSmallFloat
|
||||
-- , chromiumApp "hangouts" "hangouts.google.com" mngSmallFloat
|
||||
]
|
||||
|
||||
myManageHook :: ManageHook
|
||||
myManageHook = mkManageHook myScratchpads
|
||||
|
||||
termApp :: String -> String -> ManageHook -> NamedScratchpad
|
||||
termApp name app = NS name cmd findIt
|
||||
where
|
||||
cmd = printf fmt name name app
|
||||
fmt = "alacritty --class %s --command tmux new -A -s %s %s"
|
||||
findIt = resource =? name
|
||||
|
||||
--chromiumApp :: String -> String -> ManageHook -> NamedScratchpad
|
||||
--chromiumApp name url = NS name cmd findIt
|
||||
-- where
|
||||
-- cmd = printf "chromium --app=https://%s" url
|
||||
-- findIt = resource =? url
|
||||
|
||||
--mngSmallerFloat :: ManageHook
|
||||
--mngSmallerFloat = centeredFloat 0.6
|
||||
|
||||
--mngSmallFloat :: ManageHook
|
||||
--mngSmallFloat = centeredFloat 0.7
|
||||
|
||||
mngBigFloat :: ManageHook
|
||||
mngBigFloat = centeredFloat 0.8
|
||||
|
||||
--mngBiggerFloat :: ManageHook
|
||||
--mngBiggerFloat = centeredFloat 0.9
|
||||
|
||||
centeredFloat :: Rational -> ManageHook
|
||||
centeredFloat s = customFloating $ RationalRect p p s s
|
||||
where
|
||||
p = (1-s) / 2
|
||||
|
||||
mngTopScratch :: ManageHook
|
||||
mngTopScratch = customFloating $ RationalRect l t w h
|
||||
where
|
||||
h = 0.3 -- height, 30%
|
||||
w = 1 -- width, 100%
|
||||
t = 0 -- distance from top edge, 0%
|
||||
l = 1 - w -- distance from left edge, 0%
|
||||
|
||||
mkManageHook :: [NamedScratchpad] -> ManageHook
|
||||
mkManageHook scratchpads = composeAll
|
||||
[ isFullscreen --> doFullFloat
|
||||
, className =? "MPlayer" --> doFloat
|
||||
, className =? "VirtualBox" --> doFloat
|
||||
, className =? "Pinentry" --> doFloat
|
||||
, className =? "qjackctl" --> doFloat
|
||||
, className =? "Xmessage" --> doFloat
|
||||
, className =? "SuperCollider" --> doFloat
|
||||
, role =? "gimp-dock" --> doFloat
|
||||
, role =? "GtkFileChooserDialog" --> doFloat
|
||||
|
||||
--, className =? "Signal" --> doShift "msg"
|
||||
--, className =? "Slack" --> doShift "msg"
|
||||
--, className =? "Element" --> doShift "msg"
|
||||
--, className =? "TelegramDesktop" --> doShift "msg"
|
||||
--, resource =? "hangouts.google.com" --> doShift "msg"
|
||||
--, resource =? "web.whatsapp.com" --> doShift "msg"
|
||||
|
||||
, namedScratchpadManageHook scratchpads
|
||||
]
|
||||
where
|
||||
role = stringProperty "WM_WINDOW_ROLE"
|
|
@ -1,60 +0,0 @@
|
|||
module Polybar (polybarLogHook, mkDbusClient) where
|
||||
|
||||
import XMonad.Hooks.DynamicLog
|
||||
|
||||
import Text.Printf (printf)
|
||||
|
||||
import XMonad.Layout.IndependentScreens (marshallPP)
|
||||
|
||||
import qualified DBus as D
|
||||
import qualified DBus.Client as D
|
||||
import qualified Codec.Binary.UTF8.String as UTF8
|
||||
|
||||
|
||||
mkDbusClient :: IO D.Client
|
||||
mkDbusClient = do
|
||||
dbus <- D.connectSession
|
||||
D.requestName dbus (D.busName_ "org.xmonad.log") opts
|
||||
return dbus
|
||||
where
|
||||
opts = [D.nameAllowReplacement, D.nameReplaceExisting, D.nameDoNotQueue]
|
||||
|
||||
monitorMsg :: Int -> String -> String
|
||||
monitorMsg = printf "{\"%d\": \"%s\"}"
|
||||
|
||||
-- Emit a DBus signal on log updates
|
||||
dbusOutput :: D.Client -> String -> IO ()
|
||||
dbusOutput dbus str =
|
||||
let opath = D.objectPath_ "/org/xmonad/Log"
|
||||
iname = D.interfaceName_ "org.xmonad.Log"
|
||||
mname = D.memberName_ "Update"
|
||||
signal = D.signal opath iname mname
|
||||
body = [D.toVariant $ UTF8.decodeString $ monitorMsg 0 str]
|
||||
in D.emit dbus $ signal { D.signalBody = body }
|
||||
|
||||
polybarFmt :: String -> String -> String -> String
|
||||
polybarFmt var color elem = "%{" ++ var ++ color ++ "}" ++ elem ++ "%{" ++ var ++ "-}"
|
||||
|
||||
polybarFg :: String -> String -> String
|
||||
polybarFg = polybarFmt "F"
|
||||
|
||||
polybarBg :: String -> String -> String
|
||||
polybarBg = polybarFmt "B"
|
||||
|
||||
polybarBgFg :: String -> String -> String -> String
|
||||
polybarBgFg bg fg = polybarBg bg . polybarFg fg
|
||||
|
||||
polybarHook :: D.Client -> PP
|
||||
polybarHook dbus = def
|
||||
{ ppOutput = dbusOutput dbus
|
||||
, ppCurrent = polybarBgFg "#458588" "#fbf1c7"
|
||||
, ppVisible = polybarFg "#ebdbb2"
|
||||
, ppUrgent = polybarBgFg "#cc241d" "#fbf1c7"
|
||||
, ppHidden = polybarFg "#ebdbb2"
|
||||
, ppLayout = const ""
|
||||
, ppHiddenNoWindows = const ""
|
||||
, ppTitle = shorten 100 . polybarFg "#fbf1c7"
|
||||
, ppSep = polybarFg "#a89974" " | "
|
||||
}
|
||||
|
||||
polybarLogHook dbus = dynamicLogWithPP $ (marshallPP 0 . polybarHook) dbus
|
|
@ -1,92 +0,0 @@
|
|||
module Prompts ( promptKeybinds ) where
|
||||
|
||||
import Text.Printf (printf)
|
||||
import qualified Data.Map as M ( Map , fromList )
|
||||
|
||||
import Graphics.X11.Types
|
||||
( KeySym , ButtonMask
|
||||
, xK_Tab
|
||||
, xK_a , xK_b , xK_c , xK_p , xK_r , xK_s , xK_u , xK_t
|
||||
)
|
||||
import Graphics.X11.ExtraTypes.XF86 ( xF86XK_Launch1 )
|
||||
|
||||
import XMonad.Core ( X , modMask , XConfig(XConfig) , Layout )
|
||||
import XMonad.Util.Run ( safeSpawn )
|
||||
|
||||
import qualified XMonad.Prompt as P
|
||||
( XPConfig
|
||||
, def
|
||||
, font
|
||||
, bgColor
|
||||
, fgColor
|
||||
, bgHLight
|
||||
, fgHLight
|
||||
, bgColor
|
||||
, borderColor
|
||||
, promptBorderWidth
|
||||
, alwaysHighlight
|
||||
, defaultPrompter
|
||||
)
|
||||
|
||||
import HostConfig
|
||||
( ColorConfig
|
||||
, FontConfig
|
||||
, fontConfig
|
||||
, colorConfig
|
||||
, fontName
|
||||
, fontSize
|
||||
, bgColor
|
||||
, fgColor
|
||||
, selColor
|
||||
, selFgColor
|
||||
)
|
||||
|
||||
import Utils ( mkSubmap )
|
||||
|
||||
promptKeybinds :: XConfig Layout -> M.Map (ButtonMask, KeySym) (X ())
|
||||
promptKeybinds XConfig {modMask = modm} = M.fromList
|
||||
[ ((0, xF86XK_Launch1), run)
|
||||
, ((modm, xK_r), run)
|
||||
, ((modm, xK_a) , subMapMaker
|
||||
[ ( xK_r , drun )
|
||||
, ( xK_p , pass )
|
||||
, ( xK_Tab , window )
|
||||
, ( xK_t , todo )
|
||||
, ( xK_c , clipmenu )
|
||||
, ( xK_b , buku )
|
||||
, ( xK_s , ssh )
|
||||
])
|
||||
]
|
||||
where
|
||||
run = safeSpawn "rofi" ["-show", "run"]
|
||||
drun = safeSpawn "rofi" ["-show", "drun"]
|
||||
pass = safeSpawn "rofi-pass" []
|
||||
buku = safeSpawn "rofi-buku" []
|
||||
ssh = safeSpawn "rofi" ["-show", "ssh"]
|
||||
window = safeSpawn "rofi" ["-show", "window"]
|
||||
clipmenu = safeSpawn "clipmenu" dmenuArgs
|
||||
todo = safeSpawn "todo-rofi" []
|
||||
subMapMaker = mkSubmap modm . map (\(key,action) -> ((0,key),action))
|
||||
|
||||
dmenuArgs :: [String]
|
||||
dmenuArgs =
|
||||
[ "-b" -- bottom
|
||||
, "-fn", printf "%s:size=%d" (fontName fontConfig) (fontSize fontConfig)
|
||||
, "-nb", bgColor colorConfig -- normal background
|
||||
, "-nf", fgColor colorConfig -- normal foreground
|
||||
, "-sb", selColor colorConfig -- selected background
|
||||
, "-sf", selFgColor colorConfig -- selected foreground
|
||||
]
|
||||
|
||||
theme :: P.XPConfig
|
||||
theme = P.def
|
||||
{ P.font = printf "xft:%s:size=%d" (fontName fontConfig) (fontSize fontConfig)
|
||||
, P.bgColor = bgColor colorConfig
|
||||
, P.fgColor = fgColor colorConfig
|
||||
, P.bgHLight = selColor colorConfig
|
||||
, P.fgHLight = selFgColor colorConfig
|
||||
, P.borderColor = bgColor colorConfig
|
||||
, P.promptBorderWidth = 0
|
||||
, P.alwaysHighlight = True
|
||||
, P.defaultPrompter = const ""
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
module Utils ( mkSubmap ) where
|
||||
|
||||
import qualified Data.Map as M ( fromList )
|
||||
|
||||
import XMonad ( (.|.) )
|
||||
import Graphics.X11.Types ( KeyMask , KeySym , ButtonMask )
|
||||
|
||||
import XMonad.Core ( X )
|
||||
import XMonad.Actions.Submap ( submap )
|
||||
|
||||
mkSubmap :: ButtonMask -> [((KeyMask, KeySym), X ())] -> X ()
|
||||
mkSubmap modm = submap . M.fromList . concatMap buildSubmaps
|
||||
where
|
||||
buildSubmaps x = map (buildSubmap x) [0,modm]
|
||||
buildSubmap ((modKey,key),action) m = ((modKey .|. m,key),action)
|
|
@ -1,119 +0,0 @@
|
|||
module Xmobar (mkBars) where
|
||||
|
||||
import XMonad.Layout.IndependentScreens (marshallPP)
|
||||
|
||||
import GHC.IO.Handle.Types (Handle)
|
||||
import Text.Printf (printf)
|
||||
|
||||
import Data.List (intercalate, isPrefixOf)
|
||||
import Graphics.X11.Types (Window)
|
||||
|
||||
import XMonad.Core
|
||||
( Layout
|
||||
, ScreenDetail
|
||||
, ScreenId (S)
|
||||
, withWindowSet
|
||||
, WorkspaceId
|
||||
, WindowSet
|
||||
, description
|
||||
, X
|
||||
)
|
||||
|
||||
import XMonad (MonadIO)
|
||||
import XMonad.Config (def)
|
||||
import XMonad.Util.Run (hPutStrLn, spawnPipe)
|
||||
import XMonad.Util.NamedWindows (getName)
|
||||
import XMonad.Util.Loggers (Logger)
|
||||
|
||||
import XMonad.StackSet ( Workspace (..) , screen , workspace , current )
|
||||
import qualified XMonad.StackSet as S
|
||||
|
||||
import XMonad.Hooks.DynamicLog
|
||||
( PP
|
||||
, ppCurrent
|
||||
, ppExtras
|
||||
, ppHidden
|
||||
, ppHiddenNoWindows
|
||||
, ppLayout
|
||||
, ppOrder
|
||||
, ppOutput
|
||||
, ppSep
|
||||
, ppTitle
|
||||
, ppUrgent
|
||||
, ppVisible
|
||||
, shorten
|
||||
, wrap
|
||||
, xmobarAction
|
||||
, xmobarColor
|
||||
, dynamicLogWithPP
|
||||
)
|
||||
|
||||
import HostConfig
|
||||
( colorConfig
|
||||
, fontConfig
|
||||
, FontConfig
|
||||
, fontName
|
||||
, fontSize
|
||||
|
||||
, ColorConfig
|
||||
, bgColor
|
||||
, fgColor
|
||||
, selFgColor
|
||||
, selColor
|
||||
, inactiveColor
|
||||
, urgentColor
|
||||
)
|
||||
|
||||
mkBars :: MonadIO m => [Int] -> m (X ())
|
||||
mkBars screens = do
|
||||
xmprocs <- mkXmprocs screens
|
||||
return $ mapM_ dynamicLogWithPP $ zipWith mkPP xmprocs screens
|
||||
|
||||
mkXmprocs :: MonadIO m => [Int] -> m [Handle]
|
||||
mkXmprocs = mapM (spawnPipe . printf "xmobar --screen='%d'")
|
||||
|
||||
mkPP :: Handle -> Int -> PP
|
||||
mkPP bar nscreen = marshallPP (S nscreen) $ def
|
||||
{ ppOutput = hPutStrLn bar
|
||||
, ppCurrent = xmobarColor (selFgColor colorConfig) (selColor colorConfig)
|
||||
, ppVisible = xmobarColor (fgColor colorConfig) ""
|
||||
, ppHidden = xmobarColor (fgColor colorConfig) ""
|
||||
, ppHiddenNoWindows = const ""
|
||||
, ppUrgent = xmobarColor (urgentColor colorConfig) ""
|
||||
, ppLayout = getLayoutIcon . layoutNameCleaner
|
||||
, ppTitle = xmobarColor (selFgColor colorConfig) "" . shorten 100
|
||||
, ppSep = xmobarColor (inactiveColor colorConfig) "" " | "
|
||||
}
|
||||
|
||||
layoutNameCleaner = unwords . filter (not . (`elem` toClean)) . words
|
||||
where
|
||||
toClean =
|
||||
[ "Simple"
|
||||
, "Simplest"
|
||||
, "Minimize"
|
||||
, "Maximize"
|
||||
, "ImageButtonDeco"
|
||||
, "DefaultDecoration"
|
||||
, "Spacing"
|
||||
, "ReflectX"
|
||||
, "ReflectY"
|
||||
, "Tabbed"
|
||||
, "0"
|
||||
]
|
||||
|
||||
getLayoutIcon :: String -> String
|
||||
getLayoutIcon "empty" = ""
|
||||
getLayoutIcon x
|
||||
| x `elem` icons = printf "<icon=%s/%s.xpm/>" iconsDir x
|
||||
| otherwise = x
|
||||
where
|
||||
iconsDir = "/home/rilla/.xmonad/icons"
|
||||
icons =
|
||||
[ "3cols"
|
||||
, "float"
|
||||
, "full"
|
||||
, "grid"
|
||||
, "mtall"
|
||||
, "tabs"
|
||||
, "tall"
|
||||
]
|
|
@ -1,92 +0,0 @@
|
|||
import XMonad ( xmonad )
|
||||
import XMonad.Core
|
||||
( ScreenId (S)
|
||||
, terminal
|
||||
, modMask
|
||||
, borderWidth
|
||||
, normalBorderColor
|
||||
, focusedBorderColor
|
||||
, workspaces
|
||||
, keys
|
||||
, mouseBindings
|
||||
, layoutHook
|
||||
, manageHook
|
||||
, XConfig
|
||||
( logHook
|
||||
, focusFollowsMouse
|
||||
, startupHook
|
||||
, handleEventHook
|
||||
)
|
||||
)
|
||||
import XMonad.Config ( def )
|
||||
|
||||
import XMonad.Hooks.ServerMode ( serverModeEventHook )
|
||||
import XMonad.Hooks.EwmhDesktops ( ewmh )
|
||||
import XMonad.Hooks.ManageDocks ( docks )
|
||||
import XMonad.Hooks.SetWMName ( setWMName )
|
||||
|
||||
import XMonad.Layout.IndependentScreens ( countScreens , withScreens )
|
||||
import XMonad.Util.Replace ( replace )
|
||||
|
||||
import XMonad.Actions.UpdatePointer ( updatePointer )
|
||||
import XMonad.Actions.Navigation2D
|
||||
( withNavigation2DConfig
|
||||
, Navigation2DConfig
|
||||
, centerNavigation
|
||||
, singleWindowRect
|
||||
, defaultTiledNavigation
|
||||
, layoutNavigation
|
||||
, unmappedWindowRect
|
||||
)
|
||||
|
||||
import Graphics.X11.Types ( mod4Mask )
|
||||
|
||||
import HostConfig
|
||||
( colorConfig
|
||||
, selColor
|
||||
, inactiveBorderColor
|
||||
)
|
||||
import ManageHook ( myManageHook )
|
||||
import Xmobar ( mkBars )
|
||||
import Bindings ( keybinds, mousebinds )
|
||||
import Layouts ( myLayoutHook )
|
||||
|
||||
main :: IO ()
|
||||
main = do
|
||||
replace
|
||||
nscreens <- countScreens
|
||||
let
|
||||
myScreens = [0 .. nscreens-1]
|
||||
wsLs = withScreens (S nscreens) myWorkspaces
|
||||
bars <- mkBars myScreens
|
||||
xmonad $ opts def
|
||||
{ terminal = "alacritty"
|
||||
, modMask = mod4Mask
|
||||
, borderWidth = 4
|
||||
, normalBorderColor = inactiveBorderColor colorConfig
|
||||
, focusedBorderColor = selColor colorConfig
|
||||
, workspaces = wsLs
|
||||
, keys = keybinds
|
||||
, mouseBindings = mousebinds
|
||||
, layoutHook = myLayoutHook
|
||||
, manageHook = myManageHook
|
||||
, logHook = bars >> updatePtr
|
||||
, focusFollowsMouse = True
|
||||
, handleEventHook = serverModeEventHook
|
||||
, startupHook = setWMName "LG3D"
|
||||
}
|
||||
where
|
||||
opts = docks . ewmh . withNavigation2DConfig myNav2DConf
|
||||
updatePtr = updatePointer (0.9, 0.9) (0, 0)
|
||||
|
||||
myNav2DConf :: Navigation2DConfig
|
||||
myNav2DConf = def
|
||||
{ defaultTiledNavigation = centerNavigation
|
||||
, layoutNavigation = [("Full", centerNavigation)]
|
||||
, unmappedWindowRect = [("Full", singleWindowRect)]
|
||||
}
|
||||
|
||||
myWorkspaces :: [String]
|
||||
myWorkspaces = map show ids
|
||||
where ids :: [Int]
|
||||
ids = [1..9]
|
|
@ -1,15 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
hostname = "woodpecker.monotremata.xyz";
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
pass = "${pkgs.pass}/bin/pass";
|
||||
woodpecker-cli = "${pkgs.woodpecker-cli}/bin/woodpecker-cli";
|
||||
in pkgs.writeScriptBin "woodpecker-cli" ''
|
||||
#!${shell}
|
||||
WOODPECKER_SERVER="https://${hostname}"
|
||||
WOODPECKER_TOKEN=$(${pass} "${hostname}/token")
|
||||
export WOODPECKER_SERVER
|
||||
export WOODPECKER_TOKEN
|
||||
${woodpecker-cli} "$@"
|
||||
''
|
|
@ -1,7 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let printf = "${pkgs.coreutils-full}/bin/printf";
|
||||
in
|
||||
pkgs.writeShellScript "lf-cleaner.sh" ''
|
||||
[ -n "$FIFO_UEBERZUG" ] && ${printf} '{"action": "remove", "identifier": "PREVIEW"}\n' > "$FIFO_UEBERZUG"
|
||||
''
|
|
@ -1,132 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
pidof = "${pkgs.procps}/bin/pidof";
|
||||
pgrep = "${pkgs.procps}/bin/pgrep";
|
||||
grep = "${pkgs.gnugrep}/bin/grep";
|
||||
sed = "${pkgs.gnused}/bin/sed";
|
||||
awk = "${pkgs.gawk}/bin/awk";
|
||||
perl = "${pkgs.perl}/bin/perl";
|
||||
find = "${pkgs.findutils}/bin/find";
|
||||
|
||||
notifySend = "${pkgs.libnotify}/bin/notify-send";
|
||||
notmuch = "${pkgs.notmuch}/bin/notmuch";
|
||||
head = "${pkgs.coreutils}/bin/head";
|
||||
touch = "${pkgs.coreutils}/bin/touch";
|
||||
tr = "${pkgs.coreutils}/bin/tr";
|
||||
|
||||
mbsyncrc = "${config.home.homeDirectory}/.mbsyncrc";
|
||||
mbsync = "${pkgs.isync}/bin/mbsync -c ${mbsyncrc}";
|
||||
|
||||
maildir = "${config.home.homeDirectory}/Maildir";
|
||||
passwordStoreDir = "${config.home.homeDirectory}/.password-store";
|
||||
notmuchConfig = "${config.home.homeDirectory}/.config/notmuch/default/config";
|
||||
gnupghome = "${config.home.homeDirectory}/.gnupg";
|
||||
lastrun = "${config.home.homeDirectory}/.mailsynclastrun";
|
||||
in pkgs.writeScriptBin "mailsync" ''
|
||||
#!${shell}
|
||||
|
||||
# Run only if not already running in other instance
|
||||
${pidof} mbsync >/dev/null && {
|
||||
echo "mbsync is already running."
|
||||
exit
|
||||
}
|
||||
|
||||
export PASSWORD_STORE_DIR="${passwordStoreDir}"
|
||||
export NOTMUCH_CONFIG="${notmuchConfig}"
|
||||
export GNUPGHOME="${gnupghome}"
|
||||
export GPG_TTY=$TTY
|
||||
|
||||
notify() {
|
||||
pgrepoutput="$(${pgrep} -a X\(org\|wayland\))"
|
||||
displays="$(echo "$pgrepoutput" | ${grep} -wo "[0-9]*:[0-9]\+" | sort -u)"
|
||||
[ -n "$pgrepoutput" ] && for x in ''${displays:-0:}; do
|
||||
export DISPLAY=$x
|
||||
${notifySend} \
|
||||
--app-name="email" \
|
||||
"email" \
|
||||
"📬 $2 new mail(s) in \`$1\` account."
|
||||
done
|
||||
}
|
||||
|
||||
messageinfo() {
|
||||
from="$1"
|
||||
subject="$2"
|
||||
pgrepoutput="$(${pgrep} -a X\(org\|wayland\))"
|
||||
displays="$(echo "$pgrepoutput" | ${grep} -wo "[0-9]*:[0-9]\+" | sort -u)"
|
||||
[ -n "$pgrepoutput" ] && for x in ''${displays:-0:}; do
|
||||
export DISPLAY=$x
|
||||
${notifySend} \
|
||||
--app-name="email" \
|
||||
"📧$from:" \
|
||||
"$subject"
|
||||
done
|
||||
}
|
||||
|
||||
# Check account for new mail. Notify if there is new content.
|
||||
syncandnotify() {
|
||||
accounts="$1"
|
||||
acc="$(echo "$account" | ${sed} "s/.*\///")"
|
||||
if [ -z "$opts" ]; then
|
||||
${mbsync} "$acc"
|
||||
else
|
||||
${mbsync} "$opts" "$acc"
|
||||
fi
|
||||
new=$(
|
||||
${find} \
|
||||
"${maildir}/$acc/INBOX/new/" \
|
||||
"${maildir}/$acc/Inbox/new/" \
|
||||
"${maildir}/mail/$acc/inbox/new/" \
|
||||
-type f \
|
||||
-newer "${lastrun}" \
|
||||
2> /dev/null
|
||||
)
|
||||
newcount=$(echo "$new" | ${sed} '/^\s*$/d' | wc -l)
|
||||
if [ "$newcount" -gt 5 ]; then
|
||||
notify "$acc" "$newcount"
|
||||
elif [ "$newcount" -gt 0 ]; then
|
||||
for file in $new; do
|
||||
# Extract subject and sender from mail.
|
||||
from=$(
|
||||
${awk} '/^From: / && ++n ==1,/^\<.*\>:/' "$file" | \
|
||||
${perl} -CS -MEncode -ne 'print decode("MIME-Header", $_)' | \
|
||||
${awk} '{ $1=""; if (NF>=3)$NF=""; print $0 }' | \
|
||||
${sed} 's/^[[:blank:]]*[\"'\'''\<]*//;s/[\"'\'''\>]*[[:blank:]]*$//'
|
||||
)
|
||||
subject=$(
|
||||
${awk} '/^Subject: / && ++n == 1,/^\<.*\>: / && ++i == 2' "$file" | \
|
||||
${head} -n 1 | ${perl} -CS -MEncode -ne 'print decode("MIME-Header", $_)' | \
|
||||
${sed} 's/^Subject: //' | \
|
||||
${sed} 's/^{[[:blank:]]*[\"'\'''\<]*//;s/[\"'\'''\>]*[[:blank:]]*$//' | \
|
||||
${tr} -d '\n'
|
||||
)
|
||||
messageinfo "$from" "$subject" &
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# Sync accounts passed as argument or all.
|
||||
if [ "$#" -eq "0" ]; then
|
||||
accounts="$(${awk} '/^Channel/ {print $2}' "${mbsyncrc}")"
|
||||
else
|
||||
for arg in "$@"; do
|
||||
[ "''${arg%''${arg#?}}" = '-' ] && \
|
||||
opts="''${opts:+''${opts} }''${arg}" && \
|
||||
shift 1
|
||||
done
|
||||
accounts=$*
|
||||
fi
|
||||
|
||||
# Parallelize multiple accounts
|
||||
for account in $accounts; do
|
||||
syncandnotify "''${account}" &
|
||||
done
|
||||
|
||||
wait
|
||||
|
||||
${notmuch} new 2>/dev/null
|
||||
|
||||
#Create a touch file that indicates the time of the last run of mailsync
|
||||
${touch} "${lastrun}"
|
||||
''
|
|
@ -1,10 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
shell = "${pkgs.dash}/bin/dash";
|
||||
newsboat = "${pkgs.newsboat}/bin/newsboat";
|
||||
in
|
||||
pkgs.writeScriptBin "rsssync" ''
|
||||
#!${shell}
|
||||
${newsboat} --execute="reload"
|
||||
''
|
|
@ -1,35 +1,21 @@
|
|||
{ config, pkgs, ... }:
|
||||
# capibara
|
||||
|
||||
let
|
||||
offline-backups = pkgs.writeScriptBin "offline-backups" ''
|
||||
#!${pkgs.dash}/bin/dash
|
||||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
set -xe
|
||||
|
||||
for x in 0 1 2; do
|
||||
${pkgs.systemd}/bin/systemctl start "mnt-backups-''${x}.mount"
|
||||
done && \
|
||||
/run/wrappers/bin/doas -u btrbk \
|
||||
${pkgs.btrbk}/bin/btrbk \
|
||||
--config /etc/btrbk/offline-backups.conf \
|
||||
--progress \
|
||||
--verbose \
|
||||
"$@"
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./file-systems.nix
|
||||
./home-manager.nix
|
||||
outputs.nixosModules.common
|
||||
outputs.nixosModules.desktop
|
||||
];
|
||||
|
||||
networking.networkmanager.wifi.macAddress = "CC:AF:78:75:29:32";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.steam.enable = true;
|
||||
|
||||
|
||||
services.earlyoom.enable = true;
|
||||
|
||||
# Power management
|
||||
|
@ -38,7 +24,27 @@ in
|
|||
# services.thermald.enable = true;
|
||||
services.tlp.enable = true;
|
||||
services.power-profiles-daemon.enable = false;
|
||||
environment.systemPackages = with pkgs; [ powertop acpi offline-backups ];
|
||||
environment.systemPackages = with pkgs; [ powertop acpi ];
|
||||
|
||||
environment.etc = {
|
||||
ssh-pub-key = {
|
||||
target = "ssh/ssh_host_ed25519_key.pub";
|
||||
source = ./ssh_host_ed25519_key.pub;
|
||||
};
|
||||
ssh-pub-key-cert = {
|
||||
target = "ssh/ssh_host_ed25519_key-cert.pub";
|
||||
source = ./ssh_host_ed25519_key-cert.pub;
|
||||
};
|
||||
};
|
||||
|
||||
age.secrets.ssh-key = {
|
||||
file = outputs.secrets.capibara.ssh_host_ed25519_key;
|
||||
mode = "400";
|
||||
owner = "root";
|
||||
group = "root";
|
||||
symlink = false;
|
||||
path = "/mnt/persist/etc/ssh/ssh_host_ed25519_key";
|
||||
};
|
||||
|
||||
# todo: target and/or archive
|
||||
services.btrbk.instances = {
|
||||
|
@ -146,7 +152,7 @@ in
|
|||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = true;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ];
|
||||
};
|
||||
|
||||
networking = {
|
|
@ -0,0 +1,19 @@
|
|||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
users.rilla = {
|
||||
home = {
|
||||
packages = [ pkgs.offline-backups ];
|
||||
stateVersion = "22.11";
|
||||
};
|
||||
imports = [
|
||||
outputs.homeManagerModules.common
|
||||
outputs.homeManagerModules.extra
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519-cert-v01@openssh.com AAAAIHNzaC1lZDI1NTE5LWNlcnQtdjAxQG9wZW5zc2guY29tAAAAIN1uoV7+UFX6EIdPzs9CdvxVxWYjT1jmLfT4OmJndjHQAAAAIAEfm3I/CAHARsvbiqemh6UYPFocE7D3NnwSqcbIc48qAAAAAAAAAAAAAAACAAAACGNhcGliYXJhAAAADAAAAAhjYXBpYmFyYQAAAABjE3hcAAAAAGTzWssAAAAAAAAAAAAAAAAAAAAzAAAAC3NzaC1lZDI1NTE5AAAAIHperHwojXZeo3QWAu1f3kiCKeaHHSqBXJM6ZZEefxddAAAAUwAAAAtzc2gtZWQyNTUxOQAAAEDSalFb6LEVRYSH34+67zhOj9frcSEIwVxG8chQig+SVROJ2UV2bjhiLoXN/9bhjtYTvlm/P2QkEbS2oQHYj3oC root@narwhal
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAEfm3I/CAHARsvbiqemh6UYPFocE7D3NnwSqcbIc48q root@narwhal
|
|
@ -0,0 +1,18 @@
|
|||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
];
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
imports = [ outputs.homeManagerModules.common ];
|
||||
|
||||
home.stateVersion = "23.05";
|
||||
}
|
|
@ -1,20 +1,29 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.hostPlatform = "x86_64-linux";
|
||||
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./file-systems.nix
|
||||
./home-manager.nix
|
||||
outputs.nixosModules.common
|
||||
outputs.nixosModules.desktop
|
||||
];
|
||||
|
||||
home-manager.users.rilla.imports = [
|
||||
../../../home/hosts/trantor.nix
|
||||
];
|
||||
|
||||
networking.networkmanager.wifi.macAddress = "80:FA:5B:41:12:0F";
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
programs.steam.enable = true;
|
||||
|
||||
environment.etc = {
|
||||
ssh-pub-key = {
|
||||
target = "ssh/ssh_host_ed25519_key.pub";
|
||||
source = ./ssh_host_ed25519_key.pub;
|
||||
};
|
||||
ssh-pub-key-cert = {
|
||||
target = "ssh/ssh_host_ed25519_key-cert.pub";
|
||||
source = ./ssh_host_ed25519_key-cert.pub;
|
||||
};
|
||||
};
|
||||
|
||||
# todo: target and/or archive
|
||||
services.btrbk = {
|
||||
sshAccess = [{
|
||||
|
@ -45,6 +54,7 @@
|
|||
enp3s0f1.useDHCP = true;
|
||||
wlp4s0.useDHCP = true;
|
||||
};
|
||||
networkmanager.wifi.macAddress = "80:FA:5B:41:12:0F";
|
||||
};
|
||||
|
||||
services.xserver = { videoDrivers = [ "nvidia" ]; };
|
|
@ -1,6 +1,3 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
|
@ -0,0 +1,20 @@
|
|||
{ inputs, outputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
users.rilla = {
|
||||
home = {
|
||||
packages = [ pkgs.offline-backups ];
|
||||
stateVersion = "22.11";
|
||||
};
|
||||
imports = [
|
||||
outputs.homeManagerModules.common
|
||||
outputs.homeManagerModules.extra
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519-cert-v01@openssh.com AAAAIHNzaC1lZDI1NTE5LWNlcnQtdjAxQG9wZW5zc2guY29tAAAAINaIBi2J/1pJ2bchrc74aBONRywW+aUnEwR9P/gwqo2lAAAAIG1qvkkxHQlAIjQIYoTokx+UgsRQd48kf2iuvbWJZHE2AAAAAAAAAAAAAAACAAAAB3RyYW50b3IAAAALAAAAB3RyYW50b3IAAAAAYxN4XAAAAABk81rLAAAAAAAAAAAAAAAAAAAAMwAAAAtzc2gtZWQyNTUxOQAAACB6Xqx8KI12XqN0FgLtX95Iginmhx0qgVyTOmWRHn8XXQAAAFMAAAALc3NoLWVkMjU1MTkAAABA/pGJOglx8wKauMh+naAQyHnV99z4YY9jXHKgYcVuORQzTPpLWOHMyiKbrz1Y9z3n4PrS6PIs9FKf8NRQU87ODQ== root@narwhal
|
|
@ -0,0 +1 @@
|
|||
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG1qvkkxHQlAIjQIYoTokx+UgsRQd48kf2iuvbWJZHE2 root@narwhal
|
6
justfile
6
justfile
|
@ -2,9 +2,7 @@ echidna:
|
|||
home-manager switch --flake .#rilla@echidna
|
||||
|
||||
capibara:
|
||||
doas nixos-rebuild switch --flake .#capibara && \
|
||||
home-manager switch --flake .#rilla@capibara
|
||||
doas nixos-rebuild switch --flake .#capibara
|
||||
|
||||
trantor:
|
||||
doas nixos-rebuild switch --flake .#trantor && \
|
||||
home-manager switch --flake .#rilla@trantor
|
||||
doas nixos-rebuild switch --flake .#trantor
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = [ pkgs.librewolf pkgs.tor-browser-bundle-bin ];
|
||||
|
||||
programs.firefox.enable = true;
|
||||
home.sessionVariables.BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
package = pkgs.ungoogled-chromium;
|
||||
};
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
# common
|
||||
|
||||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home = {
|
||||
username = "rilla";
|
||||
homeDirectory = "/home/rilla";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
imports = [
|
||||
../cheat
|
||||
../dav
|
||||
../fonts
|
||||
../foot
|
||||
../git
|
||||
../gpg
|
||||
../lf
|
||||
../mail
|
||||
../neovim
|
||||
../pass
|
||||
../rss
|
||||
../ssh
|
||||
../tmux
|
||||
../vitetris
|
||||
../xdg
|
||||
../zsh
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
R
|
||||
ansible
|
||||
bind.dnsutils
|
||||
docker-compose
|
||||
file
|
||||
just
|
||||
gnumake
|
||||
html-tidy
|
||||
htop
|
||||
inetutils # telnet
|
||||
j2cli
|
||||
jq
|
||||
killall
|
||||
kubectl
|
||||
libnotify
|
||||
mosh
|
||||
neofetch
|
||||
pandoc
|
||||
podman-compose
|
||||
pv
|
||||
ripgrep
|
||||
sassc
|
||||
screen
|
||||
shellcheck
|
||||
signify
|
||||
unzip
|
||||
wget
|
||||
inputs.agenix.packages.x86_64-linux.default
|
||||
age-plugin-yubikey
|
||||
];
|
||||
|
||||
programs.bat = {
|
||||
enable = true;
|
||||
config = { theme = "gruvbox-dark"; };
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
tmux.enableShellIntegration = true;
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
|
@ -12,7 +12,7 @@ let
|
|||
|
||||
in
|
||||
{
|
||||
home.packages = [ davsync pkgs.vdirsyncer pkgs.khal pkgs.khard pkgs.abook ];
|
||||
home.packages = with pkgs; [ dav-sync vdirsyncer khal khard abook ];
|
||||
|
||||
home.file.".config/vdirsyncer/config".text = ''
|
||||
[general]
|
||||
|
@ -28,7 +28,7 @@ in
|
|||
[pair nextcloud_calendar]
|
||||
a = "nextcloud_calendar_local"
|
||||
b = "nextcloud_calendar_remote"
|
||||
collections = ["personal", "contact_birthdays", "yoga", "events"]
|
||||
collections = ["personal", "contact_birthdays", "events"]
|
||||
metadata = ["color"]
|
||||
|
||||
[storage nextcloud_calendar_local]
|
||||
|
@ -100,47 +100,6 @@ in
|
|||
token_file = "${tokens}/google_contacts"
|
||||
client_id.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_id"]
|
||||
client_secret.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_secret"]
|
||||
|
||||
|
||||
###########
|
||||
# trakken #
|
||||
###########
|
||||
|
||||
## calendar
|
||||
|
||||
[pair trakken_calendar_sync]
|
||||
a = "trakken_calendar_remote"
|
||||
b = "trakken_calendar_local"
|
||||
collections = [["trakken_cal", "ricard@trkkn.com", "ricard@trkkn.com"]]
|
||||
|
||||
[storage trakken_calendar_local]
|
||||
type = "filesystem"
|
||||
path = "${calendars}/trakken/"
|
||||
fileext = ".ics"
|
||||
|
||||
[storage trakken_calendar_remote]
|
||||
type = "google_calendar"
|
||||
token_file = "${tokens}/trakken_calendar"
|
||||
client_id.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_id"]
|
||||
client_secret.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_secret"]
|
||||
|
||||
## contacts
|
||||
|
||||
[pair trakken_contacts]
|
||||
a = "trakken_contacts_local"
|
||||
b = "trakken_contacts_remote"
|
||||
collections = [["trakken_contacts", "default", "default"]]
|
||||
|
||||
[storage trakken_contacts_local]
|
||||
type = "filesystem"
|
||||
path = "${contacts}/trakken"
|
||||
fileext = ".vcf"
|
||||
|
||||
[storage trakken_contacts_remote]
|
||||
type = "google_contacts"
|
||||
token_file = "${tokens}/trakken_contacts"
|
||||
client_id.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_id"]
|
||||
client_secret.fetch = ["command", "${pass}", "google.com/vdirsyncer/client_secret"]
|
||||
'';
|
||||
|
||||
home.file.".config/khal/config".text = ''
|
||||
|
@ -158,14 +117,6 @@ in
|
|||
path = ${calendars}/google/r.illa.pujagut@gmail.com/
|
||||
color = dark blue
|
||||
|
||||
[[trakken]]
|
||||
path = ${calendars}/trakken/ricard@trkkn.com/
|
||||
color = dark red
|
||||
|
||||
[[yoga]]
|
||||
path = ${calendars}/nextcloud/yoga/
|
||||
color = dark magenta
|
||||
|
||||
[[events]]
|
||||
path = ${calendars}/nextcloud/events
|
||||
color = brown
|
||||
|
@ -196,8 +147,6 @@ in
|
|||
path = ${contacts}/nextcloud/contacts/
|
||||
[[google]]
|
||||
path = ${contacts}/google/default/
|
||||
[[trakken]]
|
||||
path = ${contacts}/trakken/default/
|
||||
|
||||
[general]
|
||||
debug = no
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
common = import ./common;
|
||||
extra = import ./extra;
|
||||
|
||||
alacritty = import ./alacritty;
|
||||
arduino = import ./arduino;
|
||||
barrier = import ./barrier;
|
||||
browsers = import ./browsers;
|
||||
cheat = import ./cheat;
|
||||
dav = import ./dav;
|
||||
default.txt = import ./default.txt;
|
||||
desktop-river = import ./desktop-river;
|
||||
desktop-xmonad = import ./desktop-xmonad;
|
||||
drawterm = import ./drawterm;
|
||||
fonts = import ./fonts;
|
||||
foot = import ./foot;
|
||||
gcloud = import ./gcloud;
|
||||
git = import ./git;
|
||||
gotify = import ./gotify;
|
||||
gpg = import ./gpg;
|
||||
idasen = import ./idasen;
|
||||
lf = import ./lf;
|
||||
mail = import ./mail;
|
||||
maker = import ./maker;
|
||||
minidisc = import ./minidisc;
|
||||
mpd = import ./mpd;
|
||||
msg = import ./msg;
|
||||
music = import ./music;
|
||||
neovim = import ./neovim;
|
||||
pass = import ./pass;
|
||||
rss = import ./rss;
|
||||
snapcast = import ./snapcast;
|
||||
sound = import ./sound;
|
||||
ssh = import ./ssh;
|
||||
syncthing = import ./syncthing;
|
||||
theming = import ./theming;
|
||||
tmux = import ./tmux;
|
||||
vitetris = import ./vitetris;
|
||||
wallets = import ./wallets;
|
||||
wine = import ./wine;
|
||||
xdg = import ./xdg;
|
||||
zsh = import ./zsh;
|
||||
}
|
|
@ -60,4 +60,9 @@
|
|||
Install = { WantedBy = [ "river-session.target" ]; };
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_CURRENT_DESKTOP = "river";
|
||||
MOZ_ENABLE_WAYLAND = 1;
|
||||
};
|
||||
|
||||
}
|
|
@ -42,6 +42,9 @@ in {
|
|||
${riverctl} map normal Super Comma send-layout-cmd kile "mod-main-count +1"
|
||||
${riverctl} map normal Super Period send-layout-cmd kile "mod-main-count -1"
|
||||
|
||||
${riverctl} map normal Super G send-layout-cmd kile "padding 5"
|
||||
${riverctl} map normal Super+Shift G send-layout-cmd kile "padding 0"
|
||||
|
||||
# Super+{Up,Right,Down,Left} to change layout orientation
|
||||
${riverctl} map normal Super+Control K send-layout-cmd kile "layout up"
|
||||
${riverctl} map normal Super+Control J send-layout-cmd kile "layout down"
|
||||
|
@ -52,6 +55,8 @@ in {
|
|||
${riverctl} map normal Super+Control W send-layout-cmd kile "layout wide"
|
||||
${riverctl} map normal Super+Control C send-layout-cmd kile "layout cols"
|
||||
${riverctl} map normal Super+Shift Space send-layout-cmd kile "layout default"
|
||||
|
||||
${riverctl} send-layout-cmd kile "padding 5"
|
||||
'';
|
||||
};
|
||||
};
|
|
@ -0,0 +1,67 @@
|
|||
# extra
|
||||
|
||||
{ inputs, outputs, lib, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
# ./minidisc
|
||||
../arduino
|
||||
../browsers
|
||||
../desktop-river
|
||||
../drawterm
|
||||
../gotify
|
||||
../idasen
|
||||
../maker
|
||||
../mpd
|
||||
../msg
|
||||
../music
|
||||
../snapcast
|
||||
../sound
|
||||
../syncthing
|
||||
../theming
|
||||
../wallets
|
||||
../wine
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# calibre
|
||||
acpi
|
||||
android-tools
|
||||
# pyenv
|
||||
gimp
|
||||
john
|
||||
libreoffice
|
||||
lxqt.pcmanfm-qt
|
||||
mpv
|
||||
# pynitrokey
|
||||
networkmanagerapplet
|
||||
nextcloud-client
|
||||
vagrant
|
||||
virt-manager
|
||||
virtiofsd
|
||||
];
|
||||
|
||||
# services.kdeconnect = {
|
||||
# enable = true;
|
||||
# indicator = true;
|
||||
# };
|
||||
|
||||
|
||||
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = [ "secrets" ];
|
||||
};
|
||||
|
||||
services.nextcloud-client = {
|
||||
enable = true;
|
||||
startInBackground = true;
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
"autoconnect" = [ "qemu:///system" ];
|
||||
"uris" = [ "qemu:///system" ];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -44,4 +44,5 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
home.sessionVariables.TERMINAL = "${pkgs.foot}/bin/foot";
|
||||
}
|
|
@ -1,8 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let woodpecker-cli = pkgs.callPackage ./woodpecker-cli.nix { inherit pkgs; };
|
||||
in {
|
||||
home.packages = [ pkgs.diff-so-fancy pkgs.tig pkgs.tea woodpecker-cli ];
|
||||
{
|
||||
home.packages = [ pkgs.diff-so-fancy pkgs.tig pkgs.tea ];
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
|
@ -3,9 +3,9 @@
|
|||
let
|
||||
pv = pkgs.callPackage ./pv.nix { inherit config pkgs; };
|
||||
lf-wrapper = pkgs.callPackage ./lf-wrapper.nix { inherit config pkgs; };
|
||||
cleaner = pkgs.callPackage ./cleaner.nix { inherit config pkgs; };
|
||||
|
||||
in {
|
||||
in
|
||||
{
|
||||
home.packages = [ lf-wrapper ];
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
|
@ -24,8 +24,5 @@ in {
|
|||
}}
|
||||
'';
|
||||
};
|
||||
extraConfig = ''
|
||||
set cleaner ${cleaner}
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -5,7 +5,6 @@ let
|
|||
lf = "${pkgs.lf}/bin/lf";
|
||||
rm = "${pkgs.coreutils-full}/bin/rm";
|
||||
mkdir = "${pkgs.coreutils-full}/bin/mkdir";
|
||||
mkfifo = "${pkgs.coreutils-full}/bin/mkfifo";
|
||||
lfcache = "${config.home.homeDirectory}/.cache/lf";
|
||||
in pkgs.writeScriptBin "lf-wrapper" ''
|
||||
#!${shell}
|
|
@ -1,7 +1,6 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
mailsync = pkgs.callPackage ./mailsync.nix { inherit config pkgs; };
|
||||
gpgKey = "B51D4548A4846E3C8D115C808333CFB0B9D3244D";
|
||||
|
||||
personalSignature = ''
|
||||
|
@ -80,7 +79,7 @@ let
|
|||
|
||||
in
|
||||
{
|
||||
home.packages = [ mailsync pkgs.urlscan pkgs.abook ];
|
||||
home.packages = [ pkgs.mutt-wizard pkgs.urlscan pkgs.abook ];
|
||||
accounts.email.accounts = {
|
||||
|
||||
"rilla@monotremata.xyz" =
|
|
@ -4,14 +4,13 @@ let
|
|||
url = "nextcloud.monotremata.xyz";
|
||||
dir = "${config.home.homeDirectory}/.newsboat";
|
||||
user = "rilla";
|
||||
rsssync = pkgs.callPackage ./rsssync.nix { inherit config pkgs; };
|
||||
in
|
||||
{
|
||||
home.packages = [rsssync];
|
||||
home.packages = [ pkgs.rss-sync ];
|
||||
programs.newsboat = {
|
||||
enable = true;
|
||||
autoReload = true;
|
||||
browser = "firefox"; # todo: should be my open_link script
|
||||
browser = "firefox"; # todo: should be my open_link script
|
||||
reloadThreads = 100;
|
||||
extraConfig = ''
|
||||
urls-source "ocnews"
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue