Extreme cleaup + new nix rice + commit hooks

This commit is contained in:
Filippo Berto 2022-06-02 20:16:20 +02:00
parent bc28d964d3
commit c9eeeb9dc4
59 changed files with 319 additions and 400 deletions

2
.envrc Normal file
View file

@ -0,0 +1,2 @@
use flake
eval "$shellHook"

1
.gitignore vendored
View file

@ -1 +1,2 @@
result result
.direnv

View file

@ -63,13 +63,13 @@ set-face global StatusLineMode rgb:5e81ac,rgb:3b4252
# face used for the current mode except the normal mode # face used for the current mode except the normal mode
set-face global StatusLineInfo rgb:5e81ac,rgb:3b4252 set-face global StatusLineInfo rgb:5e81ac,rgb:3b4252
# face used for special information # face used for special information
set-face global StatusLineValue rgb:5e81ac,rgb:3b4252 set-face global StatusLineValue rgb:5e81ac,rgb:3b4252
# face used for special values (numeric prefixes, registers, etc.) # face used for special values (numeric prefixes, registers, etc.)
set-face global StatusCursor rgb:2e3440,rgb:ebcb8b set-face global StatusCursor rgb:2e3440,rgb:ebcb8b
# face used for the status line cursor # face used for the status line cursor
set-face global Prompt rgb:88c0d0,rgb:3b4252 set-face global Prompt rgb:88c0d0,rgb:3b4252
# face used prompt displayed on the status line # face used prompt displayed on the status line

View file

@ -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";

View file

@ -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)

View file

@ -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;
};
}

View file

