gurkan
/
nixos-config
Archived
1
0
Fork 0
This commit is contained in:
Gürkan 2021-11-03 23:57:34 +01:00
parent 46e0459b30
commit 5019c67dc6
58 changed files with 2035 additions and 35 deletions

120
flake.lock Normal file
View File

@ -0,0 +1,120 @@
{
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1634851050,
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c91f3de5adaf1de973b797ef7485e441a65b8935",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1635839387,
"narHash": "sha256-2B6DqfTiwY5w2TljC4+AxEUuVYMTP5Fo2h5iGNIONvk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "288faaa5a65e72e37e6027024829b15c8bb69286",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1635806954,
"narHash": "sha256-yX/zjbIL/HdXh8a92hWJ+31gsLLv7byA1XRuPARaLro=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "372e59d2af704bffd133cbe029f1d5efe73ba6fb",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-21.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1635949385,
"narHash": "sha256-z5Ef6MsfmyEjH3qEZwrxBbkZXwPDeRG43tSJXphp0OI=",
"owner": "nix-community",
"repo": "NUR",
"rev": "4b50c9503304f0ec63cab98f0612262259d90cb3",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "NUR",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nur": "nur",
"unstable": "unstable",
"userConfig": "userConfig"
}
},
"unstable": {
"locked": {
"lastModified": 1635844945,
"narHash": "sha256-tZcL307dj28jgEU1Wdn+zwG9neyW0H2+ZjdVhvJxh9g=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b67e752c29f18a0ca5534a07661366d6a2c2e649",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"userConfig": {
"inputs": {
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
],
"nur": [
"nur"
]
},
"locked": {
"narHash": "sha256-SFHhx5J5aLs+RpylnSXAW9U0zT3RkY3dcYwK+V5/Nj8=",
"path": "userConfig",
"type": "path"
},
"original": {
"path": "userConfig",
"type": "path"
}
}
},
"root": "root",
"version": 7
}

59
flake.nix Normal file
View File

@ -0,0 +1,59 @@
{
description = "Gurkan's systems configuration";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
userConfig = {
url = "path:userConfig";
inputs.home-manager.follows = "home-manager";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nur.follows = "nur";
};
};
outputs = inputs @ { nixpkgs, unstable, home-manager, self, userConfig, ... }:
let
overlay-unstable = final: prev: {
unstable = (import inputs.unstable {
config.allowUnfree = true;
system = "${prev.system}";
});
};
overlayModule = {
nixpkgs.overlays = [overlay-unstable];
};
in {
homeConfigurations = userConfig.outputs.homeConfigurations;
nixosConfigurations.innodellix = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
overlayModule
(import ./machines/innodellix.nix)
home-manager.nixosModules.home-manager
nixpkgs.nixosModules.notDetected
];
};
checks = builtins.listToAttrs (map (system: {
name = system;
value = let pkgs = nixpkgs.outputs.legacyPackages."${system}";
in {
nixfmt-check = pkgs.runCommand "nixfmt-config" { } ''
${pkgs.nixfmt}/bin/nixfmt --check \
$(find ${self} -type f -name '*.nix')
mkdir $out
'';
};
}) [ "x86_64-linux" ]);
};
}

View File

@ -1,13 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{ config, pkgs, lib, inputs, ... }:
let
unstable = import (
fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz
) { config = { allowUnfree = true; }; };
secrets = import ../modules/secrets.nix;
in
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
[
../modules/laptop/common.nix
];
@ -43,8 +40,7 @@ in
};
};
kernelModules = [ "kvm-intel" "i915" ];
kernelPackages = unstable.linuxPackages_latest;
# kernelPackages = pkgs.linuxPackages_zen;
kernelPackages = inputs.unstable.linuxPackages_latest;
kernelParams = [
"i915.enable_fbc=1"
"i915.enable_guc=2"

View File

@ -1,10 +1,4 @@
{ config, lib, pkgs, ... }:
let
baseconfig = { allowUnfree = true; };
unstable = import (
fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz
) { config = baseconfig; };
in
{
networking.hostName = "nixosis";

View File

@ -5,8 +5,6 @@ in
{
imports =
[
<nixpkgs/nixos/modules/installer/scan/not-detected.nix>
../common.nix
./dnscrypt.nix

View File

@ -1,10 +1,4 @@
{ config, lib, pkgs, ... }:
# let
# baseconfig = { allowUnfree = true; allowBroken = true; };
# unstable = import (
# fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz
# ) { config = baseconfig; };
# in
{
imports = [ ./helper-modules/clipcat.nix ];

View File

@ -1,10 +1,4 @@
{ config, pkgs, ... }:
# let
# baseconfig = { allowUnfree = true; };
# unstable = import (
# fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz
# ) { config = baseconfig; };
# in
{
boot.blacklistedKernelModules = [ "nouveau" ];

View File

@ -1,10 +1,5 @@
{pkgs, ...}:
{pkgs, inputs, ...}:
let
baseconfig = { allowUnfree = true; };
unstable = import (
fetchTarball https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz
) { config = baseconfig; };
# Get sha256 by running nix-prefetch-url --unpack https://github.com/[owner]/[name]/archive/[rev].tar.gz
# customVimPlugins = with unstable.vimUtils; {
customVimPlugins = with pkgs.vimUtils; {
@ -40,7 +35,7 @@ in {
enable = true;
vimAlias = true;
defaultEditor = true;
package = unstable.neovim-unwrapped;
package = inputs.nixpkgs_unstable.neovim-unwrapped;
configure = {
customRC = ''
lua require('impatient')

View File

@ -19,7 +19,11 @@
};
};
overlays = [
(import (builtins.fetchTarball "https://github.com/oxalica/rust-overlay/archive/6d957c2105a5a548211c412fbc97bae81b7b8eb6.tar.gz"))
(import (
builtins.fetchTarball {
url = "https://github.com/oxalica/rust-overlay/archive/6d957c2105a5a548211c412fbc97bae81b7b8eb6.tar.gz";
sha256 = "0qwwqqnaczlns9s76bgbcwhjxg3xcgza9nyls1gr6gk4cn9yngla";
}))
];
};

26
userConfig/flake.nix Normal file
View File

@ -0,0 +1,26 @@
{
description = "Gurkan's home-manager configuration";
inputs = {
home-manager.url = "github:nix-comunity/home-manager";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.05";
nur.url = "github:nix-community/NUR";
};
outputs = { self, nixpkgs, nur, ... }@inputs: {
homeConfigurations.nixos =
inputs.home-manager.lib.homeManagerConfiguration {
configuration = { pkgs, ... }: {
imports = [
./home.nix
];
nixpkgs = {
config.allowUnfree = true;
overlays = [
nur.overlay
];
};
};
};
};
}

38
userConfig/home.nix Normal file
View File

@ -0,0 +1,38 @@
{ pkgs, config, ... }:
with import <nixpkgs> {};
with builtins;
with lib;
with import <home-manager/modules/lib/dag.nix> { inherit lib; };
{
imports =
[
./modules/includes.nix
];
home.activation.fuckMicrosoft= dagEntryBefore ["checkLinkTargets"] ''
echo "Removing the crap some moronic apps are placing.."
find ~ -name "*.FUCK" -print -delete
'';
# XXX: declare plugins in zshrc when there is another method than
# "Oh let's write the hashsums of every f-king plugin's every version we use"
home.activation.updateZplug= dagEntryAfter ["writeBoundary"] ''
#!/usr/bin/env zsh
if [ ! -e /tmp/.zplug_updated ] || [ `stat --format=%Y /tmp/.zplug_updated` -le $(( `date +%s` - 86400 )) ]; then
echo "Updating zplug plugins.."
zsh -c "source ~/.zshrc ; zplug update" || echo "Had problems, ignoring!"
touch /tmp/.zplug_updated
else
echo "Skipping zplug update, recently done"
fi
'';
programs.home-manager = {
enable = true;
};
home.stateVersion = "19.03";
}

View File

@ -0,0 +1,40 @@
[Customer]
Prefix=0
Used=false
[Export]
Filename=/home/gurkan/export.ycfg
[Flag]
AllowUpdate=true
AppendCr=true
AppendDelay1=false
AppendDelay2=false
AppendTab1=false
AppendTab2=false
FastTrig=false
HmacLt64=true
ManUpdate=false
OathHotp8=false
Pacing10ms=false
Pacing20ms=false
RequireInput=false
SerialBtnVisible=true
StrongPw1=false
StrongPw2=false
StrongPw3=false
TabTirst=false
UseNumericKeypad=false
serialApiVisible=true
serialUsbVisible=false
[Import]
Filename=/home/gurkan/import.ycfg
[Log]
Disabled=true
Filename=/home/gurkan/configuration_log.csv
Format=0
[Preference]
Export=false

View File

@ -0,0 +1,7 @@
server_host = '127.0.0.1'
server_port = 45045
finder = 'rofi'
[rofi]
line_length = 100
menu_length = 20

View File

@ -0,0 +1,13 @@
daemonize = true
max_history = 200
history_file_path = '/home/gurkan/.cache/clipcat/clipcatd/db'
log_level = 'INFO'
[monitor]
load_current = true
enable_clipboard = true
enable_primary = false
[grpc]
host = '127.0.0.1'
port = 45045

View File

@ -0,0 +1,2 @@
[sha256]
regex: sha256:([^\s]*)

View File

@ -0,0 +1,3 @@
[72C951DA6087EB20]
Default=gurkan.default
Locked=1

View File

@ -0,0 +1,13 @@
[Install72C951DA6087EB20]
Default=gurkan.default
Locked=1
[Profile0]
Name=gurkan.default
IsRelative=1
Path=gurkan.default
Default=1
[General]
StartWithLastProfile=1
Version=2

View File

@ -0,0 +1,46 @@
/* Privacy stuff, it's a damn shame that we need to do it this way ***/
user_pref("app.normandy.first_run", false);
user_pref("app.shield.optoutstudies.enabled", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features", false);
user_pref("browser.newtabpage.activity-stream.asrouter.userprefs.cfr.addons", false);
user_pref("browser.newtabpage.activity-stream.disableSnippets", true);
user_pref("browser.newtabpage.activity-stream.feeds.section.highlights", false);
user_pref("browser.newtabpage.activity-stream.feeds.snippets", false);
user_pref("browser.pocket.enabled", false);
user_pref("extensions.pocket.enabled", false);
user_pref("privacy.trackingprotection.fingerprinting.enabled", true);
user_pref("privacy.trackingprotection.cryptomining.enabled", true);
user_pref("privacy.trackingprotection.socialtracking.enabled", true);
/* Cache less ***/
user_pref("browser.cache.disk.capacity", 100000);
user_pref("browser.cache.disk.smart_size.enabled", false);
/* Feature stuff ***/
user_pref("dom.w3c_touch_events.enabled", 1);
user_pref("security.webauth.u2f", true);
user_pref("browser.tabs.warnOnClose", false);
user_pref("browser.tabs.closeWindowWithLastTab", false);
user_pref("browser.toolbars.bookmarks.showOtherBookmarks", false);
user_pref("general.warnOnAboutConfig", false);
user_pref("dom.webnotifications.enabled", false);
user_pref("browser.download.useDownloadDir", false);
user_pref("browser.urlbar.clickSelectsAll", true);
user_pref("browser.urlbar.doubleClickSelectsAll", false);
user_pref("toolkit.legacyUserProfileCustomizations.stylesheets", true);
/* Do not have "offline mode" for fucks sake, we're not on 1992 ***/
user_pref("network.manage-offline-status", false);
/* Helps on hidpi ***/
user_pref("layout.css.devPixelsPerPx", 1.2);
/* Moronic ad stuff ***/
user_pref("browser.urlbar.suggest.topsites", false);
user_pref("browser.urlbar.sponsoredTopSites", false);
user_pref("browser.newtabpage.activity-stream.showSponsoredTopSites", false);
user_pref("browser.newtabpage.activity-stream.showSponsored", false);
user_pref("browser.newtabpage.activity-stream.discoverystream.sponsored-collections.enabled", false);
user_pref("services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsored", false);
user_pref("services.sync.prefs.sync.browser.newtabpage.activity-stream.showSponsoredTopSites", false);

View File

@ -0,0 +1,52 @@
/* No tabs toolbar, I use TST sidebar */
#TabsToolbar {
visibility: collapse !important;
}
/* Hide sidebar header */
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
display: none;
}
/*
#sidebar-box, #sidebar-box *{ max-width:5em; min-width:50px;}
#sidebar-box:hover, #sidebar-box:hover *{ max-width:none!important;}
*/
:root {
--sidebar-normal-width: 150px;
--sidebar-hover-width: 250px;
--background-color: rgb(0,0,0);
}
/* Expand sidebar if it's hovered for a while */
#sidebar-box {
position: relative !important;
overflow-x: hidden !important;
min-width: var(--sidebar-normal-width) !important;
max-width: var(--sidebar-normal-width) !important;
-moz-transition: all .2s ease-out .2s !important;
}
#sidebar-box:hover {
margin-left: calc((var(--sidebar-hover-width) - var(--sidebar-normal-width)) * -1) !important;
min-width: var(--sidebar-hover-width) !important;
-moz-transition: all .2s ease-out 2s !important;
}
/* Hide sidebar splitter */
#sidebar-splitter {
display: none !important;
}
/* Hide sidebar on fullscreen */
#main-window[inFullscreen] #sidebar-box,
#main-window[inFullscreen] #sidebar-splitter {
display: none !important;
width: 0px !important;
}
/* Close find bar if it loses focus */
findbar:not(:focus-within) {
height: 0px !important;
overflow: hidden !important;
}

View File

@ -0,0 +1,10 @@
[greenclip]
blacklisted_applications = []
enable_image_support = true
history_file = "/home/gurkan/.cache/greenclip.history"
image_cache_directory = "/tmp/greenclip"
max_history_length = 200
max_selection_size_bytes = 0
static_history = []
trim_space_from_selection = true
use_primary_selection_as_input = false

View File

@ -0,0 +1,54 @@
wintypes:
{
tooltip = { fade = true; shadow = true; opacity = 0.95; focus = true; full-shadow = false; };
utility = { opacity = 0.9; };
menu = { opacity = 0.9; };
popup_menu = { opacity = 0.9; shadow = false; }
dropdown_menu = { opacity = 0.9; shadow = false; }
};
blur-background = true;
blur-background-fixed = true;
blur:
{
method = "gaussian";
size = 10;
deviation = 5.0;
};
blur-background-exclude = [
"window_type = 'dock'",
"window_type = 'desktop'",
"class_g = 'slop'",
"_GTK_FRAME_EXTENTS@:c",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_STICKY'"
];
# https://github.com/yshui/picom/issues/663
# transparent-clipping = true;
glx-no-stencil = true;
no-fading-openclose = true;
use-ewmh-active-win = true;
detect-client-opacity = true;
backend = "glx";
focus-exclude = [
"! name ~= '' " # slock
];
shadow = true;
shadow-radius = 5;
shadow-offset-x = -5;
shadow-offset-y = -5;
shadow-opacity = 0.5;
shadow-exclude = [
"class_g = 'TelegramDesktop' && argb",
"_NET_WM_WINDOW_TYPE:a = '_NET_WM_WINDOW_TYPE_NOTIFICATION'",
"class_g = 'Daily' && argb",
"class_g = 'Mail' && argb",
"bounding_shaped",
"_GTK_FRAME_EXTENTS@:c",
"class_g = 'Firefox' && !window_type *= 'menu'",
"bounding_shaped && !rounded_corners"
];

View File

@ -0,0 +1,3 @@
quiet_mode
[ProxyList]
socks5 127.0.0.1 8080

View File

@ -0,0 +1,2 @@
[LOGGING]
disable=logging-format-interpolation

View File

@ -0,0 +1,3 @@
keyfile ~/.tarsnap.key
print-stats
cachedir ~/.tarsnapcache

View File

@ -0,0 +1,8 @@
[General]
StartWithLastProfile=1
[Profile0]
Name=default
IsRelative=1
Path=gurkan.default
Default=1

View File

@ -0,0 +1,4 @@
user_pref("mailnews.default_news_sort_order", 2);
user_pref("mailnews.default_news_sort_type", 18);
user_pref("mailnews.default_sort_order", 2);
user_pref("beacon.enabled", false);

View File

@ -0,0 +1,23 @@
/* Set default namespace to XUL */
@namespace
url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
/* Set font size in folder pane */
#folderTree >treechildren::-moz-tree-cell-text {
font-size: 12pt !important;
}
/* Set font size in thread pane */
#threadTree >treechildren::-moz-tree-cell-text {
font-size: 12pt !important;
}
/* Set height for cells in folder pane */
#folderTree >treechildren::-moz-tree-row {
height: 25px !important;
}
/* Set height for cells in thread pane */
#threadTree >treechildren::-moz-tree-row {
height: 25px !important;
}

