Merge branch 'flake'
This commit is contained in:
commit
9bee3309cf
131 changed files with 2613 additions and 1839 deletions
2
.envrc
Normal file
2
.envrc
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
use flake
|
||||||
|
eval "$shellHook"
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
||||||
|
result
|
||||||
|
.direnv
|
||||||
|
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{
|
|
||||||
allowUnfree = true;
|
|
||||||
allowUnsupportedSystem = true;
|
|
||||||
}
|
|
||||||
100
configs/rofi/onedark.rasi
Normal file
100
configs/rofi/onedark.rasi
Normal file
|
|
@ -0,0 +1,100 @@
|
||||||
|
/*
|
||||||
|
* ROFI One Dark
|
||||||
|
*
|
||||||
|
* Based on OneDark.vim (https://github.com/joshdick/onedark.vim)
|
||||||
|
*
|
||||||
|
* Author: Benjamin Stauss
|
||||||
|
* User: me-benni
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
* {
|
||||||
|
black: #000000;
|
||||||
|
red: #eb6e67;
|
||||||
|
green: #95ee8f;
|
||||||
|
yellow: #f8c456;
|
||||||
|
blue: #6eaafb;
|
||||||
|
mangenta: #d886f3;
|
||||||
|
cyan: #6cdcf7;
|
||||||
|
emphasis: #50536b;
|
||||||
|
text: #dfdfdf;
|
||||||
|
text-alt: #b2b2b2;
|
||||||
|
fg: #abb2bf;
|
||||||
|
bg: #282c34;
|
||||||
|
|
||||||
|
spacing: 0;
|
||||||
|
background-color: transparent;
|
||||||
|
|
||||||
|
font: "Knack Nerd Font 14";
|
||||||
|
text-color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
window {
|
||||||
|
transparency: "real";
|
||||||
|
fullscreen: true;
|
||||||
|
background-color: #282c34dd;
|
||||||
|
}
|
||||||
|
|
||||||
|
mainbox {
|
||||||
|
padding: 30% 30%;
|
||||||
|
}
|
||||||
|
|
||||||
|
inputbar {
|
||||||
|
margin: 0px 0px 20px 0px;
|
||||||
|
children: [prompt, textbox-prompt-colon, entry, case-indicator];
|
||||||
|
}
|
||||||
|
|
||||||
|
prompt {
|
||||||
|
text-color: @blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
textbox-prompt-colon {
|
||||||
|
expand: false;
|
||||||
|
str: ":";
|
||||||
|
text-color: @text-alt;
|
||||||
|
}
|
||||||
|
|
||||||
|
entry {
|
||||||
|
margin: 0px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
listview {
|
||||||
|
spacing: 5px;
|
||||||
|
dynamic: true;
|
||||||
|
scrollbar: false;
|
||||||
|
}
|
||||||
|
|
||||||
|
element {
|
||||||
|
padding: 5px;
|
||||||
|
text-color: @text-alt;
|
||||||
|
highlight: bold #95ee8f; /* green */
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
element selected {
|
||||||
|
background-color: @emphasis;
|
||||||
|
text-color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
element urgent, element selected urgent {
|
||||||
|
text-color: @red;
|
||||||
|
}
|
||||||
|
|
||||||
|
element active, element selected active {
|
||||||
|
text-color: @purple;
|
||||||
|
}
|
||||||
|
|
||||||
|
message {
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background-color: @emphasis;
|
||||||
|
border: 1px;
|
||||||
|
border-color: @cyan;
|
||||||
|
}
|
||||||
|
|
||||||
|
button selected {
|
||||||
|
padding: 5px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background-color: @emphasis;
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, stdenv, autoPatchelfHook, ... }:
|
{ stdenv, autoPatchelfHook, ... }:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "cocktail-bar-cli";
|
name = "cocktail-bar-cli";
|
||||||
version = "1.0";
|
version = "1.0";
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,9 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
self = with pkgs; {
|
self = with pkgs; {
|
||||||
lockscreen = callPackage ./lockscreen {};
|
lockscreen = callPackage ./lockscreen { };
|
||||||
update-background = callPackage ./update-background {};
|
update-background = callPackage ./update-background { };
|
||||||
cocktail-bar-cli = callPackage ./cocktail-bar-cli {};
|
cocktail-bar-cli = callPackage ./cocktail-bar-cli { };
|
||||||
# joystickwake = callPackage ./joystickwake {};
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
(self)
|
(self)
|
||||||
|
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
{ lib, python3, fetchFromGitHub }:
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
|
||||||
pname = "joystickwake";
|
|
||||||
version = "0.2.4";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "foresto";
|
|
||||||
repo = pname;
|
|
||||||
rev = "v${version}";
|
|
||||||
sha256 = "0j8xwfmzzmc9s88zvzc3lv67821r6x28vy6vli3srvx859wprppd";
|
|
||||||
};
|
|
||||||
|
|
||||||
buildInputs = with python3.pkgs; [
|
|
||||||
pyudev
|
|
||||||
xlib
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = with python3.pkgs; [
|
|
||||||
pyudev
|
|
||||||
xlib
|
|
||||||
];
|
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "A joystick-aware screen waker";
|
|
||||||
longDescription = ''
|
|
||||||
Linux gamers often find themselves unexpectedly staring at a blank screen, because their display server fails to recognize game controllers as input devices, allowing the screen blanker to activate during gameplay.
|
|
||||||
This program works around the problem by temporarily disabling screen blankers when joystick activity is detected.
|
|
||||||
'';
|
|
||||||
homepage = "https://github.com/foresto/joystickwake";
|
|
||||||
license = licenses.mit;
|
|
||||||
platforms = platforms.linux;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +1,16 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
|
||||||
, rice
|
, rice
|
||||||
, roboto
|
, roboto
|
||||||
, i3lock-color
|
, i3lock-color
|
||||||
, update-background
|
, writeScriptBin
|
||||||
, writeScript
|
|
||||||
, font ? { package = roboto; name = "Roboto"; }
|
, font ? { package = roboto; name = "Roboto"; }
|
||||||
, palette ? rice.palette.palette {}
|
, palette ? rice.palette.palette { }
|
||||||
, ...
|
, ...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
strPalette = rice.palette.toRGBAHex palette;
|
strPalette = lib.rice.palette.toRGBAHex palette;
|
||||||
in
|
in
|
||||||
writeScript "lockscreen.sh" ''
|
writeScriptBin "lockscreen" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Using font package ${font.package}
|
# Using font package ${font.package}
|
||||||
${i3lock-color}/bin/i3lock-color \
|
${i3lock-color}/bin/i3lock-color \
|
||||||
|
|
@ -53,6 +51,5 @@ writeScript "lockscreen.sh" ''
|
||||||
--pass-media-keys \
|
--pass-media-keys \
|
||||||
--pass-screen-keys \
|
--pass-screen-keys \
|
||||||
--pass-volume-keys \
|
--pass-volume-keys \
|
||||||
--nofork &&
|
--nofork
|
||||||
${update-background}
|
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,17 @@
|
||||||
{ lib
|
{ feh
|
||||||
, stdenv
|
|
||||||
, feh
|
|
||||||
, glib
|
, glib
|
||||||
, findutils
|
, findutils
|
||||||
, gnugrep
|
, gnugrep
|
||||||
, coreutils
|
, coreutils
|
||||||
, writeScript
|
, writeScriptBin
|
||||||
, backgrounds_directory ? "$HOME/Immagini/Sfondi"}:
|
, backgrounds_directory ? "$HOME/Immagini/Sfondi"
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
find = "${findutils}/bin/find";
|
find = "${findutils}/bin/find";
|
||||||
grep = "${gnugrep}/bin/grep";
|
grep = "${gnugrep}/bin/grep";
|
||||||
shuf = "${coreutils}/bin/shuf";
|
shuf = "${coreutils}/bin/shuf";
|
||||||
in
|
in
|
||||||
writeScript "update-background.sh" ''
|
writeScriptBin "update-background" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
if [ $# -eq 0 ]; then
|
if [ $# -eq 0 ]; then
|
||||||
image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1`
|
image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1`
|
||||||
|
|
@ -22,4 +21,5 @@ writeScript "update-background.sh" ''
|
||||||
echo "image: $image"
|
echo "image: $image"
|
||||||
${feh}/bin/feh --bg-fill --no-fehbg "$image"
|
${feh}/bin/feh --bg-fill --no-fehbg "$image"
|
||||||
${glib}/bin/gsettings set org.gnome.desktop.background picture-uri "file://$image"
|
${glib}/bin/gsettings set org.gnome.desktop.background picture-uri "file://$image"
|
||||||
|
true
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
values: {
|
|
||||||
enableCpp = false;
|
|
||||||
enableData = false;
|
|
||||||
enableGo = false;
|
|
||||||
enableHtml = false;
|
|
||||||
enableJava = false;
|
|
||||||
enableJavascript = false;
|
|
||||||
enableLatex = false;
|
|
||||||
enableNix = false;
|
|
||||||
enablePython = false;
|
|
||||||
enableRust = false;
|
|
||||||
enableShell = false;
|
|
||||||
enableSpelling = false;
|
|
||||||
enableOffice = true;
|
|
||||||
} // values
|
|
||||||
298
flake.lock
generated
Normal file
298
flake.lock
generated
Normal file
|
|
@ -0,0 +1,298 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1650374568,
|
||||||
|
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1656065134,
|
||||||
|
"narHash": "sha256-oc6E6ByIw3oJaIyc67maaFcnjYOz1mMcOtHxbEf9NwQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "bee6a7250dd1b01844a2de7e02e4df7d8a0a206c",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1655880690,
|
||||||
|
"narHash": "sha256-pO+EqUefNFolIWV1DHXPfI8NuUtD4fd7JFKoaCjVXOs=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "a839432a5c3d2a762d68168093349097e6affb07",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-22.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager-unstable": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"nixpkgs": [
|
||||||
|
"unstable"
|
||||||
|
],
|
||||||
|
"nmd": "nmd",
|
||||||
|
"nmt": "nmt",
|
||||||
|
"utils": "utils"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1656199469,
|
||||||
|
"narHash": "sha256-17t4qc016C1p6oNSKOrYbOCErWhQI4dr4nzJKrGO8VE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "1dbac84b846e4bfa21a08e31e95e11f0965ed042",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nix-rice": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"pre-commit-hooks": "pre-commit-hooks"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1654440289,
|
||||||
|
"narHash": "sha256-Mgm0eUNDb9td3aVImg7jYq/0W0XWPJo1g6K4ONgr31U=",
|
||||||
|
"owner": "bertof",
|
||||||
|
"repo": "nix-rice",
|
||||||
|
"rev": "9faf7bdc8935577f48eb80d4625a01a024e82489",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "bertof",
|
||||||
|
"repo": "nix-rice",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1656241064,
|
||||||
|
"narHash": "sha256-+jWwBt515aFGukeX8WSafg9CM3Ju3FD0XrF+X4ph0mU=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "99e33a57149916ebede78ec13edd9ba310c10f2f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1653931853,
|
||||||
|
"narHash": "sha256-O3wncIouj9x7gBPntzHeK/Hkmm9M1SGlYq7JI7saTAE=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "f1c167688a6f81f4a51ab542e5f476c8c595e457",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1656219440,
|
||||||
|
"narHash": "sha256-2dhFA29f3dpw4axAKhVj8JsHQzHViG92a7AfkXLHnBY=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "4a155658a7c3a9e465c365beb0a50352efa64ca0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "release-22.05",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nmd": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1653339422,
|
||||||
|
"narHash": "sha256-RNLq09vfj21TyYuUCeD6BNTNC6Ew8bLhQULZytN4Xx8=",
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmd",
|
||||||
|
"rev": "91dee681dd1c478d6040a00835d73c0f4a4c5c29",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmd",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nmt": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1648075362,
|
||||||
|
"narHash": "sha256-u36WgzoA84dMVsGXzml4wZ5ckGgfnvS0ryzo/3zn/Pc=",
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmt",
|
||||||
|
"rev": "d83601002c99b78c89ea80e5e6ba21addcfe12ae",
|
||||||
|
"type": "gitlab"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "rycee",
|
||||||
|
"repo": "nmt",
|
||||||
|
"type": "gitlab"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre-commit-hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"nix-rice",
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nix-rice",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1652714503,
|
||||||
|
"narHash": "sha256-qQKVEfDe5FqvGgkZtg5Pc491foeiDPIOeycHMqnPDps=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"rev": "521a524771a8e93caddaa0ac1d67d03766a8b0b3",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"pre-commit-hooks_2": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1656169028,
|
||||||
|
"narHash": "sha256-y9DRauokIeVHM7d29lwT8A+0YoGUBXV3H0VErxQeA8s=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"rev": "db3bd555d3a3ceab208bed48f983ccaa6a71a25e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "pre-commit-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"home-manager-unstable": "home-manager-unstable",
|
||||||
|
"nix-rice": "nix-rice",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"pre-commit-hooks": "pre-commit-hooks_2",
|
||||||
|
"tex2nix": "tex2nix",
|
||||||
|
"unstable": "unstable"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tex2nix": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": [
|
||||||
|
"flake-utils"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1646670117,
|
||||||
|
"narHash": "sha256-fU6gLOP2xm6lTRKfMKeXAm7rEhYAVR4RcRFK1zh/QTM=",
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "tex2nix",
|
||||||
|
"rev": "74159694f0c27ffa3f9172c6d691635568fbece4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "Mic92",
|
||||||
|
"repo": "tex2nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"unstable": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1655983783,
|
||||||
|
"narHash": "sha256-0h1FzkYWei24IdKNpCX93onkF/FMiXQG8SdEbTc0r8A=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "6141b8932a5cf376fe18fcd368cecd9ad946cb68",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1653893745,
|
||||||
|
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
177
flake.nix
Normal file
177
flake.nix
Normal file
|
|
@ -0,0 +1,177 @@
|
||||||
|
{
|
||||||
|
description = "Thor system configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/release-22.05";
|
||||||
|
home-manager = { url = "github:nix-community/home-manager/release-22.05"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||||
|
|
||||||
|
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
home-manager-unstable = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "unstable"; };
|
||||||
|
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||||
|
|
||||||
|
nix-rice = { url = "github:bertof/nix-rice"; inputs.inxpkgs.follows = "unstable"; inputs.flake-utils.follows = "flake-utils"; };
|
||||||
|
pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; };
|
||||||
|
tex2nix = { url = github:Mic92/tex2nix; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; };
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{ self
|
||||||
|
, nixpkgs
|
||||||
|
, home-manager
|
||||||
|
, unstable
|
||||||
|
, home-manager-unstable
|
||||||
|
, flake-utils
|
||||||
|
, nixos-hardware
|
||||||
|
, tex2nix
|
||||||
|
, nix-rice
|
||||||
|
, pre-commit-hooks
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
|
overlaysBuilder = system: [
|
||||||
|
(nix-rice.overlays.default)
|
||||||
|
(import ./rice.nix)
|
||||||
|
(_: _: { inherit (tex2nix.packages.${system}) tex2nix; })
|
||||||
|
(final: _: {
|
||||||
|
update-background = final.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; };
|
||||||
|
lockscreen = final.callPackage ./custom/lockscreen { palette = final.rice.colorPalette; font = final.rice.font.normal; };
|
||||||
|
})
|
||||||
|
(_: _: { stable = pkgs; })
|
||||||
|
(_: _: { unstable = unstablePkgs; })
|
||||||
|
];
|
||||||
|
nixpkgsSettings = {
|
||||||
|
inherit system;
|
||||||
|
overlays = overlaysBuilder system;
|
||||||
|
config = {
|
||||||
|
extraOptions = "experimental-features = nix-command flakes";
|
||||||
|
allowUnfree = true;
|
||||||
|
permittedInsecurePackages = [ "electron-9.4.4" ]; # authy dependency
|
||||||
|
};
|
||||||
|
};
|
||||||
|
pkgs = import nixpkgs nixpkgsSettings;
|
||||||
|
unstablePkgs = import unstable nixpkgsSettings;
|
||||||
|
homeManagerSettings = { home-manager = { useGlobalPkgs = true; useUserPackages = true; }; };
|
||||||
|
|
||||||
|
odinBaseModules = [
|
||||||
|
{ nixpkgs = nixpkgsSettings; }
|
||||||
|
./odin/hardware-configuration.nix
|
||||||
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
|
nixos-hardware.nixosModules.common-pc-laptop
|
||||||
|
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||||
|
./odin/common_configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
thorBaseModules = [
|
||||||
|
{ nixpkgs = nixpkgsSettings; }
|
||||||
|
./thor/hardware-configuration.nix
|
||||||
|
nixos-hardware.nixosModules.common-cpu-amd
|
||||||
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
|
./thor/configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
lokiBaseModules = [
|
||||||
|
{ nixpkgs = nixpkgsSettings; }
|
||||||
|
./loki/hardware-configuration.nix
|
||||||
|
nixos-hardware.nixosModules.common-cpu-intel
|
||||||
|
nixos-hardware.nixosModules.common-pc-ssd
|
||||||
|
./loki/configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
odinStable = extraModules: nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = odinBaseModules ++ [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
homeManagerSettings
|
||||||
|
{ home-manager.users.bertof = import ./home_manager/odin.nix; }
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
|
odinUnstable = extraModules: unstable.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = odinBaseModules ++ [
|
||||||
|
home-manager-unstable.nixosModules.home-manager
|
||||||
|
homeManagerSettings
|
||||||
|
{ home-manager.users.bertof = import ./home_manager/odin.nix; }
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
|
thorStable = extraModules: nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = thorBaseModules ++ [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
homeManagerSettings
|
||||||
|
{ home-manager.users.bertof = import ./home_manager/thor.nix; }
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
|
thorUnstable = extraModules: unstable.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = thorBaseModules ++ [
|
||||||
|
home-manager-unstable.nixosModules.home-manager
|
||||||
|
homeManagerSettings
|
||||||
|
{ home-manager.users.bertof = import ./home_manager/thor.nix; }
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
|
lokiUnstable = extraModules: unstable.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = lokiBaseModules ++ [
|
||||||
|
home-manager-unstable.nixosModules.home-manager
|
||||||
|
homeManagerSettings
|
||||||
|
{ home-manager.users.bertof = import ./home_manager/loki.nix; }
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
|
lokiStable = extraModules: nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = lokiBaseModules ++ [
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
homeManagerSettings
|
||||||
|
{ home-manager.users.bertof = import ./home_manager/loki.nix; }
|
||||||
|
] ++ extraModules;
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
packages.${system} = unstablePkgs;
|
||||||
|
|
||||||
|
nixosConfigurations = rec {
|
||||||
|
|
||||||
|
thor = thor-unstable;
|
||||||
|
thor-stable = thorStable [ ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix ];
|
||||||
|
thor-unstable = thorUnstable [ ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix ];
|
||||||
|
# thor-big-data = thorUnstable [ ./nixos_modules/pro_audio.nix ./nixos_modules/big_data.nix ./nixos_modules/sesar.nix ];
|
||||||
|
|
||||||
|
odin = odin-intel;
|
||||||
|
odin-intel = odin-intel-stable;
|
||||||
|
odin-nvidia = odin-nvidia-stable;
|
||||||
|
odin-intel-unstable = odinUnstable [ ./odin/configuration-intel.nix ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix ];
|
||||||
|
odin-nvidia-unstable = odinUnstable [ ./odin/configuration-nvidia.nix ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix ];
|
||||||
|
odin-intel-stable = odinStable [ ./odin/configuration-intel.nix ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix ];
|
||||||
|
odin-nvidia-stable = odinStable [ ./odin/configuration-nvidia.nix ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix ];
|
||||||
|
|
||||||
|
loki = loki-stable;
|
||||||
|
loki-stable = lokiStable [ ];
|
||||||
|
loki-unstable = lokiUnstable [ ];
|
||||||
|
|
||||||
|
};
|
||||||
|
} // (flake-utils.lib.eachDefaultSystem (system:
|
||||||
|
let unstablePkgs = import unstable { inherit system; overlays = overlaysBuilder system; };
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
checks = {
|
||||||
|
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||||
|
src = ./.;
|
||||||
|
hooks = { nixpkgs-fmt.enable = true; nix-linter.enable = true; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = unstablePkgs.mkShell {
|
||||||
|
shellHook = ''
|
||||||
|
${self.checks.${system}.pre-commit-check.shellHook}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}));
|
||||||
|
}
|
||||||
62
freya.nix
62
freya.nix
|
|
@ -1,62 +0,0 @@
|
||||||
{ pkgs, lib, ... }:
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
devEnvironment = (import ./environment.nix) {
|
|
||||||
# enableCpp = true;
|
|
||||||
# enableData = true;
|
|
||||||
# enableGo = true;
|
|
||||||
# enableHtml = true;
|
|
||||||
# enableJavascript = true;
|
|
||||||
# enableJava = true;
|
|
||||||
# enableLatex = true;
|
|
||||||
# enableNix = true;
|
|
||||||
# enableOffice = true;
|
|
||||||
# enablePython = true;
|
|
||||||
# enableRust = true;
|
|
||||||
# enableShell = true;
|
|
||||||
# enableSpelling = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
home = {
|
|
||||||
language.base = "it_IT.UTF-8";
|
|
||||||
keyboard = {
|
|
||||||
layout = "it";
|
|
||||||
options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ];
|
|
||||||
};
|
|
||||||
packages = with pkgs; [
|
|
||||||
htop
|
|
||||||
neofetch
|
|
||||||
nix-prefetch-scripts
|
|
||||||
ripgrep
|
|
||||||
wget
|
|
||||||
];
|
|
||||||
};
|
|
||||||
imports = [
|
|
||||||
./modules/configurations.nix
|
|
||||||
./modules/fonts.nix
|
|
||||||
./modules/bash.nix
|
|
||||||
./modules/bat.nix
|
|
||||||
./modules/bottom.nix
|
|
||||||
./modules/broot.nix
|
|
||||||
./modules/dircolors.nix
|
|
||||||
./modules/direnv.nix
|
|
||||||
./modules/git.nix
|
|
||||||
./modules/gpg.nix
|
|
||||||
./modules/info.nix
|
|
||||||
./modules/jq.nix
|
|
||||||
./modules/kakoune.nix
|
|
||||||
./modules/keychain.nix
|
|
||||||
./modules/lf.nix
|
|
||||||
./modules/man.nix
|
|
||||||
./modules/megasync.nix
|
|
||||||
./modules/noti.nix
|
|
||||||
./modules/ssh.nix
|
|
||||||
./modules/starship.nix
|
|
||||||
./modules/tmux.nix
|
|
||||||
./modules/zoxide.nix
|
|
||||||
./modules/zsh.nix
|
|
||||||
./modules/shell_aliases.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
14
home.nix
14
home.nix
|
|
@ -1,14 +0,0 @@
|
||||||
{ pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
hostname = lib.fileContents /etc/hostname;
|
|
||||||
user = builtins.getEnv "USER";
|
|
||||||
host_config = builtins.toPath "/home/${user}/.config/nixpkgs/${hostname}.nix";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(import ./rice.nix)
|
|
||||||
];
|
|
||||||
imports = [ host_config ];
|
|
||||||
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
}
|
|
||||||
46
home_manager/basic_env.nix
Normal file
46
home_manager/basic_env.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
language.base = "it_IT.UTF-8";
|
||||||
|
packages = with pkgs; [
|
||||||
|
file
|
||||||
|
htop
|
||||||
|
mmv-go
|
||||||
|
neofetch
|
||||||
|
nixos-option
|
||||||
|
nix-tree
|
||||||
|
unrar
|
||||||
|
unzip
|
||||||
|
wget
|
||||||
|
xclip
|
||||||
|
yq
|
||||||
|
zip
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./modules/configurations.nix
|
||||||
|
|
||||||
|
./modules/bash.nix
|
||||||
|
./modules/bat.nix
|
||||||
|
./modules/bottom.nix
|
||||||
|
./modules/broot.nix
|
||||||
|
./modules/dircolors.nix
|
||||||
|
./modules/direnv.nix
|
||||||
|
./modules/fonts.nix
|
||||||
|
./modules/fzf.nix
|
||||||
|
./modules/git.nix
|
||||||
|
./modules/gpg.nix
|
||||||
|
./modules/info.nix
|
||||||
|
./modules/jq.nix
|
||||||
|
./modules/keychain.nix
|
||||||
|
./modules/lf.nix
|
||||||
|
./modules/man.nix
|
||||||
|
./modules/shell_aliases.nix
|
||||||
|
./modules/ssh.nix
|
||||||
|
./modules/starship.nix
|
||||||
|
./modules/tmux.nix
|
||||||
|
./modules/zoxide.nix
|
||||||
|
./modules/zsh.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
(final: prev: {
|
(_: _: {
|
||||||
devEnvironment = (import ./environment.nix) {
|
devEnvironment = (import ./environment.nix) {
|
||||||
# enableCpp = true;
|
# enableCpp = true;
|
||||||
enableData = true;
|
enableData = true;
|
||||||
|
|
@ -47,6 +47,7 @@
|
||||||
./modules/direnv.nix
|
./modules/direnv.nix
|
||||||
./modules/git.nix
|
./modules/git.nix
|
||||||
./modules/gpg.nix
|
./modules/gpg.nix
|
||||||
|
./modules/helix.nix
|
||||||
./modules/info.nix
|
./modules/info.nix
|
||||||
./modules/jq.nix
|
./modules/jq.nix
|
||||||
./modules/kakoune.nix
|
./modules/kakoune.nix
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
strPalette = with pkgs.rice; palette.toRgbHex rec {
|
strPalette = with pkgs.rice; pkgs.lib.rice.palette.toRgbHex rec {
|
||||||
inherit (colorPalette) normal bright;
|
inherit (colorPalette) normal bright;
|
||||||
dim = colorPalette.dark;
|
dim = colorPalette.dark;
|
||||||
|
|
||||||
33
home_manager/modules/autorandr.nix
Normal file
33
home_manager/modules/autorandr.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
programs.autorandr = {
|
||||||
|
enable = true;
|
||||||
|
profiles = {
|
||||||
|
odin-intel = {
|
||||||
|
fingerprint = { "eDP1" = "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; };
|
||||||
|
config = {
|
||||||
|
"eDP1" = { primary = true; crtc = 0; mode = "1920x1080"; dpi = 96; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
odin-intel-laboratorio = {
|
||||||
|
fingerprint = {
|
||||||
|
"DP1-3" = "00ffffffffffff0010ac71404c473344281601030e331d78eadd45a3554fa027125054a54b00714f8180d1c001010101010101010101023a801871382d40582c4500fe1f1100001e000000ff004b463837593241364433474c0a000000fc0044454c4c205532333132484d0a000000fd00384c1e5311000a2020202020200081";
|
||||||
|
"eDP1" = "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5";
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
"DP1-3" = { primary = true; crtc = 1; mode = "1920x1080"; position = "0x0"; };
|
||||||
|
"eDP1" = { crtc = 0; mode = "1920x1080"; position = "0x1080"; dpi = 96; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
thor-two-screens = {
|
||||||
|
fingerprint = {
|
||||||
|
"DP-4" = "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da";
|
||||||
|
"HDMI-0" = "00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa";
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
"DP-4" = { primary = true; crtc = 0; mode = "2560x1440"; position = "1080x162"; };
|
||||||
|
"HDMI-0" = { crtc = 1; mode = "1920x1080"; position = "0x0"; rotate = "right"; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
home_manager/modules/bottom.nix
Normal file
13
home_manager/modules/bottom.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
tomlGenerate = (pkgs.formats.toml { }).generate "bottom-toml";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [ bottom ];
|
||||||
|
xdg.configFile."bottom/bottom.toml".source = tomlGenerate {
|
||||||
|
"flags" = {
|
||||||
|
"left_legend" = true;
|
||||||
|
"color" = "nord";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
programs.nix-index = {
|
programs.broot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
48
home_manager/modules/bspwm.nix
Normal file
48
home_manager/modules/bspwm.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
monitorPages = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX" "X" ];
|
||||||
|
monitorPagesString = lib.strings.concatStringsSep " " monitorPages;
|
||||||
|
strPalette = pkgs.lib.rice.palette.toRGBHex pkgs.rice.colorPalette;
|
||||||
|
xrandr = "${pkgs.xorg.xrandr}/bin/xrandr";
|
||||||
|
xsetroot = "${pkgs.xorg.xsetroot}/bin/xsetroot";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
xsession.windowManager.bspwm = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
border_width = 2;
|
||||||
|
border_radius = 8;
|
||||||
|
window_gap = 4;
|
||||||
|
split_ratio = 0.5;
|
||||||
|
top_padding = 0;
|
||||||
|
borderless_monocle = true;
|
||||||
|
gapless_monocle = false;
|
||||||
|
normal_border_color = strPalette.normal.blue;
|
||||||
|
focused_border_color = strPalette.bright.blue;
|
||||||
|
};
|
||||||
|
# monitors = builtins.foldl' (acc: monitor: acc // { ${monitor} = monitorPages; }) { } monitors;
|
||||||
|
rules = {
|
||||||
|
"*" = { follow = true; };
|
||||||
|
"Zathura" = { state = "tiled"; };
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
for monitor in $(${xrandr} --listactivemonitors | cut -d " " -f 6); do
|
||||||
|
bspc monitor $monitor -d ${monitorPagesString}
|
||||||
|
done
|
||||||
|
|
||||||
|
autorandr -c
|
||||||
|
${xsetroot} -solid black -cursor_name left_ptr
|
||||||
|
|
||||||
|
systemctl --user restart \
|
||||||
|
polybar.service \
|
||||||
|
update-background.service
|
||||||
|
'';
|
||||||
|
startupPrograms = [ ];
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
network-manager-applet.enable = true;
|
||||||
|
blueman-applet.enable = true;
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [ blueman ];
|
||||||
|
}
|
||||||
6
home_manager/modules/cpp.nix
Normal file
6
home_manager/modules/cpp.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
clang-tools
|
||||||
|
];
|
||||||
|
}
|
||||||
7
home_manager/modules/dircolors.nix
Normal file
7
home_manager/modules/dircolors.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{
|
||||||
|
programs.dircolors = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
rofi_dmenu = "${pkgs.rofi} -dmenu";
|
palette = pkgs.lib.rice.palette.toRGBHex pkgs.rice.colorPalette;
|
||||||
firefox = "${pkgs.firefox}/bin/firefox";
|
|
||||||
dmenu = "${pkgs.dmenu}/bin/dmenu";
|
|
||||||
palette = pkgs.rice.palette.toRGBHex pkgs.rice.colorPalette;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [ dunst rice.font.normal.package ];
|
home.packages = with pkgs; [ dunst rice.font.normal.package ];
|
||||||
|
|
@ -47,8 +44,8 @@ in
|
||||||
max_icon_size = 32;
|
max_icon_size = 32;
|
||||||
sticky_history = "yes";
|
sticky_history = "yes";
|
||||||
history_length = 20;
|
history_length = 20;
|
||||||
dmenu = "${dmenu} -p dunst:";
|
dmenu = "dmenu -p dunst:";
|
||||||
browser = "${firefox} -new-tab";
|
browser = "google-chrome-stable";
|
||||||
always_run_script = "true";
|
always_run_script = "true";
|
||||||
title = "Dunst";
|
title = "Dunst";
|
||||||
class = "Dunst";
|
class = "Dunst";
|
||||||
3
home_manager/modules/easyeffects.nix
Normal file
3
home_manager/modules/easyeffects.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
services.easyeffects.enable = true;
|
||||||
|
}
|
||||||
|
|
@ -7,7 +7,9 @@
|
||||||
dejavu_fonts
|
dejavu_fonts
|
||||||
noto-fonts
|
noto-fonts
|
||||||
noto-fonts-extra
|
noto-fonts-extra
|
||||||
noto-fonts-cjk
|
noto-fonts-cjk-sans
|
||||||
font-awesome
|
font-awesome
|
||||||
|
corefonts # Microsoft fonts
|
||||||
|
vistafonts
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
8
home_manager/modules/fzf.nix
Normal file
8
home_manager/modules/fzf.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
tmux.enableShellIntegration = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,5 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
kak = "${pkgs.kakoune}/bin/kak";
|
|
||||||
meld = "${pkgs.meld}/bin/meld";
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
"g" = "git";
|
"g" = "git";
|
||||||
"ga" = "git add";
|
"ga" = "git add";
|
||||||
|
|
@ -99,11 +97,13 @@ in
|
||||||
# };
|
# };
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
commit.gpgSign = true;
|
commit.gpgSign = true;
|
||||||
core.editor = kak;
|
# core.editor = kak;
|
||||||
credential.helper = "cache --timeout = 3600 ";
|
credential.helper = "cache --timeout=3600 ";
|
||||||
diff.guitool = meld;
|
delta.navigate = true;
|
||||||
|
diff.guitool = "meld";
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
merge.guitool = meld;
|
merge.guitool = "meld";
|
||||||
|
merge.tool = "meld";
|
||||||
pull.rebase = true;
|
pull.rebase = true;
|
||||||
rebase.autoStash = true;
|
rebase.autoStash = true;
|
||||||
user.signingKey = "berto.f@protonmail.com";
|
user.signingKey = "berto.f@protonmail.com";
|
||||||
|
|
@ -117,5 +117,6 @@ in
|
||||||
gh
|
gh
|
||||||
git-secret
|
git-secret
|
||||||
glab
|
glab
|
||||||
|
meld
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
9
home_manager/modules/go.nix
Normal file
9
home_manager/modules/go.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.go = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gopls
|
||||||
|
];
|
||||||
|
}
|
||||||
12
home_manager/modules/gpg.nix
Normal file
12
home_manager/modules/gpg.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
programs.gpg = {
|
||||||
|
enable = true;
|
||||||
|
settings = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
services.gpg-agent = {
|
||||||
|
enable = true;
|
||||||
|
defaultCacheTtl = 600;
|
||||||
|
# extraConfig = "allow-loopback-pinentry";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
services.grobi = {
|
services.grobi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -18,11 +18,13 @@
|
||||||
platformTheme = "gtk";
|
platformTheme = "gtk";
|
||||||
};
|
};
|
||||||
|
|
||||||
xsession = {
|
home = {
|
||||||
pointerCursor = {
|
pointerCursor = {
|
||||||
package = pkgs.qogir-icon-theme;
|
package = pkgs.qogir-icon-theme;
|
||||||
name = "Qogir";
|
name = "Qogir";
|
||||||
size = 24;
|
# size = 64;
|
||||||
|
# x11.enable = true;
|
||||||
|
gtk.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
86
home_manager/modules/helix.nix
Normal file
86
home_manager/modules/helix.nix
Normal file
|
|
@ -0,0 +1,86 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.bash.shellAliases = { x = "hx"; };
|
||||||
|
programs.zsh.shellAliases = { x = "hx"; };
|
||||||
|
home.sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; };
|
||||||
|
home.packages = [
|
||||||
|
(pkgs.makeDesktopItem
|
||||||
|
{
|
||||||
|
name = "helix";
|
||||||
|
exec = "hx %F";
|
||||||
|
icon = "helix";
|
||||||
|
desktopName = "Helix";
|
||||||
|
comment = "Helix text editor";
|
||||||
|
terminal = true;
|
||||||
|
categories = [ "Development" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
programs.helix = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.unstable.helix;
|
||||||
|
languages = [ ];
|
||||||
|
settings = {
|
||||||
|
theme = "monokai_pro_octagon";
|
||||||
|
editor.lsp.display-messages = true;
|
||||||
|
editor.scrolloff = 5;
|
||||||
|
editor.true-color = true;
|
||||||
|
};
|
||||||
|
themes =
|
||||||
|
let
|
||||||
|
transparent = "none";
|
||||||
|
gray = "#665c54";
|
||||||
|
dark-gray = "#3c3836";
|
||||||
|
white = "#fbf1c7";
|
||||||
|
black = "#282828";
|
||||||
|
red = "#fb4934";
|
||||||
|
green = "#b8bb26";
|
||||||
|
yellow = "#fabd2f";
|
||||||
|
orange = "#fe8019";
|
||||||
|
blue = "#83a598";
|
||||||
|
magenta = "#d3869b";
|
||||||
|
cyan = "#8ec07c";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
base16 = {
|
||||||
|
"ui.menu" = transparent;
|
||||||
|
"ui.menu.selected" = { modifiers = [ "reversed" ]; };
|
||||||
|
"ui.linenr" = { fg = gray; bg = dark-gray; };
|
||||||
|
"ui.popup" = { modifiers = [ "reversed" ]; };
|
||||||
|
"ui.linenr.selected" = { fg = white; bg = black; modifiers = [ "bold" ]; };
|
||||||
|
"ui.selection" = { fg = black; bg = blue; };
|
||||||
|
"ui.selection.primary" = { modifiers = [ "reversed" ]; };
|
||||||
|
"comment" = { fg = gray; };
|
||||||
|
"ui.statusline" = { fg = white; bg = dark-gray; };
|
||||||
|
"ui.statusline.inactive" = { fg = dark-gray; bg = white; };
|
||||||
|
"ui.help" = { fg = dark-gray; bg = white; };
|
||||||
|
"ui.cursor" = { modifiers = [ "reversed" ]; };
|
||||||
|
"variable" = red;
|
||||||
|
"variable.builtin" = orange;
|
||||||
|
"constant.numeric" = orange;
|
||||||
|
"constant" = orange;
|
||||||
|
"attributes" = yellow;
|
||||||
|
"type" = yellow;
|
||||||
|
"ui.cursor.match" = { fg = yellow; modifiers = [ "underlined" ]; };
|
||||||
|
"string" = green;
|
||||||
|
"variable.other.member" = red;
|
||||||
|
"constant.character.escape" = cyan;
|
||||||
|
"function" = blue;
|
||||||
|
"constructor" = blue;
|
||||||
|
"special" = blue;
|
||||||
|
"keyword" = magenta;
|
||||||
|
"label" = magenta;
|
||||||
|
"namespace" = blue;
|
||||||
|
"diff.plus" = green;
|
||||||
|
"diff.delta" = yellow;
|
||||||
|
"diff.minus" = red;
|
||||||
|
"diagnostic" = { modifiers = [ "underlined" ]; };
|
||||||
|
"ui.gutter" = { bg = black; };
|
||||||
|
"info" = blue;
|
||||||
|
"hint" = dark-gray;
|
||||||
|
"debug" = dark-gray;
|
||||||
|
"warning" = yellow;
|
||||||
|
"error" = red;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
3
home_manager/modules/java.nix
Normal file
3
home_manager/modules/java.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
programs.java.enable = true;
|
||||||
|
}
|
||||||
7
home_manager/modules/javascript.nix
Normal file
7
home_manager/modules/javascript.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
flow
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake";
|
joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake";
|
||||||
in
|
in
|
||||||
256
home_manager/modules/kakoune.nix
Normal file
256
home_manager/modules/kakoune.nix
Normal file
|
|
@ -0,0 +1,256 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
themeBuilder = palette: with palette; ''
|
||||||
|
set-face global value rgb:${normal.magenta},default
|
||||||
|
set-face global type rgb:${bright.white},default
|
||||||
|
set-face global identifier rgb:${normal.cyan},default
|
||||||
|
set-face global string rgb:${normal.green},default
|
||||||
|
set-face global error rgb:${normal.red},default
|
||||||
|
set-face global keyword rgb:${normal.blue},default
|
||||||
|
set-face global operator rgb:${normal.blue},default
|
||||||
|
set-face global attribute rgb:${bright.blue},default
|
||||||
|
set-face global comment rgb:${bright.blue},default
|
||||||
|
set-face global meta rgb:${normal.yellow},default
|
||||||
|
set-face global Default rgb:${normal.white},default
|
||||||
|
set-face global PrimarySelection rgb:${normal.black},rgb:${dark.yellow}
|
||||||
|
set-face global SecondarySelection rgb:${normal.black},rgb:${dark.white}
|
||||||
|
set-face global PrimaryCursor rgb:${normal.black},rgb:${normal.yellow}
|
||||||
|
set-face global SecondaryCursor rgb:${normal.black},rgb:${normal.white}
|
||||||
|
set-face global MenuForeground rgb:${normal.white},rgb:${bright.black}
|
||||||
|
set-face global MenuBackground default,rgb:${normal.black}
|
||||||
|
set-face global MenuInfo default,rgb:${normal.black}
|
||||||
|
set-face global Information rgb:${dark.black},rgb:${normal.cyan}
|
||||||
|
set-face global StatusLine rgb:${normal.white},rgb:${normal.black}
|
||||||
|
set-face global StatusLineMode rgb:${normal.blue},rgb:${normal.black}
|
||||||
|
set-face global StatusLineInfo rgb:${normal.blue},rgb:${normal.black}
|
||||||
|
set-face global StatusLineValue rgb:${normal.blue},rgb:${normal.black}
|
||||||
|
set-face global StatusCursor rgb:${dark.black},rgb:${normal.yellow}
|
||||||
|
set-face global Prompt rgb:${normal.cyan},rgb:${normal.black}
|
||||||
|
set-face global BufferPadding default,default
|
||||||
|
'';
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
yaml-language-server
|
||||||
|
nodePackages.vscode-langservers-extracted
|
||||||
|
rnix-lsp
|
||||||
|
editorconfig-core-c
|
||||||
|
aspell
|
||||||
|
aspellDicts.en
|
||||||
|
aspellDicts.en-computers
|
||||||
|
aspellDicts.en-science
|
||||||
|
aspellDicts.it
|
||||||
|
|
||||||
|
(pkgs.makeDesktopItem
|
||||||
|
{
|
||||||
|
name = "kakoune";
|
||||||
|
exec = "kak %F";
|
||||||
|
icon = "kakoune";
|
||||||
|
desktopName = "Kakoune";
|
||||||
|
comment = "Kakoune text editor";
|
||||||
|
terminal = true;
|
||||||
|
categories = [ "Development" ];
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.bash.shellAliases = { k = "kak"; };
|
||||||
|
programs.zsh.shellAliases = { k = "kak"; };
|
||||||
|
home.packages = packages;
|
||||||
|
programs.kakoune = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
colorScheme = "nord";
|
||||||
|
tabStop = 2;
|
||||||
|
indentWidth = 2;
|
||||||
|
alignWithTabs = true;
|
||||||
|
scrollOff = { lines = 5; columns = 3; };
|
||||||
|
ui = { setTitle = true; changeColors = true; enableMouse = true; };
|
||||||
|
wrapLines = { enable = true; word = true; };
|
||||||
|
numberLines = { enable = true; highlightCursor = true; };
|
||||||
|
keyMappings = [
|
||||||
|
{ mode = "normal"; docstring = "Edit file"; key = "<c-e>"; effect = ":edit<space>"; }
|
||||||
|
{ mode = "user"; docstring = "Code actions"; key = "a"; effect = ":lsp-code-actions<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Comment block"; key = "b"; effect = ":comment-block<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Comment line"; key = "l"; effect = ":comment-line<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Copy to clipboard"; key = "y"; effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Format code with formatter"; key = "f"; effect = ":format<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Format code with LSP"; key = "F"; effect = ":lsp-formatting-sync<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Jump to definition"; key = "d"; effect = ":lsp-definition<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Rename object"; key = "r"; effect = ":lsp-rename-prompt<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Jump to type definition"; key = "t"; effect = ":lsp-type-definition<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "List project diagnostics"; key = "i"; effect = ":lsp-diagnostics<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Paste from clipboard (after)"; key = "P"; effect = "<a-!>${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Paste from clipboard (before)"; key = "p"; effect = "!${pkgs.xclip}/bin/xclip -selection clipboard -o<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Show hover info"; key = "q"; effect = ":lsp-hover<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Spellcheck English"; key = "S"; effect = ":spell en<ret>"; }
|
||||||
|
{ mode = "user"; docstring = "Spellcheck"; key = "s"; effect = ":spell "; }
|
||||||
|
{ mode = "normal"; docstring = "Try next snippet placeholder"; key = "<c-n>"; effect = "<a-;>: insert-c-n<ret>"; }
|
||||||
|
# { mode = "normal"; docstring = "Search"; key = "/"; effect = "/(?i)"; }
|
||||||
|
# { mode = "normal"; docstring = "Reverse search"; key = "<a-/>"; effect = "<a-/>(?i)"; }
|
||||||
|
];
|
||||||
|
hooks = with pkgs; [
|
||||||
|
{ name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; }
|
||||||
|
# { name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; }
|
||||||
|
{ name = "ModuleLoaded"; option = "powerline"; commands = "powerline-enable; powerline-start"; }
|
||||||
|
{ name = "BufSetOption"; option = "filetype=latex"; commands = "set-option buffer formatcmd latexindent"; }
|
||||||
|
{ name = "BufSetOption"; option = "filetype=python"; commands = "set-option buffer formatcmd 'black -'"; }
|
||||||
|
{ name = "BufSetOption"; option = "filetype=(markdown|html|json|yaml|css|scss|less)"; commands = "set-option buffer formatcmd prettier"; }
|
||||||
|
{ name = "BufSetOption"; option = "filetype=rust"; commands = "set-option buffer formatcmd 'rustfmt'"; }
|
||||||
|
{ name = "BufSetOption"; option = "filetype=sh"; commands = "set-option buffer formatcmd 'rustfmt'"; }
|
||||||
|
];
|
||||||
|
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
|
||||||
|
};
|
||||||
|
extraConfig = builtins.concatStringsSep "\n" [
|
||||||
|
"# Custom commands"
|
||||||
|
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
||||||
|
"eval %sh{kak-lsp --kakoune -s $kak_session}"
|
||||||
|
"lsp-enable"
|
||||||
|
''
|
||||||
|
def -hidden insert-c-n %{
|
||||||
|
try %{
|
||||||
|
lsp-snippets-select-next-placeholders
|
||||||
|
exec '<a-;>d'
|
||||||
|
} catch %{
|
||||||
|
exec -with-hooks '<c-n>'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
''
|
||||||
|
"require-module powerline"
|
||||||
|
"require-module connect-broot"
|
||||||
|
"require-module connect-lf"
|
||||||
|
"require-module connect-rofi"
|
||||||
|
];
|
||||||
|
plugins = with pkgs.kakounePlugins; [
|
||||||
|
prelude-kak
|
||||||
|
kak-lsp
|
||||||
|
auto-pairs-kak
|
||||||
|
powerline-kak
|
||||||
|
connect-kak
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# THEME FILE
|
||||||
|
xdg.configFile."kak/colors/nord.kak".text = themeBuilder (pkgs.lib.rice.palette.toRgbShortHex pkgs.rice.colorPalette);
|
||||||
|
|
||||||
|
xdg.configFile."kak-lsp/kak-lsp.toml".text = ''
|
||||||
|
snippet_support = false
|
||||||
|
verbosity = 2
|
||||||
|
[server]
|
||||||
|
timeout = 1800 # seconds = 30 minutes
|
||||||
|
|
||||||
|
[language.c_cpp]
|
||||||
|
filetypes = ["c", "cpp"]
|
||||||
|
roots = ["compile_commands.json", ".clangd"]
|
||||||
|
command = "clangd"
|
||||||
|
offset_encoding = "utf-8"
|
||||||
|
|
||||||
|
[language.json]
|
||||||
|
filetypes = ["json"]
|
||||||
|
roots = ["package.json"]
|
||||||
|
command = "vscode-json-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.yaml]
|
||||||
|
filetypes = ["yaml"]
|
||||||
|
roots = [".git"]
|
||||||
|
command = "yaml-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.yaml.settings]
|
||||||
|
# See https://github.com/redhat-developer/yaml-language-server#language-server-settings
|
||||||
|
# Defaults are at https://github.com/redhat-developer/yaml-language-server/blob/master/src/yamlSettings.ts
|
||||||
|
yaml.format.enable = true
|
||||||
|
|
||||||
|
[language.go]
|
||||||
|
filetypes = ["go"]
|
||||||
|
roots = ["Gopkg.toml", "go.mod", ".git", ".hg"]
|
||||||
|
command = "gopls"
|
||||||
|
offset_encoding = "utf-8"
|
||||||
|
settings_section = "gopls"
|
||||||
|
|
||||||
|
[language.go.settings.gopls]
|
||||||
|
# See https://github.com/golang/tools/blob/master/gopls/doc/settings.md
|
||||||
|
# "build.buildFlags" = []
|
||||||
|
|
||||||
|
[language.html]
|
||||||
|
filetypes = ["html"]
|
||||||
|
roots = ["package.json"]
|
||||||
|
command = "vscode-html-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.css]
|
||||||
|
filetypes = ["css"]
|
||||||
|
roots = ["package.json", ".git"]
|
||||||
|
command = "vscode-css-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.less]
|
||||||
|
filetypes = ["less"]
|
||||||
|
roots = ["package.json", ".git"]
|
||||||
|
command = "vscode-css-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.scss]
|
||||||
|
filetypes = ["scss"]
|
||||||
|
roots = ["package.json", ".git"]
|
||||||
|
command = "vscode-css-language-server"
|
||||||
|
args = ["--stdio"]
|
||||||
|
|
||||||
|
[language.javascript]
|
||||||
|
filetypes = ["javascript"]
|
||||||
|
roots = [".flowconfig"]
|
||||||
|
command = "flow"
|
||||||
|
args = ["lsp"]
|
||||||
|
|
||||||
|
[language.latex]
|
||||||
|
filetypes = ["latex"]
|
||||||
|
roots = [".git"]
|
||||||
|
command = "texlab"
|
||||||
|
settings_section = "texlab"
|
||||||
|
|
||||||
|
[language.latex.settings.texlab]
|
||||||
|
# See https://github.com/latex-lsp/texlab/blob/master/src/options.rs
|
||||||
|
# bibtexFormatter = "texlab"
|
||||||
|
|
||||||
|
[language.nix]
|
||||||
|
filetypes = ["nix"]
|
||||||
|
roots = ["flake.nix", "shell.nix", ".git"]
|
||||||
|
command = "rnix-lsp"
|
||||||
|
|
||||||
|
[language.python]
|
||||||
|
filetypes = ["python"]
|
||||||
|
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
|
||||||
|
command = "pylsp"
|
||||||
|
offset_encoding = "utf-8"
|
||||||
|
|
||||||
|
[language.python.settings]
|
||||||
|
# See https://github.com/palantir/python-language-server#configuration
|
||||||
|
# and https://github.com/palantir/python-language-server/blob/develop/vscode-client/package.json
|
||||||
|
# "pyls.configurationSources" = ["flake8"]
|
||||||
|
|
||||||
|
[language.rust]
|
||||||
|
filetypes = ["rust"]
|
||||||
|
roots = ["Cargo.toml"]
|
||||||
|
command = "rust-analyzer"
|
||||||
|
settings_section = "rust-analyzer"
|
||||||
|
|
||||||
|
[language.rust.settings.rust-analyzer]
|
||||||
|
hoverActions.enable = false # kak-lsp doesn't support this at the moment
|
||||||
|
# cargo.features = []
|
||||||
|
# See https://rust-analyzer.github.io/manual.html#configuration
|
||||||
|
# If you get 'unresolved proc macro' warnings, you have two options
|
||||||
|
# 1. The safe choice is two disable the warning:
|
||||||
|
diagnostics.disabled = ["unresolved-proc-macro"]
|
||||||
|
# 2. Or you can opt-in for proc macro support
|
||||||
|
procMacro.enable = true
|
||||||
|
cargo.loadOutDirsFromCheck = true
|
||||||
|
# See https://github.com/rust-analyzer/rust-analyzer/issues/6448
|
||||||
|
|
||||||
|
[language.bash]
|
||||||
|
filetypes = ["sh"]
|
||||||
|
roots = [".git", ".hg"]
|
||||||
|
command = "bash-language-server"
|
||||||
|
args = ["start"]
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
config.systemd.user.services.keepassxc = {
|
config.systemd.user.services.keepassxc = {
|
||||||
Unit = {
|
Unit = {
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, ... }:
|
||||||
let strPalette = with pkgs.rice; palette.toRgbHex rec {
|
let strPalette = with pkgs.rice; pkgs.lib.rice.palette.toRgbHex rec {
|
||||||
foreground = colorPalette.normal.white;
|
foreground = colorPalette.normal.white;
|
||||||
background = colorPalette.normal.black;
|
background = colorPalette.normal.black;
|
||||||
color0 = colorPalette.normal.black;
|
color0 = colorPalette.normal.black;
|
||||||
|
|
@ -23,6 +23,7 @@ in
|
||||||
{
|
{
|
||||||
programs.kitty = {
|
programs.kitty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.unstable.kitty;
|
||||||
settings = {
|
settings = {
|
||||||
scrollback_lines = 10000;
|
scrollback_lines = 10000;
|
||||||
enable_audio_bell = false;
|
enable_audio_bell = false;
|
||||||
|
|
@ -37,6 +38,7 @@ in
|
||||||
keybindings = {
|
keybindings = {
|
||||||
"ctrl+shift+t" = "new_tab_with_cwd";
|
"ctrl+shift+t" = "new_tab_with_cwd";
|
||||||
"ctrl+shift+enter" = "new_window_with_cwd";
|
"ctrl+shift+enter" = "new_window_with_cwd";
|
||||||
|
"ctrl+shift+n" = "new_os_window_with_cwd";
|
||||||
};
|
};
|
||||||
font = pkgs.rice.font.monospace;
|
font = pkgs.rice.font.monospace;
|
||||||
};
|
};
|
||||||
9
home_manager/modules/latex.nix
Normal file
9
home_manager/modules/latex.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
bibtool
|
||||||
|
tex2nix
|
||||||
|
texlab
|
||||||
|
texlive.combined.scheme-medium
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
libinputGesturesCmd = "${pkgs.libinput-gestures}/bin/libinput-gestures";
|
libinputGesturesCmd = "${pkgs.libinput-gestures}/bin/libinput-gestures";
|
||||||
xdotool = "${pkgs.xdotool}/bin/xdotool";
|
xdotool = "${pkgs.xdotool}/bin/xdotool";
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
programs.man = {
|
programs.man = {
|
||||||
enable = true;
|
enable = true;
|
||||||
generateCaches = true;
|
# generateCaches = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,7 +1,9 @@
|
||||||
{ ... }:
|
|
||||||
{
|
{
|
||||||
programs.mangohud = {
|
programs.mangohud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSessionWide = true;
|
enableSessionWide = true;
|
||||||
|
settings = {
|
||||||
|
toggle_hud = "Shift_R+F12";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
megasyncCmd = "${pkgs.megacmd}/bin/mega-cmd-server";
|
megasyncCmd = "${pkgs.megacmd}/bin/mega-cmd-server";
|
||||||
in
|
in
|
||||||
4
home_manager/modules/nautilus.nix
Normal file
4
home_manager/modules/nautilus.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [ gnome.nautilus ];
|
||||||
|
}
|
||||||
27
home_manager/modules/nix-index.nix
Normal file
27
home_manager/modules/nix-index.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.nix-index = {
|
||||||
|
enable = true;
|
||||||
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user = {
|
||||||
|
services."nix-index" = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Update the nix-locate database";
|
||||||
|
After = [ "network.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = "${pkgs.nix-index}/bin/nix-index";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
timers."nix-index" = {
|
||||||
|
Unit.Description = "Daily update the nix-locate database";
|
||||||
|
Timer = { OnCalendar = "daily"; Persistent = true; Unit = "nix-index.service"; };
|
||||||
|
Install.WantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
11
home_manager/modules/office.nix
Normal file
11
home_manager/modules/office.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# libreoffice-fresh
|
||||||
|
onlyoffice-bin
|
||||||
|
hunspellDicts.en_GB-large
|
||||||
|
hunspellDicts.en_US-large
|
||||||
|
hunspellDicts.it_IT
|
||||||
|
hunspell.bin
|
||||||
|
];
|
||||||
|
}
|
||||||
5
home_manager/modules/pass.nix
Normal file
5
home_manager/modules/pass.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
programs.password-store = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
services.picom = {
|
services.picom = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
with lib;
|
||||||
let
|
let
|
||||||
|
inherit (pkgs.rice) colorPalette opacity;
|
||||||
grep = "${pkgs.gnugrep}/bin/grep";
|
grep = "${pkgs.gnugrep}/bin/grep";
|
||||||
cut = "${pkgs.coreutils}/bin/cut";
|
cut = "${pkgs.coreutils}/bin/cut";
|
||||||
head = "${pkgs.coreutils}/bin/head";
|
head = "${pkgs.coreutils}/bin/head";
|
||||||
|
|
@ -8,22 +10,34 @@ let
|
||||||
pkill = "${pkgs.procps}/bin/pkill";
|
pkill = "${pkgs.procps}/bin/pkill";
|
||||||
playerCtl = "${pkgs.playerctl}/bin/playerctl";
|
playerCtl = "${pkgs.playerctl}/bin/playerctl";
|
||||||
playerStatus = "${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata | ${head} -c 60";
|
playerStatus = "${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata | ${head} -c 60";
|
||||||
alacritty = "${pkgs.alacritty}/bin/alacritty";
|
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||||
btm = "${pkgs.bottom}/bin/btm";
|
loginctl = "${pkgs.systemd}/bin/loginctl";
|
||||||
colors = with pkgs.rice; palette.toARGBHex rec {
|
shutdown = "${pkgs.systemd}/bin/shutdown";
|
||||||
|
logout = pkgs.writeShellScript "logout" ''
|
||||||
|
session=`${loginctl} session-status | ${pkgs.coreutils}/bin/head -n 1 | ${pkgs.gawk}/bin/awk '{print $1}'`
|
||||||
|
${loginctl} terminate-session $session
|
||||||
|
'';
|
||||||
|
colors = with pkgs.lib.rice; let
|
||||||
|
alpha = 255 * opacity;
|
||||||
|
in
|
||||||
|
palette.toARGBHex rec {
|
||||||
|
|
||||||
normal = {
|
normal = {
|
||||||
foreground = colorPalette.normal.white;
|
foreground = colorPalette.normal.white;
|
||||||
background = colorPalette.normal.black;
|
background = color.setAlphaRgba alpha (colorPalette.normal.black);
|
||||||
underline = colorPalette.normal.blue;
|
underline = colorPalette.dark.blue;
|
||||||
};
|
};
|
||||||
|
|
||||||
active = palette.brighten "50%" normal;
|
active = {
|
||||||
|
foreground = colorPalette.bright.white;
|
||||||
|
background = color.setAlphaRgba alpha (colorPalette.normal.black);
|
||||||
|
underline = colorPalette.bright.blue;
|
||||||
|
};
|
||||||
|
|
||||||
selected = {
|
selected = {
|
||||||
foreground = colorPalette.bright.white;
|
foreground = colorPalette.bright.white;
|
||||||
background = color.tAlphaRgba (v: 240) colorPalette.dark.blue;
|
background = color.setAlphaRgba alpha (color.brighten 10 colorPalette.bright.black);
|
||||||
underline = colorPalette.dark.white;
|
underline = colorPalette.bright.red;
|
||||||
};
|
};
|
||||||
|
|
||||||
alert = colorPalette.bright.red;
|
alert = colorPalette.bright.red;
|
||||||
|
|
@ -47,10 +61,7 @@ let
|
||||||
foreground = colors.normal.foreground;
|
foreground = colors.normal.foreground;
|
||||||
line-size = 2;
|
line-size = 2;
|
||||||
line-color = colors.normal.underline;
|
line-color = colors.normal.underline;
|
||||||
padding = {
|
padding = { left = 0; right = 0; };
|
||||||
left = 0;
|
|
||||||
right = 0;
|
|
||||||
};
|
|
||||||
module.margin = { left = 0; right = 0; };
|
module.margin = { left = 0; right = 0; };
|
||||||
separator = " ";
|
separator = " ";
|
||||||
border = {
|
border = {
|
||||||
|
|
@ -62,8 +73,11 @@ let
|
||||||
};
|
};
|
||||||
font = [
|
font = [
|
||||||
"${pkgs.rice.font.monospace.name}:size=${toString pkgs.rice.font.monospace.size};2"
|
"${pkgs.rice.font.monospace.name}:size=${toString pkgs.rice.font.monospace.size};2"
|
||||||
"Material Design Icons:size=${toString pkgs.rice.font.monospace.size};2"
|
# "Font Awesome 6 Free:size=14;0"
|
||||||
"NotoEmoji Nerd Font Mono:size=${toString pkgs.rice.font.monospace.size};0"
|
# "Noto Color Emoji:size=2;2"
|
||||||
|
"Noto Sans Symbols2:size=${toString pkgs.rice.font.monospace.size};2"
|
||||||
|
# "Material Design Icons:size=${toString pkgs.rice.font.monospace.size};2"
|
||||||
|
# "EmojiOne Color:size=${toString pkgs.rice.font.monospace.size};0"
|
||||||
];
|
];
|
||||||
wm-restack = "bspwm";
|
wm-restack = "bspwm";
|
||||||
};
|
};
|
||||||
|
|
@ -73,9 +87,11 @@ in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
pkgs.rice.font.monospace.package
|
pkgs.rice.font.monospace.package
|
||||||
emojione
|
# emojione
|
||||||
noto-fonts-emoji
|
# noto-fonts-emoji
|
||||||
material-design-icons
|
noto-fonts
|
||||||
|
# material-design-icons
|
||||||
|
# font-awesome
|
||||||
];
|
];
|
||||||
services.polybar = {
|
services.polybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -95,7 +111,7 @@ in
|
||||||
screenchange-reload = false;
|
screenchange-reload = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
"bar/primary" = commonBar // {
|
"bar/primary" = recursiveUpdate commonBar {
|
||||||
modules-left = "bspwm";
|
modules-left = "bspwm";
|
||||||
# modules-center =
|
# modules-center =
|
||||||
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
|
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
|
||||||
|
|
@ -106,7 +122,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"bar/secondary" = commonBar // {
|
"bar/secondary" = recursiveUpdate commonBar {
|
||||||
modules-left = "bspwm";
|
modules-left = "bspwm";
|
||||||
# modules-center =
|
# modules-center =
|
||||||
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
|
modules-right = "player pulseaudio temperature cpu memory battery date powermenu";
|
||||||
|
|
@ -132,32 +148,25 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
format = {
|
format = {
|
||||||
charging = colors.selected // {
|
charging = recursiveUpdate colors.selected { text = "<animation-charging> <label-charging>"; };
|
||||||
padding = 1;
|
discharging = recursiveUpdate colors.active { text = "<animation-discharging> <label-discharging>"; };
|
||||||
text = "<animation-charging> <label-charging>";
|
full = recursiveUpdate colors.normal { text = " <label-full>"; };
|
||||||
};
|
|
||||||
discharging = colors.active // {
|
|
||||||
padding = 1;
|
|
||||||
text = "<animation-discharging> <label-discharging>";
|
|
||||||
};
|
|
||||||
full = colors.normal // {
|
|
||||||
padding = 1;
|
|
||||||
text = " <label-full>";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
label = {
|
label.text = "%percentage%%";
|
||||||
chargin = "%percentage%%";
|
# = {
|
||||||
dischargin = "%percentage%%";
|
# chargin = "%percentage%%";
|
||||||
full = "%percentage%%";
|
# dischargin = "%percentage%%";
|
||||||
};
|
# full = "%percentage%%";
|
||||||
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/bspwm" = {
|
"module/bspwm" = {
|
||||||
type = "internal/bspwm";
|
type = "internal/bspwm";
|
||||||
format = "<label-state>";
|
format = "<label-state>";
|
||||||
|
|
||||||
label = let
|
label =
|
||||||
|
let
|
||||||
common = {
|
common = {
|
||||||
padding = 1;
|
padding = 1;
|
||||||
separator = " ";
|
separator = " ";
|
||||||
|
|
@ -165,19 +174,16 @@ in
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
focused = colors.selected // common;
|
focused = recursiveUpdate colors.selected common;
|
||||||
occupied = colors.active // common;
|
occupied = recursiveUpdate colors.active common;
|
||||||
urgent = colors.active // common // { background = colors.alert; };
|
urgent = recursiveUpdate (recursiveUpdate colors.active common) { background = colors.alert; };
|
||||||
empty = colors.normal // common // { text = ""; padding = 0; };
|
empty = recursiveUpdate (recursiveUpdate colors.normal common) { text = ""; padding = 0; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/cpu" = {
|
"module/cpu" = {
|
||||||
type = "internal/cpu";
|
type = "internal/cpu";
|
||||||
format = colors.normal // {
|
format = recursiveUpdate colors.normal { text = " <label>"; };
|
||||||
text = " <label>";
|
|
||||||
padding = 1;
|
|
||||||
};
|
|
||||||
interval = 2;
|
interval = 2;
|
||||||
label = "%percentage-sum%%";
|
label = "%percentage-sum%%";
|
||||||
ramp-load = ramp;
|
ramp-load = ramp;
|
||||||
|
|
@ -195,32 +201,24 @@ in
|
||||||
alt = "%H:%M:%S";
|
alt = "%H:%M:%S";
|
||||||
text = "%H:%M";
|
text = "%H:%M";
|
||||||
};
|
};
|
||||||
format = colors.normal // {
|
format = colors.normal;
|
||||||
padding = 1;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/memory" = {
|
"module/memory" = {
|
||||||
type = "internal/memory";
|
type = "internal/memory";
|
||||||
format = colors.normal // {
|
format = recursiveUpdate colors.normal { text = " <label>"; };
|
||||||
padding = 1;
|
|
||||||
text = " <label>";
|
|
||||||
};
|
|
||||||
interval = 2;
|
interval = 2;
|
||||||
label = "%percentage_used%%";
|
label = "%percentage_used%%";
|
||||||
ramp-used = ramp;
|
ramp-used = ramp;
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/pulseaudio" = {
|
"module/pulseaudio" = {
|
||||||
|
interval = 2;
|
||||||
bar.volume = {
|
bar.volume = {
|
||||||
empty = {
|
empty = { text = "─"; };
|
||||||
font = "2";
|
fill = { text = "─"; };
|
||||||
text = "─";
|
indicator = { text = "|"; };
|
||||||
};
|
width = "10";
|
||||||
fill = {
|
|
||||||
text = "─";
|
|
||||||
font = "2";
|
|
||||||
};
|
|
||||||
foreground = [
|
foreground = [
|
||||||
colors.green
|
colors.green
|
||||||
colors.green
|
colors.green
|
||||||
|
|
@ -231,39 +229,23 @@ in
|
||||||
colors.orange
|
colors.orange
|
||||||
colors.red
|
colors.red
|
||||||
];
|
];
|
||||||
indicator = {
|
|
||||||
text = "|";
|
|
||||||
font = "2";
|
|
||||||
};
|
|
||||||
width = "10";
|
|
||||||
};
|
};
|
||||||
click.right = "${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
|
click.right = "${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}";
|
||||||
format = {
|
format = {
|
||||||
padding = 1;
|
padding = 1;
|
||||||
muted = colors.active // {
|
muted = colors.active;
|
||||||
padding = 1;
|
volume = recursiveUpdate colors.normal { text = "<ramp-volume> <label-volume>"; };
|
||||||
};
|
};
|
||||||
volume = colors.normal // {
|
label.muted.text = "婢 muted";
|
||||||
padding = 1;
|
label.volume.text = "%percentage%%";
|
||||||
text = "<ramp-volume> <label-volume>";
|
ramp.volume = [ "奄" "奔" "墳" ];
|
||||||
};
|
|
||||||
};
|
|
||||||
label.muted = {
|
|
||||||
text = "";
|
|
||||||
};
|
|
||||||
label.volume = {
|
|
||||||
text = "%percentage%%";
|
|
||||||
};
|
|
||||||
ramp.volume = [ "" "" "" ];
|
|
||||||
type = "internal/pulseaudio";
|
type = "internal/pulseaudio";
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/temperature" = {
|
"module/temperature" = {
|
||||||
format = colors.normal // {
|
format = recursiveUpdate colors.normal {
|
||||||
padding = 1;
|
|
||||||
text = "<ramp> <label>";
|
text = "<ramp> <label>";
|
||||||
warn = {
|
warn = {
|
||||||
padding = 1;
|
|
||||||
text = "<ramp> <label-warn>";
|
text = "<ramp> <label-warn>";
|
||||||
underline = colors.alert;
|
underline = colors.alert;
|
||||||
};
|
};
|
||||||
|
|
@ -273,9 +255,7 @@ in
|
||||||
text = "%temperature-c%";
|
text = "%temperature-c%";
|
||||||
warn = "%temperature-c%";
|
warn = "%temperature-c%";
|
||||||
};
|
};
|
||||||
ramp = {
|
ramp.text = [ "" "" "" "" "" ];
|
||||||
text = [ "" "" "" "" "" ];
|
|
||||||
};
|
|
||||||
thermal.zone = "0";
|
thermal.zone = "0";
|
||||||
type = "internal/temperature";
|
type = "internal/temperature";
|
||||||
warn.temperature = "90";
|
warn.temperature = "90";
|
||||||
|
|
@ -289,15 +269,9 @@ in
|
||||||
suffix = " ";
|
suffix = " ";
|
||||||
};
|
};
|
||||||
label = {
|
label = {
|
||||||
open = colors.normal // {
|
open = recursiveUpdate colors.normal { text = " ⏻ "; };
|
||||||
text = " ⏻ ";
|
close = recursiveUpdate colors.normal { text = "Cancel"; };
|
||||||
};
|
separator = { text = "|"; };
|
||||||
close = colors.normal // {
|
|
||||||
text = "Cancel";
|
|
||||||
};
|
|
||||||
separator = {
|
|
||||||
text = "|";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
menu = [
|
menu = [
|
||||||
[
|
[
|
||||||
|
|
@ -307,25 +281,23 @@ in
|
||||||
({ text = "Power off"; exec = "#powermenu.open.4"; })
|
({ text = "Power off"; exec = "#powermenu.open.4"; })
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
({ text = "Logout"; exec = "${pkgs.systemd}/bin/loginctl terminate-session self"; })
|
({ text = "Logout"; exec = logout; })
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
({ text = "Reboot"; exec = "${pkgs.systemd}/bin/systemctl reboot"; })
|
({ text = "Reboot"; exec = "${systemctl} reboot"; })
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
({ text = "Hibernate"; exec = "${pkgs.systemd}/bin/systemctl hibernate"; })
|
({ text = "Hibernate"; exec = "${systemctl} hibernate"; })
|
||||||
]
|
]
|
||||||
[
|
[
|
||||||
({ text = "Power off"; exec = "${pkgs.systemd}/bin/shutdown now"; })
|
({ text = "Power off"; exec = "${shutdown} now"; })
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
"module/player" = {
|
"module/player" = {
|
||||||
type = "custom/script";
|
type = "custom/script";
|
||||||
format = colors.normal // {
|
format = recursiveUpdate colors.normal { padding = 0; };
|
||||||
padding = 1;
|
|
||||||
};
|
|
||||||
exec = playerStatus;
|
exec = playerStatus;
|
||||||
click.left = "${playerCtl} play-pause";
|
click.left = "${playerCtl} play-pause";
|
||||||
scroll = {
|
scroll = {
|
||||||
47
home_manager/modules/pro_audio.nix
Normal file
47
home_manager/modules/pro_audio.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
variables = {
|
||||||
|
DSSI_PATH = "$HOME/.dssi:$NIX_USER_PROFILE_DIR/home-manager/home-path/lib/dssi:/run/current-system/sw/lib/dssi";
|
||||||
|
LADSPA_PATH = "$HOME/.ladspa:$NIX_USER_PROFILE_DIR/home-manager/home-path/lib/ladspa:/run/current-system/sw/lib/ladspa";
|
||||||
|
LV2_PATH = "$HOME/.lv2:$NIX_USER_PROFILE_DIR/home-manager/home-path/lib/lv2:/run/current-system/sw/lib/lv2";
|
||||||
|
LXVST_PATH = "$HOME/.lxvst:$NIX_USER_PROFILE_DIR/home-manager/home-path/lib/lxvst:/run/current-system/sw/lib/lxvst";
|
||||||
|
VST_PATH = "$HOME/.vst:$NIX_USER_PROFILE_DIR/home-manager/home-path/lib/vst:/run/current-system/sw/lib/vst";
|
||||||
|
VST3_PATH = "$HOME/.vst3:$NIX_USER_PROFILE_DIR/home-manager/home-path/lib/vst3:/run/current-system/sw/lib/vst3";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
carla
|
||||||
|
rnnoise
|
||||||
|
ardour
|
||||||
|
unstable.zrythm
|
||||||
|
unstable.breeze-icons
|
||||||
|
mixxx
|
||||||
|
|
||||||
|
# Plugins
|
||||||
|
# artyFX
|
||||||
|
autotalent
|
||||||
|
boops
|
||||||
|
unstable.cardinal
|
||||||
|
geonkick
|
||||||
|
helm
|
||||||
|
lsp-plugins
|
||||||
|
# noise-repellent
|
||||||
|
samplv1
|
||||||
|
# speech-denoiser
|
||||||
|
# stochas
|
||||||
|
# sunvox
|
||||||
|
# surge
|
||||||
|
unstable.giada
|
||||||
|
unstable.surge-XT
|
||||||
|
talentedhack
|
||||||
|
tunefish
|
||||||
|
vocproc
|
||||||
|
x42-plugins
|
||||||
|
zita-at1
|
||||||
|
zynaddsubfx
|
||||||
|
zyn-fusion
|
||||||
|
];
|
||||||
|
|
||||||
|
home.sessionVariables = variables;
|
||||||
|
}
|
||||||
|
|
@ -2,8 +2,7 @@
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
jetbrains.pycharm-professional
|
jetbrains.pycharm-professional
|
||||||
|
|
||||||
python3
|
python3
|
||||||
pypy3
|
# pypy3
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
10
home_manager/modules/python.nix
Normal file
10
home_manager/modules/python.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
black
|
||||||
|
] ++ (with pkgs.python3Packages; [
|
||||||
|
python-lsp-server
|
||||||
|
# pyls-black # not updated to the new pylsp
|
||||||
|
pyls-flake8
|
||||||
|
pyls-isort
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
@ -18,7 +18,8 @@
|
||||||
modi: "drun,run,ssh,window";
|
modi: "drun,run,ssh,window";
|
||||||
}
|
}
|
||||||
|
|
||||||
@theme "nord"
|
@theme "onedark"
|
||||||
'';
|
'';
|
||||||
xdg.configFile."rofi/nord.rasi".source = ../configs/rofi/nord.rasi;
|
xdg.configFile."rofi/nord.rasi".source = ../../configs/rofi/nord.rasi;
|
||||||
|
xdg.configFile."rofi/onedark.rasi".source = ../../configs/rofi/onedark.rasi;
|
||||||
}
|
}
|
||||||
10
home_manager/modules/rust.nix
Normal file
10
home_manager/modules/rust.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
bacon
|
||||||
|
cargo
|
||||||
|
clippy
|
||||||
|
rust-analyzer
|
||||||
|
rustfmt
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,19 +1,17 @@
|
||||||
{ pkgs, ... }:
|
{
|
||||||
let
|
home.shellAliases = {
|
||||||
shellAliases = {
|
|
||||||
"dk" = "docker";
|
|
||||||
"dkc" = "docker-compose";
|
"dkc" = "docker-compose";
|
||||||
|
"dk" = "docker";
|
||||||
"hm" = "home-manager";
|
"hm" = "home-manager";
|
||||||
"jc" = "sudo journalctl";
|
"jc" = "sudo journalctl";
|
||||||
"jcu" = "journalctl --user";
|
"jcu" = "journalctl --user";
|
||||||
"nf" = "find /nix/store/ -maxdepth 1 | grep";
|
"nf" = "find /nix/store/ -maxdepth 1 | grep";
|
||||||
"ns" = "nix search github:NixOS/nixpkgs/release-21.11";
|
"nr" = "nix run";
|
||||||
"nS" = "nix-shell";
|
"ns" = "nix search nixpkgs";
|
||||||
|
"nS" = "nix shell";
|
||||||
"sc" = "sudo systemctl";
|
"sc" = "sudo systemctl";
|
||||||
"scu" = "systemctl --user";
|
"scu" = "systemctl --user";
|
||||||
};
|
};
|
||||||
in
|
# programs.bash = { inherit shellAliases; };
|
||||||
{
|
# programs.zsh = { inherit shellAliases; };
|
||||||
programs.bash = { inherit shellAliases; };
|
|
||||||
programs.zsh = { inherit shellAliases; };
|
|
||||||
}
|
}
|
||||||
60
home_manager/modules/sxhkd.nix
Normal file
60
home_manager/modules/sxhkd.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./nautilus.nix ];
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
unstable.kitty
|
||||||
|
lockscreen
|
||||||
|
pamixer
|
||||||
|
playerctl
|
||||||
|
terminator
|
||||||
|
update-background
|
||||||
|
xorg.xbacklight
|
||||||
|
];
|
||||||
|
services.sxhkd =
|
||||||
|
let
|
||||||
|
primaryTerminal = "kitty";
|
||||||
|
secondaryTerminal = "terminator";
|
||||||
|
fileManager = "nautilus";
|
||||||
|
emojiChooser = "rofimoji --skin-tone light -a copy";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
keybindings = {
|
||||||
|
"super + b" = "update-background";
|
||||||
|
"super + alt + {h,j,k,l}" = "bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}";
|
||||||
|
"super + alt + p" = "autorandr -c";
|
||||||
|
"super + alt + {q,r}" = "bspc {quit,wm -r}";
|
||||||
|
"super + alt + shift + {h,j,k,l}" = "bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
|
||||||
|
"super + alt + m" = "lockscreen";
|
||||||
|
"super + bracket{left,right}" = "bspc desktop -f {prev,next}.local";
|
||||||
|
"super + ctrl + {1-9}" = "bspc node -o 0.{1-9}";
|
||||||
|
"super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}";
|
||||||
|
"super + ctrl + {m,x,y,z}" = "bspc node -g {marked,locked,sticky,private}";
|
||||||
|
"super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel";
|
||||||
|
"super + ctrl + space" = "bspc node -p cancel";
|
||||||
|
"super + e" = fileManager;
|
||||||
|
"super + shift + e" = emojiChooser;
|
||||||
|
"super + Escape" = "pkill -USR1 -x sxhkd";
|
||||||
|
"super + g" = "bspc node -s biggest";
|
||||||
|
"super + {grave,Tab}" = "bspc {node,desktop} -f last";
|
||||||
|
"super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}";
|
||||||
|
"super + m" = "bspc desktop -l next";
|
||||||
|
"super + {o,i}" = "bspc wm -h off;bspc node {older,newer} -f;bspc wm -h on";
|
||||||
|
"super + {p,b,comma,period}" = "bspc node -f @{parent,brother,first,second}";
|
||||||
|
"super + {_,shift + } Return" = "{${primaryTerminal} , ${secondaryTerminal}}";
|
||||||
|
"super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} 'focused:^{1-9,10}'";
|
||||||
|
"super + {_,shift + }c" = "bspc node -f {next,prev}.local";
|
||||||
|
"super + {h,j,k,l}" = "dir={west,south,north,east}; bspc node -f $dir || bspc monitor -f $dir";
|
||||||
|
"super + shift + {h,j,k,l}" = ''dir={west,south,north,east}; bspc node -s "$dir.local" --follow || bspc node -m "$dir" --follow'';
|
||||||
|
"super + {_,shift + }w" = "bspc node -{c,k}";
|
||||||
|
"super + {_,shift + }@space " = "rofi -show {drun,run}";
|
||||||
|
"alt + Tab" = "rofi -show window";
|
||||||
|
"super + {t,shift + t,s,f}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}";
|
||||||
|
"super + y" = "bspc node newest.marked.local -n newest.!automatic.local";
|
||||||
|
"{XF86AudioLowerVolume,XF86AudioMute,XF86AudioRaiseVolume}" = "pamixer {-d 2 -u,-t,-i 2 -u} && dunstify -r 1 Volume `pamixer --get-volume-human`";
|
||||||
|
"XF86Audio{Next,Play,Prev}" = "playerctl {next,play-pause,previous}";
|
||||||
|
"super + alt + {Right,Down,Left}" = "playerctl {next,play-pause,previous}";
|
||||||
|
"XF86MonBrightness{Up,Down}" = "xbacklight {+,-}10%";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
strPalette = with pkgs.rice; palette.toRgbHex rec {
|
strPalette = pkgs.lib.rice.palette.toRgbHex rec {
|
||||||
inherit (colorPalette) normal bright dark;
|
inherit (pkgs.rice.colorPalette) normal bright dark;
|
||||||
background = normal.black;
|
background = normal.black;
|
||||||
foreground = normal.white;
|
foreground = normal.white;
|
||||||
};
|
};
|
||||||
8
home_manager/modules/thunar.nix
Normal file
8
home_manager/modules/thunar.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs.xfce; [
|
||||||
|
thunar
|
||||||
|
tumbler
|
||||||
|
xfconf
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,10 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
update_time = "10m";
|
update_time = "10m";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
home.packages = [ pkgs.update-background ];
|
||||||
|
|
||||||
systemd.user.services."update-background" = {
|
systemd.user.services."update-background" = {
|
||||||
Unit = {
|
Unit = {
|
||||||
Description = "Set random desktop background using feh";
|
Description = "Set random desktop background using feh";
|
||||||
|
|
@ -16,7 +18,7 @@ in
|
||||||
Service = {
|
Service = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
IOSchedulingClass = "idle";
|
IOSchedulingClass = "idle";
|
||||||
ExecStart = "${pkgs.update-background}";
|
ExecStart = "${pkgs.update-background}/bin/update-background";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
32
home_manager/modules/webapp.nix
Normal file
32
home_manager/modules/webapp.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
# Categories: https://specifications.freedesktop.org/menu-spec/latest/apa.html#main-category-registry
|
||||||
|
let
|
||||||
|
cmd = link: "google-chrome-stable --app=${link}";
|
||||||
|
links = [
|
||||||
|
{ desktopName = "Google Calendar"; link = "https://google.com/calendar"; categories = [ "Office" ]; }
|
||||||
|
{ desktopName = "Google Keep"; link = "https://keep.google.com"; categories = [ "Office" ]; }
|
||||||
|
{ desktopName = "Monkeytype"; link = "https://monkeytype.com/"; }
|
||||||
|
{ desktopName = "Netflix"; link = "https://www.netflix.com"; categories = [ "AudioVideo" ]; }
|
||||||
|
{ desktopName = "Notion"; link = "https://notion.so"; categories = [ "Office" ]; }
|
||||||
|
{ desktopName = "Prime Video"; link = "https://primevideo.com"; categories = [ "AudioVideo" ]; }
|
||||||
|
{ desktopName = "Protonmail"; link = "https://mail.protonmail.com"; categories = [ "Office" ]; }
|
||||||
|
{ desktopName = "Twitch"; link = "https://www.twitch.tv"; categories = [ "AudioVideo" ]; }
|
||||||
|
{ desktopName = "WhatsApp"; link = "https://web.whatsapp.com/"; }
|
||||||
|
{ desktopName = "YouTube"; link = "https://www.youtube.com"; categories = [ "AudioVideo" ]; }
|
||||||
|
{ desktopName = "Plex"; link = "https://app.plex.tv"; categories = [ "AudioVideo" ]; }
|
||||||
|
];
|
||||||
|
webAppBuilder =
|
||||||
|
{ desktopName
|
||||||
|
, name ? builtins.replaceStrings [ " " ] [ "_" ] desktopName
|
||||||
|
, link
|
||||||
|
, icon ? lib.toLower name
|
||||||
|
, comment ? null
|
||||||
|
, categories ? [ "Network" ]
|
||||||
|
}: pkgs.makeDesktopItem {
|
||||||
|
inherit name icon desktopName comment categories;
|
||||||
|
exec = cmd link;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.packages = map webAppBuilder links;
|
||||||
|
}
|
||||||
|
|
@ -4,7 +4,7 @@ with lib;
|
||||||
|
|
||||||
let
|
let
|
||||||
xscreensaverCmd = "${pkgs.xscreensaver}/bin/xscreensaver-command -activate";
|
xscreensaverCmd = "${pkgs.xscreensaver}/bin/xscreensaver-command -activate";
|
||||||
lockCmd = "${pkgs.lockscreen}";
|
lockCmd = "${pkgs.lockscreen}/bin/lockscreen";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
services.xidlehook = {
|
services.xidlehook = {
|
||||||
|
|
@ -18,7 +18,7 @@ in
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
command = xscreensaverCmd;
|
command = xscreensaverCmd;
|
||||||
delay = 300;
|
delay = 120;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
20
home_manager/modules/zathura.nix
Normal file
20
home_manager/modules/zathura.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
strPalette = pkgs.lib.rice.palette.toRgbHex pkgs.rice.colorPalette;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.zathura = {
|
||||||
|
enable = true;
|
||||||
|
options = {
|
||||||
|
completion-bg = strPalette.bright.black;
|
||||||
|
default-bg = strPalette.normal.black;
|
||||||
|
font = "${pkgs.rice.font.normal.name} 10";
|
||||||
|
inputbar-bg = strPalette.bright.black;
|
||||||
|
inputbar-fg = strPalette.normal.cyan;
|
||||||
|
page-padding = 10;
|
||||||
|
recolor-lightcolor = strPalette.dark.cyan;
|
||||||
|
statusbar-bg = strPalette.bright.black;
|
||||||
|
selection-clipboard = "clipboard";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{
|
||||||
let
|
|
||||||
zoxideCmd = "zoxide";
|
|
||||||
in {
|
|
||||||
programs.zoxide = {
|
programs.zoxide = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
163
home_manager/odin.nix
Normal file
163
home_manager/odin.nix
Normal file
|
|
@ -0,0 +1,163 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
language.base = "it_IT.UTF-8";
|
||||||
|
keyboard = {
|
||||||
|
layout = "it";
|
||||||
|
options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ];
|
||||||
|
};
|
||||||
|
packages = with pkgs; [
|
||||||
|
pulseaudio
|
||||||
|
|
||||||
|
arandr
|
||||||
|
authy
|
||||||
|
bitwarden
|
||||||
|
btop
|
||||||
|
cava
|
||||||
|
unstable.discord
|
||||||
|
docker-compose
|
||||||
|
docker-machine
|
||||||
|
droidcam
|
||||||
|
easyeffects
|
||||||
|
# element-desktop # matrix client
|
||||||
|
# evince
|
||||||
|
evolution
|
||||||
|
file
|
||||||
|
# firefox
|
||||||
|
freecad
|
||||||
|
gallery-dl
|
||||||
|
gnome.eog
|
||||||
|
gnome.file-roller
|
||||||
|
gnome.geary
|
||||||
|
gnome.gnome-calendar
|
||||||
|
gnome.gnome-font-viewer
|
||||||
|
gnome.gnome-screenshot
|
||||||
|
# gnome.gnome-sound-recorder
|
||||||
|
gnome.gnome-sound-recorder
|
||||||
|
# gnome.gnome-sudoku
|
||||||
|
gnome.gnome-sudoku
|
||||||
|
# gnome.gnome-system-monitor
|
||||||
|
# gnome.gnome-tweaks
|
||||||
|
# gnome.nautilus
|
||||||
|
# gnome.quadrapassel
|
||||||
|
# gnome.seahorse
|
||||||
|
# gnome.sushi
|
||||||
|
(google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; })
|
||||||
|
gucharmap
|
||||||
|
handbrake
|
||||||
|
htop
|
||||||
|
httpie
|
||||||
|
# hyperspace-cli
|
||||||
|
inkscape
|
||||||
|
jetbrains.datagrip
|
||||||
|
# keepassxc
|
||||||
|
krita
|
||||||
|
kubectl
|
||||||
|
lutris
|
||||||
|
meld
|
||||||
|
minecraft
|
||||||
|
mmv-go
|
||||||
|
mpv
|
||||||
|
# mycrypto
|
||||||
|
neofetch
|
||||||
|
nixos-option
|
||||||
|
nix-prefetch-scripts
|
||||||
|
nix-tree
|
||||||
|
obsidian
|
||||||
|
openvpn
|
||||||
|
p7zip
|
||||||
|
pavucontrol
|
||||||
|
# pcmanfm
|
||||||
|
pentablet-driver
|
||||||
|
procps
|
||||||
|
# pulseaudio
|
||||||
|
retroarchFull
|
||||||
|
ripgrep
|
||||||
|
signal-desktop
|
||||||
|
skypeforlinux
|
||||||
|
# slack
|
||||||
|
spotify
|
||||||
|
teams
|
||||||
|
tex2nix
|
||||||
|
transmission-gtk
|
||||||
|
unrar
|
||||||
|
# (unstable.blender.override { cudaSupport = true; })
|
||||||
|
unstable.tdesktop
|
||||||
|
unstable.zotero
|
||||||
|
unzip
|
||||||
|
virt-manager
|
||||||
|
wget
|
||||||
|
# wineFull
|
||||||
|
wireguard-tools
|
||||||
|
xclip
|
||||||
|
xournalpp
|
||||||
|
yq
|
||||||
|
zip
|
||||||
|
zoom-us
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services = { gnome-keyring.enable = true; };
|
||||||
|
|
||||||
|
xsession = {
|
||||||
|
enable = true;
|
||||||
|
numlock.enable = true;
|
||||||
|
initExtra = ''
|
||||||
|
## Touchpad
|
||||||
|
${pkgs.xorg.xinput}/bin/xinput set-prop 'DELL0824:00 06CB:7E92 Touchpad' 'libinput Natural Scrolling Enabled' 1
|
||||||
|
${pkgs.xorg.xinput}/bin/xinput set-prop 'DELL0824:00 06CB:7E92 Touchpad' 'libinput Tapping Enabled' 1
|
||||||
|
${pkgs.xorg.xinput}/bin/xinput set-prop 'DELL0824:00 06CB:7E92 Touchpad' 'libinput Disable While Typing Enabled' 1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./basic_env.nix
|
||||||
|
|
||||||
|
./modules/cpp.nix
|
||||||
|
# ./modules/go.nix
|
||||||
|
./modules/java.nix
|
||||||
|
./modules/javascript.nix
|
||||||
|
./modules/latex.nix
|
||||||
|
./modules/python.nix
|
||||||
|
./modules/rust.nix
|
||||||
|
|
||||||
|
./modules/alacritty.nix
|
||||||
|
./modules/autorandr.nix
|
||||||
|
./modules/bspwm.nix
|
||||||
|
./modules/easyeffects.nix
|
||||||
|
./modules/dunst.nix
|
||||||
|
# ./modules/grobi.nix
|
||||||
|
./modules/gtk_theme.nix
|
||||||
|
./modules/helix.nix
|
||||||
|
# ./modules/joystickwake.nix
|
||||||
|
./modules/kakoune.nix
|
||||||
|
# ./modules/keepassxc.nix
|
||||||
|
./modules/kitty.nix
|
||||||
|
./modules/libinput-gestures.nix
|
||||||
|
./modules/mangohud.nix
|
||||||
|
./modules/megasync.nix
|
||||||
|
./modules/nautilus.nix
|
||||||
|
./modules/nix-index.nix
|
||||||
|
./modules/noti.nix
|
||||||
|
./modules/obs-studio.nix
|
||||||
|
./modules/office.nix
|
||||||
|
./modules/onedrive.nix
|
||||||
|
./modules/pass.nix
|
||||||
|
./modules/picom.nix
|
||||||
|
./modules/polybar.nix
|
||||||
|
./modules/pro_audio.nix
|
||||||
|
# ./modules/pycharm.nix
|
||||||
|
./modules/rofimoji.nix
|
||||||
|
./modules/rofi.nix
|
||||||
|
./modules/screen_locker.nix
|
||||||
|
# ./modules/security.nix
|
||||||
|
./modules/sxhkd.nix
|
||||||
|
./modules/syncthing.nix
|
||||||
|
./modules/terminator.nix
|
||||||
|
# ./modules/thunar.nix
|
||||||
|
./modules/update_background.nix
|
||||||
|
./modules/webapp.nix
|
||||||
|
./modules/xidlehook.nix
|
||||||
|
./modules/zathura.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
133
home_manager/thor.nix
Normal file
133
home_manager/thor.nix
Normal file
|
|
@ -0,0 +1,133 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
language.base = "it_IT.UTF-8";
|
||||||
|
keyboard = {
|
||||||
|
layout = "en";
|
||||||
|
options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ];
|
||||||
|
};
|
||||||
|
packages = with pkgs; [
|
||||||
|
pulseaudio
|
||||||
|
|
||||||
|
arandr
|
||||||
|
authy
|
||||||
|
bitwarden
|
||||||
|
btop
|
||||||
|
catgirl # IRC
|
||||||
|
cava
|
||||||
|
discord
|
||||||
|
docker-compose
|
||||||
|
docker-machine
|
||||||
|
droidcam
|
||||||
|
easyeffects
|
||||||
|
# electrum
|
||||||
|
# element-desktop # matrix client
|
||||||
|
evolution
|
||||||
|
filelight
|
||||||
|
# firefox
|
||||||
|
freecad
|
||||||
|
gallery-dl
|
||||||
|
gnome.file-roller
|
||||||
|
gnome.gnome-font-viewer
|
||||||
|
gnome.geary
|
||||||
|
gnome.gnome-calendar
|
||||||
|
gnome.gnome-screenshot
|
||||||
|
gnome.gnome-sound-recorder
|
||||||
|
# gnome.gnome-system-monitor
|
||||||
|
(google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; })
|
||||||
|
gucharmap
|
||||||
|
handbrake
|
||||||
|
httpie
|
||||||
|
hyperspace-cli
|
||||||
|
inkscape
|
||||||
|
jetbrains.datagrip
|
||||||
|
krita
|
||||||
|
kubectl
|
||||||
|
lutris
|
||||||
|
meld
|
||||||
|
minecraft
|
||||||
|
mpv
|
||||||
|
mycrypto
|
||||||
|
nix-prefetch-scripts
|
||||||
|
obsidian
|
||||||
|
okular
|
||||||
|
openvpn
|
||||||
|
p7zip
|
||||||
|
pavucontrol
|
||||||
|
pcmanfm
|
||||||
|
pentablet-driver
|
||||||
|
procps
|
||||||
|
# pulseaudio
|
||||||
|
retroarchFull
|
||||||
|
ripgrep
|
||||||
|
shotwell
|
||||||
|
signal-desktop
|
||||||
|
skypeforlinux
|
||||||
|
# slack
|
||||||
|
spotify
|
||||||
|
tdesktop
|
||||||
|
teams
|
||||||
|
transmission-gtk
|
||||||
|
(unstable.blender.override { cudaSupport = true; })
|
||||||
|
unstable.zotero
|
||||||
|
virt-manager
|
||||||
|
# wineFull
|
||||||
|
wireguard-tools
|
||||||
|
xournalpp
|
||||||
|
zoom-us
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
gnome-keyring.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./basic_env.nix
|
||||||
|
|
||||||
|
./modules/cpp.nix
|
||||||
|
# ./modules/go.nix
|
||||||
|
./modules/java.nix
|
||||||
|
./modules/javascript.nix
|
||||||
|
./modules/latex.nix
|
||||||
|
./modules/python.nix
|
||||||
|
./modules/rust.nix
|
||||||
|
|
||||||
|
./modules/alacritty.nix
|
||||||
|
./modules/autorandr.nix
|
||||||
|
./modules/bspwm.nix
|
||||||
|
./modules/easyeffects.nix
|
||||||
|
./modules/dunst.nix
|
||||||
|
# ./modules/grobi.nix
|
||||||
|
./modules/gtk_theme.nix
|
||||||
|
./modules/helix.nix
|
||||||
|
# ./modules/joystickwake.nix
|
||||||
|
./modules/kakoune.nix
|
||||||
|
# ./modules/keepassxc.nix
|
||||||
|
./modules/kitty.nix
|
||||||
|
./modules/mangohud.nix
|
||||||
|
./modules/megasync.nix
|
||||||
|
./modules/nautilus.nix
|
||||||
|
./modules/nix-index.nix
|
||||||
|
./modules/noti.nix
|
||||||
|
./modules/obs-studio.nix
|
||||||
|
./modules/office.nix
|
||||||
|
./modules/onedrive.nix
|
||||||
|
./modules/pass.nix
|
||||||
|
./modules/picom.nix
|
||||||
|
./modules/polybar.nix
|
||||||
|
./modules/pro_audio.nix
|
||||||
|
./modules/rofimoji.nix
|
||||||
|
./modules/rofi.nix
|
||||||
|
./modules/screen_locker.nix
|
||||||
|
# ./modules/security.nix
|
||||||
|
./modules/sxhkd.nix
|
||||||
|
./modules/syncthing.nix
|
||||||
|
./modules/terminator.nix
|
||||||
|
# ./modules/thunar.nix
|
||||||
|
./modules/update_background.nix
|
||||||
|
./modules/webapp.nix
|
||||||
|
./modules/xidlehook.nix
|
||||||
|
./modules/zathura.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,47 +1,36 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
with lib;
|
||||||
{
|
{
|
||||||
imports = [
|
boot = {
|
||||||
/etc/nixos/hardware-configuration.nix
|
binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
|
||||||
];
|
kernelPackages = pkgs.linuxPackages_5_18;
|
||||||
|
loader = {
|
||||||
boot.loader = {
|
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
|
||||||
hostName = "loki";
|
|
||||||
networkmanager.enable = true;
|
|
||||||
useDHCP = false;
|
|
||||||
interfaces = { eno1.useDHCP = true; wlp7s0.useDHCP = true; };
|
|
||||||
};
|
};
|
||||||
|
|
||||||
time.timeZone = "Europe/Rome";
|
|
||||||
|
|
||||||
i18n.defaultLocale = "it_IT.UTF-8";
|
|
||||||
console = {
|
console = {
|
||||||
font = "Lat2-Terminus16";
|
font = "Lat2-Terminus16";
|
||||||
keyMap = "it";
|
keyMap = "it";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver = {
|
environment = {
|
||||||
enable = true;
|
pathsToLink = [ "/share/zsh" ];
|
||||||
videoDrivers = [ "nvidia" ];
|
systemPackages = with pkgs; [ kakoune tmux vim ];
|
||||||
layout = "it";
|
|
||||||
xkbOptions = "eurosign:e;";
|
|
||||||
libinput.enable = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
|
enableRedistributableFirmware = true;
|
||||||
|
|
||||||
nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
|
nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
|
||||||
nvidia.prime = {
|
# nvidia.nvidiaPersistenced = true; # HEADLESS
|
||||||
offload.enable = false;
|
# nvidia.prime = {
|
||||||
sync.enable = true;
|
# offload.enable = false;
|
||||||
intelBusId = "PCI:0:2:0";
|
# sync.enable = true;
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
# intelBusId = "PCI:0:2:0";
|
||||||
};
|
# nvidiaBusId = "PCI:1:0:0";
|
||||||
|
# };
|
||||||
|
|
||||||
opengl = {
|
opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -51,24 +40,22 @@
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users = {
|
i18n.defaultLocale = "it_IT.UTF-8";
|
||||||
bertof = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "audio" "input" "docker" "libvirtd" "network" "usb" "video" "wheel" ];
|
|
||||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN+zsSWZFFzQKnATCAvtG+iuSm4qkZHjCtHzGa9B/71W" ];
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
};
|
|
||||||
tiziano = {
|
|
||||||
isNormalUser = true;
|
|
||||||
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMExwtJFk6HjySrTZwJH67SOHC3hlL28NO4oe2GXsv6k" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
dconf.enable = true;
|
||||||
gnupg.agent = { enable = true; enableSSHSupport = true; };
|
gnupg.agent = { enable = true; enableSSHSupport = true; };
|
||||||
zsh = { enable = true; syntaxHighlighting.enable = true; };
|
zsh = { enable = true; syntaxHighlighting.enable = true; };
|
||||||
};
|
};
|
||||||
environment.pathsToLink = [ "/share/zsh" ];
|
|
||||||
|
networking = {
|
||||||
|
hostName = "loki";
|
||||||
|
interfaces = { eno1.useDHCP = true; wlp7s0.useDHCP = true; };
|
||||||
|
networkmanager.enable = true;
|
||||||
|
useDHCP = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Rome";
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
avahi = {
|
avahi = {
|
||||||
|
|
@ -84,42 +71,23 @@
|
||||||
};
|
};
|
||||||
extraServiceFiles = {
|
extraServiceFiles = {
|
||||||
ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
|
ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
|
||||||
smb = ''<?xml version="1.0" standalone='no'?><!--*-nxml-*--><!DOCTYPE service-group SYSTEM "avahi-service.dtd"><service-group><name replace-wildcards="yes">%h</name><service><type>_smb._tcp</type><port>445</port></service></service-group>'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
bazarr = {
|
bazarr = { enable = true; openFirewall = true; group = "users"; };
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
group = "users";
|
|
||||||
};
|
|
||||||
blueman.enable = true;
|
blueman.enable = true;
|
||||||
dbus.packages = with pkgs; [ gnome.dconf ];
|
dbus.packages = with pkgs; [ dconf ];
|
||||||
fail2ban = { enable = true; bantime-increment.enable = true; };
|
fail2ban = { enable = true; bantime-increment.enable = true; };
|
||||||
gnome.gnome-keyring.enable = true;
|
gnome.gnome-keyring.enable = true;
|
||||||
gvfs = { enable = true; package = lib.mkForce pkgs.gnome3.gvfs; };
|
gvfs = { enable = true; package = mkForce pkgs.gnome3.gvfs; };
|
||||||
jackett = {
|
jackett = { enable = true; openFirewall = true; group = "users"; };
|
||||||
enable = true;
|
jellyfin = { enable = true; openFirewall = true; group = "users"; };
|
||||||
openFirewall = true;
|
|
||||||
group = "users";
|
|
||||||
};
|
|
||||||
logind.lidSwitch = "ignore";
|
logind.lidSwitch = "ignore";
|
||||||
node-red = {
|
node-red = { enable = true; openFirewall = true; withNpmAndGcc = true; };
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
withNpmAndGcc = true;
|
|
||||||
};
|
|
||||||
openssh = { enable = true; openFirewall = true; permitRootLogin = "no"; passwordAuthentication = false; };
|
openssh = { enable = true; openFirewall = true; permitRootLogin = "no"; passwordAuthentication = false; };
|
||||||
plex = { enable = true; openFirewall = true; group = "users"; };
|
plex = { enable = true; openFirewall = true; group = "users"; };
|
||||||
power-profiles-daemon.enable = true;
|
power-profiles-daemon.enable = true;
|
||||||
radarr = {
|
radarr = { enable = true; openFirewall = true; group = "users"; };
|
||||||
enable = true;
|
samba-wsdd = { enable = true; discovery = true; };
|
||||||
openFirewall = true;
|
|
||||||
group = "users";
|
|
||||||
};
|
|
||||||
samba-wsdd = {
|
|
||||||
enable = true;
|
|
||||||
discovery = true;
|
|
||||||
};
|
|
||||||
samba = {
|
samba = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableNmbd = true;
|
enableNmbd = true;
|
||||||
|
|
@ -141,20 +109,20 @@
|
||||||
"force group" = "users";
|
"force group" = "users";
|
||||||
}; in
|
}; in
|
||||||
{
|
{
|
||||||
bertof = common // {
|
bertof = recursiveUpdate common {
|
||||||
path = "/mnt/raid/bertof";
|
path = "/mnt/raid0/bertof";
|
||||||
comment = "Bertof samba share";
|
comment = "Bertof samba share";
|
||||||
"force user" = "bertof";
|
"force user" = "bertof";
|
||||||
"valid users" = "bertof";
|
"valid users" = "bertof";
|
||||||
};
|
};
|
||||||
tiziano = common // {
|
tiziano = recursiveUpdate common {
|
||||||
path = "/mnt/raid/tiziano";
|
path = "/mnt/raid0/tiziano";
|
||||||
comment = "Tiziano samba share";
|
comment = "Tiziano samba share";
|
||||||
"force user" = "tiziano";
|
"force user" = "tiziano";
|
||||||
"valid users" = "tiziano";
|
"valid users" = "tiziano";
|
||||||
};
|
};
|
||||||
condiviso = common // {
|
condiviso = recursiveUpdate common {
|
||||||
path = "/mnt/raid/condiviso";
|
path = "/mnt/raid0/condiviso";
|
||||||
comment = "Samba share condiviso";
|
comment = "Samba share condiviso";
|
||||||
"valid users" = "bertof tiziano";
|
"valid users" = "bertof tiziano";
|
||||||
"create mask" = "0770";
|
"create mask" = "0770";
|
||||||
|
|
@ -162,19 +130,19 @@
|
||||||
"force create mode" = "0660";
|
"force create mode" = "0660";
|
||||||
"force directory mode" = "2770";
|
"force directory mode" = "2770";
|
||||||
};
|
};
|
||||||
bertof_safe = common // {
|
bertof_safe = recursiveUpdate common {
|
||||||
path = "/mnt/raid1/bertof";
|
path = "/mnt/raid1/bertof";
|
||||||
comment = "Bertof samba share";
|
comment = "Bertof samba share";
|
||||||
"force user" = "bertof";
|
"force user" = "bertof";
|
||||||
"valid users" = "bertof";
|
"valid users" = "bertof";
|
||||||
};
|
};
|
||||||
tiziano_safe = common // {
|
tiziano_safe = recursiveUpdate common {
|
||||||
path = "/mnt/raid1/tiziano";
|
path = "/mnt/raid1/tiziano";
|
||||||
comment = "Tiziano samba share";
|
comment = "Tiziano samba share";
|
||||||
"force user" = "tiziano";
|
"force user" = "tiziano";
|
||||||
"valid users" = "tiziano";
|
"valid users" = "tiziano";
|
||||||
};
|
};
|
||||||
condiviso_safe = common // {
|
condiviso_safe = recursiveUpdate common {
|
||||||
path = "/mnt/raid1/condiviso";
|
path = "/mnt/raid1/condiviso";
|
||||||
comment = "Samba share condiviso";
|
comment = "Samba share condiviso";
|
||||||
"valid users" = "bertof tiziano";
|
"valid users" = "bertof tiziano";
|
||||||
|
|
@ -186,49 +154,103 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
smartd = { enable = true; notifications.x11.enable = true; };
|
smartd = { enable = true; notifications.x11.enable = true; };
|
||||||
sonarr = {
|
sonarr = { enable = true; openFirewall = true; group = "users"; };
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
group = "users";
|
|
||||||
};
|
|
||||||
thermald.enable = true;
|
thermald.enable = true;
|
||||||
transmission = {
|
transmission = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
group = "users";
|
group = "users";
|
||||||
settings = {
|
settings = {
|
||||||
download-dir = "/mnt/raid/condiviso/Scaricati/Torrent";
|
download-dir = "/mnt/raid0/condiviso/Scaricati/Torrent";
|
||||||
incomplete-dir = "/mnt/raid/condiviso/Scaricati/Torrent/.incomplete";
|
incomplete-dir = "/mnt/raid0/condiviso/Scaricati/Torrent/.incomplete";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
xserver = {
|
||||||
|
# enable = true;
|
||||||
|
videoDrivers = [ "nvidia" ];
|
||||||
|
# layout = "it";
|
||||||
|
# xkbOptions = "eurosign:e;";
|
||||||
|
# libinput.enable = true;
|
||||||
|
};
|
||||||
zerotierone = { enable = true; joinNetworks = [ "8056c2e21cf9c753" ]; };
|
zerotierone = { enable = true; joinNetworks = [ "8056c2e21cf9c753" ]; };
|
||||||
|
|
||||||
|
zoneminder = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
cameras = 3;
|
||||||
|
hostname = "0.0.0.0";
|
||||||
|
database = { username = "zoneminder"; createLocally = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.snapper = {
|
mysql = {
|
||||||
# configs =
|
# enable = true;
|
||||||
# let
|
ensureUsers = [{ name = "bertof"; ensurePermissions = { "*.*" = "ALL PRIVILEGES"; }; }];
|
||||||
# bertofExtraConfig = ''
|
};
|
||||||
# ALLOW_USERS="bertof"
|
};
|
||||||
# TIMELINE_CREATE=yes
|
|
||||||
# TIMELINE_CLEANUP=yes
|
users.users = {
|
||||||
# '';
|
bertof = {
|
||||||
# common = { extraConfig = bertofExtraConfig; };
|
isNormalUser = true;
|
||||||
# in
|
extraGroups = [ "audio" "input" "docker" "libvirtd" "network" "usb" "video" "wheel" ];
|
||||||
# {
|
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN+zsSWZFFzQKnATCAvtG+iuSm4qkZHjCtHzGa9B/71W" ];
|
||||||
# bertof_home = common // { subvolume = "/home/bertof"; };
|
shell = pkgs.zsh;
|
||||||
# };
|
};
|
||||||
# };
|
tiziano = {
|
||||||
|
isNormalUser = true;
|
||||||
|
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMExwtJFk6HjySrTZwJH67SOHC3hlL28NO4oe2GXsv6k" ];
|
||||||
|
};
|
||||||
|
jellyfin.extraGroups = [ "video" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.snapper = {
|
||||||
|
configs =
|
||||||
|
let
|
||||||
|
commonExtraConfig = ''
|
||||||
|
ALLOW_USERS="bertof"
|
||||||
|
TIMELINE_CREATE=yes
|
||||||
|
TIMELINE_CLEANUP=yes
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
bertof_raid0 = {
|
||||||
|
subvolume = "/mnt/raid0/bertof";
|
||||||
|
extraConfig = ''
|
||||||
|
ALLOW_USERS="bertof"
|
||||||
|
${commonExtraConfig}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
tiziano_raid0 = {
|
||||||
|
subvolume = "/mnt/raid0/tiziano";
|
||||||
|
extraConfig = ''
|
||||||
|
ALLOW_USERS="tiziano"
|
||||||
|
${commonExtraConfig}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
condiviso_raid0 = {
|
||||||
|
subvolume = "/mnt/raid0/condiviso";
|
||||||
|
extraConfig = ''
|
||||||
|
ALLOW_USERS="bertof tiziano"
|
||||||
|
${commonExtraConfig}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
systemd.packages = with pkgs; [ syncthing ];
|
systemd.packages = with pkgs; [ syncthing ];
|
||||||
systemd.services = let common = {
|
systemd.services = let common = {
|
||||||
|
documentation = [ "man:syncthing(1)" ];
|
||||||
|
startLimitIntervalSec = 60;
|
||||||
|
startLimitBurst = 4;
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
environment = { STNORESTART = "yes"; STNOUPGRADE = "yes"; };
|
environment = { STNORESTART = "yes"; STNOUPGRADE = "yes"; };
|
||||||
wantedBy = [ "default.target" ];
|
wantedBy = [ "default.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
SuccessExitStatus = "2 3 4";
|
RestartSec = 1;
|
||||||
|
SuccessExitStatus = "3 4";
|
||||||
RestartForceExitStatus = "3 4";
|
RestartForceExitStatus = "3 4";
|
||||||
|
|
||||||
Group = config.ids.gids.users;
|
Group = config.ids.gids.users;
|
||||||
MemoryDenyWriteExecute = true;
|
MemoryDenyWriteExecute = true;
|
||||||
NoNewPrivileges = true;
|
NoNewPrivileges = true;
|
||||||
|
|
@ -247,13 +269,13 @@
|
||||||
};
|
};
|
||||||
}; in
|
}; in
|
||||||
{
|
{
|
||||||
syncthing-bertof = common // {
|
syncthing-bertof = recursiveUpdate common {
|
||||||
description = "Syncthing service bertof";
|
description = "Syncthing service bertof";
|
||||||
serviceConfig = { User = "bertof"; ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -gui-address=0.0.0.0:8384 -home=/mnt/raid/bertof/Syncthing/.config"; };
|
serviceConfig = { User = "bertof"; ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -gui-address=0.0.0.0:8384 -home=/mnt/raid0/bertof/Syncthing/.config"; };
|
||||||
};
|
};
|
||||||
syncthing-tiziano = common // {
|
syncthing-tiziano = recursiveUpdate common {
|
||||||
description = "Syncthing service tiziano";
|
description = "Syncthing service tiziano";
|
||||||
serviceConfig = { User = "tiziano"; ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -gui-address=0.0.0.0:8385 -home=/mnt/raid/tiziano/Syncthing/.config"; };
|
serviceConfig = { User = "tiziano"; ExecStart = "${pkgs.syncthing}/bin/syncthing -no-browser -gui-address=0.0.0.0:8385 -home=/mnt/raid0/tiziano/Syncthing/.config"; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -281,7 +303,7 @@
|
||||||
kvmgt.enable = true;
|
kvmgt.enable = true;
|
||||||
libvirtd.enable = true;
|
libvirtd.enable = true;
|
||||||
podman.enable = true;
|
podman.enable = true;
|
||||||
virtualbox.host.enable = true;
|
# virtualbox.host.enable = true;
|
||||||
|
|
||||||
oci-containers.containers = {
|
oci-containers.containers = {
|
||||||
hass = {
|
hass = {
|
||||||
|
|
@ -293,13 +315,12 @@
|
||||||
ports = [ "8123:8123" ];
|
ports = [ "8123:8123" ];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/var/lib/hass:/config"
|
"/var/lib/hass:/config"
|
||||||
"/mnt/raid/condiviso:/media"
|
"/mnt/raid0/condiviso:/media"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [ htop kakoune vim tmux ];
|
|
||||||
|
|
||||||
security.sudo.extraConfig = ''
|
security.sudo.extraConfig = ''
|
||||||
Defaults pwfeedback
|
Defaults pwfeedback
|
||||||
|
|
@ -308,7 +329,7 @@
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nix = {
|
nix = {
|
||||||
package = pkgs.nixFlakes;
|
package = pkgs.nixFlakes;
|
||||||
extraOptions = lib.optionalString (config.nix.package == pkgs.nixFlakes)
|
extraOptions = optionalString (config.nix.package == pkgs.nixFlakes)
|
||||||
"experimental-features = nix-command flakes";
|
"experimental-features = nix-command flakes";
|
||||||
gc.automatic = true;
|
gc.automatic = true;
|
||||||
};
|
};
|
||||||
83
loki/hardware-configuration.nix
Normal file
83
loki/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,83 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, modulesPath, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "uas" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/44c53e75-a00d-47bc-a99b-2544fe513e51";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/8A71-E5EB";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/raid1" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/c84a38dc-9cc7-4762-b509-8fce1c1d95c8";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/lib/docker/btrfs" =
|
||||||
|
{
|
||||||
|
device = "/var/lib/docker/btrfs";
|
||||||
|
fsType = "none";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/raid0/bertof" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@bertof" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/raid0/tiziano" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@tiziano" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/raid0/condiviso" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@condiviso" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/zoneminder" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@zoneminder" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault false;
|
||||||
|
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
|
||||||
|
networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{ pkgs, lib, ... }:
|
|
||||||
let
|
|
||||||
tomlGenerate = (pkgs.formats.toml {}).generate "bottom-toml";
|
|
||||||
in {
|
|
||||||
home.packages = with pkgs; [ bottom ];
|
|
||||||
xdg.configFile."bottom/bottom.toml".source = tomlGenerate {
|
|
||||||
"flags" = {
|
|
||||||
"left_legend" = true;
|
|
||||||
"color" = "nord";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
programs.broot = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,74 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
let
|
|
||||||
monitorPages = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX" "X" ];
|
|
||||||
strPalette = pkgs.rice.palette.toRGBHex pkgs.rice.colorPalette;
|
|
||||||
xrandr = "${pkgs.xorg.xrandr}/bin/xrandr";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
xsession.windowManager.bspwm = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
border_width = 2;
|
|
||||||
border_radius = 8;
|
|
||||||
window_gap = 4;
|
|
||||||
split_ratio = 0.5;
|
|
||||||
top_padding = 0;
|
|
||||||
borderless_monocle = true;
|
|
||||||
gapless_monocle = false;
|
|
||||||
normal_border_color = strPalette.normal.blue;
|
|
||||||
focused_border_color = strPalette.bright.blue;
|
|
||||||
};
|
|
||||||
monitors = {
|
|
||||||
# Intel
|
|
||||||
"eDP1" = monitorPages;
|
|
||||||
"DP1" = monitorPages;
|
|
||||||
|
|
||||||
# Nvidia
|
|
||||||
"eDP-1-1" = monitorPages;
|
|
||||||
"HDMI-0" = monitorPages;
|
|
||||||
"DP-1-1" = monitorPages;
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
|
||||||
${pkgs.wmname}/bin/wmname LG3D
|
|
||||||
${pkgs.polybar}/bin/polybar-msg cmd restart
|
|
||||||
|
|
||||||
if grep DP-1-1 <(${xrandr} --listactivemonitors); then
|
|
||||||
${xrandr} --output DP-1-1 --auto --left-of HDMI-0 --rotate right ||
|
|
||||||
${xrandr} --output DP-1-1 --auto --left-of eDP-1-1 --rotate right
|
|
||||||
elif grep DP1 <(${xrandr} --listactivemonitors); then
|
|
||||||
${xrandr} --output DP-1-1 --auto --above eDP1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
systemctl --user restart polybar.service update-background.service || true
|
|
||||||
'';
|
|
||||||
startupPrograms = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
# xdg.configFile."bspwm/bspwmrc" = {
|
|
||||||
# executable = true;
|
|
||||||
# text = ''
|
|
||||||
# #!/bin/sh
|
|
||||||
|
|
||||||
# bspc monitor DP1 -d I II III IV V VI VII VIII IX X
|
|
||||||
# bspc monitor HDMI-0 -d I II III IV V VI VII VIII IX X
|
|
||||||
# bspc monitor eDP-1-1 -d I II III IV V VI VII VIII IX X
|
|
||||||
# bspc monitor eDP1 -d I II III IV V VI VII VIII IX X
|
|
||||||
# bspc config border_radius 8
|
|
||||||
# bspc config border_width 2
|
|
||||||
# bspc config borderless_monocle true
|
|
||||||
# bspc config focused_border_color '#678EBD'
|
|
||||||
# bspc config gapless_monocle false
|
|
||||||
# bspc config normal_border_color '#5E81AC'
|
|
||||||
# bspc config split_ratio 0.500000
|
|
||||||
# bspc config top_padding 0
|
|
||||||
# bspc config window_gap 4
|
|
||||||
# # java gui fixes
|
|
||||||
# export _JAVA_AWT_WM_NONREPARENTING=1
|
|
||||||
# bspc rule -a sun-awt-X11-XDialogPeer state=floating
|
|
||||||
|
|
||||||
# sleep 2
|
|
||||||
# polybar-msg cmd restart
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{
|
|
||||||
programs.dircolors = {
|
|
||||||
enable = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
programs.fzf = {
|
|
||||||
enable = true;
|
|
||||||
tmux.enableShellIntegration = true;
|
|
||||||
enableBashIntegration = true;
|
|
||||||
enableZshIntegration = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
{
|
|
||||||
programs.go = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,14 +0,0 @@
|
||||||
{
|
|
||||||
programs.gpg = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.gpg-agent = {
|
|
||||||
enable = true;
|
|
||||||
defaultCacheTtl = 600;
|
|
||||||
# extraConfig = "allow-loopback-pinentry";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
{ pkgs, ...}:
|
|
||||||
{
|
|
||||||
programs.java.enable = pkgs.devEnvironment.enableJava ? false;
|
|
||||||
}
|
|
||||||
|
|
@ -1,473 +0,0 @@
|
||||||
{ config, lib, pkgs, ... }:
|
|
||||||
let
|
|
||||||
strPalette = with pkgs.rice;
|
|
||||||
palette.toRgbShortHex colorPalette;
|
|
||||||
packages = with pkgs;
|
|
||||||
[
|
|
||||||
(pkgs.makeDesktopItem
|
|
||||||
{
|
|
||||||
name = "kakoune";
|
|
||||||
exec = "kak %U";
|
|
||||||
icon = "kakoune";
|
|
||||||
desktopName = "Kakoune";
|
|
||||||
comment = "Kakoune text editor";
|
|
||||||
terminal = true;
|
|
||||||
categories = [ "Development" ];
|
|
||||||
})
|
|
||||||
] ++ [
|
|
||||||
# editorconfig-core-c
|
|
||||||
python3.pkgs.editorconfig
|
|
||||||
] ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableCpp) [
|
|
||||||
clang-tools
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableData) [
|
|
||||||
yaml-language-server
|
|
||||||
nodePackages.vscode-langservers-extracted
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableHtml) [
|
|
||||||
nodePackages.vscode-langservers-extracted
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableJavascript) [
|
|
||||||
flow
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableLatex) [
|
|
||||||
texlab
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableNix) [
|
|
||||||
rnix-lsp
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
with python3.pkgs;
|
|
||||||
lib.optionals (pkgs.devEnvironment.enablePython) [
|
|
||||||
black
|
|
||||||
# pyls-black
|
|
||||||
pyls-flake8
|
|
||||||
pyls-isort
|
|
||||||
# pyls-mypy
|
|
||||||
python-lsp-server
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableRust) [
|
|
||||||
cargo
|
|
||||||
cargo-watch
|
|
||||||
clippy
|
|
||||||
rust-analyzer
|
|
||||||
rustc
|
|
||||||
rustfmt
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableShell) [
|
|
||||||
nodePackages.bash-language-server
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableSpelling) [
|
|
||||||
aspell
|
|
||||||
aspellDicts.en
|
|
||||||
aspellDicts.en-computers
|
|
||||||
aspellDicts.en-science
|
|
||||||
aspellDicts.it
|
|
||||||
]
|
|
||||||
);
|
|
||||||
plugins = with pkgs;
|
|
||||||
[
|
|
||||||
kakounePlugins.prelude-kak
|
|
||||||
kakounePlugins.kak-lsp
|
|
||||||
kakounePlugins.auto-pairs-kak
|
|
||||||
kakounePlugins.powerline-kak
|
|
||||||
kakounePlugins.connect-kak
|
|
||||||
];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "kak";
|
|
||||||
VISUAL = "kak";
|
|
||||||
};
|
|
||||||
programs.bash.shellAliases = {
|
|
||||||
k = "kak";
|
|
||||||
};
|
|
||||||
programs.zsh.shellAliases = {
|
|
||||||
k = "kak";
|
|
||||||
};
|
|
||||||
home.packages = packages;
|
|
||||||
programs.kakoune = {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
colorScheme = "nord";
|
|
||||||
tabStop = 2;
|
|
||||||
indentWidth = 2;
|
|
||||||
alignWithTabs = true;
|
|
||||||
scrollOff = {
|
|
||||||
lines = 5;
|
|
||||||
columns = 3;
|
|
||||||
};
|
|
||||||
ui = {
|
|
||||||
setTitle = true;
|
|
||||||
changeColors = true;
|
|
||||||
enableMouse = true;
|
|
||||||
};
|
|
||||||
wrapLines = {
|
|
||||||
enable = true;
|
|
||||||
word = true;
|
|
||||||
};
|
|
||||||
numberLines = {
|
|
||||||
enable = true;
|
|
||||||
highlightCursor = true;
|
|
||||||
};
|
|
||||||
keyMappings = with pkgs;
|
|
||||||
[
|
|
||||||
{
|
|
||||||
mode = "normal";
|
|
||||||
docstring = "Edit file";
|
|
||||||
key = "<c-e>";
|
|
||||||
effect = ":edit<space>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Code actions";
|
|
||||||
key = "a";
|
|
||||||
effect = ":lsp-code-actions<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Comment block";
|
|
||||||
key = "b";
|
|
||||||
effect = ":comment-block<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Comment line";
|
|
||||||
key = "l";
|
|
||||||
effect = ":comment-line<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Copy to clipboard";
|
|
||||||
key = "y";
|
|
||||||
effect = "<a-|>${xclip}/bin/xclip -i -selection clipboard<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Format code with formatter";
|
|
||||||
key = "f";
|
|
||||||
effect = ":format<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Format code with LSP";
|
|
||||||
key = "F";
|
|
||||||
effect = ":lsp-formatting-sync<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Jump to definition";
|
|
||||||
key = "d";
|
|
||||||
effect = ":lsp-definition<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Rename object";
|
|
||||||
key = "r";
|
|
||||||
effect = ":lsp-rename-prompt<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Jump to type definition";
|
|
||||||
key = "t";
|
|
||||||
effect = ":lsp-type-definition<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "List project diagnostics";
|
|
||||||
key = "i";
|
|
||||||
effect = ":lsp-diagnostics<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Paste from clipboard (after)";
|
|
||||||
key = "P";
|
|
||||||
effect = "<a-!>${xclip}/bin/xclip -selection clipboard -o<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Paste from clipboard (before)";
|
|
||||||
key = "p";
|
|
||||||
effect = "!${xclip}/bin/xclip -selection clipboard -o<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Show hover info";
|
|
||||||
key = "q";
|
|
||||||
effect = ":lsp-hover<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Spellcheck English";
|
|
||||||
key = "S";
|
|
||||||
effect = ":spell en<ret>";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "user";
|
|
||||||
docstring = "Spellcheck";
|
|
||||||
key = "s";
|
|
||||||
effect = ":spell ";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
mode = "normal";
|
|
||||||
docstring = "Try next snippet placeholder";
|
|
||||||
key = "<c-n>";
|
|
||||||
effect = "<a-;>: insert-c-n<ret>";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# mode = "normal";
|
|
||||||
# docstring = "Search";
|
|
||||||
# key = "/";
|
|
||||||
# effect = "/(?i)";
|
|
||||||
# }
|
|
||||||
# {
|
|
||||||
# mode = "normal";
|
|
||||||
# docstring = "Reverse search";
|
|
||||||
# key = "<a-/>";
|
|
||||||
# effect = "<a-/>(?i)";
|
|
||||||
# }
|
|
||||||
];
|
|
||||||
hooks = with pkgs;
|
|
||||||
[
|
|
||||||
{
|
|
||||||
name = "BufCreate";
|
|
||||||
option = ".*";
|
|
||||||
commands = "editorconfig-load";
|
|
||||||
}
|
|
||||||
# {
|
|
||||||
# name = "ModuleLoaded";
|
|
||||||
# option = "auto-pairs";
|
|
||||||
# commands = "auto-pairs-enable";
|
|
||||||
# }
|
|
||||||
{
|
|
||||||
name = "ModuleLoaded";
|
|
||||||
option = "powerline";
|
|
||||||
commands = builtins.concatStringsSep "\n" [ "powerline-enable" ];
|
|
||||||
}
|
|
||||||
] ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableLatex) [
|
|
||||||
{
|
|
||||||
name = "BufSetOption";
|
|
||||||
option = "filetype=latex";
|
|
||||||
commands = "set-option buffer formatcmd ${texlive.bin.latexindent}/bin/latexindent";
|
|
||||||
}
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enablePython) [
|
|
||||||
{
|
|
||||||
name = "BufSetOption";
|
|
||||||
option = "filetype=python";
|
|
||||||
commands = "set-option buffer formatcmd '${python3.pkgs.black}/bin/black -'";
|
|
||||||
}
|
|
||||||
]
|
|
||||||
) ++ (
|
|
||||||
lib.optionals (pkgs.devEnvironment.enableData) [
|
|
||||||
{
|
|
||||||
name = "BufSetOption";
|
|
||||||
option = "filetype=(markdown|html|json|yaml|css|scss|less)";
|
|
||||||
commands = "set-option buffer formatcmd ${nodePackages.prettier}/bin/prettier";
|
|
||||||
}
|
|
||||||
]
|
|
||||||
);
|
|
||||||
# TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
|
|
||||||
};
|
|
||||||
extraConfig = builtins.concatStringsSep "\n" [
|
|
||||||
"# Custom commands"
|
|
||||||
"add-highlighter global/ regex \\h+$ 0:Error # Highlight trailing spaces"
|
|
||||||
"eval %sh{kak-lsp --kakoune -s $kak_session}"
|
|
||||||
"lsp-enable"
|
|
||||||
''
|
|
||||||
def -hidden insert-c-n %{
|
|
||||||
try %{
|
|
||||||
lsp-snippets-select-next-placeholders
|
|
||||||
exec '<a-;>d'
|
|
||||||
} catch %{
|
|
||||||
exec -with-hooks '<c-n>'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
''
|
|
||||||
"require-module powerline"
|
|
||||||
"powerline-start"
|
|
||||||
"require-module connect-broot"
|
|
||||||
"require-module connect-lf"
|
|
||||||
"require-module connect-rofi"
|
|
||||||
];
|
|
||||||
plugins = plugins;
|
|
||||||
};
|
|
||||||
xdg.configFile."kak/colors/nord.kak".text = with strPalette;
|
|
||||||
''
|
|
||||||
set-face global value rgb:${normal.magenta},default
|
|
||||||
set-face global type rgb:${bright.white},default
|
|
||||||
set-face global identifier rgb:${normal.cyan},default
|
|
||||||
set-face global string rgb:${normal.green},default
|
|
||||||
set-face global error rgb:${normal.red},default
|
|
||||||
set-face global keyword rgb:${normal.blue},default
|
|
||||||
set-face global operator rgb:${normal.blue},default
|
|
||||||
set-face global attribute rgb:${bright.blue},default
|
|
||||||
set-face global comment rgb:${bright.blue},default
|
|
||||||
set-face global meta rgb:${normal.yellow},default
|
|
||||||
set-face global Default rgb:${normal.white},default
|
|
||||||
set-face global PrimarySelection rgb:${normal.black},rgb:${dark.yellow}
|
|
||||||
set-face global SecondarySelection rgb:${normal.black},rgb:${dark.white}
|
|
||||||
set-face global PrimaryCursor rgb:${normal.black},rgb:${normal.yellow}
|
|
||||||
set-face global SecondaryCursor rgb:${normal.black},rgb:${normal.white}
|
|
||||||
set-face global MenuForeground rgb:${normal.white},rgb:${bright.black}
|
|
||||||
set-face global MenuBackground default,rgb:${normal.black}
|
|
||||||
set-face global MenuInfo default,rgb:${normal.black}
|
|
||||||
set-face global Information rgb:${dark.black},rgb:${normal.cyan}
|
|
||||||
set-face global StatusLine rgb:${normal.white},rgb:${normal.black}
|
|
||||||
set-face global StatusLineMode rgb:${normal.blue},rgb:${normal.black}
|
|
||||||
set-face global StatusLineInfo rgb:${normal.blue},rgb:${normal.black}
|
|
||||||
set-face global StatusLineValue rgb:${normal.blue},rgb:${normal.black}
|
|
||||||
set-face global StatusCursor rgb:${dark.black},rgb:${normal.yellow}
|
|
||||||
set-face global Prompt rgb:${normal.cyan},rgb:${normal.black}
|
|
||||||
set-face global BufferPadding default,default
|
|
||||||
'';
|
|
||||||
xdg.configFile."kak-lsp/kak-lsp.toml".text = with pkgs;
|
|
||||||
builtins.concatStringsSep "\n" (
|
|
||||||
[
|
|
||||||
''
|
|
||||||
snippet_support = false
|
|
||||||
verbosity = 2
|
|
||||||
[server]
|
|
||||||
timeout = 1800 # seconds = 30 minutes
|
|
||||||
''
|
|
||||||
]
|
|
||||||
++ (
|
|
||||||
lib.optional (pkgs.devEnvironment.enableCpp) ''
|
|
||||||
[language.c_cpp]
|
|
||||||
filetypes = ["c", "cpp"]
|
|
||||||
roots = ["compile_commands.json", ".clangd"]
|
|
||||||
command = "${clang-tools}/bin/clangd"
|
|
||||||
offset_encoding = "utf-8"
|
|
||||||
''
|
|
||||||
) ++ (
|
|
||||||
lib.optional (pkgs.devEnvironment.enableData) ''
|
|
||||||
[language.json]
|
|
||||||
filetypes = ["json"]
|
|
||||||
roots = ["package.json"]
|
|
||||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-json-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
[language.yaml]
|
|
||||||
filetypes = ["yaml"]
|
|
||||||
roots = [".git"]
|
|
||||||
command = "${yaml-language-server}/bin/yaml-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
[language.yaml.settings]
|
|
||||||
# See https://github.com/redhat-developer/yaml-language-server#language-server-settings
|
|
||||||
# Defaults are at https://github.com/redhat-developer/yaml-language-server/blob/master/src/yamlSettings.ts
|
|
||||||
yaml.format.enable = true
|
|
||||||
''
|
|
||||||
) ++ (
|
|
||||||
lib.optional (pkgs.devEnvironment.enableGo) ''
|
|
||||||
[language.go]
|
|
||||||
filetypes = ["go"]
|
|
||||||
roots = ["Gopkg.toml", "go.mod", ".git", ".hg"]
|
|
||||||
command = "gopls"
|
|
||||||
offset_encoding = "utf-8"
|
|
||||||
settings_section = "gopls"
|
|
||||||
[language.go.settings.gopls]
|
|
||||||
# See https://github.com/golang/tools/blob/master/gopls/doc/settings.md
|
|
||||||
# "build.buildFlags" = []
|
|
||||||
''
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
lib.optional (pkgs.devEnvironment.enableHtml) ''
|
|
||||||
[language.html]
|
|
||||||
filetypes = ["html"]
|
|
||||||
roots = ["package.json"]
|
|
||||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-html-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
[language.css]
|
|
||||||
filetypes = ["css"]
|
|
||||||
roots = ["package.json", ".git"]
|
|
||||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
[language.less]
|
|
||||||
filetypes = ["less"]
|
|
||||||
roots = ["package.json", ".git"]
|
|
||||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
[language.scss]
|
|
||||||
filetypes = ["scss"]
|
|
||||||
roots = ["package.json", ".git"]
|
|
||||||
command = "${nodePackages.vscode-langservers-extracted}/bin/vscode-css-language-server"
|
|
||||||
args = ["--stdio"]
|
|
||||||
''
|
|
||||||
) ++ (
|
|
||||||
lib.optional (pkgs.devEnvironment.enableJavascript) ''
|
|
||||||
[language.javascript]
|
|
||||||
filetypes = ["javascript"]
|
|
||||||
roots = [".flowconfig"]
|
|
||||||
command = "${flow}/bin/flow"
|
|
||||||
args = ["lsp"]
|
|
||||||
''
|
|
||||||
) ++ (
|
|
||||||
lib.optional (pkgs.devEnvironment.enableLatex) ''
|
|
||||||
[language.latex]
|
|
||||||
filetypes = ["latex"]
|
|
||||||
roots = [".git"]
|
|
||||||
command = "${texlab}/bin/texlab"
|
|
||||||
settings_section = "texlab"
|
|
||||||
[language.latex.settings.texlab]
|
|
||||||
# See https://github.com/latex-lsp/texlab/blob/master/src/options.rs
|
|
||||||
# bibtexFormatter = "${texlab}/bin/texlab"
|
|
||||||
''
|
|
||||||
) ++ (
|
|
||||||
lib.optional (pkgs.devEnvironment.enableNix) ''
|
|
||||||
[language.nix]
|
|
||||||
filetypes = ["nix"]
|
|
||||||
roots = ["flake.nix", "shell.nix", ".git"]
|
|
||||||
command = "${rnix-lsp}/bin/rnix-lsp"
|
|
||||||
''
|
|
||||||
) ++ (
|
|
||||||
lib.optional (pkgs.devEnvironment.enablePython) ''
|
|
||||||
[language.python]
|
|
||||||
filetypes = ["python"]
|
|
||||||
roots = ["requirements.txt", "setup.py", ".git", ".hg"]
|
|
||||||
command = "${python3.pkgs.python-lsp-server}/bin/pylsp"
|
|
||||||
offset_encoding = "utf-8"
|
|
||||||
[language.python.settings]
|
|
||||||
# See https://github.com/palantir/python-language-server#configuration
|
|
||||||
# and https://github.com/palantir/python-language-server/blob/develop/vscode-client/package.json
|
|
||||||
# "pyls.configurationSources" = ["flake8"]
|
|
||||||
''
|
|
||||||
) ++ (
|
|
||||||
lib.optional (pkgs.devEnvironment.enableRust) ''
|
|
||||||
[language.rust]
|
|
||||||
filetypes = ["rust"]
|
|
||||||
roots = ["Cargo.toml"]
|
|
||||||
command = "${rust-analyzer}/bin/rust-analyzer"
|
|
||||||
settings_section = "rust-analyzer"
|
|
||||||
[language.rust.settings.rust-analyzer]
|
|
||||||
hoverActions.enable = false # kak-lsp doesn't support this at the moment
|
|
||||||
# cargo.features = []
|
|
||||||
# See https://rust-analyzer.github.io/manual.html#configuration
|
|
||||||
# If you get 'unresolved proc macro' warnings, you have two options
|
|
||||||
# 1. The safe choice is two disable the warning:
|
|
||||||
diagnostics.disabled = ["unresolved-proc-macro"]
|
|
||||||
# 2. Or you can opt-in for proc macro support
|
|
||||||
procMacro.enable = true
|
|
||||||
cargo.loadOutDirsFromCheck = true
|
|
||||||
# See https://github.com/rust-analyzer/rust-analyzer/issues/6448
|
|
||||||
''
|
|
||||||
) ++ (
|
|
||||||
lib.optional (pkgs.devEnvironment.enableShell) ''
|
|
||||||
[language.bash]
|
|
||||||
filetypes = ["sh"]
|
|
||||||
roots = [".git", ".hg"]
|
|
||||||
command = "${nodePackages.bash-language-server}/bin/bash-language-server"
|
|
||||||
args = ["start"]
|
|
||||||
''
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
{ pkgs, lib, ...}:
|
|
||||||
{
|
|
||||||
home.packages = lib.optionals pkgs.devEnvironment.enableLatex [
|
|
||||||
pkgs.texlive.combined.scheme-full
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{pkgs, lib,...}:
|
|
||||||
with pkgs;
|
|
||||||
{
|
|
||||||
home.packages = (lib.optionals pkgs.devEnvironment.enableOffice [
|
|
||||||
# libreoffice-fresh
|
|
||||||
onlyoffice-bin
|
|
||||||
]) ++ (lib.optionals pkgs.devEnvironment.enableSpelling [
|
|
||||||
hunspellDicts.en_GB-large
|
|
||||||
hunspellDicts.en_US-large
|
|
||||||
hunspellDicts.it_IT
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,44 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
let
|
|
||||||
variables = {
|
|
||||||
DSSI_PATH = "$HOME/.dssi:$HOME/.nix-profile/lib/dssi:/run/current-system/sw/lib/dssi";
|
|
||||||
LADSPA_PATH = "$HOME/.ladspa:$HOME/.nix-profile/lib/ladspa:/run/current-system/sw/lib/ladspa";
|
|
||||||
LV2_PATH = "$HOME/.lv2:$HOME/.nix-profile/lib/lv2:/run/current-system/sw/lib/lv2";
|
|
||||||
LXVST_PATH = "$HOME/.lxvst:$HOME/.nix-profile/lib/lxvst:/run/current-system/sw/lib/lxvst";
|
|
||||||
VST_PATH = "$HOME/.vst:$HOME/.nix-profile/lib/vst:/run/current-system/sw/lib/vst";
|
|
||||||
VST3_PATH = "$HOME/.vst3:$HOME/.nix-profile/lib/vst3:/run/current-system/sw/lib/vst3";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
carla
|
|
||||||
rnnoise
|
|
||||||
ardour
|
|
||||||
# zrythm
|
|
||||||
|
|
||||||
# Plugins
|
|
||||||
# artyFX
|
|
||||||
autotalent
|
|
||||||
boops
|
|
||||||
cardinal
|
|
||||||
geonkick
|
|
||||||
helm
|
|
||||||
(lsp-plugins.overrideAttrs (old: { version = "1.2.0"; }))
|
|
||||||
# noise-repellent
|
|
||||||
samplv1
|
|
||||||
# speech-denoiser
|
|
||||||
# stochas
|
|
||||||
sunvox
|
|
||||||
# surge
|
|
||||||
surge-XT
|
|
||||||
talentedhack
|
|
||||||
tunefish
|
|
||||||
vocproc
|
|
||||||
x42-plugins
|
|
||||||
zita-at1
|
|
||||||
zynaddsubfx
|
|
||||||
zyn-fusion
|
|
||||||
];
|
|
||||||
|
|
||||||
home.sessionVariables = variables;
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue