Reformat + swap odin SSD

This commit is contained in:
Filippo Berto 2022-09-01 15:11:16 +02:00
parent 1bc27dde82
commit 2f3d05a802
No known key found for this signature in database
GPG key ID: FE98AE5EC52B1056
83 changed files with 1448 additions and 931 deletions

View file

@ -1,6 +1,5 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
with lib; with lib; {
{
# boot = { # boot = {
# # binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]; # # binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
# # kernelPackages = pkgs.linuxPackages_5_18; # # kernelPackages = pkgs.linuxPackages_5_18;
@ -24,8 +23,14 @@ with lib;
programs = { programs = {
dconf.enable = true; dconf.enable = true;
gnupg.agent = { enable = true; enableSSHSupport = true; }; gnupg.agent = {
zsh = { enable = true; syntaxHighlighting.enable = true; }; enable = true;
enableSSHSupport = true;
};
zsh = {
enable = true;
syntaxHighlighting.enable = true;
};
}; };
networking = { networking = {
@ -56,14 +61,22 @@ with lib;
# bazarr = { enable = true; openFirewall = true; group = "users"; }; # bazarr = { enable = true; openFirewall = true; group = "users"; };
# blueman.enable = true; # blueman.enable = true;
dbus.packages = with pkgs; [ 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 = mkForce pkgs.gnome3.gvfs; }; # gvfs = { enable = true; package = mkForce pkgs.gnome3.gvfs; };
# jackett = { enable = true; openFirewall = true; group = "users"; }; # jackett = { enable = true; openFirewall = true; group = "users"; };
# jellyfin = { enable = true; openFirewall = true; group = "users"; }; # jellyfin = { enable = true; openFirewall = true; group = "users"; };
# logind.lidSwitch = "ignore"; # logind.lidSwitch = "ignore";
# node-red = { enable = true; openFirewall = true; withNpmAndGcc = true; }; # node-red = { 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 = { enable = true; openFirewall = true; group = "users"; }; # radarr = { enable = true; openFirewall = true; group = "users"; };
@ -104,7 +117,17 @@ with lib;
users.users.bertof = { users.users.bertof = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "audio" "input" "docker" "libvirtd" "network" "networkmanager" "usb" "video" "wheel" ]; extraGroups = [
"audio"
"input"
"docker"
"libvirtd"
"network"
"networkmanager"
"usb"
"video"
"wheel"
];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@ -142,7 +165,6 @@ with lib;
# }; # };
# }; # };
# systemd.packages = with pkgs; [ syncthing ]; # systemd.packages = with pkgs; [ syncthing ];
# systemd.services = # systemd.services =
# let # let
@ -230,7 +252,6 @@ with lib;
# }; # };
# }; # };
security.sudo.extraConfig = '' security.sudo.extraConfig = ''
Defaults pwfeedback Defaults pwfeedback
''; '';

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
nixpkgs.overlays = [ nixpkgs.overlays = [
(_: _: { (_: _: {
devEnvironment = (import ./environment.nix) { devEnvironment = (import ./environment.nix) {

View file

@ -1,6 +1,4 @@
{ pkgs ? import <nixos> { inherit system; } { pkgs ? import <nixos> { inherit system; }, system ? builtins.currentSystem }:
, system ? builtins.currentSystem
}:
let let
self = with pkgs; { self = with pkgs; {

View file

@ -3,14 +3,15 @@
, 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 = lib.rice.palette.toRGBAHex palette;
strPalette = lib.rice.palette.toRGBAHex palette; in writeScriptBin "lockscreen" ''
in
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 \

170
flake.nix
View file

@ -3,17 +3,41 @@
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";
};
nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager-u = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs-u"; }; home-manager-u = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs-u";
};
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";
nix-rice = { url = "github:bertof/nix-rice"; inputs = { inxpkgs.follows = "nixpkgs-u"; flake-utils.follows = "flake-utils"; }; }; nix-rice = {
pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs = { nixpkgs.follows = "nixpkgs-u"; flake-utils.follows = "flake-utils"; }; }; url = "github:bertof/nix-rice";
tex2nix = { url = "github:Mic92/tex2nix"; inputs = { nixpkgs.follows = "nixpkgs-u"; flake-utils.follows = "flake-utils"; }; }; inputs = {
inxpkgs.follows = "nixpkgs-u";
flake-utils.follows = "flake-utils";
};
};
pre-commit-hooks = {
url = "github:cachix/pre-commit-hooks.nix";
inputs = {
nixpkgs.follows = "nixpkgs-u";
flake-utils.follows = "flake-utils";
};
};
tex2nix = {
url = "github:Mic92/tex2nix";
inputs = {
nixpkgs.follows = "nixpkgs-u";
flake-utils.follows = "flake-utils";
};
};
}; };
outputs = outputs =
@ -30,13 +54,25 @@
}: }:
let let
overlaysBuilder = system: [ overlaysBuilder = system: [
(_: _: { inherit (tex2nix.packages.${system}) tex2nix; stable = pkgs { inherit system; }; unstable = pkgs-u { inherit system; }; }) (_: _: {
inherit (tex2nix.packages.${system}) tex2nix;
stable = pkgs { inherit system; };
unstable = pkgs-u { inherit system; };
})
(nix-rice.overlays.default) (nix-rice.overlays.default)
(import ./rice.nix) (import ./rice.nix)
(final: _: { (final: _: {
update-background = final.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; }; update-background = final.callPackage ./custom/update-background {
lockscreen = final.callPackage ./custom/lockscreen { palette = final.rice.colorPalette; font = final.rice.font.normal; }; backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+";
sddm-theme-clairvoyance = final.callPackage ./custom/sddm-theme-clairvoyance { wallpaper = ./wallpapers/comfy_waves.jpg; }; };
lockscreen = final.callPackage ./custom/lockscreen {
palette = final.rice.colorPalette;
font = final.rice.font.normal;
};
sddm-theme-clairvoyance =
final.callPackage ./custom/sddm-theme-clairvoyance {
wallpaper = ./wallpapers/comfy_waves.jpg;
};
}) })
]; ];
defaultConfig = { defaultConfig = {
@ -44,10 +80,18 @@
allowUnfree = true; allowUnfree = true;
permittedInsecurePackages = [ "electron-9.4.4" ]; # authy dependency permittedInsecurePackages = [ "electron-9.4.4" ]; # authy dependency
}; };
nixpkgsSettings = { system, overlays ? overlaysBuilder system, config ? defaultConfig }: { inherit system overlays config; }; nixpkgsSettings =
{ system, overlays ? overlaysBuilder system, config ? defaultConfig }: {
inherit system overlays config;
};
pkgs = s: import nixpkgs (nixpkgsSettings s); pkgs = s: import nixpkgs (nixpkgsSettings s);
pkgs-u = s: import nixpkgs-u (nixpkgsSettings s); pkgs-u = s: import nixpkgs-u (nixpkgsSettings s);
homeManagerSettings = { home-manager = { useGlobalPkgs = true; useUserPackages = true; }; }; homeManagerSettings = {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
};
};
commonBaseModules = [ commonBaseModules = [
./nixos_modules/bertof_user.nix ./nixos_modules/bertof_user.nix
@ -79,22 +123,22 @@
odinIntelModules = [ ./odin/configuration-intel.nix ]; odinIntelModules = [ ./odin/configuration-intel.nix ];
odinNvidiaModules = [ ./odin/configuration-nvidia.nix ]; odinNvidiaModules = [ ./odin/configuration-nvidia.nix ];
odinIntelBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec { odinIntelBuilder = { extraModules ? [ ] }:
system = "x86_64-linux"; nixpkgs.lib.nixosSystem rec {
modules = system = "x86_64-linux";
[{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++ modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
commonBaseModules ++ odinBaseModules ++ odinIntelModules ++ ++ commonBaseModules ++ odinBaseModules ++ odinIntelModules
(homeManagerModules { bertof = import ./odin/hm.nix; }) ++ ++ (homeManagerModules { bertof = import ./odin/hm.nix; })
extraModules; ++ extraModules;
}; };
odinNvidiaBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec { odinNvidiaBuilder = { extraModules ? [ ] }:
system = "x86_64-linux"; nixpkgs.lib.nixosSystem rec {
modules = system = "x86_64-linux";
[{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++ modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
commonBaseModules ++ odinBaseModules ++ odinNvidiaModules ++ ++ commonBaseModules ++ odinBaseModules ++ odinNvidiaModules
(homeManagerModules { bertof = import ./odin/hm.nix; }) ++ ++ (homeManagerModules { bertof = import ./odin/hm.nix; })
extraModules; ++ extraModules;
}; };
thorBaseModules = [ thorBaseModules = [
./thor/hardware-configuration.nix ./thor/hardware-configuration.nix
@ -102,14 +146,14 @@
nixos-hardware.nixosModules.common-pc-ssd nixos-hardware.nixosModules.common-pc-ssd
./thor/configuration.nix ./thor/configuration.nix
]; ];
thorBuilder = { extraModules ? [ ] }: nixpkgs-u.lib.nixosSystem rec { thorBuilder = { extraModules ? [ ] }:
system = "x86_64-linux"; nixpkgs-u.lib.nixosSystem rec {
modules = system = "x86_64-linux";
[{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++ modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
commonBaseModules ++ thorBaseModules ++ ++ commonBaseModules ++ thorBaseModules
(homeManagerUModules { bertof = import ./thor/hm.nix; }) ++ ++ (homeManagerUModules { bertof = import ./thor/hm.nix; })
extraModules; ++ extraModules;
}; };
lokiBaseModules = [ lokiBaseModules = [
./loki/hardware-configuration.nix ./loki/hardware-configuration.nix
@ -117,39 +161,38 @@
nixos-hardware.nixosModules.common-pc-ssd nixos-hardware.nixosModules.common-pc-ssd
./loki/configuration.nix ./loki/configuration.nix
]; ];
lokiBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec { lokiBuilder = { extraModules ? [ ] }:
system = "x86_64-linux"; nixpkgs.lib.nixosSystem rec {
modules = system = "x86_64-linux";
[{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++ modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
commonBaseModules ++ lokiBaseModules ++ ++ commonBaseModules ++ lokiBaseModules
(homeManagerModules { bertof = import ./loki/hm.nix; }) ++ ++ (homeManagerModules { bertof = import ./loki/hm.nix; })
extraModules; ++ extraModules;
}; };
freyaBaseModules = [ freyaBaseModules = [
# ./freya/hardware-configuration.nix # ./freya/hardware-configuration.nix
nixos-hardware.nixosModules.raspberry-pi."4" nixos-hardware.nixosModules.raspberry-pi."4"
./freya/configuration.nix ./freya/configuration.nix
]; ];
freyaBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec { freyaBuilder = { extraModules ? [ ] }:
system = "x86_64-linux"; nixpkgs.lib.nixosSystem rec {
modules = system = "x86_64-linux";
[{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++ modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
commonBaseModules ++ freyaBaseModules ++ ++ commonBaseModules ++ freyaBaseModules
(homeManagerModules { bertof = import ./freya/hm.nix; }) ++ ++ (homeManagerModules { bertof = import ./freya/hm.nix; })
extraModules; ++ extraModules;
}; };
baldurBaseModules = [ baldurBaseModules = [ ./baldur/configuration.nix ];
./baldur/configuration.nix balurBuilder = { extraModules ? [ ] }:
]; nixpkgs.lib.nixosSystem rec {
balurBuilder = { extraModules ? [ ] }: nixpkgs.lib.nixosSystem rec { system = "x86_64-linux";
system = "x86_64-linux"; modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }]
modules = [{ nixpkgs = nixpkgsSettings { inherit system; }; }] ++ ++ commonBaseModules ++ baldurBaseModules
commonBaseModules ++ baldurBaseModules ++ ++ (homeManagerModules { bertof = import ./baldur/hm.nix; })
(homeManagerModules { bertof = import ./baldur/hm.nix; }) ++ ++ extraModules;
extraModules; };
};
in in
(flake-utils.lib.eachDefaultSystem (system: rec { (flake-utils.lib.eachDefaultSystem (system: rec {
packages = pkgs-u { inherit system; }; packages = pkgs-u { inherit system; };
@ -157,7 +200,10 @@
checks = { checks = {
pre-commit-check = pre-commit-hooks.lib.${system}.run { pre-commit-check = pre-commit-hooks.lib.${system}.run {
src = ./.; src = ./.;
hooks = { nixpkgs-fmt.enable = true; nix-linter.enable = true; }; hooks = {
nixpkgs-fmt.enable = true;
nix-linter.enable = true;
};
}; };
}; };

View file

@ -1,6 +1,5 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
with lib; with lib; {
{
boot = { boot = {
binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]; binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
kernelPackages = pkgs.linuxPackages_5_18; kernelPackages = pkgs.linuxPackages_5_18;
@ -24,8 +23,14 @@ with lib;
programs = { programs = {
dconf.enable = true; dconf.enable = true;
gnupg.agent = { enable = true; enableSSHSupport = true; }; gnupg.agent = {
zsh = { enable = true; syntaxHighlighting.enable = true; }; enable = true;
enableSSHSupport = true;
};
zsh = {
enable = true;
syntaxHighlighting.enable = true;
};
}; };
networking = { networking = {
@ -63,7 +68,12 @@ with lib;
# jellyfin = { enable = true; openFirewall = true; group = "users"; }; # jellyfin = { enable = true; openFirewall = true; group = "users"; };
# logind.lidSwitch = "ignore"; # logind.lidSwitch = "ignore";
# node-red = { enable = true; openFirewall = true; withNpmAndGcc = true; }; # node-red = { 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 = { enable = true; openFirewall = true; group = "users"; }; # radarr = { enable = true; openFirewall = true; group = "users"; };
@ -136,7 +146,10 @@ with lib;
# }; # };
# }; # };
# }; # };
smartd = { enable = true; notifications.x11.enable = true; }; smartd = {
enable = true;
notifications.x11.enable = true;
};
# sonarr = { enable = true; openFirewall = true; group = "users"; }; # sonarr = { enable = true; openFirewall = true; group = "users"; };
thermald.enable = true; thermald.enable = true;
# transmission = { # transmission = {
@ -173,7 +186,17 @@ with lib;
users.users = { users.users = {
bertof = { bertof = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "audio" "input" "docker" "libvirtd" "network" "networkmanager" "usb" "video" "wheel" ]; extraGroups = [
"audio"
"input"
"docker"
"libvirtd"
"network"
"networkmanager"
"usb"
"video"
"wheel"
];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
# tiziano = { # tiziano = {

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
nixpkgs.overlays = [ nixpkgs.overlays = [
(_: _: { (_: _: {
devEnvironment = (import ./environment.nix) { devEnvironment = (import ./environment.nix) {

View file

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

View file

@ -1,31 +1,32 @@
{ pkgs, ... }: { pkgs, ... }:
let let
strPalette = with pkgs.rice; pkgs.lib.rice.palette.toRgbHex rec { strPalette = with pkgs.rice;
inherit (colorPalette) normal bright; pkgs.lib.rice.palette.toRgbHex rec {
dim = colorPalette.dark; inherit (colorPalette) normal bright;
dim = colorPalette.dark;
primary = { primary = {
background = normal.black; background = normal.black;
foreground = normal.white; foreground = normal.white;
dim_foreground = dim.white; dim_foreground = dim.white;
}; };
cursor = { cursor = {
cursor = normal.white; cursor = normal.white;
text = normal.black; text = normal.black;
}; };
vi_mode_cursor = { vi_mode_cursor = {
cursor = normal.white; cursor = normal.white;
text = normal.black; text = normal.black;
}; };
selection.background = dim.blue; selection.background = dim.blue;
search = { search = {
matches.background = dim.cyan; matches.background = dim.cyan;
bar = { bar = {
foreground = dim.cyan; foreground = dim.cyan;
background = dim.yellow; background = dim.yellow;
};
}; };
}; };
};
in in
{ {
# Include fonts packages # Include fonts packages
@ -45,10 +46,11 @@ in
# hide_when_typing = true; # hide_when_typing = true;
hints.modifiers = "Control"; hints.modifiers = "Control";
}; };
colors = with pkgs.rice; strPalette // { colors = with pkgs.rice;
selection.text = "CellForeground"; strPalette // {
search.matches.foreground = "CellForeground"; selection.text = "CellForeground";
}; search.matches.foreground = "CellForeground";
};
}; };
}; };
} }

View file

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
programs.zsh.enable = true;
programs.zsh.initExtra = ''
source <(${pkgs.any-nix-shell}/bin/any-nix-shell zsh --info-right)
'';
}

View file

@ -5,7 +5,8 @@
let let
dell-laptop = { dell-laptop = {
dpi = 96; dpi = 96;
fingerprint = "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; fingerprint =
"00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5";
mode = "1920x1080"; mode = "1920x1080";
}; };
in in
@ -13,43 +14,87 @@
odin-nvidia = { odin-nvidia = {
fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; }; fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; };
config = { config = {
"eDP-1-1" = { inherit (dell-laptop) mode dpi; primary = true; crtc = 0; }; "eDP-1-1" = {
inherit (dell-laptop) mode dpi;
primary = true;
crtc = 0;
};
}; };
}; };
odin-intel = { odin-intel = {
fingerprint = { "eDP1" = dell-laptop.fingerprint; }; fingerprint = { "eDP1" = dell-laptop.fingerprint; };
config = { config = {
"eDP1" = { inherit (dell-laptop) mode dpi; primary = true; crtc = 0; }; "eDP1" = {
inherit (dell-laptop) mode dpi;
primary = true;
crtc = 0;
};
}; };
}; };
odin-intel-laboratorio-dock-dell = { odin-intel-laboratorio-dock-dell = {
fingerprint = { fingerprint = {
"DP1-3" = "00ffffffffffff0010ac10d04c36453221110103682b1b78ee8db0a2544a9c25115054a54b00714f818001010101010101010101010121399030621a274068b03600ae0e1100001c000000ff00434b3632373738413245364c0a000000fd00384b1e530f000a202020202020000000fc0044454c4c20453230375746500a0088"; "DP1-3" =
"00ffffffffffff0010ac10d04c36453221110103682b1b78ee8db0a2544a9c25115054a54b00714f818001010101010101010101010121399030621a274068b03600ae0e1100001c000000ff00434b3632373738413245364c0a000000fd00384b1e530f000a202020202020000000fc0044454c4c20453230375746500a0088";
"eDP1" = dell-laptop.fingerprint; "eDP1" = dell-laptop.fingerprint;
}; };
config = { config = {
"DP1-3" = { crtc = 1; mode = "1680x1050"; position = "120x0"; primary = true; dpi = 96; }; "DP1-3" = {
"eDP1" = { inherit (dell-laptop) mode dpi; crtc = 0; position = "0x1080"; }; crtc = 1;
mode = "1680x1050";
position = "120x0";
primary = true;
dpi = 96;
};
"eDP1" = {
inherit (dell-laptop) mode dpi;
crtc = 0;
position = "0x1080";
};
}; };
}; };
odin-intel-laboratorio = { odin-intel-laboratorio = {
fingerprint = { fingerprint = {
"DP1-3" = "00ffffffffffff0010ac71404c473344281601030e331d78eadd45a3554fa027125054a54b00714f8180d1c001010101010101010101023a801871382d40582c4500fe1f1100001e000000ff004b463837593241364433474c0a000000fc0044454c4c205532333132484d0a000000fd00384c1e5311000a2020202020200081"; "DP1-3" =
"00ffffffffffff0010ac71404c473344281601030e331d78eadd45a3554fa027125054a54b00714f8180d1c001010101010101010101023a801871382d40582c4500fe1f1100001e000000ff004b463837593241364433474c0a000000fc0044454c4c205532333132484d0a000000fd00384c1e5311000a2020202020200081";
"eDP1" = dell-laptop.fingerprint; "eDP1" = dell-laptop.fingerprint;
}; };
config = { config = {
"DP1-3" = { crtc = 1; mode = "1920x1080"; position = "0x0"; primary = true; dpi = 96; }; "DP1-3" = {
"eDP1" = { inherit (dell-laptop) mode dpi; crtc = 0; position = "0x1080"; }; crtc = 1;
mode = "1920x1080";
position = "0x0";
primary = true;
dpi = 96;
};
"eDP1" = {
inherit (dell-laptop) mode dpi;
crtc = 0;
position = "0x1080";
};
}; };
}; };
thor-two-screens = { thor-two-screens = {
fingerprint = { fingerprint = {
"DP-4" = "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da"; "DP-4" =
"HDMI-0" = "00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa"; "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da";
"HDMI-0" =
"00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa";
}; };
config = { config = {
"DP-4" = { crtc = 0; mode = "2560x1440"; position = "1080x162"; primary = true; dpi = 96; }; "DP-4" = {
"HDMI-0" = { crtc = 1; mode = "1920x1080"; position = "0x0"; rotate = "right"; dpi = 96; }; crtc = 0;
mode = "2560x1440";
position = "1080x162";
primary = true;
dpi = 96;
};
"HDMI-0" = {
crtc = 1;
mode = "1920x1080";
position = "0x0";
rotate = "right";
dpi = 96;
};
}; };
}; };
}; };

View file

@ -1,8 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
let let tomlGenerate = (pkgs.formats.toml { }).generate "bottom-toml";
tomlGenerate = (pkgs.formats.toml { }).generate "bottom-toml"; in {
in
{
home.packages = with pkgs; [ bottom ]; home.packages = with pkgs; [ bottom ];
xdg.configFile."bottom/bottom.toml".source = tomlGenerate { xdg.configFile."bottom/bottom.toml".source = tomlGenerate {
"flags" = { "flags" = {

View file

@ -1,11 +1,14 @@
{ pkgs, lib, ... }: { pkgs, lib, ... }:
let let
strPalette = with pkgs.rice; pkgs.lib.rice.palette.toRgbHex colorPalette; strPalette = with pkgs.rice; pkgs.lib.rice.palette.toRgbHex colorPalette;
fmtString = str: "\'${str}\'"; fmtString = str: "'${str}'";
in in
{ {
xdg.configFile."cava/config".text = lib.generators.toINI { } { xdg.configFile."cava/config".text = lib.generators.toINI { } {
general = { bar_width = 1; bar_spacing = 1; }; general = {
bar_width = 1;
bar_spacing = 1;
};
color = { color = {
gradient = 1; gradient = 1;
gradient_count = 5; gradient_count = 5;

View file

@ -1,6 +1 @@
{ pkgs, ... }: { pkgs, ... }: { home.packages = with pkgs; [ clang-tools ]; }
{
home.packages = with pkgs; [
clang-tools
];
}

View file

@ -1,8 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
let let palette = pkgs.lib.rice.palette.toRGBHex pkgs.rice.colorPalette;
palette = pkgs.lib.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 ];
services.dunst = { services.dunst = {
enable = true; enable = true;

View file

@ -1,3 +1 @@
{ { services.easyeffects.enable = true; }
services.easyeffects.enable = true;
}

View file

@ -1,8 +1,5 @@
{ pkgs, ... }: { pkgs, ... }: {
{ fonts.fontconfig = { enable = true; };
fonts.fontconfig = {
enable = true;
};
home.packages = with pkgs; [ home.packages = with pkgs; [
dejavu_fonts dejavu_fonts
noto-fonts noto-fonts

View file

@ -44,11 +44,13 @@ let
"gdw" = "git diff --word-diff"; "gdw" = "git diff --word-diff";
"gf" = "git fetch"; "gf" = "git fetch";
"gfa" = "git fetch --all --prune"; "gfa" = "git fetch --all --prune";
"gfg" = "git ls-files \| grep"; "gfg" = "git ls-files | grep";
"gignored" = ''git ls-files -v \| grep"^[[ :lower: ]]"''; "gignored" = ''git ls-files -v \| grep"^[[ :lower: ]]"'';
"glo" = "git log --oneline --decorate"; "glo" = "git log --oneline --decorate";
"glols" = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --stat"; "glols" =
"glola" = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all"; "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --stat";
"glola" =
"git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all";
"glog" = "git log --oneline --decorate --graph"; "glog" = "git log --oneline --decorate --graph";
"gloga" = "git log --oneline --decorate --graph --all"; "gloga" = "git log --oneline --decorate --graph --all";
"gm" = "git merge"; "gm" = "git merge";
@ -117,10 +119,5 @@ in
}; };
programs.bash.shellAliases = shellAliases; programs.bash.shellAliases = shellAliases;
programs.zsh.shellAliases = shellAliases; programs.zsh.shellAliases = shellAliases;
home.packages = with pkgs; [ home.packages = with pkgs; [ gh git-secret glab meld ];
gh
git-secret
glab
meld
];
} }

View file

@ -4,7 +4,5 @@
goPath = ".go"; goPath = ".go";
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [ gopls ];
gopls
];
} }

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
gtk = with pkgs.rice; { gtk = with pkgs.rice; {
enable = true; enable = true;
font = font.normal; font = font.normal;

View file

@ -1,36 +1,37 @@
{ pkgs, ... }: { pkgs, ... }: {
{
programs.bash.shellAliases = { x = "hx"; }; programs.bash.shellAliases = { x = "hx"; };
programs.zsh.shellAliases = { x = "hx"; }; programs.zsh.shellAliases = { x = "hx"; };
home.sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; }; home.sessionVariables = {
EDITOR = "hx";
VISUAL = "hx";
};
home.packages = [ home.packages = [
(pkgs.makeDesktopItem (pkgs.makeDesktopItem {
{ name = "helix";
name = "helix"; exec = "hx %F";
exec = "hx %F"; icon = "helix";
icon = "helix"; desktopName = "Helix";
desktopName = "Helix"; comment = "Helix text editor";
comment = "Helix text editor"; terminal = true;
terminal = true; categories = [ "Development" ];
categories = [ "Development" ]; mimeTypes = [
mimeTypes = [ "text/english"
"text/english" "text/plain"
"text/plain" "text/x-makefile"
"text/x-makefile" "text/x-c++hdr"
"text/x-c++hdr" "text/x-c++src"
"text/x-c++src" "text/x-chdr"
"text/x-chdr" "text/x-csrc"
"text/x-csrc" "text/x-java"
"text/x-java" "text/x-moc"
"text/x-moc" "text/x-pascal"
"text/x-pascal" "text/x-tcl"
"text/x-tcl" "text/x-tex"
"text/x-tex" "application/x-shellscript"
"application/x-shellscript" "text/x-c"
"text/x-c" "text/x-c++"
"text/x-c++" ];
]; })
})
]; ];
programs.helix = { programs.helix = {
enable = true; enable = true;
@ -65,15 +66,34 @@
base16 = { base16 = {
"ui.menu" = transparent; "ui.menu" = transparent;
"ui.menu.selected" = { modifiers = [ "reversed" ]; }; "ui.menu.selected" = { modifiers = [ "reversed" ]; };
"ui.linenr" = { fg = gray; bg = dark-gray; }; "ui.linenr" = {
fg = gray;
bg = dark-gray;
};
"ui.popup" = { modifiers = [ "reversed" ]; }; "ui.popup" = { modifiers = [ "reversed" ]; };
"ui.linenr.selected" = { fg = white; bg = black; modifiers = [ "bold" ]; }; "ui.linenr.selected" = {
"ui.selection" = { fg = black; bg = blue; }; fg = white;
bg = black;
modifiers = [ "bold" ];
};
"ui.selection" = {
fg = black;
bg = blue;
};
"ui.selection.primary" = { modifiers = [ "reversed" ]; }; "ui.selection.primary" = { modifiers = [ "reversed" ]; };
"comment" = { fg = gray; }; "comment" = { fg = gray; };
"ui.statusline" = { fg = white; bg = dark-gray; }; "ui.statusline" = {
"ui.statusline.inactive" = { fg = dark-gray; bg = white; }; fg = white;
"ui.help" = { fg = dark-gray; bg = white; }; bg = dark-gray;
};
"ui.statusline.inactive" = {
fg = dark-gray;
bg = white;
};
"ui.help" = {
fg = dark-gray;
bg = white;
};
"ui.cursor" = { modifiers = [ "reversed" ]; }; "ui.cursor" = { modifiers = [ "reversed" ]; };
"variable" = red; "variable" = red;
"variable.builtin" = orange; "variable.builtin" = orange;
@ -81,7 +101,10 @@
"constant" = orange; "constant" = orange;
"attributes" = yellow; "attributes" = yellow;
"type" = yellow; "type" = yellow;
"ui.cursor.match" = { fg = yellow; modifiers = [ "underlined" ]; }; "ui.cursor.match" = {
fg = yellow;
modifiers = [ "underlined" ];
};
"string" = green; "string" = green;
"variable.other.member" = red; "variable.other.member" = red;
"constant.character.escape" = cyan; "constant.character.escape" = cyan;

View file

@ -1,5 +1 @@
{ { programs.info = { enable = true; }; }
programs.info = {
enable = true;
};
}

View file

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

View file

@ -1,7 +1,2 @@
{ pkgs, ... }: { pkgs, ... }: { home.packages = with pkgs; [ flow ]; }
{
home.packages = with pkgs; [
flow
];
}

View file

@ -1,17 +1,13 @@
{ pkgs, ... }: { pkgs, ... }:
let let joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake";
joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake"; in {
in
{
systemd.user.services."joystickwake" = { systemd.user.services."joystickwake" = {
Unit = { Unit = {
Description = "Keep lockscreen from activating"; Description = "Keep lockscreen from activating";
After = [ "graphical-session.target" ]; After = [ "graphical-session.target" ];
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
}; };
Install = { Install = { WantedBy = [ "graphical-session.target" ]; };
WantedBy = [ "graphical-session.target" ];
};
Service = { Service = {
Type = "simple"; Type = "simple";
ExecStart = joystickwakeCmd; ExecStart = joystickwakeCmd;

View file

@ -1,5 +1 @@
{ { programs.jq = { enable = true; }; }
programs.jq = {
enable = true;
};
}

View file

@ -1,33 +1,34 @@
{ pkgs, ... }: { pkgs, ... }:
let let
themeBuilder = palette: with palette; '' themeBuilder = palette:
set-face global value rgb:${normal.magenta},default with palette; ''
set-face global type rgb:${bright.white},default set-face global value rgb:${normal.magenta},default
set-face global identifier rgb:${normal.cyan},default set-face global type rgb:${bright.white},default
set-face global string rgb:${normal.green},default set-face global identifier rgb:${normal.cyan},default
set-face global error rgb:${normal.red},default set-face global string rgb:${normal.green},default
set-face global keyword rgb:${normal.blue},default set-face global error rgb:${normal.red},default
set-face global operator rgb:${normal.blue},default set-face global keyword rgb:${normal.blue},default
set-face global attribute rgb:${bright.blue},default set-face global operator rgb:${normal.blue},default
set-face global comment rgb:${bright.blue},default set-face global attribute rgb:${bright.blue},default
set-face global meta rgb:${normal.yellow},default set-face global comment rgb:${bright.blue},default
set-face global Default rgb:${normal.white},default set-face global meta rgb:${normal.yellow},default
set-face global PrimarySelection rgb:${normal.black},rgb:${dark.yellow} set-face global Default rgb:${normal.white},default
set-face global SecondarySelection rgb:${normal.black},rgb:${dark.white} set-face global PrimarySelection rgb:${normal.black},rgb:${dark.yellow}
set-face global PrimaryCursor rgb:${normal.black},rgb:${normal.yellow} set-face global SecondarySelection rgb:${normal.black},rgb:${dark.white}
set-face global SecondaryCursor rgb:${normal.black},rgb:${normal.white} set-face global PrimaryCursor rgb:${normal.black},rgb:${normal.yellow}
set-face global MenuForeground rgb:${normal.white},rgb:${bright.black} set-face global SecondaryCursor rgb:${normal.black},rgb:${normal.white}
set-face global MenuBackground default,rgb:${normal.black} set-face global MenuForeground rgb:${normal.white},rgb:${bright.black}
set-face global MenuInfo default,rgb:${normal.black} set-face global MenuBackground default,rgb:${normal.black}
set-face global Information rgb:${dark.black},rgb:${normal.cyan} set-face global MenuInfo default,rgb:${normal.black}
set-face global StatusLine rgb:${normal.white},rgb:${normal.black} set-face global Information rgb:${dark.black},rgb:${normal.cyan}
set-face global StatusLineMode rgb:${normal.blue},rgb:${normal.black} set-face global StatusLine rgb:${normal.white},rgb:${normal.black}
set-face global StatusLineInfo rgb:${normal.blue},rgb:${normal.black} set-face global StatusLineMode rgb:${normal.blue},rgb:${normal.black}
set-face global StatusLineValue rgb:${normal.blue},rgb:${normal.black} set-face global StatusLineInfo rgb:${normal.blue},rgb:${normal.black}
set-face global StatusCursor rgb:${dark.black},rgb:${normal.yellow} set-face global StatusLineValue rgb:${normal.blue},rgb:${normal.black}
set-face global Prompt rgb:${normal.cyan},rgb:${normal.black} set-face global StatusCursor rgb:${dark.black},rgb:${normal.yellow}
set-face global BufferPadding default,default set-face global Prompt rgb:${normal.cyan},rgb:${normal.black}
''; set-face global BufferPadding default,default
'';
packages = with pkgs; [ packages = with pkgs; [
yaml-language-server yaml-language-server
@ -40,33 +41,32 @@ let
aspellDicts.en-science aspellDicts.en-science
aspellDicts.it aspellDicts.it
(pkgs.makeDesktopItem (pkgs.makeDesktopItem {
{ name = "kakoune";
name = "kakoune"; exec = "kak %F";
exec = "kak %F"; icon = "kakoune";
icon = "kakoune"; desktopName = "Kakoune";
desktopName = "Kakoune"; comment = "Kakoune text editor";
comment = "Kakoune text editor"; terminal = true;
terminal = true; categories = [ "Development" ];
categories = [ "Development" ]; mimeTypes = [
mimeTypes = [ "text/english"
"text/english" "text/plain"
"text/plain" "text/x-makefile"
"text/x-makefile" "text/x-c++hdr"
"text/x-c++hdr" "text/x-c++src"
"text/x-c++src" "text/x-chdr"
"text/x-chdr" "text/x-csrc"
"text/x-csrc" "text/x-java"
"text/x-java" "text/x-moc"
"text/x-moc" "text/x-pascal"
"text/x-pascal" "text/x-tcl"
"text/x-tcl" "text/x-tex"
"text/x-tex" "application/x-shellscript"
"application/x-shellscript" "text/x-c"
"text/x-c" "text/x-c++"
"text/x-c++" ];
]; })
})
]; ];
in in
@ -81,40 +81,166 @@ in
tabStop = 2; tabStop = 2;
indentWidth = 2; indentWidth = 2;
alignWithTabs = true; alignWithTabs = true;
scrollOff = { lines = 5; columns = 3; }; scrollOff = {
ui = { setTitle = true; changeColors = true; enableMouse = true; }; lines = 5;
wrapLines = { enable = true; word = true; }; columns = 3;
numberLines = { enable = true; highlightCursor = true; }; };
ui = {
setTitle = true;
changeColors = true;
enableMouse = true;
};
wrapLines = {
enable = true;
word = true;
};
numberLines = {
enable = true;
highlightCursor = true;
};
keyMappings = [ 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 = "normal";
{ mode = "user"; docstring = "Comment block"; key = "b"; effect = ":comment-block<ret>"; } docstring = "Edit file";
{ mode = "user"; docstring = "Comment line"; key = "l"; effect = ":comment-line<ret>"; } key = "<c-e>";
{ mode = "user"; docstring = "Copy to clipboard"; key = "y"; effect = "<a-|>${pkgs.xclip}/bin/xclip -i -selection clipboard<ret>"; } effect = ":edit<space>";
{ 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";
{ mode = "user"; docstring = "Rename object"; key = "r"; effect = ":lsp-rename-prompt<ret>"; } docstring = "Code actions";
{ mode = "user"; docstring = "Jump to type definition"; key = "t"; effect = ":lsp-type-definition<ret>"; } key = "a";
{ mode = "user"; docstring = "List project diagnostics"; key = "i"; effect = ":lsp-diagnostics<ret>"; } effect = ":lsp-code-actions<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";
{ mode = "user"; docstring = "Spellcheck English"; key = "S"; effect = ":spell en<ret>"; } docstring = "Comment block";
{ mode = "user"; docstring = "Spellcheck"; key = "s"; effect = ":spell "; } key = "b";
{ mode = "normal"; docstring = "Try next snippet placeholder"; key = "<c-n>"; effect = "<a-;>: insert-c-n<ret>"; } 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 = "Search"; key = "/"; effect = "/(?i)"; }
# { mode = "normal"; docstring = "Reverse search"; key = "<a-/>"; effect = "<a-/>(?i)"; } # { mode = "normal"; docstring = "Reverse search"; key = "<a-/>"; effect = "<a-/>(?i)"; }
]; ];
hooks = with pkgs; [ hooks = with pkgs; [
{ name = "BufCreate"; option = ".*"; commands = "editorconfig-load"; } {
name = "BufCreate";
option = ".*";
commands = "editorconfig-load";
}
# { name = "ModuleLoaded"; option = "auto-pairs"; commands = "auto-pairs-enable"; } # { 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 = "ModuleLoaded";
{ name = "BufSetOption"; option = "filetype=python"; commands = "set-option buffer formatcmd 'black -'"; } option = "powerline";
{ name = "BufSetOption"; option = "filetype=(markdown|html|json|yaml|css|scss|less)"; commands = "set-option buffer formatcmd prettier"; } commands = "powerline-enable; powerline-start";
{ name = "BufSetOption"; option = "filetype=rust"; commands = "set-option buffer formatcmd 'rustfmt'"; } }
{ name = "BufSetOption"; option = "filetype=sh"; commands = "set-option buffer formatcmd 'rustfmt'"; } {
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 # TODO add more formatters from https://github.com/mawww/kakoune/wiki/Format
}; };
@ -148,7 +274,8 @@ in
}; };
# THEME FILE # THEME FILE
xdg.configFile."kak/colors/nord.kak".text = themeBuilder (pkgs.lib.rice.palette.toRgbShortHex pkgs.rice.colorPalette); xdg.configFile."kak/colors/nord.kak".text =
themeBuilder (pkgs.lib.rice.palette.toRgbShortHex pkgs.rice.colorPalette);
xdg.configFile."kak-lsp/kak-lsp.toml".text = '' xdg.configFile."kak-lsp/kak-lsp.toml".text = ''
snippet_support = false snippet_support = false

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
config.systemd.user.services.keepassxc = { config.systemd.user.services.keepassxc = {
Unit = { Unit = {
Description = "KeePassXC password manager"; Description = "KeePassXC password manager";

View file

@ -1,25 +1,26 @@
{ pkgs, ... }: { pkgs, ... }:
let let
strPalette = with pkgs.rice; pkgs.lib.rice.palette.toRgbHex rec { strPalette = with pkgs.rice;
foreground = colorPalette.normal.white; pkgs.lib.rice.palette.toRgbHex rec {
background = colorPalette.normal.black; foreground = colorPalette.normal.white;
color0 = colorPalette.normal.black; background = colorPalette.normal.black;
color1 = colorPalette.normal.red; color0 = colorPalette.normal.black;
color2 = colorPalette.normal.green; color1 = colorPalette.normal.red;
color3 = colorPalette.normal.yellow; color2 = colorPalette.normal.green;
color4 = colorPalette.normal.blue; color3 = colorPalette.normal.yellow;
color5 = colorPalette.normal.magenta; color4 = colorPalette.normal.blue;
color6 = colorPalette.normal.cyan; color5 = colorPalette.normal.magenta;
color7 = colorPalette.normal.white; color6 = colorPalette.normal.cyan;
color8 = colorPalette.bright.black; color7 = colorPalette.normal.white;
color9 = colorPalette.bright.red; color8 = colorPalette.bright.black;
color10 = colorPalette.bright.green; color9 = colorPalette.bright.red;
color11 = colorPalette.bright.yellow; color10 = colorPalette.bright.green;
color12 = colorPalette.bright.blue; color11 = colorPalette.bright.yellow;
color13 = colorPalette.bright.magenta; color12 = colorPalette.bright.blue;
color14 = colorPalette.bright.cyan; color13 = colorPalette.bright.magenta;
color15 = colorPalette.bright.white; color14 = colorPalette.bright.cyan;
}; color15 = colorPalette.bright.white;
};
in in
{ {
programs.kitty = { programs.kitty = {
@ -32,7 +33,8 @@ in
update_check_interval = 0; update_check_interval = 0;
background_opacity = toString pkgs.rice.opacity; background_opacity = toString pkgs.rice.opacity;
close_on_child_death = "yes"; close_on_child_death = "yes";
clipboard_control = "write-clipboard write-primary read-clipboard read-primary"; clipboard_control =
"write-clipboard write-primary read-clipboard read-primary";
disable_ligatures = "never"; disable_ligatures = "never";
editor = "kak"; editor = "kak";
} // strPalette; } // strPalette;

View file

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

View file

@ -34,43 +34,46 @@ in
source = lf_kitty_preview; source = lf_kitty_preview;
# keybinding = "i"; # keybinding = "i";
}; };
keybindings = { keybindings = { "<c-f>" = "$EDITOR $(fzf)"; };
"<c-f>" = "$EDITOR $(fzf)";
};
commands = { commands = {
"z" = ''''${{ "z" = ''
result="$(zoxide query --exclude "$PWD" -- "$@")" ''${{
lf -remote "send $id cd '$result'" result="$(zoxide query --exclude "$PWD" -- "$@")"
}}''; lf -remote "send $id cd '$result'"
"zi" = ''''${{ }}'';
result="$(zoxide query -i -- "$@")" "zi" = ''
lf -remote "send $id cd '$result'" ''${{
}}''; result="$(zoxide query -i -- "$@")"
"extract" = ''''${{ lf -remote "send $id cd '$result'"
set -f }}'';
case $f in "extract" = ''
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; ''${{
*.tar.gz|*.tgz) tar xzvf $f;; set -f
*.tar.xz|*.txz) tar xJvf $f;; case $f in
*.zip) unzip $f;; *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
*.rar) unrar x $f;; *.tar.gz|*.tgz) tar xzvf $f;;
*.7z) 7z x $f;; *.tar.xz|*.txz) tar xJvf $f;;
esac *.zip) unzip $f;;
}}''; *.rar) unrar x $f;;
"tar" = ''''${{ *.7z) 7z x $f;;
set -f esac
mkdir $1 }}'';
cp -r $fx $1 "tar" = ''
tar czf $1.tar.gz $1 ''${{
rm -rf $1 set -f
}}''; mkdir $1
"zip" = ''''${{ cp -r $fx $1
set -f tar czf $1.tar.gz $1
mkdir $1 rm -rf $1
cp -r $fx $1 }}'';
zip -r $1.zip $1 "zip" = ''
rm -rf $1 ''${{
}}''; set -f
mkdir $1
cp -r $fx $1
zip -r $1.zip $1
rm -rf $1
}}'';
}; };
extraConfig = '' extraConfig = ''
set cleaner ${lf_kitty_cleaner} set cleaner ${lf_kitty_cleaner}

View file

@ -10,9 +10,7 @@ in
After = [ "graphical-session-pre.target" ]; After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
}; };
Install = { Install = { WantedBy = [ "graphical-session.target" ]; };
WantedBy = [ "graphical-session.target" ];
};
Service = { Service = {
Type = "simple"; Type = "simple";
ExecStart = libinputGesturesCmd; ExecStart = libinputGesturesCmd;

View file

@ -1,3 +1 @@
{ { services.lorri.enable = true; }
services.lorri.enable = true;
}

View file

@ -3,7 +3,38 @@
enable = true; enable = true;
enableSessionWide = true; enableSessionWide = true;
settings = { settings = {
toggle_fps_limit = "F1";
legacy_layout = false;
gpu_stats = true;
gpu_temp = true;
gpu_text = "GPU";
cpu_stats = true;
cpu_temp = true;
cpu_color = "2e97cb";
cpu_text = "CPU";
io_color = "a491d3";
vram = true;
vram_color = "ad64c1";
ram = true;
ram_color = "c26693";
fps = true;
engine_color = "eb5b5b";
gpu_color = "2e9762";
wine_color = "eb5b5b";
frame_timing = 1;
frametime_color = "00ff00";
media_player_color = "ffffff";
background_alpha = 0.4;
font_size = 24;
background_color = "020202";
position = "top-left";
text_color = "ffffff";
round_corners = 0;
toggle_hud = "Shift_L+F12"; toggle_hud = "Shift_L+F12";
toggle_logging = "Shift_L+F2";
upload_log = "F5";
output_folder = "/home/bertof";
media_player_name = "spotify";
}; };
}; };
} }

View file

@ -1,11 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
let let megasyncCmd = "${pkgs.megacmd}/bin/mega-cmd-server";
megasyncCmd = "${pkgs.megacmd}/bin/mega-cmd-server"; in {
in home.packages = [ pkgs.megacmd ];
{
home.packages = [
pkgs.megacmd
];
systemd.user.services."mega-cmd-server" = { systemd.user.services."mega-cmd-server" = {
Unit = { Unit = {
@ -13,9 +9,7 @@ in
After = [ "default.target" ]; After = [ "default.target" ];
PartOf = [ "default.target" ]; PartOf = [ "default.target" ];
}; };
Install = { Install = { WantedBy = [ "default.target" ]; };
WantedBy = [ "default.target" ];
};
Service = { Service = {
Type = "simple"; Type = "simple";
ExecStart = megasyncCmd; ExecStart = megasyncCmd;

View file

@ -1,4 +1 @@
{ pkgs, ... }: { pkgs, ... }: { home.packages = with pkgs; [ gnome.nautilus ]; }
{
home.packages = with pkgs; [ gnome.nautilus ];
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
programs.nix-index = { programs.nix-index = {
enable = true; enable = true;
enableBashIntegration = true; enableBashIntegration = true;
@ -20,7 +19,11 @@
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,5 +1 @@
{ { programs.noti = { enable = true; }; }
programs.noti = {
enable = true;
};
}

View file

@ -1,5 +1 @@
{ { programs.nushell = { enable = true; }; }
programs.nushell = {
enable = true;
};
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
programs.obs-studio = { programs.obs-studio = {
enable = true; enable = true;
package = pkgs.obs-studio; package = pkgs.obs-studio;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# libreoffice-fresh # libreoffice-fresh
onlyoffice-bin onlyoffice-bin

View file

@ -1,17 +1,13 @@
{ pkgs, ... }: { pkgs, ... }:
let let onedriveCmd = "${pkgs.unstable.onedrive}/bin/onedrive --monitor";
onedriveCmd = "${pkgs.unstable.onedrive}/bin/onedrive --monitor"; in {
in
{
systemd.user.services."onedrive" = { systemd.user.services."onedrive" = {
Unit = { Unit = {
Description = "OneDrive synchronization service"; Description = "OneDrive synchronization service";
After = [ "network.target" ]; After = [ "network.target" ];
PartOf = [ "default.target" ]; PartOf = [ "default.target" ];
}; };
Install = { Install = { WantedBy = [ "default.target" ]; };
WantedBy = [ "default.target" ];
};
Service = { Service = {
ExecStart = onedriveCmd; ExecStart = onedriveCmd;
Restart = "always"; Restart = "always";

View file

@ -1,5 +1 @@
{ { programs.password-store = { enable = true; }; }
programs.password-store = {
enable = true;
};
}

View file

@ -9,7 +9,8 @@ let
pgrep = "${pkgs.procps}/bin/pgrep"; pgrep = "${pkgs.procps}/bin/pgrep";
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";
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,39 +18,39 @@ 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.lib.rice; let colors = with pkgs.lib.rice;
alpha = 255 * opacity; let alpha = 255 * opacity;
in in palette.toARGBHex rec {
palette.toARGBHex rec {
normal = { normal = {
foreground = colorPalette.normal.white; foreground = colorPalette.normal.white;
background = color.setAlphaRgba alpha (colorPalette.normal.black); background = color.setAlphaRgba alpha (colorPalette.normal.black);
underline = colorPalette.dark.blue; underline = colorPalette.dark.blue;
};
active = {
foreground = colorPalette.bright.white;
background = color.setAlphaRgba alpha (colorPalette.normal.black);
underline = colorPalette.bright.blue;
};
selected = {
foreground = colorPalette.bright.white;
background = color.setAlphaRgba alpha
(color.brighten 10 colorPalette.bright.black);
underline = colorPalette.bright.red;
};
alert = colorPalette.bright.red;
green = colorPalette.normal.green;
yellow = colorPalette.normal.yellow;
orange = colorPalette.bright.red;
red = colorPalette.normal.red;
transparent = color.transparent;
}; };
active = {
foreground = colorPalette.bright.white;
background = color.setAlphaRgba alpha (colorPalette.normal.black);
underline = colorPalette.bright.blue;
};
selected = {
foreground = colorPalette.bright.white;
background = color.setAlphaRgba alpha (color.brighten 10 colorPalette.bright.black);
underline = colorPalette.bright.red;
};
alert = colorPalette.bright.red;
green = colorPalette.normal.green;
yellow = colorPalette.normal.yellow;
orange = colorPalette.bright.red;
red = colorPalette.normal.red;
transparent = color.transparent;
};
commonBar = { commonBar = {
locale = config.home.language.base; locale = config.home.language.base;
monitor = "\${env:MONITOR}"; monitor = "\${env:MONITOR}";
@ -61,8 +62,14 @@ 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 = { left = 0; right = 0; }; padding = {
module.margin = { left = 0; right = 0; }; left = 0;
right = 0;
};
module.margin = {
left = 0;
right = 0;
};
separator = " "; separator = " ";
border = { border = {
color = colors.transparent; color = colors.transparent;
@ -72,7 +79,9 @@ let
bottom.size = 0; bottom.size = 0;
}; };
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"
# "Font Awesome 6 Free:size=14;0" # "Font Awesome 6 Free:size=14;0"
# "Noto Color Emoji:size=2;2" # "Noto Color Emoji:size=2;2"
"Noto Sans Symbols2:size=${toString pkgs.rice.font.monospace.size};2" "Noto Sans Symbols2:size=${toString pkgs.rice.font.monospace.size};2"
@ -96,25 +105,23 @@ in
services.polybar = { services.polybar = {
enable = true; enable = true;
package = pkgs.polybarFull; package = pkgs.polybarFull;
script = script = ''
'' monitor=`polybar -m | ${grep} primary | ${cut} -d":" -f1`
monitor=`polybar -m | ${grep} primary | ${cut} -d":" -f1` MONITOR=$monitor polybar primary &
MONITOR=$monitor polybar primary & monitors=(`polybar -m | ${grep} -v primary | ${cut} -d":" -f1`)
monitors=(`polybar -m | ${grep} -v primary | ${cut} -d":" -f1`) for monitor in "''${monitors[@]}"; do
for monitor in "''${monitors[@]}"; do MONITOR=$monitor polybar secondary &
MONITOR=$monitor polybar secondary & done
done '';
'';
settings = { settings = {
"settings" = { "settings" = { screenchange-reload = false; };
screenchange-reload = false;
};
"bar/primary" = recursiveUpdate 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";
enable-ipc = true; enable-ipc = true;
tray = { tray = {
position = "right"; position = "right";
@ -125,7 +132,8 @@ in
"bar/secondary" = recursiveUpdate 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";
enable-ipc = true; enable-ipc = true;
}; };
@ -148,8 +156,12 @@ in
}; };
format = { format = {
charging = recursiveUpdate colors.selected { text = "<animation-charging> <label-charging>"; }; charging = recursiveUpdate colors.selected {
discharging = recursiveUpdate colors.active { text = "<animation-discharging> <label-discharging>"; }; text = "<animation-charging> <label-charging>";
};
discharging = recursiveUpdate colors.active {
text = "<animation-discharging> <label-discharging>";
};
full = recursiveUpdate colors.normal { text = " <label-full>"; }; full = recursiveUpdate colors.normal { text = " <label-full>"; };
}; };
@ -176,8 +188,13 @@ in
{ {
focused = recursiveUpdate colors.selected common; focused = recursiveUpdate colors.selected common;
occupied = recursiveUpdate colors.active common; occupied = recursiveUpdate colors.active common;
urgent = recursiveUpdate (recursiveUpdate colors.active common) { background = colors.alert; }; urgent = recursiveUpdate (recursiveUpdate colors.active common) {
empty = recursiveUpdate (recursiveUpdate colors.normal common) { text = "󰧟"; padding = 0; }; background = colors.alert;
};
empty = recursiveUpdate (recursiveUpdate colors.normal common) {
text = "󰧟";
padding = 0;
};
}; };
}; };
@ -230,11 +247,14 @@ in
colors.red colors.red
]; ];
}; };
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;
volume = recursiveUpdate colors.normal { text = "<ramp-volume> <label-volume>"; }; volume = recursiveUpdate colors.normal {
text = "<ramp-volume> <label-volume>";
};
}; };
label.muted.text = " muted"; label.muted.text = " muted";
label.volume.text = "%percentage%%"; label.volume.text = "%percentage%%";
@ -250,7 +270,8 @@ in
underline = colors.alert; underline = colors.alert;
}; };
}; };
hwmon.path = "/sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input"; hwmon.path =
"/sys/devices/platform/coretemp.0/hwmon/hwmon5/temp1_input";
label = { label = {
text = "%temperature-c%"; text = "%temperature-c%";
warn = "%temperature-c%"; warn = "%temperature-c%";
@ -275,22 +296,46 @@ in
}; };
menu = [ menu = [
[ [
({ text = "Logout"; exec = "#powermenu.open.1"; }) ({
({ text = "Reboot"; exec = "#powermenu.open.2"; }) text = "Logout";
({ text = "Hibernate"; exec = "#powermenu.open.3"; }) exec = "#powermenu.open.1";
({ text = "Power off"; exec = "#powermenu.open.4"; }) })
({
text = "Reboot";
exec = "#powermenu.open.2";
})
({
text = "Hibernate";
exec = "#powermenu.open.3";
})
({
text = "Power off";
exec = "#powermenu.open.4";
})
] ]
[ [
({ text = "Logout"; exec = logout; }) ({
text = "Logout";
exec = logout;
})
] ]
[ [
({ text = "Reboot"; exec = "${systemctl} reboot"; }) ({
text = "Reboot";
exec = "${systemctl} reboot";
})
] ]
[ [
({ text = "Hibernate"; exec = "${systemctl} hibernate"; }) ({
text = "Hibernate";
exec = "${systemctl} hibernate";
})
] ]
[ [
({ text = "Power off"; exec = "${shutdown} now"; }) ({
text = "Power off";
exec = "${shutdown} now";
})
] ]
]; ];
}; };

View file

@ -2,10 +2,12 @@
let let
user = "bertof"; user = "bertof";
systemLibFolder = "/run/current-system/sw/lib/"; systemLibFolder = "/run/current-system/sw/lib/";
userLibFolder = "/nix/var/nix/profiles/per-user/${user}/home-manager/home-path/lib/"; userLibFolder =
"/nix/var/nix/profiles/per-user/${user}/home-manager/home-path/lib/";
variables = { variables = {
DSSI_PATH = "$HOME/.dssi:${userLibFolder}/dssi:${systemLibFolder}/dssi"; DSSI_PATH = "$HOME/.dssi:${userLibFolder}/dssi:${systemLibFolder}/dssi";
LADSPA_PATH = "$HOME/.ladspa:${userLibFolder}/ladspa:${systemLibFolder}/ladspa"; LADSPA_PATH =
"$HOME/.ladspa:${userLibFolder}/ladspa:${systemLibFolder}/ladspa";
LV2_PATH = "$HOME/.lv2:${userLibFolder}/lv2:${systemLibFolder}/lv2"; LV2_PATH = "$HOME/.lv2:${userLibFolder}/lv2:${systemLibFolder}/lv2";
LXVST_PATH = "$HOME/.lxvst:${userLibFolder}/lxvst:${systemLibFolder}/lxvst"; LXVST_PATH = "$HOME/.lxvst:${userLibFolder}/lxvst:${systemLibFolder}/lxvst";
VST_PATH = "$HOME/.vst:${userLibFolder}/vst:${systemLibFolder}/vst"; VST_PATH = "$HOME/.vst:${userLibFolder}/vst:${systemLibFolder}/vst";

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
jetbrains.pycharm-professional jetbrains.pycharm-professional
python3 python3

View file

@ -1,10 +1,9 @@
{ pkgs, ... }: { { pkgs, ... }: {
home.packages = with pkgs; [ home.packages = with pkgs;
black [ black ] ++ (with pkgs.python3Packages; [
] ++ (with pkgs.python3Packages; [ python-lsp-server
python-lsp-server # pyls-black # not updated to the new pylsp
# pyls-black # not updated to the new pylsp pyls-flake8
pyls-flake8 pyls-isort
pyls-isort ]);
]);
} }

View file

@ -2,10 +2,10 @@
programs.rofi = { programs.rofi = {
enable = true; enable = true;
location = "center"; location = "center";
font = "${pkgs.rice.font.monospace.name} ${toString pkgs.rice.font.monospace.size}"; font = "${pkgs.rice.font.monospace.name} ${
extraConfig = { toString pkgs.rice.font.monospace.size
modi = "drun,run,ssh,window"; }";
}; extraConfig = { modi = "drun,run,ssh,window"; };
terminal = "kitty"; terminal = "kitty";
theme = "onedark"; theme = "onedark";
}; };

View file

@ -1,8 +1,5 @@
{ pkgs, ... }: { pkgs, ... }: {
{ home.packages = [ pkgs.rofimoji ];
home.packages = [
pkgs.rofimoji
];
xdg.configFile."rofimoji.rc".text = '' xdg.configFile."rofimoji.rc".text = ''
action=copy action=copy

View file

@ -1,10 +1,3 @@
{ pkgs, ... }: { pkgs, ... }: {
{ home.packages = with pkgs; [ bacon cargo clippy rust-analyzer rustfmt ];
home.packages = with pkgs; [
bacon
cargo
clippy
rust-analyzer
rustfmt
];
} }

View file

@ -1,12 +1,8 @@
{ pkgs, ... }: { pkgs, ... }: {
{
services.screen-locker = { services.screen-locker = {
enable = true; enable = true;
lockCmd = "${pkgs.lockscreen}/bin/lockscreen"; lockCmd = "${pkgs.lockscreen}/bin/lockscreen";
inactiveInterval = 2; # minutes inactiveInterval = 2; # minutes
xautolock.extraOptions = [ xautolock.extraOptions = [ "-secure" "-lockaftersleep" ];
"-secure"
"-lockaftersleep"
];
}; };
} }

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
# RECOGNITION # RECOGNITION
nmap nmap

View file

@ -2,8 +2,6 @@
programs.ssh = { programs.ssh = {
enable = true; enable = true;
compression = true; compression = true;
matchBlocks = { matchBlocks = { "*" = { identityFile = "~/.ssh/id_ed25519"; }; };
"*" = { identityFile = "~/.ssh/id_ed25519"; };
};
}; };
} }

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
imports = [ ./nautilus.nix ]; imports = [ ./nautilus.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [
bc bc
@ -25,41 +24,55 @@
keybindings = { keybindings = {
"alt + Tab" = "rofi -show window"; "alt + Tab" = "rofi -show window";
"Print" = "gnome-screenshot"; "Print" = "gnome-screenshot";
"super + alt + {h,j,k,l}" = "bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}"; "super + alt + {h,j,k,l}" =
"bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}";
"super + alt + m" = "lockscreen"; "super + alt + m" = "lockscreen";
"super + alt + p" = "autorandr -c"; "super + alt + p" = "autorandr -c";
"super + alt + {q,r}" = "bspc {quit,wm -r}"; "super + alt + {q,r}" = "bspc {quit,wm -r}";
"super + alt + {Right,Down,Left}" = "playerctl {next,play-pause,previous}"; "super + alt + {Right,Down,Left}" =
"super + alt + shift + {h,j,k,l}" = "bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}"; "playerctl {next,play-pause,previous}";
"super + alt + shift + {h,j,k,l}" =
"bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}";
"super + bracket{left,right}" = "bspc desktop -f {prev,next}.local"; "super + bracket{left,right}" = "bspc desktop -f {prev,next}.local";
"super + b" = "update-background"; "super + b" = "update-background";
"super + ctrl + {1-9}" = "bspc node -o 0.{1-9}"; "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 + {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 + {m,x,y,z}" =
"super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel"; "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 + ctrl + space" = "bspc node -p cancel";
"super + e" = fileManager; "super + e" = fileManager;
"super + Escape" = "pkill -USR1 -x sxhkd"; "super + Escape" = "pkill -USR1 -x sxhkd";
"super + g" = "bspc node -s biggest"; "super + g" = "bspc node -s biggest";
"super + {grave,Tab}" = "bspc {node,desktop} -f last"; "super + {grave,Tab}" = "bspc {node,desktop} -f last";
"super + {h,j,k,l}" = "dir={west,south,north,east}; bspc node -f $dir || bspc monitor -f $dir"; "super + {h,j,k,l}" =
"dir={west,south,north,east}; bspc node -f $dir || bspc monitor -f $dir";
"super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}"; "super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}";
"super + m" = "bspc desktop -l next"; "super + m" = "bspc desktop -l next";
"super + n {_, + shift}" = "bsp-layout {next, previous}"; "super + n {_, + shift}" = "bsp-layout {next, previous}";
"super + {o,i}" = "bspc wm -h off;bspc node {older,newer} -f;bspc wm -h on"; "super + {o,i}" =
"super + {p,b,comma,period}" = "bspc node -f @{parent,brother,first,second}"; "bspc wm -h off;bspc node {older,newer} -f;bspc wm -h on";
"super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} 'focused:^{1-9,10}'"; "super + {p,b,comma,period}" =
"bspc node -f @{parent,brother,first,second}";
"super + {_,shift + }{1-9,0}" =
"bspc {desktop -f,node -d} 'focused:^{1-9,10}'";
"super + {_,shift + }c" = "bspc node -f {next,prev}.local"; "super + {_,shift + }c" = "bspc node -f {next,prev}.local";
"super + shift + e" = emojiChooser; "super + shift + e" = emojiChooser;
"super + shift + {h,j,k,l}" = ''dir={west,south,north,east}; bspc node -s "$dir.local" --follow || bspc node -m "$dir" --follow''; "super + shift + {h,j,k,l}" = ''
"super + {_,shift + } Return" = "{${primaryTerminal} , ${secondaryTerminal}}"; dir={west,south,north,east}; bspc node -s "$dir.local" --follow || bspc node -m "$dir" --follow'';
"super + {_,shift + } Return" =
"{${primaryTerminal} , ${secondaryTerminal}}";
"super + {_,shift + }@space " = "rofi -show {drun,run}"; "super + {_,shift + }@space " = "rofi -show {drun,run}";
"super + {_,shift + }w" = "bspc node -{c,k}"; "super + {_,shift + }w" = "bspc node -{c,k}";
"super + {t,shift + t,s,f}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}"; "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"; # "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`"; "{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}"; "XF86Audio{Next,Play,Prev}" = "playerctl {next,play-pause,previous}";
"XF86MonBrightness{Up,Down}" = ''xbacklight -{inc,dec} 10 && dunstify -r 2 Luminosità `printf "%.0f" $(xbacklight -get)`''; "XF86MonBrightness{Up,Down}" = ''
xbacklight -{inc,dec} 10 && dunstify -r 2 Luminosità `printf "%.0f" $(xbacklight -get)`'';
}; };
}; };
} }

View file

@ -1,5 +1 @@
{ { services.syncthing = { enable = true; }; }
services.syncthing = {
enable = true;
};
}

View file

@ -7,12 +7,29 @@ let
}; };
opacity = toString pkgs.rice.opacity; opacity = toString pkgs.rice.opacity;
font = pkgs.rice.font.monospace; font = pkgs.rice.font.monospace;
colorString = with strPalette; normal: bright: builtins.concatStringsSep ":" [ normal.black normal.red normal.green normal.yellow normal.blue normal.magenta normal.cyan normal.white bright.black bright.red bright.green bright.yellow bright.blue bright.magenta bright.cyan bright.white ]; colorString = with strPalette;
normal: bright:
builtins.concatStringsSep ":" [
normal.black
normal.red
normal.green
normal.yellow
normal.blue
normal.magenta
normal.cyan
normal.white
bright.black
bright.red
bright.green
bright.yellow
bright.blue
bright.magenta
bright.cyan
bright.white
];
in in
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [ terminator ];
terminator
];
xdg.configFile."terminator/config".text = with strPalette; '' xdg.configFile."terminator/config".text = with strPalette; ''
[global_config] [global_config]

View file

@ -1,8 +1 @@
{ pkgs, ... }: { pkgs, ... }: { home.packages = with pkgs.xfce; [ thunar tumbler xfconf ]; }
{
home.packages = with pkgs.xfce; [
thunar
tumbler
xfconf
];
}

View file

@ -1,14 +1,10 @@
{ pkgs, ... }: { pkgs, ... }: {
{
programs.tmux = { programs.tmux = {
enable = true; enable = true;
clock24 = true; clock24 = true;
escapeTime = 25; escapeTime = 25;
terminal = "screen-256color"; terminal = "screen-256color";
plugins = with pkgs.tmuxPlugins; [ plugins = with pkgs.tmuxPlugins; [ nord prefix-highlight ];
nord
prefix-highlight
];
extraConfig = '' extraConfig = ''
set -g mouse on set -g mouse on
''; '';

View file

@ -1,8 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
let let update_time = "10m";
update_time = "10m"; in {
in
{
home.packages = [ pkgs.update-background ]; home.packages = [ pkgs.update-background ];
systemd.user.services."update-background" = { systemd.user.services."update-background" = {
@ -12,9 +10,7 @@ in
PartOf = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ];
RequiresMountsFor = [ "/home/bertof/Immagini" ]; RequiresMountsFor = [ "/home/bertof/Immagini" ];
}; };
Install = { Install = { WantedBy = [ "graphical-session.target" ]; };
WantedBy = [ "graphical-session.target" ];
};
Service = { Service = {
Type = "oneshot"; Type = "oneshot";
IOSchedulingClass = "idle"; IOSchedulingClass = "idle";

View file

@ -4,17 +4,59 @@ let
# cmd = link: "google-chrome-stable --app=${link}"; # cmd = link: "google-chrome-stable --app=${link}";
cmd = link: "firefox ${link}"; cmd = link: "firefox ${link}";
links = [ links = [
{ desktopName = "Google Calendar"; link = "https://google.com/calendar"; categories = [ "Office" ]; } {
{ desktopName = "Google Keep"; link = "https://keep.google.com"; categories = [ "Office" ]; } desktopName = "Google Calendar";
{ desktopName = "Monkeytype"; link = "https://monkeytype.com/"; } link = "https://google.com/calendar";
{ desktopName = "Netflix"; link = "https://www.netflix.com"; categories = [ "AudioVideo" ]; } categories = [ "Office" ];
{ 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 = "Google Keep";
{ desktopName = "Twitch"; link = "https://www.twitch.tv"; categories = [ "AudioVideo" ]; } link = "https://keep.google.com";
{ desktopName = "WhatsApp"; link = "https://web.whatsapp.com/"; } categories = [ "Office" ];
{ desktopName = "YouTube"; link = "https://www.youtube.com"; categories = [ "AudioVideo" ]; } }
{ desktopName = "Plex"; link = "https://app.plex.tv"; categories = [ "AudioVideo" ]; } {
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 = webAppBuilder =
{ desktopName { desktopName
@ -23,11 +65,10 @@ let
, icon ? lib.toLower name , icon ? lib.toLower name
, comment ? null , comment ? null
, categories ? [ "Network" ] , categories ? [ "Network" ]
}: pkgs.makeDesktopItem { }:
pkgs.makeDesktopItem {
inherit name icon desktopName comment categories; inherit name icon desktopName comment categories;
exec = cmd link; exec = cmd link;
}; };
in in
{ { home.packages = map webAppBuilder links; }
home.packages = map webAppBuilder links;
}

View file

@ -10,7 +10,8 @@ let
lightLevel = 10; lightLevel = 10;
saveLightLevel = "${xbacklightCmd} -get > /run/user/$UID/xbacklight_v"; saveLightLevel = "${xbacklightCmd} -get > /run/user/$UID/xbacklight_v";
lowerLight = "${xbacklightCmd} -set ${toString lightLevel}"; lowerLight = "${xbacklightCmd} -set ${toString lightLevel}";
resetLight = "${xbacklightCmd} -set $(</run/user/$UID/xbacklight_v) || ${xbacklightCmd} -set 100"; resetLight =
"${xbacklightCmd} -set $(</run/user/$UID/xbacklight_v) || ${xbacklightCmd} -set 100";
in in
{ {
services.xidlehook = { services.xidlehook = {

View file

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

View file

@ -1,9 +1,5 @@
{ pkgs, ... }: { pkgs, ... }: {
{ home.packages = with pkgs; [ nix-zsh-completions zsh-completions ];
home.packages = with pkgs; [
nix-zsh-completions
zsh-completions
];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
@ -19,14 +15,8 @@
oh-my-zsh = { oh-my-zsh = {
enable = true; enable = true;
plugins = [ plugins =
"common-aliases" [ "common-aliases" "cp" "dirhistory" "git-auto-fetch" "git" "sudo" ];
"cp"
"dirhistory"
"git-auto-fetch"
"git"
"sudo"
];
extraConfig = ""; extraConfig = "";
}; };

View file

@ -1,6 +1,5 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
with lib; with lib; {
{
boot = { boot = {
binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]; binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
kernelPackages = pkgs.linuxPackages_5_18; kernelPackages = pkgs.linuxPackages_5_18;
@ -34,7 +33,12 @@ with lib;
opengl = { opengl = {
enable = true; enable = true;
extraPackages = with pkgs; [ intel-media-driver libvdpau-va-gl vaapiIntel vaapiVdpau ]; extraPackages = with pkgs; [
intel-media-driver
libvdpau-va-gl
vaapiIntel
vaapiVdpau
];
}; };
bluetooth.enable = true; bluetooth.enable = true;
@ -44,13 +48,22 @@ with lib;
programs = { programs = {
dconf.enable = true; dconf.enable = true;
gnupg.agent = { enable = true; enableSSHSupport = true; }; gnupg.agent = {
zsh = { enable = true; syntaxHighlighting.enable = true; }; enable = true;
enableSSHSupport = true;
};
zsh = {
enable = true;
syntaxHighlighting.enable = true;
};
}; };
networking = { networking = {
hostName = "loki"; hostName = "loki";
interfaces = { eno1.useDHCP = true; wlp7s0.useDHCP = true; }; interfaces = {
eno1.useDHCP = true;
wlp7s0.useDHCP = true;
};
networkmanager.enable = true; networkmanager.enable = true;
useDHCP = false; useDHCP = false;
}; };
@ -73,21 +86,51 @@ with lib;
ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service"; ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service";
}; };
}; };
bazarr = { enable = true; openFirewall = true; group = "users"; }; bazarr = {
enable = true;
openFirewall = true;
group = "users";
};
blueman.enable = true; blueman.enable = true;
dbus.packages = with pkgs; [ 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 = mkForce pkgs.gnome3.gvfs; }; gvfs = {
jackett = { enable = true; openFirewall = true; group = "users"; }; enable = true;
jellyfin = { enable = true; openFirewall = true; group = "users"; }; package = mkForce pkgs.gnome3.gvfs;
};
jackett = {
enable = true;
openFirewall = true;
group = "users";
};
jellyfin = {
enable = true;
openFirewall = true;
group = "users";
};
logind.lidSwitch = "ignore"; logind.lidSwitch = "ignore";
# node-red = { enable = true; openFirewall = true; withNpmAndGcc = true; }; # node-red = { 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 = { enable = true; openFirewall = true; group = "users"; }; radarr = {
samba-wsdd = { enable = true; discovery = true; }; enable = true;
openFirewall = true;
group = "users";
};
samba-wsdd = {
enable = true;
discovery = true;
};
samba = { samba = {
enable = true; enable = true;
enableNmbd = true; enableNmbd = true;
@ -156,8 +199,15 @@ with lib;
}; };
}; };
}; };
smartd = { enable = true; notifications.x11.enable = true; }; smartd = {
sonarr = { enable = true; openFirewall = true; group = "users"; }; enable = true;
notifications.x11.enable = true;
};
sonarr = {
enable = true;
openFirewall = true;
group = "users";
};
thermald.enable = true; thermald.enable = true;
transmission = { transmission = {
enable = true; enable = true;
@ -181,24 +231,42 @@ with lib;
openFirewall = true; openFirewall = true;
cameras = 3; cameras = 3;
hostname = "0.0.0.0"; hostname = "0.0.0.0";
database = { username = "zoneminder"; createLocally = true; }; database = {
username = "zoneminder";
createLocally = true;
};
}; };
mysql = { mysql = {
# enable = true; # enable = true;
ensureUsers = [{ name = "bertof"; ensurePermissions = { "*.*" = "ALL PRIVILEGES"; }; }]; ensureUsers = [{
name = "bertof";
ensurePermissions = { "*.*" = "ALL PRIVILEGES"; };
}];
}; };
}; };
users.users = { users.users = {
bertof = { bertof = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "audio" "input" "docker" "libvirtd" "network" "networkmanager" "usb" "video" "wheel" ]; extraGroups = [
"audio"
"input"
"docker"
"libvirtd"
"network"
"networkmanager"
"usb"
"video"
"wheel"
];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
tiziano = { tiziano = {
isNormalUser = true; isNormalUser = true;
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMExwtJFk6HjySrTZwJH67SOHC3hlL28NO4oe2GXsv6k" ]; openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMExwtJFk6HjySrTZwJH67SOHC3hlL28NO4oe2GXsv6k"
];
}; };
jellyfin.extraGroups = [ "video" ]; jellyfin.extraGroups = [ "video" ];
}; };
@ -237,7 +305,6 @@ with lib;
}; };
}; };
systemd.packages = with pkgs; [ syncthing ]; systemd.packages = with pkgs; [ syncthing ];
systemd.services = systemd.services =
let let
@ -246,7 +313,10 @@ with lib;
startLimitIntervalSec = 60; startLimitIntervalSec = 60;
startLimitBurst = 4; 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";
@ -268,18 +338,34 @@ with lib;
RestrictNamespaces = true; RestrictNamespaces = true;
RestrictRealtime = true; RestrictRealtime = true;
RestrictSUIDSGID = true; RestrictSUIDSGID = true;
CapabilityBoundingSet = [ "~CAP_SYS_PTRACE" "~CAP_SYS_ADMIN" "~CAP_SETGID" "~CAP_SETUID" "~CAP_SETPCAP" "~CAP_SYS_TIME" "~CAP_KILL" ]; CapabilityBoundingSet = [
"~CAP_SYS_PTRACE"
"~CAP_SYS_ADMIN"
"~CAP_SETGID"
"~CAP_SETUID"
"~CAP_SETPCAP"
"~CAP_SYS_TIME"
"~CAP_KILL"
];
}; };
}; };
in in
{ {
syncthing-bertof = recursiveUpdate 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/raid0/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 = recursiveUpdate 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/raid0/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";
};
}; };
}; };
@ -299,7 +385,8 @@ with lib;
138 # SYNCTHING 138 # SYNCTHING
3702 # SAMBA-WSDD 3702 # SAMBA-WSDD
]; ];
extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns''; extraCommands =
"iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns";
}; };
virtualisation = { virtualisation = {
@ -312,20 +399,14 @@ with lib;
oci-containers.containers = { oci-containers.containers = {
hass = { hass = {
image = "ghcr.io/home-assistant/home-assistant:stable"; image = "ghcr.io/home-assistant/home-assistant:stable";
environment = { environment = { TZ = "Europe/Rome"; };
TZ = "Europe/Rome";
};
extraOptions = [ "--privileged" "--network=host" "--pull=always" ]; extraOptions = [ "--privileged" "--network=host" "--pull=always" ];
ports = [ "8123:8123" ]; ports = [ "8123:8123" ];
volumes = [ volumes = [ "/var/lib/hass:/config" "/mnt/raid0/condiviso:/media" ];
"/var/lib/hass:/config"
"/mnt/raid0/condiviso:/media"
];
}; };
}; };
}; };
security.sudo.extraConfig = '' security.sudo.extraConfig = ''
Defaults pwfeedback Defaults pwfeedback
''; '';

View file

@ -4,68 +4,65 @@
{ config, lib, modulesPath, ... }: { config, lib, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "uas" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"uas"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/44c53e75-a00d-47bc-a99b-2544fe513e51";
device = "/dev/disk/by-uuid/44c53e75-a00d-47bc-a99b-2544fe513e51"; fsType = "btrfs";
fsType = "btrfs"; };
};
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/8A71-E5EB";
device = "/dev/disk/by-uuid/8A71-E5EB"; fsType = "vfat";
fsType = "vfat"; };
};
fileSystems."/mnt/raid1" = fileSystems."/mnt/raid1" = {
{ device = "/dev/disk/by-uuid/c84a38dc-9cc7-4762-b509-8fce1c1d95c8";
device = "/dev/disk/by-uuid/c84a38dc-9cc7-4762-b509-8fce1c1d95c8"; fsType = "btrfs";
fsType = "btrfs"; };
};
fileSystems."/var/lib/docker/btrfs" = fileSystems."/var/lib/docker/btrfs" = {
{ device = "/var/lib/docker/btrfs";
device = "/var/lib/docker/btrfs"; fsType = "none";
fsType = "none"; options = [ "bind" ];
options = [ "bind" ]; };
};
fileSystems."/mnt/raid0/bertof" = fileSystems."/mnt/raid0/bertof" = {
{ device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c"; fsType = "btrfs";
fsType = "btrfs"; options = [ "subvol=@bertof" ];
options = [ "subvol=@bertof" ]; };
};
fileSystems."/mnt/raid0/tiziano" = fileSystems."/mnt/raid0/tiziano" = {
{ device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c"; fsType = "btrfs";
fsType = "btrfs"; options = [ "subvol=@tiziano" ];
options = [ "subvol=@tiziano" ]; };
};
fileSystems."/mnt/raid0/condiviso" = fileSystems."/mnt/raid0/condiviso" = {
{ device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c"; fsType = "btrfs";
fsType = "btrfs"; options = [ "subvol=@condiviso" ];
options = [ "subvol=@condiviso" ]; };
};
fileSystems."/var/lib/zoneminder/events" = fileSystems."/var/lib/zoneminder/events" = {
{ device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c";
device = "/dev/disk/by-uuid/7ca4d382-eed7-4b49-b7d8-4b5ca139dd9c"; fsType = "btrfs";
fsType = "btrfs"; options = [ "subvol=@zoneminder" ];
options = [ "subvol=@zoneminder" ]; };
};
swapDevices = [ ]; swapDevices = [ ];
@ -79,5 +76,6 @@
networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true; networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
# networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true; # networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
nixpkgs.overlays = [ nixpkgs.overlays = [
(_: _: { (_: _: {
devEnvironment = (import ./environment.nix) { devEnvironment = (import ./environment.nix) {

View file

@ -1,3 +1,6 @@
{ {
nix.gc = { automatic = true; options = "--delete-older-than 7d"; }; nix.gc = {
automatic = true;
options = "--delete-older-than 7d";
};
} }

View file

@ -2,6 +2,8 @@
users.users.bertof = { users.users.bertof = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "network" "networkmanager" "wheel" ]; extraGroups = [ "network" "networkmanager" "wheel" ];
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN+zsSWZFFzQKnATCAvtG+iuSm4qkZHjCtHzGa9B/71W" ]; openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN+zsSWZFFzQKnATCAvtG+iuSm4qkZHjCtHzGa9B/71W"
];
}; };
} }

View file

@ -11,7 +11,6 @@ let
# 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"
@ -82,21 +81,21 @@ in
{ {
networking = { networking = {
hosts = { hosts = { "127.0.0.1" = [ "ds.my.engine" "kdc.my.engine" "my.engine" ]; };
"127.0.0.1" = [
"ds.my.engine"
"kdc.my.engine"
"my.engine"
];
};
}; };
services = { services = {
spark = { spark = {
package = spark; package = spark;
master = { enable = true; restartIfChanged = true; }; master = {
worker = { enable = true; restartIfChanged = true; }; enable = true;
restartIfChanged = true;
};
worker = {
enable = true;
restartIfChanged = true;
};
confDir = sparkConfDir; confDir = sparkConfDir;
}; };
@ -137,12 +136,14 @@ in
# NAME NODE SECURITY # NAME NODE SECURITY
"dfs.namenode.keytab.file" = hadoop_keytab_path; "dfs.namenode.keytab.file" = hadoop_keytab_path;
"dfs.namenode.kerberos.principal" = "nn/my.engine@MY.ENGINE"; "dfs.namenode.kerberos.principal" = "nn/my.engine@MY.ENGINE";
"dfs.namenode.kerberos.internal.spnego.principal" = "HTTP/my.engine@MY.ENGINE"; "dfs.namenode.kerberos.internal.spnego.principal" =
"HTTP/my.engine@MY.ENGINE";
# SECONDARY NAME NODE SECURITY # SECONDARY NAME NODE SECURITY
"dfs.secondary.namenode.keytab.file" = hadoop_keytab_path; "dfs.secondary.namenode.keytab.file" = hadoop_keytab_path;
"dfs.secondary.namenode.kerberos.principal" = "nn/my.engine@MY.ENGINE"; "dfs.secondary.namenode.kerberos.principal" = "nn/my.engine@MY.ENGINE";
"dfs.secondary.namenode.kerberos.internal.spnego.principal" = "HTTP/my.engine@MY.ENGINE"; "dfs.secondary.namenode.kerberos.internal.spnego.principal" =
"HTTP/my.engine@MY.ENGINE";
# DATA NODE SECURITY # DATA NODE SECURITY
"dfs.datanode.keytab.file" = hadoop_keytab_path; "dfs.datanode.keytab.file" = hadoop_keytab_path;
@ -156,7 +157,8 @@ in
"dfs.webhdfs.enabled" = "true"; "dfs.webhdfs.enabled" = "true";
# WEB AUTHENTICATION CONFIG # WEB AUTHENTICATION CONFIG
"dfs.web.authentication.kerberos.principal" = "HTTP/my.engine@MY.ENGINE"; "dfs.web.authentication.kerberos.principal" =
"HTTP/my.engine@MY.ENGINE";
"dfs.web.authentication.kerberos.keytab" = hadoop_keytab_path; "dfs.web.authentication.kerberos.keytab" = hadoop_keytab_path;
"ignore.secure.ports.for.testing" = "true"; "ignore.secure.ports.for.testing" = "true";
"dfs.http.policy" = "HTTP_ONLY"; "dfs.http.policy" = "HTTP_ONLY";
@ -173,15 +175,20 @@ in
yarnSite = { yarnSite = {
"yarn.nodemanager.admin-env" = "PATH=$PATH"; "yarn.nodemanager.admin-env" = "PATH=$PATH";
"yarn.nodemanager.aux-services" = "mapreduce_shuffle"; "yarn.nodemanager.aux-services" = "mapreduce_shuffle";
"yarn.nodemanager.aux-services.mapreduce_shuffle.class" = "org.apache.hadoop.mapred.ShuffleHandler"; "yarn.nodemanager.aux-services.mapreduce_shuffle.class" =
"org.apache.hadoop.mapred.ShuffleHandler";
"yarn.nodemanager.bind-host" = "0.0.0.0"; "yarn.nodemanager.bind-host" = "0.0.0.0";
"yarn.nodemanager.container-executor.class" = "org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor"; "yarn.nodemanager.container-executor.class" =
"yarn.nodemanager.env-whitelist" = "JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_HOME,LANG,TZ"; "org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor";
"yarn.nodemanager.env-whitelist" =
"JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_HOME,LANG,TZ";
"yarn.nodemanager.linux-container-executor.group" = "hadoop"; "yarn.nodemanager.linux-container-executor.group" = "hadoop";
"yarn.nodemanager.linux-container-executor.path" = "/run/wrappers/yarn-nodemanager/bin/container-executor"; "yarn.nodemanager.linux-container-executor.path" =
"/run/wrappers/yarn-nodemanager/bin/container-executor";
"yarn.nodemanager.log-dirs" = "/var/log/hadoop/yarn/nodemanager"; "yarn.nodemanager.log-dirs" = "/var/log/hadoop/yarn/nodemanager";
"yarn.resourcemanager.bind-host" = "0.0.0.0"; "yarn.resourcemanager.bind-host" = "0.0.0.0";
"yarn.resourcemanager.scheduler.class" = "org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler"; "yarn.resourcemanager.scheduler.class" =
"org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler";
"yarn.resourcemanager.keytab" = hadoop_keytab_path; "yarn.resourcemanager.keytab" = hadoop_keytab_path;
"yarn.resourcemanager.principal" = "rm/my.engine@MY.ENGINE"; "yarn.resourcemanager.principal" = "rm/my.engine@MY.ENGINE";
@ -193,12 +200,14 @@ in
"yarn.scheduler.capacity.root.queues" = "default"; "yarn.scheduler.capacity.root.queues" = "default";
"yarn.scheduler.capacity.root.default.capacity" = 100; "yarn.scheduler.capacity.root.default.capacity" = 100;
# "yarn.scheduler.capacity.root.default.state" = "RUNNING"; # "yarn.scheduler.capacity.root.default.state" = "RUNNING";
"yarn.scheduler.capacity.root.acl_submit_applications" = "hadoop,yarn,mapred,hdfs"; "yarn.scheduler.capacity.root.acl_submit_applications" =
"hadoop,yarn,mapred,hdfs";
}; };
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;
@ -206,23 +215,52 @@ in
extraConfDirs = [ ]; extraConfDirs = [ ];
hdfs = { hdfs = {
namenode = { enable = true; formatOnInit = true; restartIfChanged = true; }; namenode = {
datanode = { enable = true; restartIfChanged = true; }; enable = true;
journalnode = { enable = true; restartIfChanged = true; }; formatOnInit = true;
zkfc = { enable = false; restartIfChanged = true; }; # ZOOKEEPER DISABLED, not using High Availability setup restartIfChanged = true;
httpfs = { enable = true; restartIfChanged = true; }; };
datanode = {
enable = true;
restartIfChanged = true;
};
journalnode = {
enable = true;
restartIfChanged = true;
};
zkfc = {
enable = false;
restartIfChanged = true;
}; # ZOOKEEPER DISABLED, not using High Availability setup
httpfs = {
enable = true;
restartIfChanged = true;
};
}; };
yarn = { yarn = {
resourcemanager = { enable = true; restartIfChanged = true; }; resourcemanager = {
nodemanager = { enable = true; restartIfChanged = true; useCGroups = false; }; enable = true;
restartIfChanged = true;
};
nodemanager = {
enable = true;
restartIfChanged = true;
useCGroups = false;
};
}; };
}; };
kerberos_server = { kerberos_server = {
enable = true; enable = true;
realms."MY.ENGINE".acl = [ realms."MY.ENGINE".acl = [
{ principal = "*/admin"; access = "all"; } {
{ principal = "*/my.engine"; access = "all"; } principal = "*/admin";
access = "all";
}
{
principal = "*/my.engine";
access = "all";
}
]; ];
}; };
}; };
@ -274,8 +312,10 @@ in
User = "spark"; User = "spark";
Group = "spark"; Group = "spark";
WorkingDirectory = "${pkgs.spark}/lib/${pkgs.spark.untarDir}"; WorkingDirectory = "${pkgs.spark}/lib/${pkgs.spark.untarDir}";
ExecStart = "${pkgs.spark}/lib/${pkgs.spark.untarDir}/sbin/start-history-server.sh"; ExecStart =
ExecStop = "${pkgs.spark}/lib/${pkgs.spark.untarDir}/sbin/stop-history-server.sh"; "${pkgs.spark}/lib/${pkgs.spark.untarDir}/sbin/start-history-server.sh";
ExecStop =
"${pkgs.spark}/lib/${pkgs.spark.untarDir}/sbin/stop-history-server.sh";
TimeoutSec = 300; TimeoutSec = 300;
StartLimitBurst = 10; StartLimitBurst = 10;
Restart = "always"; Restart = "always";

View file

@ -1,10 +1,17 @@
{ ... }: { ... }: {
{
networking.hosts = { networking.hosts = {
"54.176.11.243" = [ "vpn.mhackeroni.it" ]; "54.176.11.243" = [ "vpn.mhackeroni.it" ];
"10.100.0.50" = [ "master.cb.cloud.mhackeroni.it" "bartender.cb.cloud.mhackeroni.it" "grafana.cb.cloud.mhackeroni.it" "menu.cb.cloud.mhackeroni.it" "maitre.cb.cloud.mhackeroni.it" "accountant.cb.cloud.mhackeroni.it" ]; "10.100.0.50" = [
"10.100.0.150" = [ "flowgui.cloud.mhackeroni.it" "smb.cloud.mhackeroni.it" ]; "master.cb.cloud.mhackeroni.it"
"bartender.cb.cloud.mhackeroni.it"
"grafana.cb.cloud.mhackeroni.it"
"menu.cb.cloud.mhackeroni.it"
"maitre.cb.cloud.mhackeroni.it"
"accountant.cb.cloud.mhackeroni.it"
];
"10.100.0.150" =
[ "flowgui.cloud.mhackeroni.it" "smb.cloud.mhackeroni.it" ];
"10.100.0.200" = [ "tunniceddu.cloud.mhackeroni.it" ]; "10.100.0.200" = [ "tunniceddu.cloud.mhackeroni.it" ];
"10.100.0.250" = [ "rev.cloud.mhackeroni.it" ]; "10.100.0.250" = [ "rev.cloud.mhackeroni.it" ];
"10.100.0.66" = [ "attackerbackup.cloud.mhackeroni.it" ]; "10.100.0.66" = [ "attackerbackup.cloud.mhackeroni.it" ];

View file

@ -1,8 +1,9 @@
{ lib, ... }: { ... }:
let let
blocklist = builtins.fetchurl { blocklist = builtins.fetchurl {
sha256 = "sha256:16xcx2z8ziv2fbqhr4ajayxblcs4i1ckrwnf50iina9asgia18za"; sha256 = "sha256:16xcx2z8ziv2fbqhr4ajayxblcs4i1ckrwnf50iina9asgia18za";
url = "https://github.com/notracking/hosts-blocklists/raw/master/dnsmasq/dnsmasq.blacklist.txt"; url =
"https://github.com/notracking/hosts-blocklists/raw/master/dnsmasq/dnsmasq.blacklist.txt";
}; };
in in
{ {
@ -11,11 +12,7 @@ in
services.dnsmasq = { services.dnsmasq = {
enable = true; enable = true;
servers = [ servers = [ "1.1.1.1" "8.8.8.8" "8.8.4.4" ];
"1.1.1.1"
"8.8.8.8"
"8.8.4.4"
];
extraConfig = '' extraConfig = ''
cache-size=10000 cache-size=10000
log-queries log-queries

View file

@ -1,17 +1,13 @@
{ {
services.k3s = { services.k3s = { enable = true; };
enable = true;
};
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ allowedTCPPorts = [
6443 # Kubernetes API 6443 # Kubernetes API
]; ];
allowedTCPPortRanges = [ allowedTCPPortRanges = [{
{ from = 9000;
from = 9000; to = 15000;
to = 15000; }];
}
];
}; };
} }

View file

@ -1,20 +1,12 @@
{ {
services.postgresql = { services.postgresql = {
enable = true; enable = true;
ensureDatabases = [ ensureDatabases = [ "mfh" ];
"mfh" ensureUsers = [{
]; name = "bertof";
ensureUsers = [ ensurePermissions = { "DATABASE \"mfh\"" = "ALL PRIVILEGES"; };
{ }];
name = "bertof";
ensurePermissions = {
"DATABASE \"mfh\"" = "ALL PRIVILEGES";
};
}
];
}; };
services.apache-kafka = { services.apache-kafka = { enable = true; };
enable = true;
};
} }

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
# udev rules # udev rules
services.udev.extraRules = '' services.udev.extraRules = ''
KERNEL=="uinput",MODE:="0666",OPTIONS+="static_node=uinput" KERNEL=="uinput",MODE:="0666",OPTIONS+="static_node=uinput"

View file

@ -34,10 +34,30 @@
# fileSystems."/" = { options = "noatime errors=remount-ro"; }; # fileSystems."/" = { options = "noatime errors=remount-ro"; };
security.pam.loginLimits = [ security.pam.loginLimits = [
{ domain = "@audio"; item = "memlock"; type = "-"; value = "unlimited"; } {
{ domain = "@audio"; item = "rtprio"; type = "-"; value = "99"; } domain = "@audio";
{ domain = "@audio"; item = "nofile"; type = "soft"; value = "99999"; } item = "memlock";
{ domain = "@audio"; item = "nofile"; type = "hard"; value = "99999"; } type = "-";
value = "unlimited";
}
{
domain = "@audio";
item = "rtprio";
type = "-";
value = "99";
}
{
domain = "@audio";
item = "nofile";
type = "soft";
value = "99999";
}
{
domain = "@audio";
item = "nofile";
type = "hard";
value = "99999";
}
]; ];
# services = { # services = {

View file

@ -1,11 +1,7 @@
{ {
networking = { networking = {
hosts = { hosts = {
"172.20.28.210" = [ "172.20.28.210" = [ "datanode1" "datanode2" "datanode3" ];
"datanode1"
"datanode2"
"datanode3"
];
# "172.20.28.210" = [ "*.engine.sesar.int" ]; # "172.20.28.210" = [ "*.engine.sesar.int" ];
"159.149.147.137" = [ "vcenter.sesar.int" ]; "159.149.147.137" = [ "vcenter.sesar.int" ];
}; };

View file

@ -1,6 +1,5 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
with lib; with lib; {
{
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
@ -16,9 +15,7 @@ with lib;
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
# Use same ACPI identifier as Dell Ubuntu # Use same ACPI identifier as Dell Ubuntu
boot.kernelParams = [ boot.kernelParams = [ "acpi_osi=Linux-Dell-Video" ];
"acpi_osi=Linux-Dell-Video"
];
networking = { networking = {
hostName = "odin"; hostName = "odin";
@ -28,7 +25,10 @@ with lib;
# Per-interface useDHCP will be mandatory in the future, so this generated config # Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour. # replicates the default behaviour.
useDHCP = false; useDHCP = false;
interfaces = { enp60s0.useDHCP = true; wlp0s20f3.useDHCP = true; }; interfaces = {
enp60s0.useDHCP = true;
wlp0s20f3.useDHCP = true;
};
# Configure network proxy if necessary # Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/"; # proxy.default = "http://user:password@proxy:port/";
@ -51,7 +51,6 @@ with lib;
keyMap = "it"; keyMap = "it";
}; };
# X11 windowing system. # X11 windowing system.
services.xserver = { services.xserver = {
enable = true; enable = true;
@ -71,13 +70,17 @@ with lib;
displayManager.sddm = { displayManager.sddm = {
enable = true; enable = true;
autoNumlock = true; autoNumlock = true;
theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; theme =
"${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance";
}; };
# Configure keymap in X11 # Configure keymap in X11
layout = "it"; layout = "it";
extraLayouts = { extraLayouts = {
eng = { languages = [ "eng" ]; description = "English layout for external keyboard"; }; eng = {
languages = [ "eng" ];
description = "English layout for external keyboard";
};
}; };
xkbOptions = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl"; xkbOptions = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl";
libinput.enable = true; libinput.enable = true;
@ -86,10 +89,11 @@ with lib;
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing = { services.printing = {
enable = true; enable = true;
drivers = with pkgs; [ drivers = with pkgs;
gutenprint [
# cups-kyocera gutenprint
]; # cups-kyocera
];
}; };
services.fwupd.enable = true; services.fwupd.enable = true;
@ -106,10 +110,14 @@ with lib;
enable = true; enable = true;
pulse.enable = true; pulse.enable = true;
jack.enable = true; jack.enable = true;
alsa = { enable = true; support32Bit = true; }; alsa = {
enable = true;
support32Bit = true;
};
# media-session.enable = true; # media-session.enable = true;
}; };
environment.sessionVariables.LD_LIBRARY_PATH = lib.mkForce "${config.services.pipewire.package.jack}/lib"; # Temporary fix for WebKitGTK environment.sessionVariables.LD_LIBRARY_PATH = lib.mkForce
"${config.services.pipewire.package.jack}/lib"; # Temporary fix for WebKitGTK
# # Tablet # # Tablet
# hardware.opentabletdriver = { # hardware.opentabletdriver = {
@ -120,7 +128,18 @@ with lib;
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.bertof = { users.users.bertof = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "audio" "input" "docker" "flashrom" "libvirtd" "network" "networkmanager" "usb" "video" "wheel" ]; extraGroups = [
"audio"
"input"
"docker"
"flashrom"
"libvirtd"
"network"
"networkmanager"
"usb"
"video"
"wheel"
];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@ -132,18 +151,29 @@ with lib;
# started in user sessions. # started in user sessions.
# programs.mtr.enable = true; # programs.mtr.enable = true;
programs.flashrom.enable = true; programs.flashrom.enable = true;
programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.steam.enable = true; programs.steam.enable = true;
services.joycond.enable = true; services.joycond.enable = true;
programs.dconf.enable = true; programs.dconf.enable = true;
programs.zsh = { enable = true; syntaxHighlighting.enable = true; }; programs.zsh = {
enable = true;
syntaxHighlighting.enable = true;
};
# List services that you want to enable: # List services that you want to enable:
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh = { enable = true; openFirewall = true; permitRootLogin = "no"; passwordAuthentication = false; }; services.openssh = {
enable = true;
openFirewall = true;
permitRootLogin = "no";
passwordAuthentication = false;
};
# Cooling management # Cooling management
services.thermald.enable = true; services.thermald.enable = true;
@ -160,14 +190,21 @@ with lib;
in in
{ {
bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; }; bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; };
bertof_music = recursiveUpdate common { subvolume = "/home/bertof/Musica"; }; bertof_music =
bertof_downloads = recursiveUpdate common { subvolume = "/home/bertof/Scaricati"; }; recursiveUpdate common { subvolume = "/home/bertof/Musica"; };
bertof_images = recursiveUpdate common { subvolume = "/home/bertof/Immagini"; }; bertof_downloads =
bertof_videos = recursiveUpdate common { subvolume = "/home/bertof/Video"; }; recursiveUpdate common { subvolume = "/home/bertof/Scaricati"; };
bertof_documents = recursiveUpdate common { subvolume = "/home/bertof/Documenti"; }; bertof_images =
bertof_games_ssd = recursiveUpdate common { subvolume = "/home/bertof/Giochi/SSD"; }; recursiveUpdate common { subvolume = "/home/bertof/Immagini"; };
bertof_videos =
recursiveUpdate common { subvolume = "/home/bertof/Video"; };
bertof_documents =
recursiveUpdate common { subvolume = "/home/bertof/Documenti"; };
bertof_games_ssd =
recursiveUpdate common { subvolume = "/home/bertof/Giochi/SSD"; };
# bertof_games_hdd = recursiveUpdate common { subvolume = "/home/bertof/Giochi/HDD"; }; # bertof_games_hdd = recursiveUpdate common { subvolume = "/home/bertof/Giochi/HDD"; };
bertof_git = recursiveUpdate common { subvolume = "/home/bertof/Documenti/Git"; }; bertof_git =
recursiveUpdate common { subvolume = "/home/bertof/Documenti/Git"; };
}; };
}; };
@ -175,7 +212,10 @@ with lib;
services.gnome.gnome-keyring.enable = true; services.gnome.gnome-keyring.enable = true;
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
services.blueman.enable = true; services.blueman.enable = true;
services.gvfs = { enable = true; package = lib.mkForce pkgs.gnome3.gvfs; }; services.gvfs = {
enable = true;
package = lib.mkForce pkgs.gnome3.gvfs;
};
# services.tlp.enable = false; # services.tlp.enable = false;
services.avahi = { services.avahi = {
enable = true; enable = true;
@ -194,7 +234,10 @@ with lib;
}; };
# SMART # SMART
services.smartd = { enable = true; notifications.x11.enable = true; }; services.smartd = {
enable = true;
notifications.x11.enable = true;
};
# FPRINTD # FPRINTD
# services.fprintd = { # services.fprintd = {
@ -205,7 +248,10 @@ with lib;
security.pam.services.xscreensaver.fprintAuth = true; security.pam.services.xscreensaver.fprintAuth = true;
# Clamav # Clamav
services.clamav = { daemon.enable = true; updater.enable = true; }; services.clamav = {
daemon.enable = true;
updater.enable = true;
};
# Power-profiles # Power-profiles
services.power-profiles-daemon.enable = true; services.power-profiles-daemon.enable = true;
@ -233,9 +279,7 @@ with lib;
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
steam = pkgs.steam.override { steam = pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ icu ]; };
extraPkgs = pkgs: with pkgs; [ icu ];
};
}; };
}; };
nix = { nix = {

View file

@ -4,10 +4,7 @@
{ config, lib, 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" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
@ -32,46 +29,46 @@
options = [ "x-gvfs-hide" ]; options = [ "x-gvfs-hide" ];
}; };
# fileSystems."/var/lib/docker/btrfs" =
# { device = "/nix/@root/var/lib/docker/btrfs";
# fsType = "none";
# options = [ "bind" ];
# };
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/@home" "x-gvfs-hide" ]; options = [ "subvol=@bertof/@home" "x-gvfs-hide" ];
}; };
fileSystems."/home/bertof/Documenti" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
fsType = "btrfs";
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" ];
}; };
fileSystems."/home/bertof/Musica" = { fileSystems."/home/bertof/Immagini" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof/@music" "x-gvfs-hide" ]; options = [ "subvol=@bertof/@images" "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/c2635d50-7f08-4aca-bcdd-0ac685047a64";
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/Documenti" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof/@images" "x-gvfs-hide" ]; options = [ "subvol=@bertof/@documents" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Musica" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "subvol=@bertof/@music" "x-gvfs-hide" ];
};
fileSystems."/home/bertof/Scaricati" = {
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs";
options = [ "subvol=@bertof/@downloads" "x-gvfs-hide" ];
}; };
fileSystems."/home/bertof/Giochi/SSD" = { fileSystems."/home/bertof/Giochi/SSD" = {
@ -80,10 +77,10 @@
options = [ "subvol=@bertof/@games" "x-gvfs-hide" ]; options = [ "subvol=@bertof/@games" "x-gvfs-hide" ];
}; };
fileSystems."/home/bertof/Scaricati" = { fileSystems."/home/bertof/Giochi/SATA" = {
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@bertof/@downloads" "x-gvfs-hide" ]; options = [ "subvol=@bertof/@games" "x-gvfs-hide" ];
}; };
swapDevices = swapDevices =
@ -100,5 +97,6 @@
# networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true; # networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true;
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,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
home = { home = {
language.base = "it_IT.UTF-8"; language.base = "it_IT.UTF-8";
keyboard = { keyboard = {
@ -43,7 +42,9 @@
# gnome.quadrapassel # gnome.quadrapassel
# gnome.seahorse # gnome.seahorse
# gnome.sushi # gnome.sushi
(google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; }) (google-chrome.override {
commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ];
})
gucharmap gucharmap
handbrake handbrake
htop htop
@ -123,7 +124,6 @@
../hm_modules/python.nix ../hm_modules/python.nix
../hm_modules/rust.nix ../hm_modules/rust.nix
../hm_modules/any_nix_shell.nix
../hm_modules/alacritty.nix ../hm_modules/alacritty.nix
../hm_modules/autorandr.nix ../hm_modules/autorandr.nix
../hm_modules/bspwm.nix ../hm_modules/bspwm.nix

View file

@ -4,37 +4,32 @@ let
# onedark = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/onedark.nix); # onedark = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/onedark.nix);
# tomorrow-night = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/tomorrow-night.nix); # tomorrow-night = prev.lib.rice.palette.tPalette prev.lib.rice.color.hexToRgba (import ./themes/tomorrow-night.nix);
# mkpm = with prev.lib.rice; palette.tPalette color.hexToRgba (import ./themes/monokai-pro-machine.nix); # mkpm = with prev.lib.rice; palette.tPalette color.hexToRgba (import ./themes/monokai-pro-machine.nix);
bloom = with prev.lib.rice; palette.tPalette color.hexToRgba (import ./themes/bloom.nix); bloom = with prev.lib.rice;
palette.tPalette color.hexToRgba (import ./themes/bloom.nix);
in in
( (rec {
rec { rice = {
rice = { colorPalette = with prev.lib.rice; rec {
colorPalette = with prev.lib.rice; rec { normal = palette.defaultPalette // {
normal = palette.defaultPalette // { inherit (bloom.normal) black red green yellow blue magenta cyan white;
inherit (bloom.normal) black red green yellow blue magenta cyan white;
};
bright = palette.brighten 10 normal // {
inherit (bloom.bright) black red green yellow blue magenta cyan white;
};
dark = palette.darken 10 normal;
}; };
font = { bright = palette.brighten 10 normal // {
normal = { inherit (bloom.bright) black red green yellow blue magenta cyan white;
name = "Cantarell";
package = final.cantarell-fonts;
size = 10;
};
monospace = {
name = "FiraCode Nerd Font Mono";
package = (
final.nerdfonts.override {
fonts = [ "FiraCode" ];
}
);
size = 10;
};
}; };
opacity = 0.95; dark = palette.darken 10 normal;
}; };
} font = {
) normal = {
name = "Cantarell";
package = final.cantarell-fonts;
size = 10;
};
monospace = {
name = "FiraCode Nerd Font Mono";
package = (final.nerdfonts.override { fonts = [ "FiraCode" ]; });
size = 10;
};
};
opacity = 0.95;
};
})

View file

@ -1,6 +1,5 @@
{ lib, config, pkgs, ... }: { lib, config, pkgs, ... }:
with lib; with lib; {
{
boot = { boot = {
binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]; binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
@ -28,11 +27,7 @@ with lib;
environment = { environment = {
pathsToLink = [ "/share/zsh" ]; pathsToLink = [ "/share/zsh" ];
systemPackages = with pkgs; [ systemPackages = with pkgs; [ kakoune tmux vim ];
kakoune
tmux
vim
];
}; };
hardware = { hardware = {
@ -47,9 +42,15 @@ with lib;
programs = { programs = {
dconf.enable = true; dconf.enable = true;
flashrom.enable = true; flashrom.enable = true;
gnupg.agent = { enable = true; enableSSHSupport = true; }; gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
steam = { enable = true; }; steam = { enable = true; };
zsh = { enable = true; syntaxHighlighting.enable = true; }; zsh = {
enable = true;
syntaxHighlighting.enable = true;
};
}; };
networking = { networking = {
@ -81,12 +82,24 @@ with lib;
}; };
}; };
blueman.enable = true; blueman.enable = true;
clamav = { daemon.enable = true; updater.enable = true; }; clamav = {
daemon.enable = true;
updater.enable = true;
};
dbus.packages = with pkgs; [ dconf ]; dbus.packages = with pkgs; [ dconf ];
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = true;
gvfs = { enable = true; package = pkgs.gnome3.gvfs; }; gvfs = {
enable = true;
package = pkgs.gnome3.gvfs;
};
fwupd.enable = true; fwupd.enable = true;
openssh = { enable = true; openFirewall = true; permitRootLogin = "no"; passwordAuthentication = false; forwardX11 = true; }; openssh = {
enable = true;
openFirewall = true;
permitRootLogin = "no";
passwordAuthentication = false;
forwardX11 = true;
};
pipewire = { pipewire = {
enable = true; enable = true;
pulse.enable = true; pulse.enable = true;
@ -98,7 +111,10 @@ with lib;
# media-session.enable = true; # media-session.enable = true;
}; };
power-profiles-daemon.enable = true; power-profiles-daemon.enable = true;
smartd = { enable = true; notifications.x11.enable = true; }; smartd = {
enable = true;
notifications.x11.enable = true;
};
snapper = { snapper = {
configs = configs =
let let
@ -126,7 +142,8 @@ with lib;
# displayManager.gdm = { enable = true; nvidiaWayland = true; }; # displayManager.gdm = { enable = true; nvidiaWayland = true; };
displayManager.sddm = { displayManager.sddm = {
enable = true; enable = true;
theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; theme =
"${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance";
}; };
layout = "us"; layout = "us";
videoDrivers = [ "nvidia" ]; videoDrivers = [ "nvidia" ];
@ -135,8 +152,6 @@ with lib;
# gnome.gnome-remote-desktop.enable = true; # gnome.gnome-remote-desktop.enable = true;
}; };
services.teamviewer.enable = true; services.teamviewer.enable = true;
security = { security = {
@ -151,7 +166,18 @@ with lib;
users.users.bertof = { users.users.bertof = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "audio" "input" "docker" "flashrom" "libvirtd" "network" "networkmanager" "usb" "video" "wheel" ]; extraGroups = [
"audio"
"input"
"docker"
"flashrom"
"libvirtd"
"network"
"networkmanager"
"usb"
"video"
"wheel"
];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@ -166,9 +192,7 @@ with lib;
nixpkgs.config = { nixpkgs.config = {
allowUnfree = true; allowUnfree = true;
packageOverrides = pkgs: { packageOverrides = pkgs: {
steam = pkgs.steam.override { steam = pkgs.steam.override { extraPkgs = pkgs: with pkgs; [ icu ]; };
extraPkgs = pkgs: with pkgs; [ icu ];
};
}; };
# cudaSupport = true; # cudaSupport = true;
}; };

View file

@ -4,42 +4,54 @@
{ 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" ];
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
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 = [
options = [ "subvol=@root" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ]; "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 = [
options = [ "subvol=@home_bertof" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ]; "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 = [
options = [ "subvol=@nix" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ]; "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"; }];

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: { pkgs, ... }: {
{
home = { home = {
language.base = "it_IT.UTF-8"; language.base = "it_IT.UTF-8";
keyboard = { keyboard = {
@ -36,7 +35,9 @@
gnome.gnome-screenshot gnome.gnome-screenshot
gnome.gnome-sound-recorder gnome.gnome-sound-recorder
# gnome.gnome-system-monitor # gnome.gnome-system-monitor
(google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; }) (google-chrome.override {
commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ];
})
gucharmap gucharmap
handbrake handbrake
httpie httpie
@ -80,9 +81,7 @@
]; ];
}; };
services = { services = { gnome-keyring.enable = true; };
gnome-keyring.enable = true;
};
imports = [ imports = [
../hm_modules/__basic.nix ../hm_modules/__basic.nix