View File

@ -0,0 +1,8 @@
# Switch to a branch with selected commit
bind main F !@sh -c "git checkout -b `echo -n %(commit) | head -c 10 | sed 's/^/newbranch_/'` %(commit)"
# copy commit id to clipboard
bind generic c !@sh -c "echo -n %(commit) | xclip -selection c"
# export current diff to a file
bind main x ?git format-patch -1 -N %(commit)

View File

@ -0,0 +1,135 @@
:root {
--tridactyl-font-family: "FiraCode Nerd Font", sans-serif;
--tridactyl-cmdl-font-size: 1.5rem;
--tridactyl-cmdl-line-height: 1.5;
--tridactyl-cmplt-option-height: 1.4em;
--tridactyl-cmplt-font-size: var(--tridactyl-small-font-size);
--tridactyl-cmplt-border-top: unset;
--tridactyl-status-font-size: 9px;
--tridactyl-status-font-family: "FiraCode Nerd Font", monospace;
--tridactyl-status-border: 1px var(--tridactyl-fg) solid;
--tridactyl-header-font-size: var(--tridactyl-small-font-size);
--tridactyl-header-font-weight: 200;
--tridactyl-header-border-bottom: unset;
--tridactyl-hintspan-font-size: var(--tridactyl-font-size);
}
span.TridactylHint {
font-family: monospace !important;
background: transparent !important;
color: black !important;
text-shadow: cyan -1px -1px 0px, cyan -1px 0px 0px, cyan -1px 1px 0px, cyan 1px -1px 0px, cyan 1px 0px 0px, cyan 1px 1px 0px, cyan 0px 1px 0px, cyan 0px -1px 0px !important;
font-size: 0.8em;
}
:root #command-line-holder {
order: 1;
border: 2px solid var(--tridactyl-cmdl-fg);
color: var(--tridactyl-cmdl-bg);
}
:root #tridactyl-input {
width: 90%;
padding: 1rem;
}
:root #completions table {
font-size: 0.8rem;
font-weight: 200;
border-spacing: 0;
table-layout: fixed;
padding: 1rem;
padding-top: 0;
}
:root #completions > div {
max-height: calc(20 * var(--tridactyl-cmplt-option-height));
min-height: calc(10 * var(--tridactyl-cmplt-option-height));
}
/* COMPLETIONS */
:root #completions {
font-weight: 200;
order: 2;
}
/* Olie doesn't know how CSS inheritance works */
:root #completions .HistoryCompletionSource {
max-height: unset;
min-height: unset;
}
:root #completions .HistoryCompletionSource table {
width: 100%;
font-size: 9pt;
border-spacing: 0;
table-layout: fixed;
}
/* redundancy 2: redundancy 2: more redundancy */
:root #completions .BmarkCompletionSource {
max-height: unset;
min-height: unset;
}
:root #completions table tr td.prefix,
:root #completions table tr td.privatewindow,
:root #completions table tr td.container,
:root #completions table tr td.icon {
display: none;
}
:root #completions .BufferCompletionSource table {
width: unset;
font-size: unset;
border-spacing: unset;
table-layout: unset;
}
:root #completions table tr .title {
width: 50%;
}
:root #completions table tr {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
:root #completions .sectionHeader {
background: unset;
padding: 1rem !important;
padding-left: unset;
padding-bottom: 0.2rem;
}
:root #cmdline_iframe {
position: fixed !important;
bottom: unset;
top: 25% !important;
left: 10% !important;
z-index: 2147483647 !important;
width: 80% !important;
box-shadow: rgba(0, 0, 0, 0.5) 0px 0px 15px !important;
}
:root .TridactylStatusIndicator {
position: fixed !important;
bottom: 0 !important;
font-weight: 200 !important;
padding: 0.8ex !important;
}
/* #Shydactyl-normal { */
/* border-color: green !important; */
/* } */
/* #Shydactyl-insert { */
/* border-color: yellow !important; */
/* } */

View File

@ -0,0 +1,84 @@
" vim: filetype=vim
" This wipes all existing settings. This means that if a setting in this file
" is removed, then it will return to default. In other words, this file serves
" as an enforced single point of truth for Tridactyl's configuration.
sanitize tridactyllocal tridactylsync
" Just use a blank page for new tab. It would be nicer to use the standard
" Firefox homepage, but Tridactyl doesn't support this yet.
set newtab about:blank
" hinting stuff
set hintnames numeric
" set hintchars asdfpolkm
set hintfiltermode vimperator-reflow
set hintautoselect true
set hintuppercase false
set incsearch true
set modeindicatorshowkeys true
" Git{Hub,Lab} git clone via SSH yank
bind yg composite js "git clone " + document.location.href.replace(/https?:\/\//,"git@").replace("/",":").replace(/$/,".git") | clipboard yank
" Theme
colourscheme mytheme
" Use vim in tmux for editor.
set editorcmd wezterm start vim
" Ctrl-F should use the browser's native 'find' functionality.
unbind <C-f>
" But also support Tridactyl search too.
bind / fillcmdline find
bind ? fillcmdline find -?
bind n findnext 1
bind N findnext -1
" Who cares case in search?
set findcase insensitive
" Smooth scrolling, yes please. This is still a bit janky in Tridactyl.
set smoothscroll true
" Not so vim
unbind j
unbind k
unbind l
unbind f
unbind t
unbind .
unbind s
unbind o
" Hinting
bind h hint
" yank
bind ly hint -y
" tab
bind lt hint -b
" select text
bind s hint -h
" hover
bind lh hint -F e => e.dispatchEvent(new MouseEvent('mouseover', {}))
" image hover
bind ih hint -iF e => e.dispatchEvent(new MouseEvent('mouseover', {}))
" Tab stuff
" new
bind tn tabnew
" move
bind tm tabdetach
" copy
bind tc composite tabduplicate; tabdetach
" @Reference
" Don't run Tridactyl on some web sites because it doesn't work well, or
" because the web site has its own keybindings.
" autocmd DocStart mail.google.com mode ignore
" Sometimes the status bar in the bottom left corner overlaps the Tridactyl
" command line, so set an option to move the status bar to the right.
guiset_quiet hoverlink right

View File

@ -0,0 +1,11 @@
# Add yubikey to ssh
if ! [[ `ssh-add -L | grep nist` ]] && [[ `lsusb | grep "0406 Yubico"` ]]; then
if [[ ! -z `pgrep ssh-add` ]]; then
echo "(An instance of ssh-add is waiting)"
else
ssh-add -s /nix/store/9mq39kkc9liymrw5m6idjfvbk017jgqj-opensc-0.21.0/lib/opensc-pkcs11.so
fi
fi
# zap directory with z
eval "$(zoxide init zsh)"

View File

@ -0,0 +1,34 @@
{
"application/pdf" = "qpdfview.desktop";
"application/vnd.oasis.opendocument.text" = "writer.desktop";
"application/vnd.openxmlformats-officedocument.wordprocessingml.document" = "writer.desktop";
"application/x-debian-package" = "org.kde.ark.desktop";
"application/x-extension-htm" = "firefox.desktop";
"application/x-extension-html" = "firefox.desktop";
"application/x-extension-shtml" = "firefox.desktop";
"application/x-extension-xht" = "firefox.desktop";
"application/x-extension-xhtml" = "firefox.desktop";
"application/x-xz-compressed-tar" = "org.kde.ark.desktop";
"application/xhtml+xml" = "firefox.desktop";
"application/zip" = "org.kde.ark.desktop";
"image/jpeg" = "lximage-qt.desktop";
"image/png" = "lximage-qt.desktop";
"image/gif" = "lximage-qt.desktop";
"image/x-xcf" = "gimp.desktop";
"inode/directory" = "pcmanfm.desktop";
"application/x-directory" = "pcmanfm.desktop";
"message/rfc822" = "thunderbird.desktop";
"text/html" = "firefox.desktop";
"text/plain" = "geany.desktop";
"video/mp4" = "mpv.desktop";
"video/webm" = "mpv.desktop";
"x-scheme-handler/chrome" = "firefox.desktop";
"x-scheme-handler/ftp" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/mailto" = "thunderbird.desktop";
"x-scheme-handler/slack" = "slack.desktop";
"x-scheme-handler/msteams" = "teams.desktop";
"x-scheme-handler/vscode" = "code-url-handler.desktop";
"x-scheme-handler/file" = "pcmanfm.desktop";
}

View File

@ -0,0 +1,58 @@
{ pkgs, ... }:
let
sync = "/home/gurkan/syncfolder";
secrets = import ./secrets.nix {pkgs=pkgs;};
fileAssociations = import ./file-associations.nix;
in
{
xdg = {
mimeApps = {
enable = true;
defaultApplications = fileAssociations;
};
configFile = {
"tridactyl/tridactylrc".source = ./config_files/tridactyl/tridactylrc;
"tridactyl/themes/mytheme.css".source = ./config_files/tridactyl/mytheme.css;
"mimeapps.list".force = true;
"Yubico/u2f_keys".text = secrets.yubicoU2FKeys;
"Yubico/YKPersonalization.conf".source = ./config_files/YKPersonalization.conf;
"greenclip.toml".source = ./config_files/greenclip.toml;
"tig/config".source = ./config_files/tig;
"picom.conf".source = ./config_files/picom.conf;
"pylintrc".source = ./config_files/pylintrc;
"extrakto/extrakto.conf".source = ./config_files/extrakto.conf;
};
};
home.file = {
".zshnix".source = ./config_files/zsh_nix;
".gist".text = secrets.gistSecret;
".tarsnap.key".text = secrets.tarsnapKey;
".rustypaste/config.toml".text = secrets.rustypasteSecret;
".tarsnaprc".source = ./config_files/tarsnaprc;
".thunderbird/profiles.ini".source = ./config_files/thunderbird/profiles.ini;
".thunderbird/gurkan.default/user.js".source = ./config_files/thunderbird/user.js;
".thunderbird/gurkan.default/chrome/userChrome.css".source = ./config_files/thunderbird/userChrome.css;
".mozilla/firefox/installs.ini".source = ./config_files/firefox/installs.ini;
".mozilla/firefox/profiles.ini".source = ./config_files/firefox/profiles.ini;
".mozilla/firefox/gurkan.default/user.js".source = ./config_files/firefox/user.js;
".mozilla/firefox/gurkan.default/chrome/userChrome.css".source = ./config_files/firefox/userChrome.css;
".mozilla/native-messaging-hosts/tridactyl.json".source = "${pkgs.tridactyl-native}/lib/mozilla/native-messaging-hosts/tridactyl.json";
".trc".text = secrets.rubyTwitterSecret;
".proxychains/proxychains.conf".source = ./config_files/proxychains.conf;
};
}

View File

@ -0,0 +1,10 @@
{ pkgs }:
{
# Wrap scripts into programs
writeSubbedBin = args:
pkgs.substituteAll (args // {
dir = "bin";
isExecutable = true;
shell = pkgs.bash;
});
}