@ -1,15 +1,14 @@
{ lib { lib
, stdenv
, rice , rice
, roboto , roboto
, i3lock-color , i3lock-color
, writeScriptBin , writeScriptBin
, 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
writeScriptBin "lockscreen" '' writeScriptBin "lockscreen" ''
#!/bin/sh #!/bin/sh
@ -53,4 +52,4 @@ writeScriptBin "lockscreen" ''
--pass-screen-keys \ --pass-screen-keys \
--pass-volume-keys \ --pass-volume-keys \
--nofork --nofork
'' ''

View file

@ -1,12 +1,11 @@
{ lib { feh
, stdenv
, feh
, glib , glib
, findutils , findutils
, gnugrep , gnugrep
, coreutils , coreutils
, writeScriptBin , 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";

98
flake.lock generated
View file

@ -56,6 +56,28 @@
"type": "github" "type": "github"
} }
}, },
"nix-rice": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": "nixpkgs",
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1654188574,
"narHash": "sha256-wl87aE0JGd2viY7io0FLS4nHKAa8f9MVZWXohUvEbDU=",
"owner": "bertof",
"repo": "nix-rice",
"rev": "0ce38b26d5fc9392cc2972f77e42549075a8e78d",
"type": "github"
},
"original": {
"owner": "bertof",
"repo": "nix-rice",
"type": "github"
}
},
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1650522846, "lastModified": 1650522846,
@ -72,6 +94,22 @@
} }
}, },
"nixpkgs": { "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": { "locked": {
"lastModified": 1653979012, "lastModified": 1653979012,
"narHash": "sha256-Md1OeSa4WwrtsjJKanOyrNfo9WbRCgURk23iRhUI2LU=", "narHash": "sha256-Md1OeSa4WwrtsjJKanOyrNfo9WbRCgURk23iRhUI2LU=",
@ -87,19 +125,32 @@
"type": "github" "type": "github"
} }
}, },
"root": { "pre-commit-hooks": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": [
"home-manager": "home-manager", "nix-rice",
"home-manager-unstable": "home-manager-unstable", "flake-utils"
"nixos-hardware": "nixos-hardware", ],
"nixpkgs": "nixpkgs", "nixpkgs": [
"rust-overlay": "rust-overlay", "nix-rice",
"tex2nix": "tex2nix", "nixpkgs"
"unstable": "unstable" ]
},
"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"
} }
}, },
"rust-overlay": { "pre-commit-hooks_2": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [
"flake-utils" "flake-utils"
@ -109,19 +160,32 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1652496760, "lastModified": 1652714503,
"narHash": "sha256-AM1almW0FjiUegqfJc6n+OO3yXTCXUsH2IEI323vbJ0=", "narHash": "sha256-qQKVEfDe5FqvGgkZtg5Pc491foeiDPIOeycHMqnPDps=",
"owner": "oxalica", "owner": "cachix",
"repo": "rust-overlay", "repo": "pre-commit-hooks.nix",
"rev": "f9ddceabd2ccd2bf3d08c83832f3709c94287144", "rev": "521a524771a8e93caddaa0ac1d67d03766a8b0b3",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "oxalica", "owner": "cachix",
"repo": "rust-overlay", "repo": "pre-commit-hooks.nix",
"type": "github" "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": { "tex2nix": {
"inputs": { "inputs": {
"flake-utils": [ "flake-utils": [

View file

@ -2,36 +2,18 @@
description = "Thor system configuration"; description = "Thor system configuration";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-22.05"; nixpkgs.url = "github:NixOS/nixpkgs/release-22.05";
home-manager = { url = "github:nix-community/home-manager/release-22.05"; inputs.nixpkgs.follows = "nixpkgs"; };
home-manager = {
url = "github:nix-community/home-manager/release-22.05";
inputs.nixpkgs.follows = "nixpkgs";
};
unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager-unstable = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "unstable"; };
home-manager-unstable = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "unstable";
};
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";
rust-overlay = { nix-rice = { url = "github:bertof/nix-rice"; inputs.inxpkgs.follows = "unstable"; inputs.flake-utils.follows = "flake-utils"; };
url = "github:oxalica/rust-overlay"; pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; };
inputs.nixpkgs.follows = "nixpkgs"; tex2nix = { url = github:Mic92/tex2nix; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; };
inputs.flake-utils.follows = "flake-utils";
};
tex2nix = {
url = github:Mic92/tex2nix;
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
}; };
outputs = outputs =
@ -42,24 +24,26 @@
, home-manager-unstable , home-manager-unstable
, flake-utils , flake-utils
, nixos-hardware , nixos-hardware
, rust-overlay
, tex2nix , tex2nix
, nix-rice
, pre-commit-hooks
}: }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
overlays = [ overlaysBuilder = system: [
(nix-rice.overlays.default)
(import ./rice.nix) (import ./rice.nix)
(rust-overlay.overlay) (_: _: { inherit (tex2nix.packages.${system}) tex2nix; })
(final: prev: { inherit (tex2nix.packages.${system}) tex2nix; }) (final: _: {
(final: prev: {
update-background = final.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; }; 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; }; lockscreen = final.callPackage ./custom/lockscreen { palette = final.rice.colorPalette; font = final.rice.font.normal; };
}) })
(final: prev: { stable = pkgs; }) (_: _: { stable = pkgs; })
(final: prev: { unstable = unstablePkgs; }) (_: _: { unstable = unstablePkgs; })
]; ];
nixpkgsSettings = { nixpkgsSettings = {
inherit overlays system; inherit system;
overlays = overlaysBuilder system;
config = { config = {
extraOptions = "experimental-features = nix-command flakes"; extraOptions = "experimental-features = nix-command flakes";
allowUnfree = true; allowUnfree = true;
@ -156,7 +140,7 @@
nixosConfigurations = rec { nixosConfigurations = rec {
thor = thor-unstable; thor = thor-unstable;
thor-stable = thorStable [ ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix]; 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-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 ]; # thor-big-data = thorUnstable [ ./nixos_modules/pro_audio.nix ./nixos_modules/big_data.nix ./nixos_modules/sesar.nix ];
@ -168,9 +152,25 @@
odin-nvidia-stable = odinStable [ ./odin/configuration-nvidia.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-unstable; loki = loki-unstable;
loki-stable = lokiStable []; loki-stable = lokiStable [ ];
loki-unstable = lokiUnstable [ ]; 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}
'';
};
}));
} }

View file

@ -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
];
}

View file

@ -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;
}

View file

@ -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;

View file

