squash wayland commits

This commit is contained in:
Dmitriy Kholkin 2022-01-29 00:41:41 +03:00
parent 2c80906ba9
commit 1ca3d32053
41 changed files with 1059 additions and 999 deletions

283
flake.lock generated
View File

@ -1,27 +1,5 @@
{
"nodes": {
"android-nixpkgs": {
"inputs": {
"devshell": "devshell",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1636661994,
"narHash": "sha256-EQ1jTIGAtb2DCippFWPXume+j8Xw02VnT/M35Prlovc=",
"owner": "tadfisher",
"repo": "android-nixpkgs",
"rev": "3ca481a473cb07fdc25b7d4c2cdd5960391aba90",
"type": "github"
},
"original": {
"owner": "tadfisher",
"repo": "android-nixpkgs",
"type": "github"
}
},
"base16": {
"inputs": {
"nixpkgs": "nixpkgs"
@ -88,28 +66,29 @@
"type": "gitlab"
}
},
"devshell": {
"cachix": {
"locked": {
"lastModified": 1636119665,
"narHash": "sha256-e11Z9PyH9hdgTm4Vyl8S5iTwrv0um6+srzb1Ba+YUHA=",
"owner": "numtide",
"repo": "devshell",
"rev": "ab14b1a3cb253f58e02f5f849d621292fbf81fad",
"lastModified": 1642244250,
"narHash": "sha256-vWpUEqQdVP4srj+/YLJRTN9vjpTs4je0cdWKXPbDItc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0fd9ee1aa36ce865ad273f4f07fdc093adeb5c00",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "devshell",
"owner": "nixos",
"ref": "nixos-21.05",
"repo": "nixpkgs",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1634851050,
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c91f3de5adaf1de973b797ef7485e441a65b8935",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
@ -119,6 +98,21 @@
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1642700792,
"narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "846b2ae0fc4cc943637d3d1def4454213e203cba",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"locked": {
"lastModified": 1634851050,
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
@ -140,11 +134,11 @@
]
},
"locked": {
"lastModified": 1636520380,
"narHash": "sha256-gBiQ8+AQG6Dia34rqJDuqs6VFe/J1SjIhOZBeTXCKQI=",
"lastModified": 1642676973,
"narHash": "sha256-bLQ6n0pXYaIuNSyJnm30JGCfjmuTi59qAmj8S2ExDXI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "1e5c8e9bff00d0844bc3d25d1a98eab5633e600b",
"rev": "7eb5106548eaab99ebeb21c87f93092de54fe931",
"type": "github"
},
"original": {
@ -155,10 +149,7 @@
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"vscode-server-fixup",
"nixpkgs"
]
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1635839387,
@ -174,22 +165,6 @@
"type": "github"
}
},
"i3lock-fancy-rapid": {
"flake": false,
"locked": {
"lastModified": 1618965247,
"narHash": "sha256-EoX8ts0yV/zkb4wgEh4P8noU+UraRS4w9pp+76v+Nm0=",
"owner": "yvbbrjdr",
"repo": "i3lock-fancy-rapid",
"rev": "6eeebd4caa177b82fa5010b5e8828cce3f89fb97",
"type": "github"
},
"original": {
"owner": "yvbbrjdr",
"repo": "i3lock-fancy-rapid",
"type": "github"
}
},
"lowdown-src": {
"flake": false,
"locked": {
@ -209,11 +184,11 @@
"materia-theme": {
"flake": false,
"locked": {
"lastModified": 1620818711,
"narHash": "sha256-0eCAfm/MWXv6BbCl2vbVbvgv8DiUH09TAUhoKq7Ow0k=",
"lastModified": 1638461758,
"narHash": "sha256-+E8eJQcDw4F12MmGrCoFUeGFZzYZWQtY7PVhXVAZRFY=",
"owner": "nana-4",
"repo": "materia-theme",
"rev": "76cac96ca7fe45dc9e5b9822b0fbb5f4cad47984",
"rev": "af63425f9bbb2ac9bc4853a4357457d743c65308",
"type": "github"
},
"original": {
@ -248,50 +223,38 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1636573809,
"narHash": "sha256-fZqSolh+RfJnqK9zR9TFEMFII+ayo4V9DA21xuI9nhA=",
"owner": "NixOS",
"lastModified": 1642777172,
"narHash": "sha256-Sh37PkGIiMhhaiM33+TvacbgQHtg93YITMY0orGJ7y8=",
"owner": "nixos",
"repo": "nix",
"rev": "52a3b2ee6367306a3f17fe9a2d0e2e4096852e05",
"rev": "5f08db69d18ea5b868cbb58993822e7dd0307518",
"type": "github"
},
"original": {
"id": "nix",
"type": "indirect"
}
},
"nix-direnv": {
"flake": false,
"locked": {
"lastModified": 1634795676,
"narHash": "sha256-p2xWs0I1hrZLiWU1P4cCGNSRuhRsbTFxsMYNVWocS4I=",
"owner": "nix-community",
"repo": "nix-direnv",
"rev": "a3d08b6c8fa2a976aba430c733f54cf97d9046b0",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-direnv",
"owner": "nixos",
"repo": "nix",
"type": "github"
}
},
"nixos-rocm": {
"nix-alien": {
"inputs": {
"nixpkgs": "nixpkgs_3"
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"poetry2nix": "poetry2nix"
},
"locked": {
"lastModified": 1630800478,
"narHash": "sha256-dHaXN5bdf1RTK9YpYscflmdBqz2XV01Lit0xXRjLDkc=",
"owner": "nixos-rocm",
"repo": "nixos-rocm",
"rev": "cb12dc5cf144469b39f47b6be2e162f3202b142f",
"lastModified": 1642257542,
"narHash": "sha256-znJjO+22bmYIcMvXTNoxkGrPyCEKhjNpwu/R4gLuKYY=",
"owner": "thiagokokada",
"repo": "nix-alien",
"rev": "039e009b74b4310986696e28808342741079c7ee",
"type": "github"
},
"original": {
"owner": "nixos-rocm",
"ref": "4.3.x",
"repo": "nixos-rocm",
"owner": "thiagokokada",
"repo": "nix-alien",
"type": "github"
}
},
@ -325,13 +288,28 @@
"type": "indirect"
}
},
"nixpkgs-21_11": {
"locked": {
"lastModified": 1638371214,
"narHash": "sha256-0kE6KhgH7n0vyuX4aUoGsGIQOqjIx2fJavpCWtn73rc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a640d8394f34714578f3e6335fc767d0755d78f9",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-21.11",
"type": "indirect"
}
},
"nixpkgs-master": {
"locked": {
"lastModified": 1636683649,
"narHash": "sha256-4wDfn9pmGX5WBEttGxYVYliZm2zeZeBLl0ytowHnvXE=",
"lastModified": 1642799162,
"narHash": "sha256-6KJlDYBM2YUfHyjn3J3iCmNpjKIBUfmenfAGtmVWLoI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "77e7d796b838eae999b7649495770345b54825d2",
"rev": "af1309ca38c3d727e5100c18f66f19cf9c0530be",
"type": "github"
},
"original": {
@ -344,11 +322,11 @@
"nixpkgs-mozilla": {
"flake": false,
"locked": {
"lastModified": 1636569584,
"narHash": "sha256-iDFogua24bhFJZSxG/jhZbbNxDXuKP9S/pyRIYzrRPM=",
"lastModified": 1638887313,
"narHash": "sha256-FMYV6rVtvSIfthgC1sK1xugh3y7muoQcvduMdriz4ag=",
"owner": "mozilla",
"repo": "nixpkgs-mozilla",
"rev": "9f70f86d73fa97e043bebeb58e5676d157069cfb",
"rev": "7c1e8b1dd6ed0043fb4ee0b12b815256b0b9de6f",
"type": "github"
},
"original": {
@ -375,17 +353,38 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1632411313,
"narHash": "sha256-lekODc44lVo9/0EwGiX6LoEt2KhiPdcfNopealMJ7n4=",
"lastModified": 1642707142,
"narHash": "sha256-BzH6xhnkn52yF4+A8C8slWFQRMInS5VYlzrH/rN1bnA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "51bcdc4cdaac48535dabf0ad4642a66774c609ed",
"rev": "6f07605b6916abee5435ea1145a7541299a87c1b",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"rev": "51bcdc4cdaac48535dabf0ad4642a66774c609ed",
"type": "github"
}
},
"nixpkgs-wayland": {
"inputs": {
"cachix": "cachix",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1642775155,
"narHash": "sha256-yQMXrsAxYTbrSr5DGpCsyrWIeBbs/f0S9Uc0/fUABHo=",
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"rev": "a38c5dfa2998e6dddd39a5e119672110a91b79a6",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs-wayland",
"type": "github"
}
},
@ -406,27 +405,26 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1630761588,
"narHash": "sha256-7GXckvZy7DGh2KIyfdArqwnyeSc5Owy1fumEDQyd8eY=",
"lastModified": 1642799162,
"narHash": "sha256-6KJlDYBM2YUfHyjn3J3iCmNpjKIBUfmenfAGtmVWLoI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a51aa6523bd8ee985bc70987909eff235900197a",
"rev": "af1309ca38c3d727e5100c18f66f19cf9c0530be",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1636443933,
"narHash": "sha256-ABJmNQdzFWWxaqkb0C0kd9f/MmUtmnQrxm9sZPhgm/s=",
"lastModified": 1642635915,
"narHash": "sha256-vabPA32j81xBO5m3+qXndWp5aqepe+vu96Wkd9UnngM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9e70e9f732fbb15872cb4ea11bd43c14328a0b69",
"rev": "6d8215281b2f87a5af9ed7425a26ac575da0438f",
"type": "github"
},
"original": {
@ -436,14 +434,46 @@
"type": "github"
}
},
"nixpkgs_5": {
"locked": {
"lastModified": 1641528457,
"narHash": "sha256-FyU9E63n1W7Ql4pMnhW2/rO9OftWZ37pLppn/c1aisY=",
"path": "/nix/store/pwz0d92vl5hjrvhiri3qzazxjnf1r8wy-source",
"rev": "ff377a78794d412a35245e05428c8f95fef3951f",
"type": "path"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1642215333,
"narHash": "sha256-hOs6lr62ITT8gAnpj5C248K0PW4IrCuXzgoan+VUgiM=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "7b5c8e3b838d534e0d4dcaa6bbe6530086ebf407",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"qbittorrent-ee": {
"flake": false,
"locked": {
"lastModified": 1635705887,
"narHash": "sha256-MiAfqcalfk6CWBtLtENnwc0W17MLSZOoLuzfu/xP4Pw=",
"lastModified": 1641579458,
"narHash": "sha256-7jbG8kQkLyKP03Ta2LNIEctAEbVb4o/opWiaYP15ZAc=",
"owner": "c0re100",
"repo": "qBittorrent-Enhanced-Edition",
"rev": "a3955360cd527a641d4623fd84609bc072c574e2",
"rev": "fd047415f4fa9d99edabd4a0cb285bb8d30c8c50",
"type": "github"
},
"original": {
@ -454,21 +484,19 @@
},
"root": {
"inputs": {
"android-nixpkgs": "android-nixpkgs",
"base16": "base16",
"base16-horizon-scheme": "base16-horizon-scheme",
"base16-tokyonight-scheme": "base16-tokyonight-scheme",
"home-manager": "home-manager",
"i3lock-fancy-rapid": "i3lock-fancy-rapid",
"materia-theme": "materia-theme",
"multimc-cracked": "multimc-cracked",
"nix": "nix",
"nix-direnv": "nix-direnv",
"nixos-rocm": "nixos-rocm",
"nix-alien": "nix-alien",
"nixpkgs": "nixpkgs_4",
"nixpkgs-master": "nixpkgs-master",
"nixpkgs-mozilla": "nixpkgs-mozilla",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-wayland": "nixpkgs-wayland",
"qbittorrent-ee": "qbittorrent-ee",
"rycee": "rycee",
"simple-nixos-mailserver": "simple-nixos-mailserver",
@ -482,11 +510,11 @@
"rycee": {
"flake": false,
"locked": {
"lastModified": 1636603333,
"narHash": "sha256-VnTFUNJZE2eNnjsPgTVqqHQtcHXe0udFBHPqXljRLwE=",
"lastModified": 1642777133,
"narHash": "sha256-sJuwCblryqBK4oTsq/MSZIpKgaB4XpfHCfG1kzmKbHM=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "12ffa46d3f18d1a439a63fb78a83db8e9637a12f",
"rev": "fdd004510ccd5fe3fd63a38124578a58b2b21c8e",
"type": "gitlab"
},
"original": {
@ -502,14 +530,15 @@
"nixpkgs"
],
"nixpkgs-21_05": "nixpkgs-21_05",
"nixpkgs-21_11": "nixpkgs-21_11",
"utils": "utils"
},
"locked": {
"lastModified": 1636315032,
"narHash": "sha256-hbMXt0/PYssN92hfZwIoAnavyBbcLEpHJS3eMAK6H6c=",
"lastModified": 1638911354,
"narHash": "sha256-hNhzLOp+dApEY15vwLAQZu+sjEQbJcOXCaSfAT6lpsQ=",
"owner": "simple-nixos-mailserver",
"repo": "nixos-mailserver",
"rev": "6e8142862f23ab99e1cc57838c02b733361e8d50",
"rev": "6e3a7b2ea6f0d68b82027b988aa25d3423787303",
"type": "gitlab"
},
"original": {
@ -535,7 +564,7 @@
},
"vscode-server-fixup": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"home-manager": "home-manager_2",
"nixpkgs": [
"nixpkgs"
@ -575,11 +604,11 @@
"zsh-cod": {
"flake": false,
"locked": {
"lastModified": 1627976995,
"narHash": "sha256-CJDZK/3TCk+Zb6IZk41L1crboED4FZFhrSJJmHF6yBk=",
"lastModified": 1642757985,
"narHash": "sha256-gn1MXy2kRCZqYewsxr+ZRwhxwUlD6TM1bt0mRDYnRZ8=",
"owner": "dim-an",
"repo": "cod",
"rev": "5e815b558bbc1c2a48df090c9ab6d0dad8e6f551",
"rev": "de10c9bfff394dd59f302515776f1413f26e5a49",
"type": "github"
},
"original": {
@ -607,11 +636,11 @@
"zsh-you-should-use": {
"flake": false,
"locked": {
"lastModified": 1628094370,
"narHash": "sha256-hTJjeJT9szHl9HXDHaSEmkv3wOARORs7sQA8/MjkfIo=",
"lastModified": 1638894143,
"narHash": "sha256-g4Fw0TwyajZnWQ8fvJvobyt98nRgg08uxK6yNEABo8Y=",
"owner": "MichaelAquilina",
"repo": "zsh-you-should-use",
"rev": "ccc7e7f75bd7169758a1c931ea574b96b71aa9a0",
"rev": "773ae5f414b296b4100f1ab6668ecffdab795128",
"type": "github"
},
"original": {

View File

@ -4,17 +4,16 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixpkgs-master.url = "github:nixos/nixpkgs/master";
# nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-21.05";
nixpkgs-stable.url = "github:nixos/nixpkgs/51bcdc4cdaac48535dabf0ad4642a66774c609ed";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-21.11";
nixpkgs-wayland = {
url = "github:nix-community/nixpkgs-wayland";
inputs.nixpkgs.follows = "nixpkgs";
};
nix.url = "github:nixos/nix";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
android-nixpkgs = {
url = "github:tadfisher/android-nixpkgs";
inputs.nixpkgs.follows = "nixpkgs";
};
base16.url = "github:alukardbf/base16-nix";
base16-horizon-scheme = {
url = "github:michael-ball/base16-horizon-scheme";
@ -24,10 +23,6 @@
url = "github:alukardbf/base16-tokyonight-scheme";
flake = false;
};
i3lock-fancy-rapid = {
url = "github:yvbbrjdr/i3lock-fancy-rapid";
flake = false;
};
materia-theme = {
url = "github:nana-4/materia-theme";
flake = false;
@ -40,19 +35,14 @@
submodules = true;
type = "git";
};
nixos-rocm = {
url = "github:nixos-rocm/nixos-rocm/4.3.x";
# inputs.nixpkgs.follows = "nixpkgs";
nix-alien = {
url = "github:thiagokokada/nix-alien";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpkgs-mozilla = {
url = "github:mozilla/nixpkgs-mozilla";
flake = false;
};
nix-direnv = {
url = "github:nix-community/nix-direnv";
flake = false;
# inputs.nixpkgs.follows = "nixpkgs";
};
qbittorrent-ee = {
url = "github:c0re100/qBittorrent-Enhanced-Edition";
flake = false;

View File

@ -28,12 +28,4 @@
deviceSpecific.wireguard.enable = true;
hardware.video.hidpi.enable = lib.mkForce false;
services.xserver.config = ''
Section "InputClass"
Identifier "C-Media USB Headphone Set"
MatchUSBID "0d8c:000c"
Option "Ignore" "true"
EndSection
'';
}

Binary file not shown.

View File

@ -45,6 +45,23 @@ let
};
};
activate-secrets = pkgs.writeShellScriptBin "activate-secrets" ''
set -euo pipefail
export PATH="${with pkgs; lib.makeBinPath [ gnupg git coreutils ]}:/run/wrappers/bin/:$PATH"
export SHELL=${pkgs.runtimeShell}
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
if [ -d "${password-store}/.git" ]; then
cd "${password-store}"; git pull
else
echo "${lib.escapeShellArg config.secretsConfig.repo}"
git clone ${
lib.escapeShellArg config.secretsConfig.repo
} "${password-store}"
fi
cat ${password-store}/spotify.gpg | ${pkgs.gnupg}/bin/gpg --decrypt > /dev/null
[ ! -z "${allServices}" ] && sudo systemctl restart ${allServices}
'';
decrypt = name: cfg:
with cfg; {
"${name}-secrets" = rec {
@ -95,23 +112,6 @@ let
(builtins.attrNames config.secrets-envsubst)
++ map (name: "${name}-secrets.service")
(builtins.attrNames config.secrets));
activate-secrets = pkgs.writeShellScriptBin "activate-secrets" ''
set -euo pipefail
# Make sure card is available and unlocked
# echo fetch | gpg --card-edit --no-tty --command-fd=0
# ${pkgs.gnupg}/bin/gpg --card-status
if [ -d "${password-store}/.git" ]; then
cd "${password-store}"; ${pkgs.git}/bin/git pull
else
${pkgs.git}/bin/git clone ${lib.escapeShellArg config.secretsConfig.repo} "${password-store}"
fi
ln -sf ${
pkgs.writeShellScript "push" "${pkgs.git}/bin/git push origin master"
} "${password-store}/.git/hooks/post-commit"
cat ${password-store}/spotify.gpg | ${pkgs.gnupg}/bin/gpg --decrypt > /dev/null
sudo systemctl restart ${allServices}
'';
in {
options.secrets = lib.mkOption {
type = attrsOf (submodule secret);
@ -121,15 +121,13 @@ in {
options.secretsConfig = {
repo = lib.mkOption {
type = str;
default = "ssh://git@github.com/AlukardBF/pass";
default = "git@github.com:AlukardBF/pass.git";
};
};
config.systemd.services =
mkMerge (concatLists (mapAttrsToList mkServices config.secrets));
config.environment.systemPackages = [ activate-secrets ];
config.security.sudo.extraRules = [{
users = [ "alukard" ];
commands = [{
@ -139,12 +137,42 @@ in {
}];
config.home-manager.users.alukard = {
xsession.windowManager.i3 = {
config.startup = [{ command = "activate-secrets"; }];
systemd.user.services.activate-secrets = {
Service = {
ExecStart = "${activate-secrets}/bin/activate-secrets";
Type = "oneshot";
};
Unit = {
PartOf = [ "graphical-session-pre.target" ];
};
Install.WantedBy = [ "graphical-session-pre.target" ];
};
systemd.user.services.pass-store-sync = {
Service = {
Environment = [
"PASSWORD_STORE_DIR=${password-store}"
"PATH=${with pkgs; lib.makeBinPath [ pass inotify-tools gnupg git ]}"
];
ExecStart = toString (pkgs.writeShellScript "pass-store-sync" ''
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
while inotifywait "$PASSWORD_STORE_DIR" -r -e move -e close_write -e create -e delete --exclude .git; do
sleep 1
pass git add --all
pass git commit -m "$(date +%F)_$(date+%T)"
pass git pull --rebase
pass git push
done
'');
};
Unit = rec {
After = [ "activate-secrets.service" ];
Wants = After;
};
Install.WantedBy = [ "graphical-session-pre.target" ];
};
programs.password-store = {
enable = true;
package = pkgs.pass-nodmenu;
package = pkgs.pass-wayland;
settings.PASSWORD_STORE_DIR = password-store;
};
};

View File

@ -38,7 +38,7 @@
messenger.cmd
"${pkgs.keepassxc}/bin/keepassxc --keyfile=/home/alukard/.passwords.key /home/alukard/nixos-config/misc/Passwords.kdbx"
"${term.cmd} -e spt"
"${pkgs.feh}/bin/feh --bg-fill ${/. + ../misc/wallpaper}"
# "${pkgs.feh}/bin/feh --bg-fill ${/. + ../misc/wallpaper}"
];
environment.sessionVariables = {

View File

@ -4,6 +4,8 @@
enable = true;
config = {
vo = "gpu";
gpu-context = "wayland";
save-position-on-quit = "yes";
hwdec = if config.deviceSpecific.devInfo.gpu.vendor == "nvidia" then
"vdpau"
else
@ -11,12 +13,13 @@
ytdl-format = if config.deviceSpecific.isLaptop then
"bestvideo[height<=?1080]+bestaudio/best"
else
"bestvideo+bestaudio/best";
"bestvideo[height<=?2160]+bestaudio/best";
};
};
home-manager.users.alukard.home.file.".config/youtube-dl/config" = {
# TODO: --cookies-from-browser
home-manager.users.alukard.home.file.".config/yt-dlp/config" = {
text = ''
--cookie=/home/alukard/.config/yt-cookie
--cookies=/home/alukard/.config/yt-cookie
--mark-watched
'';
};

View File

@ -9,12 +9,15 @@ with config.deviceSpecific; {
exa
fd
ffmpeg.bin
git-filter-repo
# glib.bin # gio
# git-filter-repo
glib
# gptfdisk
libqalculate
lm_sensors
lnav
nix-alien
nix-prefetch-git
nix-index-update
p7zip
# (p7zip.override { enableUnfree = true; })
pciutils
@ -24,12 +27,11 @@ with config.deviceSpecific; {
samba
sd
tealdeer
tidal-dl
# tidal-dl
unzip
usbutils
wget
xclip
youtube-dl
yt-dlp
zip
# tui
@ -45,39 +47,45 @@ with config.deviceSpecific; {
# gui
audacity
blueman
bookworm
# bookworm
discord
element-desktop
feh
gnome.eog
gparted
keepassxc
persepolis
# persepolis
pinta
qbittorrent
qimgv
quodlibet
scrcpy
system-config-printer
tdesktop
xarchiver
xfce4-14.thunar
xfce4-14.xfce4-taskmanager
youtube-to-mpv
zathura
zoom-us
# libsForQt5.networkmanager-qt
# networkmanagerapplet
xdg-utils
# awesome-shell
lnav
curlie
duf
zsh-z
] ++ lib.optionals (!(isVM || isISO)) [
libreoffice
] ++ lib.optionals isGaming [
# ceserver
# ckan
gamescope
goverlay
multimc
lutris
obs-studio
reshade-shaders
# (retroarch.override { cores = [ libretro.genesis-plus-gx ]; })
protontricks
vkBasalt
# wine
# winetricks

View File

@ -0,0 +1,6 @@
{ config, pkgs, lib, ... }: {
config = lib.mkIf (config.device == "AMD-Workstation") {
services.ratbagd.enable = true;
home-manager.users.alukard.home.packages = [ pkgs.piper ];
};
}

View File

@ -5,13 +5,14 @@ let
in
{
defaultApplications.dmenu = {
cmd = "${pkgs.rofi}/bin/rofi -show run";
cmd = "${pkgs.rofi-wayland}/bin/rofi -show run";
desktop = "rofi";
};
home-manager.users.alukard = {
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
font = "${thm.fonts.mono.family} ${thm.fontSizes.header.str}";
terminal = config.defaultApplications.term.cmd;
theme = "${themeFile}";

View File

@ -1,90 +0,0 @@
{ config, lib, pkgs, ... }:
with config.lib.base16.theme;
with config.deviceSpecific;
let
thm = config.lib.base16.theme;
in
{
defaultApplications.term = lib.mkIf (isISO || isVM) {
cmd = "${pkgs.rxvt-unicode}/bin/urxvt";
desktop = "urxvt";
};
home-manager.users.alukard = lib.mkIf (isISO || isVM) {
programs.urxvt = {
enable = true;
extraConfig = {
"font" = "xft:${thm.fonts.powerline.family}:style=Regular:size=${thm.fontSizes.small.str}";
"boldFont" = "xft:${thm.fonts.powerline.family}:style=Bold:size=${thm.fontSizes.small.str}";
"italicFont" = "xft:${thm.fonts.powerline.family}:style=Italic:size=${thm.fontSizes.small.str}";
"boldItalicfont" = "xft:${thm.fonts.powerline.family}:style=Bold Italic:size=${thm.fontSizes.small.str}";
"letterSpace" = "0";
"lineSpace" = "0";
"geometry" = "92x24";
"internalBorder" = "24";
"cursorBlink" = "true";
"cursorUnderline" = "false";
"saveline" = "2048";
"scrollBar" = "false";
"scrollBar_right" = "false";
"urgentOnBell" = "true";
"depth" = "24";
"iso14755" = "false";
"keysym.Shift-Up" = "command:\\033]720;1\\007";
"keysym.Shift-Down" = "command:\\033]721;1\\007";
"keysym.Control-Up" = "\\033[1;5A";
"keysym.Control-Down" = "\\033[1;5B";
"keysym.Control-Right" = "\\033[1;5C";
"keysym.Control-Left" = "\\033[1;5D";
"foreground" = "#${thm.base05-hex}";
"background" = "#${thm.base00-hex}";
"cursorColor" = "#${thm.base05-hex}";
"color0" = "#${thm.base00-hex}";
"color1" = "#${thm.base08-hex}";
"color2" = "#${thm.base0B-hex}";
"color3" = "#${thm.base0A-hex}";
"color4" = "#${thm.base0D-hex}";
"color5" = "#${thm.base0E-hex}";
"color6" = "#${thm.base0C-hex}";
"color7" = "#${thm.base05-hex}";
"color8" = "#${thm.base03-hex}";
"color9" = "#${thm.base08-hex}";
"color10" = "#${thm.base0B-hex}";
"color11" = "#${thm.base0A-hex}";
"color12" = "#${thm.base0D-hex}";
"color13" = "#${thm.base0E-hex}";
"color14" = "#${thm.base0C-hex}";
"color15" = "#${thm.base07-hex}";
"color16" = "#${thm.base09-hex}";
"color17" = "#${thm.base0F-hex}";
"color18" = "#${thm.base01-hex}";
"color19" = "#${thm.base02-hex}";
"color20" = "#${thm.base04-hex}";
"color21" = "#${thm.base06-hex}";
};
};
xresources.properties = with config.lib.base16.theme; {
"*foreground" = "#${base05-hex}";
"*background" = "#${base00-hex}";
"*cursorColor" = "#${base05-hex}";
"*color0" = "#${base00-hex}";
"*color1" = "#${base08-hex}";
"*color2" = "#${base0B-hex}";
"*color3" = "#${base0A-hex}";
"*color4" = "#${base0D-hex}";
"*color5" = "#${base0E-hex}";
"*color6" = "#${base0C-hex}";
"*color7" = "#${base05-hex}";
"*color8" = "#${base03-hex}";
"*color9" = "#${base09-hex}";
"*color10" = "#${base01-hex}";
"*color11" = "#${base02-hex}";
"*color12" = "#${base04-hex}";
"*color13" = "#${base06-hex}";
"*color14" = "#${base0F-hex}";
"*color15" = "#${base07-hex}";
};
};
}

View File

@ -6,7 +6,6 @@
home-manager.users.alukard = {
home.packages = with pkgs; [
# (vivaldi.override { proprietaryCodecs = true; })
((vivaldi.overrideAttrs (oldAttrs: rec {
buildInputs = oldAttrs.buildInputs ++ [ pkgs.libglvnd pkgs.pipewire pkgs.wayland ];
# --enable-features=UseOzonePlatform,UseSkiaRenderer,Vulkan --ozone-platform=wayland

View File

@ -8,107 +8,127 @@ in
programs.vscode = {
enable = true;
package = pkgs.vscode;
extensions = with pkgs.vscode-extensions; ([
alefragnani.project-manager
arrterian.nix-env-selector
bbenoist.nix
codezombiech.gitignore
coenraads.bracket-pair-colorizer-2
eamodio.gitlens
github.vscode-pull-request-github
mhutchie.git-graph
ms-vscode-remote.remote-ssh
naumovs.color-highlight
shardulm94.trailing-spaces
streetsidesoftware.code-spell-checker
tomoki1207.pdf
yzhang.markdown-all-in-one
]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
extensions = pkgs.vscode-utils.extensionsFromVscodeMarketplace [
{
name = "awesome-flutter-snippets";
publisher = "nash";
version = "3.0.2";
sha256 = "sha256-GQ42tySMD74F0umBlfBCbcjRsop8lKn/9RrwFM40PwE=";
} {
name = "better-comments";
publisher = "aaron-bond";
version = "2.1.0";
sha256 = "sha256-l7MG2bpfTgVgC+xLal6ygbxrrRoNONzOWjs3fZeZtU4=";
sha256 = "0kmmk6bpsdrvbb7dqf0d3annpg41n9g6ljzc1dh0akjzpbchdcwp";
} {
name = "Bookmarks";
publisher = "alefragnani";
version = "13.2.2";
sha256 = "17fyk8hr9ml0fx6qfyrkd0hbsb9r9s4s95w3yzly2glbwpwn5mm5";
} {
name = "project-manager";
publisher = "alefragnani";
version = "12.4.0";
sha256 = "0q6zkz7pqz2prmr01h17h9a5q6cn6bjgcxggy69c84j8h2w905wy";
} {
name = "nix-env-selector";
publisher = "arrterian";
version = "1.0.7";
sha256 = "0mralimyzhyp4x9q98x3ck64ifbjqdp8cxcami7clvdvkmf8hxhf";
} {
name = "Nix";
publisher = "bbenoist";
version = "1.0.1";
sha256 = "0zd0n9f5z1f0ckzfjr38xw2zzmcxg1gjrava7yahg5cvdcw6l35b";
} {
name = "better-toml";
publisher = "bungcip";
version = "0.3.2";
sha256 = "sha256-g+LfgjAnSuSj/nSmlPdB0t29kqTmegZB5B1cYzP8kCI=";
} {
name = "bookmarks";
publisher = "alefragnani";
version = "13.2.2";
sha256 = "sha256-pdZi+eWLPuHp94OXpIlOOS29IGgze4dNd4DWlCGa3p0=";
} {
name = "codeacejumper";
publisher = "lucax88x";
version = "3.3.2";
sha256 = "sha256-Fltl6ryBK2g2WWxV2Ru74cSYwqxgfFGclLlm8ChwRQk=";
} {
name = "dart-code";
publisher = "dart-code";
version = "3.28.0";
sha256 = "sha256-m0cZLAlVtjfvkIXlFssDQcNhqpjRrW1JTaUsohnY/14=";
} {
name = "vscode-env";
publisher = "irongeek";
version = "0.1.0";
sha256 = "sha256-URq90lOFtPCNfSIl2NUwihwRQyqgDysGmBc3NG7o7vk=";
} {
name = "flutter";
publisher = "dart-code";
version = "3.28.0";
sha256 = "sha256-3+PGSuJe32F2i1g9+/6GkcSYEMsjXZMK4xv4xPjzXvM=";
} {
name = "flutter-tree";
publisher = "marcelovelasquez";
version = "1.0.0";
sha256 = "sha256-+gQH7so9m/HvO0tDKaiNTP+2pTCvNdecJK60sgTY9CE=";
} {
name = "gruvbox-material";
publisher = "sainnhe";
version = "6.4.6";
sha256 = "sha256-rm/S4SAZ/z8Svd0wZyaYOZUxcUSMmBE0xUk+16drrZ8=";
} {
name = "vscode-hexdump";
publisher = "slevesque";
version = "1.8.1";
sha256 = "sha256-BNPRXRiM0OujxUZhBHREtaa0VrbuhhQ2CG3PUCyxga8=";
} {
name = "material-icon-theme";
publisher = "pkief";
version = "4.10.0";
sha256 = "sha256-4CzjUz/n/lQ7tLXuKEzmSkSE1jinpTZWDy11KHq7P4U=";
sha256 = "08lhzhrn6p0xwi0hcyp6lj9bvpfj87vr99klzsiy8ji7621dzql3";
} {
name = "path-intellisense";
publisher = "christian-kohler";
version = "2.4.2";
sha256 = "sha256-bPemoDmhBANjbn19ThKTZEjKLbQ5SlVFJp22K4kNjag=";
version = "2.7.0";
sha256 = "11jbaz8dlr9zmamikgii6pvbncsm61bhkipfarlqrisgfk99im9w";
} {
name = "plantuml";
publisher = "jebbs";
version = "2.16.0";
sha256 = "sha256-E29zGwHzVTARVGKn0JHpyKx3NCBNUSUSngmUvi0Hfo8=";
name = "gitignore";
publisher = "codezombiech";
version = "0.7.0";
sha256 = "0fm4sxx1cb679vn4v85dw8dfp5x0p74m9p2b56gqkvdap0f2q351";
} {
name = "code-spell-checker-russian";
publisher = "streetsidesoftware";
version = "2.0.1";
sha256 = "sha256-GC1zQp/2BxPLrCBCgKhxHkvX0bM3OAYSvI2C9SSHthQ=";
name = "dart-code";
publisher = "Dart-Code";
version = "3.33.20220111";
sha256 = "14jc0vh7swn2ijmgc496wjfrk5mbv4yrjpzxq3n9z1l5390sz30x";
} {
name = "tokyo-night";
publisher = "enkia";
version = "0.7.9";
sha256 = "sha256-2+md3lkBew1u+XkAM4e7i4OMNvyyJlZA4OT3WvMUkfk=";
name = "flutter";
publisher = "Dart-Code";
version = "3.32.0";
sha256 = "02zk6889n9m4s44ygnid28mg9bghrdcj0wg8ma1g1yqx7jv554l6";
} {
name = "wal-theme";
publisher = "dlasagno";
version = "1.2.0";
sha256 = "sha256-X16N5ClNVLtWST64ybJUEIRo6WgDCzODhBA9ScAHI5w=";
sha256 = "17130z04jg8hhj1k62q3d3lni10hajrckf1y95bbnm2d57j8spjz";
} {
name = "gitlens";
publisher = "eamodio";
version = "11.7.0";
sha256 = "0apjjlfdwljqih394ggz2d8m599pyyjrb0b4cfcz83601b7hk3x6";
} {
name = "tokyo-night";
publisher = "enkia";
version = "0.8.4";
sha256 = "15ab2k0xs8kvws8zq0irch4cvq1dc0zr3xynj0qn78zzbgwq92c7";
} {
name = "vscode-pull-request-github";
publisher = "GitHub";
version = "0.35.2022012009";
sha256 = "0rbky4cy6r0nw32pqfjj854nj9kf3f5dc6v38mf4wvzmxd5nb6bj";
} {
name = "vscode-env";
publisher = "IronGeek";
version = "0.1.0";
sha256 = "1ygfx1p38dqpk032n3x0591i274a63axh992gn6z1d45ag9bs6ji";
} {
name = "plantuml";
publisher = "jebbs";
version = "2.17.2";
sha256 = "0yxnfq34g563w96dwfirqscjfclhzr48yb9cwfjjf0c0l638x9vv";
} {
name = "codeacejumper";
publisher = "lucax88x";
version = "3.3.2";
sha256 = "02a5f0lg0rmrjjf52z30mk19ii71pcdxjmbcb4v6haw1pkm6anqn";
} {
name = "flutter-tree";
publisher = "marcelovelasquez";
version = "1.0.0";
sha256 = "08glv02b5d5f4jfdfddg62jvdzscinl2jhsb7gpz36rxrbp0f17s";
} {
name = "git-graph";
publisher = "mhutchie";
version = "1.30.0";
sha256 = "000zhgzijf3h6abhv4p3cz99ykj6489wfn81j0s691prr8q9lxxh";
} {
name = "remote-ssh";
publisher = "ms-vscode-remote";
version = "0.71.2021121615";
sha256 = "1lh08157z7lialb0dxls9fhahmf5l9wz6x2anwrnycvs512lpr1p";
} {
name = "awesome-flutter-snippets";
publisher = "Nash";
version = "3.0.2";
sha256 = "009z6k719w0sypzsk53wiard3j3d8bq9b0g9s82vw3wc4jvkc3hr";
} {
name = "color-highlight";
publisher = "naumovs";
version = "2.5.0";
sha256 = "0ri1rylg0r9r1kdc67815gjlq5fwnb26xpyziva6a40brrbh70vm";
} {
name = "material-icon-theme";
publisher = "PKief";
version = "4.11.0";
sha256 = "1l2s8j645riqjmj09i3v71s8ycin5vd6brdp35z472fnk6wyi1y6";
} {
name = "gruvbox-material";
publisher = "sainnhe";
version = "6.5.0";
sha256 = "1r9kgwrh6jjp8i6aa07prhrb398d5isf9ics4wmdbvd6k0gnzf8n";
}
];
userSettings = {
@ -170,6 +190,8 @@ in
"git-graph.repository.sign.commits" = true;
"git-graph.repository.sign.tags" = true;
"remote.SSH.configFile" = "/home/alukard/.ssh/remote_config";
"editor.bracketPairColorization.enabled" = true;
"editor.guides.bracketPairs" = "active";
};
};

View File

@ -3,13 +3,13 @@
nixPath = lib.mkForce [ "self=/etc/self/compat" "nixpkgs=/etc/nixpkgs" ];
binaryCaches = [
"https://cache.nixos.org"
"https://nixos-rocm.cachix.org"
"https://nix-community.cachix.org"
"https://nixpkgs-wayland.cachix.org"
];
binaryCachePublicKeys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nixos-rocm.cachix.org-1:VEpsf7pRIijjd8csKjFNBGzkBqOmw8H9PRmgAq14LnE="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
];
registry.self.flake = inputs.self;

View File

@ -1,6 +1,6 @@
{ pkgs, config, lib, inputs, ... }:
let
system = "x86_64-linux";
inherit (pkgs) system;
stable = import inputs.nixpkgs-stable ({
config = config.nixpkgs.config;
localSystem = { inherit system; };
@ -12,8 +12,8 @@ let
in
with lib; {
nixpkgs.overlays = [
inputs.android-nixpkgs.overlay
inputs.nixpkgs-wayland.overlay
inputs.nix-alien.overlay
(self: super:
rec {
inherit inputs;
@ -21,7 +21,7 @@ with lib; {
android-emulator = self.callPackage ./packages/android-emulator.nix { };
bibata-cursors = pkgs.callPackage ./packages/bibata-cursors.nix { };
ceserver = pkgs.callPackage ./packages/ceserver.nix { };
i3lock-fancy-rapid = pkgs.callPackage ./packages/i3lock-fancy-rapid.nix { };
gamescope = pkgs.callPackage ./packages/gamescope.nix { };
ibm-plex-powerline = pkgs.callPackage ./packages/ibm-plex-powerline.nix { };
mpris-ctl = pkgs.callPackage ./packages/mpris-ctl.nix { };
multimc = pkgs.qt5.callPackage ./packages/multimc.nix { multimc-repo = inputs.multimc-cracked; };
@ -33,6 +33,7 @@ with lib; {
youtube-to-mpv = pkgs.callPackage ./packages/youtube-to-mpv.nix { term = config.defaultApplications.term.cmd; };
vivaldi = master.vivaldi;
wine = super.wineWowPackages.staging;
pass-secret-service = super.pass-secret-service.overrideAttrs (_: { installCheckPhase = null; });
qbittorrent = super.qbittorrent.overrideAttrs (old: rec {
version = "enchanced-edition";
src = inputs.qbittorrent-ee;
@ -42,8 +43,8 @@ with lib; {
src = super.fetchFromGitHub {
owner = "digint";
repo = "btrbk";
rev = "cb38b7efa411f08fd3d7a65e19a8cef385eda0b8";
sha256 = "sha256-426bjK7EDq5LHb3vNS8XYnAuA6TUKXNOVrjGMR70bio=";
rev = "c5273a8745fa60fc52b3180fa210ec3048e6a419";
sha256 = "sha256-Q5KIndnXtTJmqVjmuucutWPggLey7ceT9sqeEInC8vw=";
};
preFixup = ''
wrapProgram $out/bin/btrbk \

View File

@ -1,128 +0,0 @@
{ stdenv, lib, runtimeShell
, name ? "android-emulator", sdk ? null, deviceType ? ""
, platformVersion ? "30", systemImageType ? "default", abiVersion ? "x86_64"
, enableGPU ? false, extraAVDFiles ? []
, app ? null, package ? null, activity ? null
, avdHomeDir ? null
}:
stdenv.mkDerivation {
inherit name;
buildCommand = ''
mkdir -p $out/bin
cat > $out/bin/${name}-run << "EOF"
#!${runtimeShell} -e
# We need a TMPDIR
if [ "$TMPDIR" = "" ]
then
export TMPDIR=/tmp
fi
${if avdHomeDir == null then ''
# Store the virtual devices somewhere else, instead of polluting a user's HOME directory
export ANDROID_SDK_HOME=$(mktemp -d $TMPDIR/nix-android-vm-XXXX)
'' else ''
mkdir -p "${avdHomeDir}"
export ANDROID_SDK_HOME="${avdHomeDir}"
''}
# We need to specify the location of the Android SDK root folder
export ANDROID_SDK_ROOT=${sdk}
# We have to look for a free TCP port
echo "Looking for a free TCP port in range 5554-5584" >&2
for i in $(seq 5554 2 5584)
do
if [ -z "$(${sdk}/platform-tools/adb devices | grep emulator-$i)" ]
then
port=$i
break
fi
done
if [ -z "$port" ]
then
echo "Unfortunately, the emulator port space is exhausted!" >&2
exit 1
else
echo "We have a free TCP port: $port" >&2
fi
export ANDROID_SERIAL="emulator-$port"
# Create a virtual android device for testing if it does not exist
# ${sdk}/cmdline-tools/latest/bin/avdmanager list target
if [ "$(${sdk}/cmdline-tools/latest/bin/avdmanager list avd | grep 'Name: ${name}')" = "" ]
then
# Create a virtual android device
yes "" | ${sdk}/cmdline-tools/latest/bin/avdmanager create avd -n "${name}" -k "system-images;android-${platformVersion};${systemImageType};${abiVersion}" -d "${deviceType}" $NIX_ANDROID_AVD_FLAGS
# fix wrong sdk path
sed -i "s|image.sysdir.1.\+|image.sysdir.1=${sdk}/system-images/android-${platformVersion}/${systemImageType}/${abiVersion}|" "$ANDROID_SDK_HOME/.android/avd/${name}.avd/config.ini"
${lib.optionalString enableGPU ''
# Enable GPU acceleration
echo "hw.gpu.enabled=yes" >> "$ANDROID_SDK_HOME/.android/avd/${name}.avd/config.ini"
''}
${lib.concatMapStrings (extraAVDFile: ''
ln -sf ${extraAVDFile} "$ANDROID_SDK_HOME/.android/avd/${name}.avd"
'') extraAVDFiles}
fi
# Launch the emulator
${sdk}/emulator/emulator -avd "${name}" -no-boot-anim -port $port $NIX_ANDROID_EMULATOR_FLAGS &
# Wait until the device has completely booted
echo "Waiting until the emulator has booted the device and the package manager is ready..." >&2
${sdk}/platform-tools/adb -s emulator-$port wait-for-device
echo "Device state has been reached" >&2
while [ -z "$(${sdk}/platform-tools/adb -s emulator-$port shell getprop dev.bootcomplete | grep 1)" ]
do
sleep 5
done
echo "dev.bootcomplete property is 1" >&2
#while [ -z "$(${sdk}/platform-tools/adb -s emulator-$port shell getprop sys.boot_completed | grep 1)" ]
#do
#sleep 5
#done
#echo "sys.boot_completed property is 1" >&2
echo "ready" >&2
${lib.optionalString (app != null) ''
# Install the App through the debugger, if it has not been installed yet
if [ -z "${package}" ] || [ "$(${sdk}/platform-tools/adb -s emulator-$port shell pm list packages | grep package:${package})" = "" ]
then
if [ -d "${app}" ]
then
appPath="$(echo ${app}/*.apk)"
else
appPath="${app}"
fi
${sdk}/platform-tools/adb -s emulator-$port install "$appPath"
fi
# Start the application
${lib.optionalString (package != null && activity != null) ''
${sdk}/platform-tools/adb -s emulator-$port shell am start -a android.intent.action.MAIN -n ${package}/${activity}
''}
''}
EOF
chmod +x $out/bin/${name}-run
'';
}

View File

@ -0,0 +1,81 @@
{ lib, stdenv, fetchFromGitHub, meson, pkgconfig, libdrm, xorg
, wayland, wayland-protocols, libxkbcommon, libcap
, SDL2, mesa, libinput, pixman, xcbutilerrors, xcbutilwm, glslang
, ninja, makeWrapper, xwayland, libuuid, xcbutilrenderutil
, pipewire, stb, writeText, wlroots, vulkan-loader, vulkan-headers, libkrb5 }:
let
stbpc = writeText "stbpc" ''
prefix=${stb}
includedir=''${prefix}/include/stb
Cflags: -I''${includedir}
Name: stb
Version: ${stb.version}
Description: stb
'';
stb_ = stb.overrideAttrs (oldAttrs: rec {
installPhase = ''
${oldAttrs.installPhase}
install -Dm644 ${stbpc} $out/lib/pkgconfig/stb.pc
'';
});
vulkan-headers_ = vulkan-headers.overrideAttrs (oldAttrs: rec {
version = "1.2.189.1";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Headers";
rev = "sdk-${version}";
sha256 = "1qggc7dv9jr83xr9w2h375wl3pz3rfgrk9hnrjmylkg9gz4p9q03";
};
});
vulkan-loader_ = (vulkan-loader.overrideAttrs (oldAttrs: rec {
version = "1.2.189.1";
src = fetchFromGitHub {
owner = "KhronosGroup";
repo = "Vulkan-Loader";
rev = "sdk-${version}";
sha256 = "1745fdzi0n5qj2s41q6z1y52cq8pwswvh1a32d3n7kl6bhksagp6";
};
})).override { vulkan-headers = vulkan-headers_; };
in stdenv.mkDerivation rec {
pname = "gamescope";
version = "3.9.1";
src = fetchFromGitHub {
owner = "Plagman";
repo = "gamescope";
rev = version;
sha256 = "05a1sj1fl9wpb9jys515m96958cxmgim8i7zc5mn44rjijkfbfcb";
fetchSubmodules = true;
};
preConfigure = ''
substituteInPlace meson.build \
--replace "'examples=false'" "'examples=false', 'logind-provider=systemd', 'libseat=disabled'"
'';
postInstall = ''
wrapProgram $out/bin/gamescope \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ libkrb5 ]}" \
--prefix PATH : "${lib.makeBinPath [ xwayland ]}"
'';
buildInputs = with xorg; [
libX11 libXdamage libXcomposite libXrender libXext libXxf86vm
libXtst libdrm vulkan-loader_ wayland wayland-protocols
libxkbcommon libcap SDL2 mesa libinput pixman xcbutilerrors
xcbutilwm libXi libXres libuuid xcbutilrenderutil xwayland
pipewire wlroots libkrb5
];
nativeBuildInputs = [ meson pkgconfig glslang ninja makeWrapper stb_ ];
meta = with lib; {
description = "The micro-compositor formerly known as steamcompmgr";
license = licenses.bsd2;
homepage = src.meta.homepage;
platforms = platforms.linux;
maintainers = with maintainers; [ ];
};
}

View File

@ -1,25 +0,0 @@
{ stdenv, fetchFromGitHub, i3lock, xorg, inputs, pkgs }:
stdenv.mkDerivation rec {
name = "i3lock-fancy-rapid";
src = inputs.i3lock-fancy-rapid;
# src = fetchFromGitHub {
# owner = "yvbbrjdr";
# repo = "i3lock-fancy-rapid";
# rev = "c67f09bc8a48798c7c820d7d4749240b10865ce0";
# sha256 = "0jhvlj6v6wx70239pgkjxd42z1s2bzfg886ra6n1rzsdclf4rkc6";
# };
buildInputs = [ i3lock xorg.libX11 ];
installPhase = ''
mkdir -p $out/bin
cp i3lock-fancy-rapid $out/bin/i3lock-fancy-rapid
'';
meta = with pkgs.lib; {
description = "A faster implementation of i3lock-fancy. It is blazing fast and provides a fully configurable box blur. It uses linear-time box blur and accelerates using OpenMP.";
homepage = https://github.com/yvbbrjdr/i3lock-fancy-rapid;
maintainers = with maintainers; [ ];
license = licenses.bsd3;
platforms = platforms.linux;
};
}

View File

@ -19,7 +19,7 @@ let
'';
};
version = "5.1.3";
version = "6.0.0";
in fetchzip {
name = "ibm-plex-powerline-${version}";
@ -33,6 +33,6 @@ in fetchzip {
rm -f $out/share/fonts/opentype/IBMPlex*
'';
sha256 = "sha256-Ur3pG3t9sjboJ2AFAcffFfVJhRQBOtvZ0aulFyMZJts=";
sha256 = "sha256-doBe3rNMrPjNG7zRGuCAV7w1iT49A7UROjtMapcjXUk=";
}

View File

@ -2,14 +2,14 @@
{ stdenv, pkgs, term }:
let
yt-mpv = pkgs.writeShellScriptBin "yt-mpv" ''
if [[ "$1" != "--no-video" ]]; then
${pkgs.libnotify}/bin/notify-send -t 3000 --icon=video-television "Playing Video" "$(${pkgs.xclip}/bin/xclip -o)"
${pkgs.mpv}/bin/mpv --fs "$(${pkgs.xclip}/bin/xclip -o)"
else
${pkgs.libnotify}/bin/notify-send -t 3000 --icon=video-television "Playing Audio" "$(${pkgs.xclip}/bin/xclip -o)"
${term} -e ${pkgs.mpv}/bin/mpv --no-video "$(${pkgs.xclip}/bin/xclip -o)"
fi
'';
if [[ "$1" != "--no-video" ]]; then
${pkgs.libnotify}/bin/notify-send -t 3000 --icon=video-television "Playing Video" "$(${pkgs.wl-clipboard}/bin/wl-paste)"
${pkgs.mpv}/bin/mpv --fs "$(${pkgs.wl-clipboard}/bin/wl-paste)"
else
${pkgs.libnotify}/bin/notify-send -t 3000 --icon=video-television "Playing Audio" "$(${pkgs.wl-clipboard}/bin/wl-paste)"
${term} -e ${pkgs.mpv}/bin/mpv --no-video "$(${pkgs.wl-clipboard}/bin/wl-paste)"
fi
'';
in
stdenv.mkDerivation rec {
name = "youtube-to-mpv";

View File

@ -0,0 +1,26 @@
{ pkgs, config, lib, ... }:
{
secrets.gitea = {
owner = "gitea";
};
services.gitea = {
enable = true;
appName = "AtaraxiaDev Gitea Instance";
cookieSecure = true;
database = {
type = "postgres";
passwordFile = config.secrets.gitea.decrypted;
};
disableRegistration = true;
domain = "code.ataraxiadev.com";
httpPort = 6000;
lfs.enable = true;
rootUrl = "https://code.ataraxiadev.com";
settings = {
server = {
SSH_DOMAIN = "gitea.ataraxiadev.com";
};
};
};
}

View File

@ -109,6 +109,11 @@
proxyPass = "http://localhost:13748";
};
} // default;
"code.ataraxiadev.com" = {
locations."/" = {
proxyPass = "http://localhost:6000";
};
} // default;
};
};
}

View File

@ -28,12 +28,6 @@ with config.deviceSpecific; {
interval = "weekly";
};
services.redshift = {
enable = true;
temperature.day = 6500;
temperature.night = 3000;
};
services.thermald.enable = isLaptop;
services.tlp = {
@ -69,6 +63,14 @@ with config.deviceSpecific; {
home-manager.users.alukard.services.udiskie.enable = true;
home-manager.users.alukard.services.gammastep = {
enable = true;
latitude = 48.79;
longitude = 44.78;
temperature.day = 6500;
temperature.night = 3000;
};
services.upower.enable = true;
systemd.services.systemd-udev-settle.enable = false;

View File

@ -1,51 +0,0 @@
{ config, lib, pkgs, inputs, ... }: {
home-manager.users.alukard = rec {
imports = [ inputs.android-nixpkgs.hmModule ];
android-sdk = {
enable = true;
path = "${config.home-manager.users.alukard.home.homeDirectory}/.android/sdk";
packages = sdk: with sdk; [
build-tools-31-0-0
build-tools-29-0-2
cmdline-tools-latest
patcher-v4
platform-tools
platforms-android-30
emulator
system-images-android-30-google-apis-x86-64
];
};
home.sessionVariables = {
ANDROID_HOME = android-sdk.path;
ANDROID_SDK_ROOT = android-sdk.path;
JAVA_HOME = pkgs.jdk11.home;
};
home.packages = let
android-emulator = pkgs.android-emulator.override {
name = "flutter-emulator";
avdHomeDir = config.home-manager.users.alukard.home.homeDirectory;
sdk = android-sdk.path;
platformVersion = "30";
systemImageType = "google_apis";
abiVersion = "x86_64";
deviceType = "pixel";
# enableGPU = true;
};
in [
pkgs.flutter
android-emulator
# jdk11
];
};
environment.sessionVariables = {
ANDROID_HOME = config.home-manager.users.alukard.android-sdk.path;
ANDROID_SDK_ROOT = config.home-manager.users.alukard.android-sdk.path;
JAVA_HOME = pkgs.jdk11.home;
};
}

View File

@ -1,51 +0,0 @@
{ pkgs, config, lib, ... }:
let
thm = config.lib.base16.theme;
in {
home-manager.users.alukard = {
services.dunst = {
enable = true;
iconTheme = {
name = "${thm.iconTheme}";
package = thm.iconPackage;
};
settings = {
global = {
geometry = "500x5-30+50";
transparency = 10;
frame_color = "#${thm.base05-hex}";
separator_color = "#${thm.base05-hex}";
font = "${thm.fonts.main.family} ${thm.fontSizes.normal.str}";
padding = 15;
horizontal_padding = 17;
word_wrap = true;
follow = "keyboard";
format = ''
%s %p %I
%b'';
markup = "full";
};
urgency_low = {
background = "#${thm.base01-hex}";
foreground = "#${thm.base05-hex}";
timeout = 8;
};
urgency_normal = {
background = "#${thm.base01-hex}";
foreground = "#${thm.base08-hex}";
timeout = 12;
};
urgency_critical = {
background = "#${thm.base01-hex}";
foreground = "#${thm.base0D-hex}";
timeout = 20;
};
};
};
xsession.windowManager.i3.config.startup =
[{ command = "${pkgs.dunst}/bin/dunst"; }];
};
}

View File

@ -31,8 +31,9 @@ in {
};
})
];
gtk.iconCache.enable = true;
programs.dconf.enable = true;
services.dbus.packages = with pkgs; [ gnome3.dconf gcr ];
services.dbus.packages = with pkgs; [ dconf gcr ];
home-manager.users.alukard = {
gtk = {
enable = true;
@ -49,10 +50,6 @@ in {
size = thm.fontSizes.normal.int;
};
};
home.sessionVariables.XDG_DATA_DIRS = [
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
];
home.sessionVariables.GTK_THEME = "Generated";
};
}

View File

@ -1,194 +0,0 @@
{ pkgs, config, lib, ... }:
let
thm = config.lib.base16.theme;
apps = config.defaultApplications;
# lock = pkgs.writeShellScript "lock" "sudo /run/current-system/sw/bin/lock";
in {
environment.sessionVariables._JAVA_AWT_WM_NONREPARENTING = "1";
home-manager.users.alukard.xsession.windowManager.i3 = {
enable = true;
package = pkgs.i3-gaps;
config = rec {
assigns = {
"" = [
{ class = "spotify"; }
{ title = "spt"; }
];
"" = [
{ class = "^Telegram"; }
];
};
fonts = {
names = [ "${thm.fonts.main.family}" ];
style = "Regular";
size = thm.fontSizes.micro.float;
};
bars = [ ];
colors = rec {
background = "#${thm.base00-hex}";
unfocused = {
text = "#${thm.base02-hex}";
border = "#${thm.base01-hex}";
background = "#${thm.base00-hex}";
childBorder = "#${thm.base01-hex}";
indicator = "#${thm.base07-hex}";
};
focusedInactive = unfocused;
urgent = unfocused // {
text = "#${thm.base05-hex}";
border = "#${thm.base09-hex}";
childBorder = "#${thm.base09-hex}";
};
focused = unfocused // {
childBorder = "#${thm.base03-hex}";
border = "#${thm.base03-hex}";
background = "#${thm.base01-hex}";
text = "#${thm.base05-hex}";
};
};
gaps = {
inner = 6;
smartGaps = true;
smartBorders = "on";
};
focus.mouseWarping = false;
focus.followMouse = false;
modifier = "Mod4";
window = {
border = 1;
titlebar = false;
hideEdgeBorders = "smart";
commands = [
{
command = "border pixel 2px";
criteria = { window_role = "popup"; };
}
{
command = "move to workspace ";
criteria = { class = "Spotify"; };
}
{
command = "floating enable";
criteria = { instance = "origin.exe"; };
}
];
};
startup = lib.mkIf (!config.deviceSpecific.isISO) (map (command: { inherit command; }) config.startupApplications);
keybindings = let
script = name: content: "exec ${pkgs.writeScript name content}";
workspaces = (builtins.genList (x: [ (toString x) (toString x) ]) 10)
++ [ [ "c" "" ] [ "t" "" ] ];
in ({
"${modifier}+q" = "kill";
"${modifier}+Shift+q" = "move container to workspace temp; [workspace=__focused__] kill; workspace temp; move container to workspace temp; workspace temp";
"${modifier}+w" = "exec ${apps.dmenu.cmd}";
"${modifier}+Return" = "exec ${apps.term.cmd}";
"${modifier}+e" = "exec ${apps.editor.cmd}";
"${modifier}+o" = "layout toggle all";
"${modifier}+Left" = "focus child; focus left";
"${modifier}+Right" = "focus child; focus right";
"${modifier}+Up" = "focus child; focus up";
"${modifier}+Down" = "focus child; focus down";
"${modifier}+Control+Left" = "focus parent; focus left";
"${modifier}+Control+Right" = "focus parent; focus right";
"${modifier}+Control+Up" = "focus parent; focus up";
"${modifier}+Control+Down" = "focus parent; focus down";
"${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+Down" = "move down";
"${modifier}+Shift+Right" = "move right";
"${modifier}+Shift+Left" = "move left";
"${modifier}+bracketleft" = "workspace prev";
"${modifier}+bracketright" = "workspace next";
"${modifier}+f" = "fullscreen toggle";
"${modifier}+r" = "mode resize";
"${modifier}+Shift+f" = "floating toggle";
"${modifier}+Escape" = "exec ${apps.monitor.cmd}";
"${modifier}+j" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl prev";
"${modifier}+k" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl pp";
"${modifier}+l" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl next";
"${modifier}+m" = "exec ${pkgs.pamixer}/bin/pamixer -t";
"${modifier}+comma" = "exec ${pkgs.pamixer}/bin/pamixer -d 5";
"${modifier}+period" = "exec ${pkgs.pamixer}/bin/pamixer -i 5";
"${modifier}+Shift+comma" = "exec ${pkgs.pamixer}/bin/pamixer -d 2";
"${modifier}+Shift+period" = "exec ${pkgs.pamixer}/bin/pamixer -i 2";
"${modifier}+i" = "exec ${pkgs.pavucontrol}/bin/pavucontrol";
"${modifier}+d" = "exec ${apps.fm.cmd}";
"${modifier}+y" = "exec ${pkgs.youtube-to-mpv}/bin/yt-mpv";
"${modifier}+Shift+y" = "exec ${pkgs.youtube-to-mpv}/bin/yt-mpv --no-video";
"${modifier}+Shift+l" = "exec ${pkgs.i3lock-fancy-rapid}/bin/i3lock-fancy-rapid 8 3";
"${modifier}+Print" = script "screenshot"
"${pkgs.maim}/bin/maim ~/Pictures/$(date +%s).png";
"${modifier}+Control+Print" = script "screenshot-copy"
"${pkgs.maim}/bin/maim | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png";
"--release ${modifier}+Shift+Print" = script "screenshot-area"
"${pkgs.maim}/bin/maim -s ~/Pictures/$(date +%s).png";
"--release ${modifier}+Control+Shift+Print" = script "screenshot-area-copy"
"${pkgs.maim}/bin/maim -s | ${pkgs.xclip}/bin/xclip -selection clipboard -t image/png";
"${modifier}+x" = "move workspace to output right";
"${modifier}+F5" = "reload";
"${modifier}+Shift+F5" = "exit";
"${modifier}+Shift+h" = "layout splith";
"${modifier}+Shift+v" = "layout splitv";
"${modifier}+h" = "split h";
"${modifier}+v" = "split v";
"${modifier}+F1" = "move to scratchpad";
"${modifier}+F2" = "scratchpad show";
"${modifier}+F12" = "exec xset dpms force off";
"XF86AudioPlay" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl pp";
"XF86AudioNext" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl next";
"XF86AudioPrev" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl prev";
"XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 5";
"XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer -i 5";
"XF86AudioMute" = "exec ${pkgs.pamixer}/bin/pamixer -t";
"Shift+XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 2";
"Shift+XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer -i 2";
"--release button2" = "kill";
"--whole-window ${modifier}+button2" = "kill";
} // builtins.listToAttrs (builtins.map (x: {
name = "${modifier}+${builtins.elemAt x 0}";
value = "workspace ${builtins.elemAt x 1}";
}) workspaces) // builtins.listToAttrs (builtins.map (x: {
name = "${modifier}+Shift+${builtins.elemAt x 0}";
value = "move container to workspace ${builtins.elemAt x 1}";
}) workspaces)
);
workspaceLayout = "tabbed";
};
extraConfig = ''
default_border pixel 1
hide_edge_borders smart
# Set colors
set $base00 #${thm.base00-hex}
set $base01 #${thm.base01-hex}
set $base02 #${thm.base02-hex}
set $base03 #${thm.base03-hex}
set $base04 #${thm.base04-hex}
set $base05 #${thm.base05-hex}
set $base06 #${thm.base06-hex}
set $base07 #${thm.base07-hex}
set $base08 #${thm.base08-hex}
set $base09 #${thm.base09-hex}
set $base0A #${thm.base0A-hex}
set $base0B #${thm.base0B-hex}
set $base0C #${thm.base0C-hex}
set $base0D #${thm.base0D-hex}
set $base0E #${thm.base0E-hex}
set $base0F #${thm.base0F-hex}
'';
};
}

View File

@ -4,16 +4,17 @@ let
thm = config.lib.base16.theme;
in {
home-manager.users.alukard = {
xsession.windowManager.i3.config.bars = [{
# xsession.windowManager.i3.config.bars = [{
wayland.windowManager.sway.config.bars = [{
id = "default";
position = "top";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs ~/.config/i3status-rust/config-top.toml";
workspaceNumbers = false;
fonts = {
names = [ "${thm.fonts.powerline.family}" "${thm.fonts.icon.family}" "${thm.fonts.iconFallback.family}" ];
style = "Regular";
size = thm.fontSizes.micro.float;
};
position = "top";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs";
workspaceNumbers = false;
colors = let
default = {
background = "#${thm.base00-hex}";
@ -29,143 +30,101 @@ in {
urgentWorkspace = default // { text = "#${thm.base09-hex}"; };
bindingMode = default // { text = "#${thm.base0A-hex}"; };
};
}];
xdg.configFile."i3status-rust/config.toml".text = lib.concatStrings [''
[theme]
name = "solarized-dark"
[theme.overrides]
idle_bg = "#${thm.base00-hex}"
idle_fg = "#${thm.base05-hex}"
info_bg = "#${thm.base0C-hex}"
info_fg = "#${thm.base00-hex}"
good_bg = "#${thm.base0B-hex}"
good_fg = "#${thm.base00-hex}"
warning_bg = "#${thm.base0A-hex}"
warning_fg = "#${thm.base00-hex}"
critical_bg = "#${thm.base08-hex}"
critical_fg = "#${thm.base00-hex}"
# Material Icons Cheatsheet [https://shanfan.github.io/material-icons-cheatsheet/]
# Font Awesome Cheatsheet [https://fontawesome.com/icons?d=gallery&m=free]
[icons]
name = "awesome5"
[icons.overrides]
backlight_empty = " 🌑 "
backlight_full = " 🌕 "
backlight_partial1 = " 🌘 "
backlight_partial2 = " 🌗 "
backlight_partial3 = " 🌖 "
# bat_charging = ""
# bat_discharging = ""
# bat_full = ""
# bat = ""
# cogs = ""
cpu = ""
# gpu = ""
# mail = ""
memory_mem = ""
memory_swap = ""
music_next = ""
music_pause = ""
music_play = ""
music_prev = ""
music = ""
net_down = ""
net_up = ""
### net_up = ""
net_wired = ""
net_wireless = ""
### net_wired = ""
### net_wireless = ""
# ping = ""
# thermometer = ""
# time = ""
# toggle_off = ""
# toggle_on = ""
# update = ""
# uptime = ""
volume_empty = ""
volume_full = ""
volume_half = ""
volume_muted = ""
# weather_clouds = ""
# weather_default = ""
# weather_rain = ""
# weather_snow = ""
# weather_sun = ""
# weather_thunder = ""
# xrandr = ""
# [[block]]
# block = "music"
# buttons = ["play", "next"]
[[block]]
block = "net"
''
(if config.device == "Dell-Laptop" then ''
device = "wlo1"
'' else "")
(if config.device == "AMD-Workstation" then ''
device = "enp9s0"
'' else "")
(if config.deviceSpecific.isLaptop then ''
[[block]]
block = "battery"
interval = 10
format = "{percentage} {time}"
[[block]]
block = "backlight"
'' else "")
''
[[block]]
block = "custom"
command = "${scripts.weather}"
interval = 600
[[block]]
block = "sound"
driver = "auto"
''
(if config.device == "Dell-Laptop" then ''
[[block]]
block = "custom"
command = "${scripts.cputemp}"
interval = 5
'' else "")
''
[[block]]
block = "cpu"
interval = 1
format = "{utilization} {frequency}"
[[block]]
block = "memory"
display_type = "memory"
format_mem = "{mem_avail;G}"
format_swap = "{swap_free;G}"
[[block]]
block = "custom"
command = "${scripts.df}"
interval = 60
[[block]]
block = "custom"
command = "${scripts.vpn-status}"
interval = 60
[[block]]
block = "time"
interval = 1
format = "%a %Y/%m/%d %T"
''];
programs.i3status-rust = {
enable = true;
bars.top = {
settings = {
theme = {
name = "solarized-dark";
overrides = {
idle_bg = "#${thm.base00-hex}";
idle_fg = "#${thm.base05-hex}";
info_bg = "#${thm.base0C-hex}";
info_fg = "#${thm.base00-hex}";
good_bg = "#${thm.base0B-hex}";
good_fg = "#${thm.base00-hex}";
warning_bg = "#${thm.base0A-hex}";
warning_fg = "#${thm.base00-hex}";
critical_bg = "#${thm.base08-hex}";
critical_fg = "#${thm.base00-hex}";
};
};
icons = {
name = "awesome5";
overrides = {
backlight_empty = " 🌑 ";
backlight_full = " 🌕 ";
backlight_partial1 = " 🌘 ";
backlight_partial2 = " 🌗 ";
backlight_partial3 = " 🌖 ";
cpu = "";
net_wired = "";
net_wireless = "";
};
};
};
blocks = [
{
block = "net";
device = if config.device == "Dell-Laptop" then
"wlo1"
else if config.device == "AMD-Workstation" then
"enp9s0"
else "";
}
] ++ lib.optionals config.deviceSpecific.isLaptop [
{
block = "battery";
interval = 10;
format = "{percentage} {time}";
}
{
block = "backlight";
}
] ++ [
{
block = "custom";
command = "${scripts.weather}";
interval = 600;
}
{
block = "sound";
driver = "auto";
}
{
block = "temperature";
# collapsed = false;
chip = if config.device == "Dell-Laptop" then
"*-isa-*"
else if config.device == "AMD-Workstation" then
"*-pci-*"
else "*-pci-*";
}
{
block = "cpu";
interval = 1;
format = "{utilization} {frequency}";
}
{
block = "custom";
command = "${scripts.df}";
interval = 60;
}
{
block = "memory";
display_type = "memory";
format_mem = "{mem_avail;G}";
format_swap = "{swap_free;G}";
}
{
block = "time";
interval = 1;
format = "%a %Y/%m/%d %T";
}
];
};
};
};
}

View File

@ -1,6 +1,5 @@
{ pkgs, lib, config, ... }:
with config.lib.base16.theme; {
xdg.portal.enable = true;
services.dbus.packages =
[ pkgs.systemd iconPackage ];
services.udev.packages = [ pkgs.libmtp pkgs.media-player-info ];

View File

@ -15,8 +15,8 @@ with config.deviceSpecific; {
location = lib.mkIf (!isServer) {
provider = "manual";
latitude = 48.78583;
longitude = 44.77973;
latitude = 48.79;
longitude = 44.78;
};
home-manager.users.alukard = {

View File

@ -0,0 +1,30 @@
{ pkgs, config, ... }: {
home-manager.users.alukard = {
systemd.user.services.mako = {
Service = {
ExecStart = "${pkgs.mako}/bin/mako";
};
Install = {
WantedBy = [ "sway-session.target" ];
};
Unit = {
After = [ "sway-session.target" ];
};
};
programs.mako = with config.lib.base16; {
enable = true;
layer = "overlay";
font = "${theme.fonts.mono.family} ${theme.fontSizes.normal.str}";
width = 500;
height = 80;
defaultTimeout = 10000;
maxVisible = 10;
backgroundColor = "#${theme.base00-hex}AA";
textColor = "#${theme.base05-hex}";
borderColor = "#${theme.base0D-hex}AA";
progressColor = "over #${theme.base0B-hex}";
iconPath = "${theme.iconPackage}/share/icons/${theme.iconTheme}";
maxIconSize = 24;
};
};
}

View File

@ -11,6 +11,22 @@
news.display = "silent";
systemd.user.startServices = true;
home.stateVersion = "21.11";
#TODO: Move to another file
services.pass-secret-service.enable = true;
systemd.user.services.pass-secret-service = {
Service = {
ExecStart = lib.mkForce
"${pkgs.pass-secret-service}/bin/pass_secret_service --path ${config.environment.variables.PASSWORD_STORE_DIR}";
Type = "dbus";
BusName = "org.freedesktop.secrets";
};
Unit = rec {
Wants = [ "gpg-agent.service" "activate-secrets.service" ];
After = Wants;
PartOf = [ "graphical-session-pre.target" ];
};
};
};
system.stateVersion = "21.11";

View File

@ -0,0 +1,304 @@
{ pkgs, lib, config, ... }:
let
thm = config.lib.base16.theme;
apps = config.defaultApplications;
# lock_fork =
# pkgs.writeShellScript "lock_fork" "sudo /run/current-system/sw/bin/lock &";
# lock = pkgs.writeShellScript "lock"
# "swaymsg 'output * dpms off'; sudo /run/current-system/sw/bin/lock; swaymsg 'output * dpms on'";
in {
programs.sway.enable = true;
programs.sway.wrapperFeatures.gtk = true;
programs.sway.extraPackages = lib.mkForce (with pkgs; [
swayidle
swaylock-effects
xwayland
wl-clipboard
libsForQt5.qt5.qtwayland
gsettings_desktop_schemas
]);
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-wlr xdg-desktop-portal-gtk ];
gtkUsePortal = true;
};
users.users.alukard.extraGroups = [ "sway" ];
environment.loginShellInit = lib.mkAfter ''
[[ "$(tty)" == /dev/tty1 ]] && {
pass unlock
exec sway 2> /tmp/sway.debug.log
}
'';
home-manager.users.alukard.wayland.windowManager.sway = let
gsettings = "${pkgs.glib}/bin/gsettings";
gnomeSchema = "org.gnome.desktop.interface";
importGsettings = pkgs.writeShellScript "import_gsettings.sh" ''
config="/home/alukard/.config/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
${gsettings} set ${gnomeSchema} gtk-theme "$gtk_theme"
${gsettings} set ${gnomeSchema} icon-theme "$icon_theme"
${gsettings} set ${gnomeSchema} cursor-theme "$cursor_theme"
${gsettings} set ${gnomeSchema} font-name "$font_name"
'';
in {
enable = true;
config = rec {
assigns = {
# "" = [
# { class = "Chromium"; }
# { app_id = "firefox"; }
# { class = "Firefox"; }
# ];
"" = [
{ class = "spotify"; }
{ title = "spt"; }
];
"" = [
{ class = "^Telegram"; }
];
};
fonts = {
names = [ "${thm.fonts.main.family}" ];
style = "Regular";
size = thm.fontSizes.micro.float;
};
bars = [ ];
colors = rec {
background = "#${thm.base00-hex}";
unfocused = {
text = "#${thm.base02-hex}";
border = "#${thm.base01-hex}";
background = "#${thm.base00-hex}";
childBorder = "#${thm.base01-hex}";
indicator = "#${thm.base07-hex}";
};
focusedInactive = unfocused;
urgent = unfocused // {
text = "#${thm.base05-hex}";
border = "#${thm.base09-hex}";
childBorder = "#${thm.base09-hex}";
};
focused = unfocused // {
childBorder = "#${thm.base03-hex}";
border = "#${thm.base03-hex}";
background = "#${thm.base01-hex}";
text = "#${thm.base05-hex}";
};
};
gaps = {
inner = 15;
smartGaps = true;
smartBorders = "on";
};
focus.followMouse = false;
focus.forceWrapping = false;
modifier = "Mod4";
window = {
border = 0;
titlebar = false;
commands = [
{
command = "border pixel 2px";
criteria = { window_role = "popup"; };
}
{
command = "sticky enable";
criteria = { floating = ""; };
}
{
command = "move to workspace ";
criteria = { class = "Spotify"; };
}
{
command = "floating enable";
criteria = { instance = "origin.exe"; };
}
];
};
startup = (map (command: { inherit command; }) config.startupApplications)
++ [
{ command = "${importGsettings}"; always = true; }
{
always = true;
command = ''
swayidle -w timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' '';
}
# {
# command =
# "swayidle -w before-sleep '${lock_fork}' lock '${lock_fork}' unlock 'pkill -9 swaylock'";
# }
];
keybindings = let
script = name: content: "exec ${pkgs.writeScript name content}";
workspaces = (builtins.genList (x: [ (toString x) (toString x) ]) 10)
++ [ [ "c" "" ] [ "t" "" ] ];
in ({
"${modifier}+q" = "kill";
"${modifier}+Shift+q" =
"move container to workspace temp; [workspace=__focused__] kill; workspace temp; move container to workspace temp; workspace temp";
"${modifier}+w" = "exec ${apps.dmenu.cmd}";
"${modifier}+Return" = "exec ${apps.term.cmd}";
"${modifier}+e" = "exec ${apps.editor.cmd}";
"${modifier}+o" = "layout toggle all";
"${modifier}+Left" = "focus child; focus left";
"${modifier}+Right" = "focus child; focus right";
"${modifier}+Up" = "focus child; focus up";
"${modifier}+Down" = "focus child; focus down";
"${modifier}+Control+Left" = "focus parent; focus left";
"${modifier}+Control+Right" = "focus parent; focus right";
"${modifier}+Control+Up" = "focus parent; focus up";
"${modifier}+Control+Down" = "focus parent; focus down";
"${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+Down" = "move down";
"${modifier}+Shift+Right" = "move right";
"${modifier}+Shift+Left" = "move left";
"${modifier}+bracketleft" = "workspace prev";
"${modifier}+bracketright" = "workspace next";
# "${modifier}+a" = "focus child; focus left";
# "${modifier}+d" = "focus child; focus right";
# "${modifier}+w" = "focus child; focus up";
# "${modifier}+s" = "focus child; focus down";
# "${modifier}+Control+a" = "focus parent; focus left";
# "${modifier}+Control+d" = "focus parent; focus right";
# "${modifier}+Control+w" = "focus parent; focus up";
# "${modifier}+Control+s" = "focus parent; focus down";
# "${modifier}+Shift+w" = "move up";
# "${modifier}+Shift+s" = "move down";
# "${modifier}+Shift+d" = "move right";
# "${modifier}+Shift+a" = "move left";
"${modifier}+f" = "fullscreen toggle; floating toggle";
"${modifier}+r" = "mode resize";
"${modifier}+Shift+f" = "floating toggle";
"${modifier}+Escape" = "exec ${apps.monitor.cmd}";
"${modifier}+j" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl prev";
"${modifier}+k" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl pp";
"${modifier}+l" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl next";
"${modifier}+Shift+j" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl --player Spotify prev";
"${modifier}+Shift+k" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl --player Spotify pp";
"${modifier}+Shift+l" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl --player Spotify next";
"${modifier}+m" = "exec ${pkgs.pamixer}/bin/pamixer -t";
"${modifier}+comma" = "exec ${pkgs.pamixer}/bin/pamixer -d 5";
"${modifier}+period" = "exec ${pkgs.pamixer}/bin/pamixer -i 5";
"${modifier}+Shift+comma" = "exec ${pkgs.pamixer}/bin/pamixer -d 2";
"${modifier}+Shift+period" = "exec ${pkgs.pamixer}/bin/pamixer -i 2";
"${modifier}+i" = "exec ${pkgs.pavucontrol}/bin/pavucontrol";
"${modifier}+d" = "exec ${apps.fm.cmd}";
"${modifier}+y" = "exec ${pkgs.youtube-to-mpv}/bin/yt-mpv";
"${modifier}+Shift+y" = "exec ${pkgs.youtube-to-mpv}/bin/yt-mpv --no-video";
"${modifier}+Print" = script "screenshot"
"${pkgs.grim}/bin/grim Pictures/$(date +'%Y-%m-%d+%H:%M:%S').png";
"${modifier}+Control+Print" = script "screenshot-copy"
"${pkgs.grim}/bin/grim - | ${pkgs.wl-clipboard}/bin/wl-copy";
"--release ${modifier}+Shift+Print" = script "screenshot-area" ''
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" Pictures/$(date +'%Y-%m-%d+%H:%M:%S').png'';
"--release ${modifier}+Control+Shift+Print" =
script "screenshot-area-copy" ''
${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)" - | ${pkgs.wl-clipboard}/bin/wl-copy'';
"${modifier}+x" = "focus output right";
"${modifier}+Shift+x" = "move workspace to output right";
"${modifier}+F5" = "reload";
"${modifier}+Shift+F5" = "exit";
"${modifier}+Shift+h" = "layout splith";
"${modifier}+Shift+v" = "layout splitv";
"${modifier}+h" = "split h";
"${modifier}+v" = "split v";
"${modifier}+F1" = "move to scratchpad";
"${modifier}+F2" = "scratchpad show";
"${modifier}+F11" = "output * dpms off";
"${modifier}+F12" = "output * dpms on";
# "${modifier}+End" = "exec ${lock}";
"${modifier}+p" = "sticky toggle";
"${modifier}+backslash" =
script "0x0" ''wl-paste | curl -F"file=@-" https://0x0.st | wl-copy'';
"${modifier}+b" = "focus mode_toggle";
"XF86AudioPlay" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl pp";
"XF86AudioNext" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl next";
"XF86AudioPrev" = "exec ${pkgs.mpris-ctl}/bin/mpris-ctl prev";
"XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 5";
"XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer -i 5";
"XF86AudioMute" = "exec ${pkgs.pamixer}/bin/pamixer -t";
"Shift+XF86AudioLowerVolume" = "exec ${pkgs.pamixer}/bin/pamixer -d 2";
"Shift+XF86AudioRaiseVolume" = "exec ${pkgs.pamixer}/bin/pamixer -i 2";
"button2" = "kill";
"--whole-window ${modifier}+button2" = "kill";
} // builtins.listToAttrs (builtins.map (x: {
name = "${modifier}+${builtins.elemAt x 0}";
value = "workspace ${builtins.elemAt x 1}";
}) workspaces) // builtins.listToAttrs (builtins.map (x: {
name = "${modifier}+Shift+${builtins.elemAt x 0}";
value = "move container to workspace ${builtins.elemAt x 1}";
}) workspaces));
keycodebindings = { };
workspaceLayout = "tabbed";
workspaceAutoBackAndForth = true;
input = {
"type:touchpad" = {
accel_profile = "adaptive";
dwt = "enabled";
middle_emulation = "enabled";
natural_scroll = "enabled";
tap = "enabled";
};
"type:mouse" = {
accel_profile = "flat";
natural_scroll = "disabled";
};
"type:keyboard" = {
xkb_layout = "us,ru";
xkb_options = "grp:win_space_toggle";
};
"3468:12:C-Media_USB_Headphone_Set" = {
events = "disabled";
};
};
output = {
"*".bg = "${/. + ../../../misc/wallpaper} fill";
"*".scale = "1";
};
};
wrapperFeatures = { gtk = true; };
xwayland = true;
extraConfig = ''
default_border pixel 1
hide_edge_borders --i3 smart
exec pkill swaynag
exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
'';
extraSessionCommands = ''
# export SDL_VIDEODRIVER=wayland
export GDK_BACKEND=wayland
export QT_QPA_PLATFORM=wayland-egl
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
export XDG_CURRENT_DESKTOP=sway
export XDG_SESSION_DESKTOP=sway
export XDG_SESSION_TYPE=wayland
export _JAVA_AWT_WM_NONPARENTING=1
export _JAVA_AWT_WM_NONREPARENTING=1
'';
};
}

View File

@ -0,0 +1,10 @@
{ config, pkgs, lib, ... }: {
services.tor = {
enable = true;
client.enable = true;
};
services.privoxy = {
enable = true;
enableTor = true;
};
}

View File

@ -10,7 +10,7 @@
};
environment.sessionVariables = {
XDG_CURRENT_DESKTOP = "X-Generic";
# XDG_CURRENT_DESKTOP = "X-Generic";
DE = "generic";
};
}

View File

@ -43,8 +43,8 @@
shellAliases = {
"clr" = "clear";
"weather" = "curl wttr.in/Volzhskiy";
"rede" = "systemctl --user start redshift.service &";
"redd" = "systemctl --user stop redshift.service &";
"rede" = "systemctl --user start gammastep.service &";
"redd" = "systemctl --user stop gammastep.service &";
"show-packages" = "_ nix-store -q --references /run/current-system/sw";
"nsp" = "nix-shell --run zsh -p";
"grep" = "${pkgs.ripgrep}/bin/rg";

View File

@ -4,7 +4,8 @@ let
in
with config.deviceSpecific; {
services.xserver = {
enable = true;
enable = false;
# enable = true;
# TODO: Disable natural scrolling for external mouse
libinput = {

View File

@ -21,27 +21,28 @@
kitty
mangohud
mpv
ncmpcpp
# ncmpcpp
packages
piper
rofi
spotify
steam
syncthing
# urxvt
vivaldi
vscode
cursor
direnv
dunst
fonts
gtk
i3
i3status-rust
kde
light
mako
nix-index
picom
print-scan
tor
sway
];
}

View File

@ -10,6 +10,7 @@
kitty
coturn
gitea
mailserver
matrix-synapse
nginx

View File

@ -1,7 +1,5 @@
{ inputs, ... }: {
imports = with inputs.self.nixosModules; with inputs.self.nixosProfiles; [
./desktop.nix
flutter
];
}

View File

@ -0,0 +1,90 @@
#! /usr/bin/env nix-shell
#! nix-shell -i bash -p curl jq unzip
# shellcheck shell=bash
set -eu -o pipefail
# can be added to your configuration with the following command and snippet:
# $ ./pkgs/misc/vscode-extensions/update_installed_exts.sh > extensions.nix
#
# packages = with pkgs;
# (vscode-with-extensions.override {
# vscodeExtensions = map
# (extension: vscode-utils.buildVscodeMarketplaceExtension {
# mktplcRef = {
# inherit (extension) name publisher version sha256;
# };
# })
# (import ./extensions.nix).extensions;
# })
# ]
# Helper to just fail with a message and non-zero exit code.
function fail() {
echo "$1" >&2
exit 1
}
# Helper to clean up after ourselves if we're killed by SIGINT.
function clean_up() {
TDIR="${TMPDIR:-/tmp}"
echo "Script killed, cleaning up tmpdirs: $TDIR/vscode_exts_*" >&2
rm -Rf "$TDIR/vscode_exts_*"
}
function get_vsixpkg() {
N="$1.$2"
# Create a tempdir for the extension download.
EXTTMP=$(mktemp -d -t vscode_exts_XXXXXXXX)
URL="https://$1.gallery.vsassets.io/_apis/public/gallery/publisher/$1/extension/$2/latest/assetbyname/Microsoft.VisualStudio.Services.VSIXPackage"
# Quietly but delicately curl down the file, blowing up at the first sign of trouble.
curl --silent --show-error --fail -X GET -o "$EXTTMP/$N.zip" "$URL"
# Unpack the file we need to stdout then pull out the version
VER=$(jq -r '.version' <(unzip -qc "$EXTTMP/$N.zip" "extension/package.json"))
# Calculate the SHA
SHA=$(nix-hash --flat --base32 --type sha256 "$EXTTMP/$N.zip")
# Clean up.
rm -Rf "$EXTTMP"
# I don't like 'rm -Rf' lurking in my scripts but this seems appropriate.
cat <<-EOF
{
name = "$2";
publisher = "$1";
version = "$VER";
sha256 = "$SHA";
}
EOF
}
# See if we can find our `code` binary somewhere.
if [ $# -ne 0 ]; then
CODE=$1
else
CODE=$(command -v code || command -v codium)
fi
if [ -z "$CODE" ]; then
# Not much point continuing.
fail "VSCode executable not found"
fi
# Try to be a good citizen and clean up after ourselves if we're killed.
trap clean_up SIGINT
# Begin the printing of the nix expression that will house the list of extensions.
printf '{ extensions = [\n'
# Note that we are only looking to update extensions that are already installed.
for i in $($CODE --list-extensions)
do
OWNER=$(echo "$i" | cut -d. -f1)
EXT=$(echo "$i" | cut -d. -f2)
get_vsixpkg "$OWNER" "$EXT"
done
# Close off the nix expression.
printf '];\n}'