View File

@ -0,0 +1,13 @@
{ config, ... }:
{
imports =
[
./packages.nix
./services.nix
./programs.nix
./variables.nix
./ssh.nix
./files.nix
./xserver.nix
];
}

View File

@ -0,0 +1,161 @@
{ config, pkgs, inputs, ...}:
let
# For overrides
nixpkgs = import <nixpkgs> {};
sysconfig = (import <nixpkgs/nixos> {}).config;
my_scripts = (import ./scripts.nix {pkgs = pkgs;});
in
{
nixpkgs = {
config = {
enable = true;
allowUnfree = true;
# Quick-overrides
packageOverrides = pkgs: rec {
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
inherit pkgs;
};
adminapi = imputs.nixpkgs_unstable.python38Packages.callPackage /devel/ig/nix-definitions/packages/adminapi.nix {};
pyvis = inputs.nixpkgs_unstable.python38Packages.callPackage ~/.config/nixpkgs/modules/packages/pyvis.nix {};
wezterm = pkgs.callPackage ~/.config/nixpkgs/modules/packages/wezterm.nix {};
paoutput = pkgs.callPackage ~/.config/nixpkgs/modules/packages/paoutput.nix {};
# @Reference patching apps
# krunner-pass = pkgs.krunner-pass.overrideAttrs (attrs: {
# patches = attrs.patches ++ [ ~/syncfolder/dotfiles/nixos/home/gurkan/.config/nixpkgs/modules/packages/pass-dbus.patch ];
# });
# weechat = (pkgs.weechat.override {
# configure = { availablePlugins, ... }: {
# plugins = with availablePlugins; [
# (python.withPackages (ps: with ps; [
# websocket_client
# dbus-python
# notify
# ]))
# ];
# };
# });
};
# @Reference sometimes needed
# allowBroken = true;
};
};
home.packages = with pkgs;
# Conditionals first
(if sysconfig.networking.hostName == "innixos" || sysconfig.networking.hostName == "innodellix" then [
slack
inputs.nixpkgs_unstable.teams
gnome3.gnome-keyring # needed for teams, thanks MS
discord
zoom-us
my_scripts.innovpn-toggle
thunderbird
] else [] ) ++ [
# Now overrides
( gimp-with-plugins.override { plugins = with gimpPlugins; [ gmic ]; })
( pass.withExtensions ( ps: with ps; [ pass-genphrase ]))
( inputs.nixpkgs_unstable.python38.withPackages ( ps: with ps; [
adminapi
black
coverage
flake8
ipython
libtmux
libvirt
netaddr
pep8
pip
pylint
pynvim
pysnooper
pyvis
pyyaml
requests
setuptools
vimwiki-markdown
virtualenv
xlib
]))
# non-stable stuff, subject to change
steam
nur.repos.mic92.reveal-md
# Rest is sorted
adbfs-rootless
alacritty
alttab
arandr # I might need manual xrandr one day
arc-kde-theme # for theming kde apps
arc-theme
ark
blueman
brightnessctl
calibre
chromium
ffmpeg
ffmpegthumbs
firefox
flameshot
geany
gitstatus
glxinfo
gnome3.dconf # some gnome apps keep its config in this shit e.g. shotwell
graphviz # some rarely-needed weird tools
grobi # no more autorandr 🎉
imagemagick
inotify-tools
jmtpfs # mount MTP devices easily
# kde-cli-tools # required to open kde-gtk-config
# kde-gtk-config # best GTK theme selector
libnotify
libreoffice
lxqt.lximage-qt
meld # GUI diff tool
mpv
my_scripts.git-cleanmerged
my_scripts.psitool-script
my_scripts.tarsnap-dotfiles
my_scripts.xinput-toggle
my_scripts.workman-toggle
onboard # on-screen keyboard
pamixer # pulseaudio mixer
papirus-icon-theme
paoutput
pavucontrol
pcmanfm-qt # A file-manager which fucking works
# pdftk # split-combine pdfs
picom # X compositor which sucks, also do not use services.picom
playerctl
# poppler_utils # for pdfunite
proxychains
puppet-lint
qpdfview
# qt5ct # QT5 theme selector
simplescreenrecorder
slock
spotify
steam-run # helper tool for running shitty binaries
tarsnap
taskwarrior
tdesktop # telegram
tightvnc
update-nix-fetchgit
wally-cli
wezterm
xautomation
xclip
xdotool
xlibs.xmodmap
xorg.xdpyinfo
xorg.xev
xorg.xkill
xorg.xwininfo
xournal # annotate pdfs
xsel
];
}