@ -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;

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{ {
programs.autorandr = { programs.autorandr = {
enable = true; enable = true;

View file

@ -1,12 +1,13 @@
{ pkgs, lib, ... }: { pkgs, ... }:
let let
tomlGenerate = (pkgs.formats.toml {}).generate "bottom-toml"; tomlGenerate = (pkgs.formats.toml { }).generate "bottom-toml";
in { in
home.packages = with pkgs; [ bottom ]; {
xdg.configFile."bottom/bottom.toml".source = tomlGenerate { home.packages = with pkgs; [ bottom ];
"flags" = { xdg.configFile."bottom/bottom.toml".source = tomlGenerate {
"left_legend" = true; "flags" = {
"color" = "nord"; "left_legend" = true;
}; "color" = "nord";
}; };
};
} }

View file

@ -1,7 +1,7 @@
{ {
programs.broot = { programs.broot = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;
enableZshIntegration = true; enableZshIntegration = true;
}; };
} }

View file

@ -3,7 +3,7 @@
let let
monitorPages = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX" "X" ]; monitorPages = [ "I" "II" "III" "IV" "V" "VI" "VII" "VIII" "IX" "X" ];
monitorPagesString = lib.strings.concatStringsSep " " monitorPages; monitorPagesString = lib.strings.concatStringsSep " " monitorPages;
strPalette = pkgs.rice.palette.toRGBHex pkgs.rice.colorPalette; strPalette = pkgs.lib.rice.palette.toRGBHex pkgs.rice.colorPalette;
xrandr = "${pkgs.xorg.xrandr}/bin/xrandr"; xrandr = "${pkgs.xorg.xrandr}/bin/xrandr";
xsetroot = "${pkgs.xorg.xsetroot}/bin/xsetroot"; xsetroot = "${pkgs.xorg.xsetroot}/bin/xsetroot";
in in

View file

@ -1,7 +1,7 @@
{ {
programs.dircolors = { programs.dircolors = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;
enableZshIntegration = true; enableZshIntegration = true;
}; };
} }

View file

@ -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";

View file

@ -1,8 +1,8 @@
{ {
programs.fzf = { programs.fzf = {
enable = true; enable = true;
tmux.enableShellIntegration = true; tmux.enableShellIntegration = true;
enableBashIntegration = true; enableBashIntegration = true;
enableZshIntegration = true; enableZshIntegration = true;
}; };
} }

View file

@ -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";
@ -101,9 +99,9 @@ in
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; diff.guitool = "meld";
init.defaultBranch = "main"; init.defaultBranch = "main";
merge.guitool = meld; merge.guitool = "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 +115,6 @@ in
gh gh
git-secret git-secret
glab glab
meld
]; ];
} }

View file

@ -1,14 +1,12 @@
{ {
programs.gpg = { programs.gpg = {
enable = true; enable = true;
settings = { settings = { };
};
}; services.gpg-agent = {
}; enable = true;
defaultCacheTtl = 600;
services.gpg-agent = { # extraConfig = "allow-loopback-pinentry";
enable = true; };
defaultCacheTtl = 600;
# extraConfig = "allow-loopback-pinentry";
};
} }

View file