View File

@ -0,0 +1,67 @@
{ lib, stdenv
, python3Packages
, fetchFromGitHub
, systemd
, xrandr }:
let
python = python3Packages.python;
version = "1.11";
revision = "5d3b326";
in
stdenv.mkDerivation {
pname = "autorandr";
inherit version;
buildInputs = [ python ];
# no wrapper, as autorandr --batch does os.environ.clear()
buildPhase = ''
substituteInPlace autorandr.py \
--replace 'os.popen("xrandr' 'os.popen("${xrandr}/bin/xrandr' \
--replace '["xrandr"]' '["${xrandr}/bin/xrandr"]'
'';
outputs = [ "out" "man" ];
installPhase = ''
runHook preInstall
make install TARGETS='autorandr' PREFIX=$out
make install TARGETS='bash_completion' DESTDIR=$out/share/bash-completion/completions
make install TARGETS='autostart_config' PREFIX=$out DESTDIR=$out
make install TARGETS='manpage' PREFIX=$man
${if systemd != null then ''
make install TARGETS='systemd udev' PREFIX=$out DESTDIR=$out \
SYSTEMD_UNIT_DIR=/lib/systemd/system \
UDEV_RULES_DIR=/etc/udev/rules.d
substituteInPlace $out/etc/udev/rules.d/40-monitor-hotplug.rules \
--replace /bin/systemctl "/run/current-system/systemd/bin/systemctl"
'' else ''
make install TARGETS='pmutils' DESTDIR=$out \
PM_SLEEPHOOKS_DIR=/lib/pm-utils/sleep.d
make install TARGETS='udev' PREFIX=$out DESTDIR=$out \
UDEV_RULES_DIR=/etc/udev/rules.d
''}
runHook postInstall
'';
src = fetchFromGitHub {
owner = "seqizz";
repo = "autorandr";
rev = revision;
sha256 = "0a2nsvidcj7y343axbfh3nvxyys03ni43cradlj6xkhmqk0yjkd1";
};
meta = with lib; {
homepage = "https://github.com/phillipberndt/autorandr/";
description = "Automatically select a display configuration based on connected devices";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ coroa globin ];
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,17 @@
{rustPlatform, fetchFromGitHub, scdoc, installShellFiles}:
rustPlatform.buildRustPackage rec {
name = "autorandr-rs";
src = fetchFromGitHub {
owner = "theotherjimmy";
repo = name;
rev = "c8cd814dcdb25551e9acc7b777979a73b2241612";
sha256 = "1gaw2hjyvbrv7wwf1yr218avxdi6yfm4cshqvnf57mq4c024s7i8";
};
cargoSha256 = "14kascz4ifvmixq7w13vvnzq52q1b6ipw2wkdxarv5phmzmsbmi6";
nativeBuildInputs = [ scdoc installShellFiles ];
preFixup = ''
installManPage $releaseDir/build/${name}-*/out/${name}.1
installManPage $releaseDir/build/${name}-*/out/${name}.5
'';
}

View File

@ -0,0 +1,12 @@
diff --git a/pyproject.toml b/pyproject.toml
index 2c93a39..6c800e2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -24,3 +24,7 @@ isort = "^4.3"
[tool.black]
line-length = 120
+
+[build-system]
+requires = ["poetry_core>=1.0.0"]
+build-backend = "poetry.core.masonry.api"

View File

@ -0,0 +1,53 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, vmprof
, pyqt4
, isPyPy
, pkgs
}:
let
# scons is needed but using it requires Python 2.7
# Therefore we create a separate env for it.
scons = pkgs.python27.withPackages(ps: [ pkgs.scons ]);
in buildPythonPackage rec {
version = "0.6.9.1";
pname = "Nuitka";
src = fetchFromGitHub {
owner = "Nuitka";
repo = "Nuitka";
rev = "262d506035b3738f622fa01d9ce8e597deb417cf";
sha256 = "0lyybhi8gaaafckjvpfchqqanvjx514p492l50gjdskzwi7mv6r0";
};
checkInputs = [ vmprof pyqt4 ];
nativeBuildInputs = [ scons ];
postPatch = ''
patchShebangs tests/run-tests
'' + stdenv.lib.optionalString stdenv.isLinux ''
substituteInPlace nuitka/plugins/standard/ImplicitImports.py --replace 'locateDLL("uuid")' '"${pkgs.utillinux.out}/lib/libuuid.so"'
'';
# We do not want any wrappers here.
postFixup = '''';
checkPhase = ''
tests/run-tests
'';
# Problem with a subprocess (parts)
doCheck = false;
# Requires CPython
disabled = isPyPy;
meta = with stdenv.lib; {
description = "Python compiler with full language support and CPython compatibility";
license = licenses.asl20;