@ -1,4 +1,3 @@
{ config, lib, pkgs, ... }:
{ {
services.grobi = { services.grobi = {
enable = true; enable = true;

View file

@ -23,10 +23,10 @@
editor.lsp.display-messages = true; editor.lsp.display-messages = true;
editor.scrolloff = 5; editor.scrolloff = 5;
editor.true-color = true; editor.true-color = true;
editor.mouse = false;
}; };
themes = themes =
let let
strPalette = with pkgs.rice; palette.toRgbShortHex coloPalette;
transparent = "none"; transparent = "none";
gray = "#665c54"; gray = "#665c54";
dark-gray = "#3c3836"; dark-gray = "#3c3836";

View file

@ -1,3 +1,3 @@
{ pkgs, ...}: {
{ programs.java.enable = true; programs.java.enable = true;
} }

View file

@ -1,4 +1,4 @@
{ pkgs, config, ... }: { pkgs, ... }:
let let
joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake"; joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake";
in in

View file

@ -1,6 +1,5 @@
{ config, lib, pkgs, ... }: { pkgs, ... }:
let let
strPalette = with pkgs.rice; palette.toRgbShortHex colorPalette;
themeBuilder = palette: with palette; '' themeBuilder = palette: with palette; ''
set-face global value rgb:${normal.magenta},default set-face global value rgb:${normal.magenta},default
set-face global type rgb:${bright.white},default set-face global type rgb:${bright.white},default
@ -132,36 +131,9 @@ in
}; };
# THEME FILE # THEME FILE
xdg.configFile."kak/colors/nord.kak".text = with strPalette; '' xdg.configFile."kak/colors/nord.kak".text = themeBuilder (pkgs.lib.rice.palette.toRgbShortHex pkgs.rice.colorPalette);
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; '' xdg.configFile."kak-lsp/kak-lsp.toml".text = ''
snippet_support = false snippet_support = false
verbosity = 2 verbosity = 2
[server] [server]

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }: { pkgs, ... }:
{ {
config.systemd.user.services.keepassxc = { config.systemd.user.services.keepassxc = {
Unit = { Unit = {

View file

@ -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;

View file

@ -1,4 +1,4 @@
{ pkgs, lib, ...}: { pkgs, ... }:
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
tex2nix tex2nix

View file

@ -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";

View file

@ -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

View file

@ -20,7 +20,7 @@
timers."nix-index" = { timers."nix-index" = {
Unit.Description = "Daily update the nix-locate database"; Unit.Description = "Daily update the nix-locate database";
Timer = { OnCalendar = "daily"; Persistent = true; Unit = "nix-index.service";}; Timer = { OnCalendar = "daily"; Persistent = true; Unit = "nix-index.service"; };
Install.WantedBy = [ "timers.target" ]; Install.WantedBy = [ "timers.target" ];
}; };
}; };

View file

@ -1,11 +1,10 @@
{pkgs, lib,...}: { pkgs, ... }:
with pkgs;
{ {
home.packages = [ home.packages = with pkgs; [
# libreoffice-fresh # libreoffice-fresh
onlyoffice-bin onlyoffice-bin
hunspellDicts.en_GB-large hunspellDicts.en_GB-large
hunspellDicts.en_US-large hunspellDicts.en_US-large
hunspellDicts.it_IT hunspellDicts.it_IT
]; ];
} }

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{ {
services.picom = { services.picom = {
enable = true; enable = true;

View file

@ -1,5 +1,6 @@
{ config, lib, pkgs, ... }: { config, pkgs, ... }:
let let
inherit (pkgs.rice) colorPalette;
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,8 +9,6 @@ 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";
btm = "${pkgs.bottom}/bin/btm";
systemctl = "${pkgs.systemd}/bin/systemctl"; systemctl = "${pkgs.systemd}/bin/systemctl";
loginctl = "${pkgs.systemd}/bin/loginctl"; loginctl = "${pkgs.systemd}/bin/loginctl";
shutdown = "${pkgs.systemd}/bin/shutdown"; shutdown = "${pkgs.systemd}/bin/shutdown";
@ -17,7 +16,7 @@ let
session=`${loginctl} session-status | ${pkgs.coreutils}/bin/head -n 1 | ${pkgs.gawk}/bin/awk '{print $1}'` session=`${loginctl} session-status | ${pkgs.coreutils}/bin/head -n 1 | ${pkgs.gawk}/bin/awk '{print $1}'`
${loginctl} terminate-session $session ${loginctl} terminate-session $session
''; '';
colors = with pkgs.rice; palette.toARGBHex rec { colors = with pkgs.lib.rice; palette.toARGBHex rec {
normal = { normal = {
foreground = colorPalette.normal.white; foreground = colorPalette.normal.white;

View file

@ -14,7 +14,8 @@ in
carla carla
rnnoise rnnoise
ardour ardour
unstable.zrythm unstable.breeze-icons unstable.zrythm
unstable.breeze-icons
mixxx mixxx
# Plugins # Plugins
@ -24,7 +25,7 @@ in
unstable.cardinal unstable.cardinal
geonkick geonkick
helm helm
(lsp-plugins.overrideAttrs (old: { version = "1.2.0"; })) lsp-plugins
# noise-repellent # noise-repellent
samplv1 samplv1
# speech-denoiser # speech-denoiser

View file

@ -12,10 +12,10 @@
xdg.configFile."rofi/config.rasi".text = '' xdg.configFile."rofi/config.rasi".text = ''
configuration { configuration {
font: "${pkgs.rice.font.monospace.name} 12"; font: "${pkgs.rice.font.monospace.name} 12";
location: 0; location: 0;
yoffset: 0; yoffset: 0;
xoffset: 0; xoffset: 0;
modi: "drun,run,ssh,window"; modi: "drun,run,ssh,window";
} }
@theme "onedark" @theme "onedark"

View file

@ -1,6 +1,5 @@
{ pkgs, ... }: {
let home.shellAliases = {
shellAliases = {
"dkc" = "docker-compose"; "dkc" = "docker-compose";
"dk" = "docker"; "dk" = "docker";
"hm" = "home-manager"; "hm" = "home-manager";
@ -13,9 +12,6 @@ let
"sc" = "sudo systemctl"; "sc" = "sudo systemctl";
"scu" = "systemctl --user"; "scu" = "systemctl --user";
}; };
in
{
home = { inherit shellAliases; };
# programs.bash = { inherit shellAliases; }; # programs.bash = { inherit shellAliases; };
# programs.zsh = { inherit shellAliases; }; # programs.zsh = { inherit shellAliases; };
} }

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { pkgs, ... }:
{ {
imports = [ ./thunar.nix ]; imports = [ ./thunar.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -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;
}; };

View file

@ -1,4 +1,4 @@
{ pkgs, config, ... }: { pkgs, ... }:
let let
update_time = "10m"; update_time = "10m";
in in

View file

@ -3,13 +3,13 @@
let let
cmd = link: "google-chrome-stable --app=${link}"; cmd = link: "google-chrome-stable --app=${link}";
links = [ links = [
{ desktopName = "Google Calendar"; link = "https://google.com/calendar"; categories = [ "Office" ]; } { desktopName = "Google Calendar"; link = "https://google.com/calendar"; categories = [ "Office" ]; }
{ desktopName = "Google Keep"; link = "https://keep.google.com"; categories = [ "Office" ]; } { desktopName = "Google Keep"; link = "https://keep.google.com"; categories = [ "Office" ]; }
{ desktopName = "Monkeytype"; link = "https://monkeytype.com/"; } { desktopName = "Monkeytype"; link = "https://monkeytype.com/"; }
{ desktopName = "Netflix"; link = "https://www.netflix.com"; categories = [ "AudioVideo" ]; } { desktopName = "Netflix"; link = "https://www.netflix.com"; categories = [ "AudioVideo" ]; }
{ desktopName = "Notion"; link = "https://notion.so"; categories = [ "Office" ]; } { desktopName = "Notion"; link = "https://notion.so"; categories = [ "Office" ]; }
{ desktopName = "Prime Video"; link = "https://primevideo.com"; categories = [ "AudioVideo" ]; } { desktopName = "Prime Video"; link = "https://primevideo.com"; categories = [ "AudioVideo" ]; }
{ desktopName = "Protonmail"; link = "https://mail.protonmail.com"; categories = [ "Office" ]; } { desktopName = "Protonmail"; link = "https://mail.protonmail.com"; categories = [ "Office" ]; }
{ desktopName = "Twitch"; link = "https://www.twitch.tv"; categories = [ "AudioVideo" ]; } { desktopName = "Twitch"; link = "https://www.twitch.tv"; categories = [ "AudioVideo" ]; }
{ desktopName = "WhatsApp"; link = "https://web.whatsapp.com/"; } { desktopName = "WhatsApp"; link = "https://web.whatsapp.com/"; }
{ desktopName = "YouTube"; link = "https://www.youtube.com"; categories = [ "AudioVideo" ]; } { desktopName = "YouTube"; link = "https://www.youtube.com"; categories = [ "AudioVideo" ]; }

View file

@ -1,6 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
let let
strPalette = with pkgs.rice; palette.toRgbHex colorPalette; strPalette = pkgs.lib.rice.palette.toRgbHex pkgs.rice.colorPalette;
in in
{ {
programs.zathura = { programs.zathura = {

View file

@ -1,7 +1,4 @@
{ pkgs, ... }: {
let
zoxideCmd = "zoxide";
in {
programs.zoxide = { programs.zoxide = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;

View file

@ -1,4 +1,4 @@
{ pkgs, lib, ... }: { pkgs, ... }:
{ {
home = { home = {
language.base = "it_IT.UTF-8"; language.base = "it_IT.UTF-8";

View file

@ -1,4 +1,4 @@
{ pkgs, lib, ... }: { pkgs, ... }:
{ {
home = { home = {
language.base = "it_IT.UTF-8"; language.base = "it_IT.UTF-8";

View file

@ -1,7 +1,7 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { modulesPath, ... }:
{ {
imports = [ imports = [

View file

@ -1,22 +1,22 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
let let
setup_scirpt = '' # setup_script = ''
sudo mkdir -p /hdfs # sudo mkdir -p /hdfs
sudo chown -R hdfs:hadoop /hdfs # sudo chown -R hdfs:hadoop /hdfs
for p in {nn,dn,jn,rm,nm,jhs,HTTP}; do # for p in {nn,dn,jn,rm,nm,jhs,HTTP}; do
sudo kadmin.local -q "ank -randkey $p/my.engine"; # sudo kadmin.local -q "ank -randkey $p/my.engine";
sudo kadmin.local -q "xst -k /etc/hadoop.keytab $p/my.engine"; # sudo kadmin.local -q "xst -k /etc/hadoop.keytab $p/my.engine";
sudo kadmin.local -q "ktrem -k /etc/hadoop.keytab $p/my.engine old" # sudo kadmin.local -q "ktrem -k /etc/hadoop.keytab $p/my.engine old"
done # done
sudo chown hdfs:hadoop /etc/hadoop.keytab # sudo chown hdfs:hadoop /etc/hadoop.keytab
sudo kadmin.local -q "ank -randkey spark/my.engine"; # sudo kadmin.local -q "ank -randkey spark/my.engine";
sudo kadmin.local -q "xst -k /etc/spark.keytab spark/my.engine"; # sudo kadmin.local -q "xst -k /etc/spark.keytab spark/my.engine";
sudo kadmin.local -q "ktrem -k /etc/spark.keytab spark/my.engine old" # sudo kadmin.local -q "ktrem -k /etc/spark.keytab spark/my.engine old"
sudo chown spark:spark /etc/spark.keytab # sudo chown spark:spark /etc/spark.keytab
''; # '';
hadoop_keytab_path = "/etc/hadoop.keytab"; hadoop_keytab_path = "/etc/hadoop.keytab";
spark_keytab_path = "/etc/spark.keytab"; spark_keytab_path = "/etc/spark.keytab";
pysparkPackageSelector = p: with p; [ numpy pyspark ]; pysparkPackageSelector = p: with p; [ numpy pyspark ];
@ -63,17 +63,17 @@ let
STOP STOP
cat > $out/spark-defaults.conf <<- STOP cat > $out/spark-defaults.conf <<- STOP
spark.eventLog.enabled true spark.eventLog.enabled true
spark.eventLog.dir hdfs://localhost:/logs/spark spark.eventLog.dir hdfs://localhost:/logs/spark
spark.history.fs.logDirectory hdfs://localhost:/logs/spark spark.history.fs.logDirectory hdfs://localhost:/logs/spark
# spark.yarn.keytab ${spark_keytab_path} # spark.yarn.keytab ${spark_keytab_path}
# spark.yarn.principal spark/my.engine@MY.ENGINE # spark.yarn.principal spark/my.engine@MY.ENGINE
spark.history.ui.acls.enable true spark.history.ui.acls.enable true
spark.history.kerberos.enabled true spark.history.kerberos.enabled true
spark.history.kerberos.keytab ${spark_keytab_path} spark.history.kerberos.keytab ${spark_keytab_path}
spark.history.kerberos.principal spark/my.engine@MY.ENGINE spark.history.kerberos.principal spark/my.engine@MY.ENGINE
spark.yarn.appMasterEnv.PYSPARK_PYTHON ${pysparkEnv.outPath}/bin/${pysparkEnv.executable} spark.yarn.appMasterEnv.PYSPARK_PYTHON ${pysparkEnv.outPath}/bin/${pysparkEnv.executable}
spark.yarn.appMasterEnv.PYTHONPATH ${pysparkEnv.outPath}/lib/${pysparkEnv.executable}/site-packages spark.yarn.appMasterEnv.PYTHONPATH ${pysparkEnv.outPath}/lib/${pysparkEnv.executable}/site-packages
spark.executorEnv.PYSPARK_PYTHON ${pysparkEnv.outPath}/bin/${pysparkEnv.executable} spark.executorEnv.PYSPARK_PYTHON ${pysparkEnv.outPath}/bin/${pysparkEnv.executable}
STOP STOP
''; '';
@ -198,9 +198,9 @@ in
httpfsSite = { httpfsSite = {
"kerberos.realm" = "MY.ENGINE"; "kerberos.realm" = "MY.ENGINE";
"httpfs.authentication.type" = "kerberos"; "httpfs.authentication.type" = "kerberos";
"httpfs.authentication.kerberos.principal " = "HTTP/my.engine@MY.ENGINE"; "httpfs.authentication.kerberos.principal " = "HTTP/my.engine@MY.ENGINE";
"httpfs.authentication.kerberos.keytab" = hadoop_keytab_path; "httpfs.authentication.kerberos.keytab" = hadoop_keytab_path;
"httpfs.hadoop.kerberos.principal " = "HTTP/my.engine@MY.ENGINE"; "httpfs.hadoop.kerberos.principal " = "HTTP/my.engine@MY.ENGINE";
"httpfs.hadoop.kerberos.keytab" = hadoop_keytab_path; "httpfs.hadoop.kerberos.keytab" = hadoop_keytab_path;
}; };
extraConfDirs = [ ]; extraConfDirs = [ ];

View file

@ -8,7 +8,7 @@
{ {
name = "bertof"; name = "bertof";
ensurePermissions = { ensurePermissions = {
"DATABASE \"mfh\"" = "ALL PRIVILEGES"; "DATABASE \"mfh\"" = "ALL PRIVILEGES";
}; };
} }
]; ];

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, modulesPath, ...}: { pkgs, ... }:
{ {
# udev rules # udev rules
services.udev.extraRules = '' services.udev.extraRules = ''

View file

@ -1,4 +1,4 @@
{ pkgs, lib, ... }: { {
boot = { boot = {
# kernelModules = [ "snd-seq" "snd-rawmidi" ]; # kernelModules = [ "snd-seq" "snd-rawmidi" ];
# kernel.sysctl = { "vm.swappiness" = 10; "fs.inotify.max_user_watches" = 524288; }; # kernel.sysctl = { "vm.swappiness" = 10; "fs.inotify.max_user_watches" = 524288; };

View file

@ -2,7 +2,7 @@
# your system. Help is available in the configuration.nix(5) man page # your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help). # and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }: { config, ... }:
{ {
boot.initrd.kernelModules = [ "i915" ]; boot.initrd.kernelModules = [ "i915" ];

View file

@ -1,11 +1,12 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { config, lib, modulesPath, ... }:
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ];
@ -14,73 +15,83 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@root" "x-gvfs-hide" ]; options = [ "subvol=@root" "x-gvfs-hide" ];
}; };
fileSystems."/nix" = fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@nix" "x-gvfs-hide" ]; options = [ "subvol=@nix" "x-gvfs-hide" ];
}; };
fileSystems."/home/bertof" = fileSystems."/home/bertof" =
{ device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof" "x-gvfs-hide" ]; options = [ "subvol=@bertof" "x-gvfs-hide" ];
}; };
fileSystems."/home/bertof/Giochi/SSD" = fileSystems."/home/bertof/Giochi/SSD" =
{ device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof_games" "x-gvfs-hide" ]; options = [ "subvol=@bertof_games" "x-gvfs-hide" ];
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/82DB-3444"; {
device = "/dev/disk/by-uuid/82DB-3444";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/home/bertof/Musica" = fileSystems."/home/bertof/Musica" =
{ device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof_music" "x-gvfs-hide" ]; options = [ "subvol=@bertof_music" "x-gvfs-hide" ];
}; };
fileSystems."/home/bertof/Video" = fileSystems."/home/bertof/Video" =
{ device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof_videos" "x-gvfs-hide" ]; options = [ "subvol=@bertof_videos" "x-gvfs-hide" ];
}; };
fileSystems."/home/bertof/Immagini" = fileSystems."/home/bertof/Immagini" =
{ device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof_images" "x-gvfs-hide" ]; options = [ "subvol=@bertof_images" "x-gvfs-hide" ];
}; };
fileSystems."/home/bertof/Scaricati" = fileSystems."/home/bertof/Scaricati" =
{ device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof_downloads" "x-gvfs-hide" ]; options = [ "subvol=@bertof_downloads" "x-gvfs-hide" ];
}; };
fileSystems."/home/bertof/Documenti" = fileSystems."/home/bertof/Documenti" =
{ device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof_documents" "x-gvfs-hide" ]; options = [ "subvol=@bertof_documents" "x-gvfs-hide" ];
}; };
fileSystems."/home/bertof/Documenti/Git" = fileSystems."/home/bertof/Documenti/Git" =
{ device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof_git" "x-gvfs-hide" ]; options = [ "subvol=@bertof_git" "x-gvfs-hide" ];
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/5f3cf424-2bd8-4352-a778-1bb067cb5700"; } [{ device = "/dev/disk/by-uuid/5f3cf424-2bd8-4352-a778-1bb067cb5700"; }];
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -1,19 +1,13 @@
final: prev: final: prev:
let let
nix-rice = final.callPackage ( # nord = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/nord.nix);
fetchTarball { onedark = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/onedark.nix);
url = "https://github.com/bertof/nix-rice/archive/refs/tags/v0.2.1.tar.gz"; # tomorrow-night = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/tomorrow-night.nix);
sha256 = "1is70gjf59sxccwhz1hl9hdxsd4z8vqsr2rdk3imnmxj9n3jf6j8";
}
) {};
nord = with nix-rice; palette.tPalette color.hexToRgba (import ./themes/nord.nix);
onedark = with nix-rice; palette.tPalette color.hexToRgba (import ./themes/onedark.nix);
tomorrow-night = with nix-rice; palette.tPalette color.hexToRgba (import ./themes/tomorrow-night.nix);
in in
( (
rec { rec {
rice = nix-rice // { rice = {
colorPalette = with nix-rice; rec { colorPalette = with prev.lib.rice; palette.defaultPalette // rec {
normal = { normal = {
black = onedark.black; black = onedark.black;
blue = onedark.blue; blue = onedark.blue;
@ -32,12 +26,14 @@ in
# red = nord.n12; # red = nord.n12;
# white = nord.n6; # white = nord.n6;
}; };
dark = palette.darken 10 normal // { dark = palette.darken 10 normal
# black = nord.n0; # // {
# blue = nord.n3; # # black = nord.n0;
# cyan = nord.n7; # # blue = nord.n3;
# white = nord.n4; # # cyan = nord.n7;
}; # # white = nord.n4;
# }
;
}; };
font = { font = {
normal = { normal = {

View file

@ -1,15 +1,15 @@
# Nord palette (https://www.nordtheme.com) # Nord palette (https://www.nordtheme.com)
{ {
n0 = "#2e3440"; n0 = "#2e3440";
n1 = "#3b4252"; n1 = "#3b4252";
n2 = "#434c5e"; n2 = "#434c5e";
n3 = "#4c566a"; n3 = "#4c566a";
n4 = "#d8dee9"; n4 = "#d8dee9";
n5 = "#e5e9f0"; n5 = "#e5e9f0";
n6 = "#eceff4"; n6 = "#eceff4";
n7 = "#8fbcbb"; n7 = "#8fbcbb";
n8 = "#88c0d0"; n8 = "#88c0d0";
n9 = "#81a1c1"; n9 = "#81a1c1";
n10 = "#5e81ac"; n10 = "#5e81ac";
n11 = "#bf616a"; n11 = "#bf616a";
n12 = "#d08770"; n12 = "#d08770";

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, ... }:
{ {
boot = { boot = {
binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]; binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];

View file

@ -1,11 +1,12 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: { modulesPath, ... }:
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
@ -14,30 +15,33 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126"; {
device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@root" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ]; options = [ "subvol=@root" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ];
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/B9D2-255C"; {
device = "/dev/disk/by-uuid/B9D2-255C";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/home/bertof" = fileSystems."/home/bertof" =
{ device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126"; {
device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@home_bertof" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ]; options = [ "subvol=@home_bertof" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ];
}; };
fileSystems."/nix" = fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126"; {
device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@nix" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ]; options = [ "subvol=@nix" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ];
}; };
swapDevices = swapDevices =
[ { device = "/dev/disk/by-uuid/dee188e4-4ff8-417c-9419-b7f00ecb9989"; } [{ device = "/dev/disk/by-uuid/dee188e4-4ff8-417c-9419-b7f00ecb9989"; }];
];
} }