Merge branch 'upgrade-to-23-05'

This commit is contained in:
Filippo Berto 2023-06-06 00:28:44 +02:00
commit ccaaed552b
Signed by: bertof
GPG key ID: 9DBF7E6A1D2CE9ED
11 changed files with 135 additions and 173 deletions

View file

@ -40,7 +40,7 @@
avahi = {
enable = true;
openFirewall = true;
interfaces = [ "ztmjfdwjkp" ];
allowInterfaces = [ "ztmjfdwjkp" ];
nssmdns = true;
publish = {
enable = true;

91
flake.lock generated
View file

@ -3,16 +3,17 @@
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1682101079,
"narHash": "sha256-MdAhtjrLKnk2uiqun1FWABbKpLH090oeqCSiWemtuck=",
"lastModified": 1684153753,
"narHash": "sha256-PVbWt3qrjYAK+T5KplFcO+h7aZWfEj1UtyoKlvcDxh0=",
"owner": "ryantm",
"repo": "agenix",
"rev": "2994d002dcff5353ca1ac48ec584c7f6589fe447",
"rev": "db5637d10f797bb251b94ef9040b237f4702cde3",
"type": "github"
},
"original": {
@ -52,11 +53,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1682063650,
"narHash": "sha256-VaDHh2z6xlnTHaONlNVHP7qEMcK5rZ8Js3sT6mKb2XY=",
"lastModified": 1685948350,
"narHash": "sha256-1FldJ059so0X/rScdbIiOlQbjjSNCCTdj2cUr5pHU4A=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "c2ea4e642dc50fd44b537e9860ec95867af30d39",
"rev": "65211db63ba1199f09b4c9f27e5eba5ec50d76ac",
"type": "github"
},
"original": {
@ -134,11 +135,11 @@
"systems": "systems"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
@ -211,23 +212,41 @@
"home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
],
"utils": [
"flake-utils"
]
},
"locked": {
"lastModified": 1681092193,
"narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=",
"lastModified": 1682203081,
"narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af",
"rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-22.11",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1685599623,
"narHash": "sha256-Tob4CMOVHue0D3RzguDBCtUmX5ji2PsdbQDbIOIKvsc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "93db05480c0c0f30382d3e80779e8386dcb4f9dd",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.05",
"repo": "home-manager",
"type": "github"
}
@ -272,11 +291,11 @@
},
"nixlib": {
"locked": {
"lastModified": 1681001314,
"narHash": "sha256-5sDnCLdrKZqxLPK4KA8+f4A3YKO/u6ElpMILvX0g72c=",
"lastModified": 1685840432,
"narHash": "sha256-VJIbiKsY7Xy4E4WcgwUt/UiwYDmN5BAk8tngAjcWsqY=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "367c0e1086a4eb4502b24d872cea2c7acdd557f4",
"rev": "961e99baaaa57f5f7042fe7ce089a88786c839f4",
"type": "github"
},
"original": {
@ -293,11 +312,11 @@
]
},
"locked": {
"lastModified": 1682332772,
"narHash": "sha256-GMoWhChQdeNM2FFqVbEZgBABSdi/+JgSP6v+jUz5b24=",
"lastModified": 1685943944,
"narHash": "sha256-GpaQwOkvwkmSWxvWaZqbMKyyOSaBAwgdEcHCqLW/240=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "d774aeedc0685e5871be1e1ee0511900deeb21c2",
"rev": "122dcc32cadf14c5015aa021fae8882c5058263a",
"type": "github"
},
"original": {
@ -308,11 +327,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1682836095,
"narHash": "sha256-PdzpJhuXBz71AgWNWMMYLbB8GMMce6QguhQY/6HOOcc=",
"lastModified": 1684899633,
"narHash": "sha256-NtwerXX8UFsoNy6k+DukJMriWtEjQtMU/Urbff2O2Dg=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "e4a21ddcb45ee5f5c85a5d9e9698debf77fb98c3",
"rev": "4cc688ee711159b9bcb5a367be44007934e1a49d",
"type": "github"
},
"original": {
@ -386,11 +405,11 @@
},
"nixpkgs-u": {
"locked": {
"lastModified": 1682786779,
"narHash": "sha256-m7QFzPS/CE8hbkbIVK4UStihAQMtczr0vSpOgETOM1g=",
"lastModified": 1685836261,
"narHash": "sha256-rpxEPGeW4JZJcH58SQApJUtJ7w78VPtkF6Cut/Pq6Kg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "08e4dc3a907a6dfec8bb3bbf1540d8abbffea22b",
"rev": "dd4982554e18b936790da07c4ea2db7c7600f283",
"type": "github"
},
"original": {
@ -402,16 +421,16 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1682912022,
"narHash": "sha256-9a1juOuPBj9U61jcG630rd3Sqfx7RxyJDzmlbQA5qE0=",
"lastModified": 1685952468,
"narHash": "sha256-YCOr9kttCqoa9IZMjHxX6SlwenTg7FsSmG9TaT76mSE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7a8d9a8e84ea09987a6d68f5cd26e2fb1aa20fd3",
"rev": "70f7275b32f49bc67ae3532b758b80cb6c27f98a",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-22.11",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
@ -454,11 +473,11 @@
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": {
"lastModified": 1682596858,
"narHash": "sha256-Hf9XVpqaGqe/4oDGr30W8HlsWvJXtMsEPHDqHZA6dDg=",
"lastModified": 1685957890,
"narHash": "sha256-oat5CkVZnfZlMNO7mRz5hbgaC88SViwZZR11Fl0rii4=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "fb58866e20af98779017134319b5663b8215d912",
"rev": "238a10d458d46d4af3e89ccd6b83b1e8e9807b23",
"type": "github"
},
"original": {
@ -472,7 +491,7 @@
"agenix": "agenix",
"deploy-rs": "deploy-rs",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"home-manager": "home-manager_2",
"nix-rice": "nix-rice",
"nixos-generators": "nixos-generators",
"nixos-hardware": "nixos-hardware",

View file

@ -2,9 +2,9 @@
description = "Thor system configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/release-22.11";
nixpkgs.url = "github:NixOS/nixpkgs/release-23.05";
nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = { url = "github:nix-community/home-manager/release-22.11"; inputs = { nixpkgs.follows = "nixpkgs"; utils.follows = "flake-utils"; }; };
home-manager = { url = "github:nix-community/home-manager/release-23.05"; inputs.nixpkgs.follows = "nixpkgs"; };
# home-manager-u = { url = "github:nix-community/home-manager"; inputs = { nixpkgs.follows = "nixpkgs-u"; }; };
agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; };
@ -196,13 +196,13 @@
system = "aarch64-linux";
modules = commonModules ++ [
nixos-hardware.nixosModules.raspberry-pi-4
./freya/hardware-configuration.nix
./freya/configuration.nix
({ lib, ... }: {
boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ];
})
./freya/hardware-configuration.nix
./freya/configuration.nix
./nixos_modules/garage.nix
# ./nixos_modules/nextcloud.nix
] ++ homeManagerModules ++ [
@ -240,7 +240,6 @@
./loki/configuration.nix
./nixos_modules/garage.nix
(nixpkgs-u + "/nixos/modules/services/misc/readarr.nix")
./nixos_modules/readarr.nix
] ++ homeManagerModules ++ [
{

View file

@ -11,15 +11,14 @@
bluetooth = { enable = true; package = pkgs.bluezFull; };
opengl = { enable = true; driSupport = true; };
raspberry-pi."4" = {
audio.enable = true;
fkms-3d.enable = true; # GPU
# audio.enable = true; # AUDIO
# fkms-3d.enable = true; # GPU
};
};
i18n.defaultLocale = "it_IT.UTF-8";
networking.hostName = "freya";
# networking.firewall.allowedTCPPorts = [ 80 ];
networking.firewall = {
enable = true;
allowPing = true;

View file

@ -12,7 +12,7 @@
programs.helix = {
enable = true;
package = pkgs.unstable_pkgs.helix;
languages = [{
languages.language = [{
name = "nix";
formatter = { command = "nixpkgs-fmt"; };
# config = { nil = { formatting = { command = "nixpkgs-fmt"; }; }; };

View file

@ -12,7 +12,7 @@ let
zscroll = "${pkgs.zscroll}/bin/zscroll";
notificationStatus = pkgs.writeShellScript "notificationStatus" ''
PATH=$PATH:"${lib.makeBinPath [ pkgs.dbus ]}"
if [[ `${dunstctl} is-paused` == "true" ]]; then echo ; else echo ; fi
if [[ `${dunstctl} is-paused` == "true" ]]; then echo 󰂚; else echo 󰂛; fi
'';
notificationToggle = pkgs.writeShellScript "notificationToggle" ''
PATH=$PATH:"${lib.makeBinPath [ pkgs.dbus ]}"
@ -38,10 +38,10 @@ let
${playerCtl} -f '{{title}} - {{artist}}' metadata || true
'';
playerStatus = pkgs.writeShellScript "playerStatus" ''
${zscroll} -l 20 -M ${playerStatusBasic} -n -s 1 \
-m "Playing" -b ' ' \
-m "Paused" -b ' ' \
-u ${playerStatusSrc} &
${zscroll} -l 25 -M ${playerStatusBasic} \
-m "Playing" "-b ' ' -s 1" \
-m "Paused" "-b ' ' -s 0" \
-u true ${playerStatusSrc} &
wait
'';
confirm_command = { cmd, title ? null, text ? null, image ? null }:
@ -178,14 +178,8 @@ in
full.at = 98;
animation = {
charging = {
text = [ "" "" "" "" "" "" "" "" "" "" ];
framerate = "750";
};
discharging = {
text = [ "" "" "" "" "" "" "" "" "" "" ];
framerate = "750";
};
charging = { text = [ "" "" "" "" "" ]; framerate = "750"; };
discharging = { text = [ "" "" "" "" "" ]; framerate = "750"; };
};
format = {
@ -195,7 +189,7 @@ in
discharging = recursiveUpdate colors.active {
text = "<animation-discharging> <label-discharging>";
};
full = recursiveUpdate colors.normal { text = " <label-full>"; };
full = recursiveUpdate colors.normal { text = " <label-full>"; };
};
label.text = "%percentage%%";
@ -221,16 +215,14 @@ in
{
focused = recursiveUpdate common colors.selected;
occupied = recursiveUpdate common colors.active;
urgent = recursiveUpdate (recursiveUpdate common colors.active) {
background = colors.alert;
};
urgent = recursiveUpdate (recursiveUpdate common colors.active) { background = colors.alert; };
empty = recursiveUpdate common colors.normal;
};
};
"module/cpu" = {
type = "internal/cpu";
format = recursiveUpdate colors.normal { text = " <label>"; };
format = recursiveUpdate colors.normal { text = " <label>"; };
interval = 2;
label = "%percentage-sum%%";
ramp-load = ramp;
@ -238,22 +230,16 @@ in
"module/date" = {
type = "internal/date";
date = {
alt = "%Y-%m-%d";
text = "%a %d/%m/%y";
};
format = colors.normal;
date = { alt = "%Y-%m-%d"; text = "%a %d/%m/%y"; };
interval = "1";
label = "%date% %time%";
time = {
alt = "%H:%M:%S";
text = "%H:%M";
};
format = colors.normal;
time = { alt = "%H:%M:%S"; text = "%H:%M"; };
};
"module/memory" = {
type = "internal/memory";
format = recursiveUpdate colors.normal { text = " <label>"; };
format = recursiveUpdate colors.normal { text = " <label>"; };
interval = 2;
label = "%percentage_used%%";
ramp-used = ramp;
@ -286,9 +272,9 @@ in
text = "<ramp-volume> <label-volume>";
};
};
label.muted.text = " muted";
label.muted.text = "󰝟 muted";
label.volume.text = "%percentage%%";
ramp.volume = [ "" "奔" "" ];
ramp.volume = [ "󰕿" "󰖀" "󰕾" ];
type = "internal/pulseaudio";
};
@ -323,36 +309,20 @@ in
menu = [
[
{
text = "";
exec = confirm_command {
cmd = logout;
title = "Logout";
text = "Do you want to logout?";
};
text = "󰍃";
exec = confirm_command { cmd = logout; title = "Logout"; text = "Do you want to logout?"; };
}
{
text = "";
exec = confirm_command {
cmd = "${systemctl} reboot";
title = "Reboot";
text = "Do you want to reboot?";
};
text = "󰜉";
exec = confirm_command { cmd = "${systemctl} reboot"; title = "Reboot"; text = "Do you want to reboot?"; };
}
{
text = "";
exec = confirm_command {
cmd = "${systemctl} hibernate";
title = "Hibernate";
text = "Do you want to hibernate?";
};
exec = confirm_command { cmd = "${systemctl} hibernate"; title = "Hibernate"; text = "Do you want to hibernate?"; };
}
{
text = "";
exec = confirm_command {
cmd = "${shutdown} now";
title = "Shutdown";
text = "Do you want to shutdown?";
};
exec = confirm_command { cmd = "${shutdown} now"; title = "Shutdown"; text = "Do you want to shutdown?"; };
}
]
];

View file

@ -2,7 +2,7 @@
with lib; {
boot = {
binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
kernelPackages = pkgs.linuxPackages_latest;
# kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
@ -240,32 +240,23 @@ with lib; {
services.snapper = {
configs =
let
commonExtraConfig = ''
TIMELINE_CREATE=yes
TIMELINE_CLEANUP=yes
'';
common = {
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
};
in
{
bertof = {
subvolume = "/home/bertof/";
extraConfig = ''
ALLOW_USERS="bertof"
${commonExtraConfig}
'';
bertof = recursiveUpdate common {
SUBVOLUME = "/home/bertof/";
ALLOW_USERS = [ "bertof" ];
};
tiziano = {
subvolume = "/home/tiziano/";
extraConfig = ''
ALLOW_USERS="tiziano"
${commonExtraConfig}
'';
tiziano = recursiveUpdate common {
SUBVOLUME = "/home/tiziano/";
ALLOW_USERS = [ "tiziano" ];
};
condiviso = {
subvolume = "/mnt/condiviso";
extraConfig = ''
ALLOW_USERS="bertof tiziano"
${commonExtraConfig}
'';
condiviso = recursiveUpdate common {
SUBVOLUME = "/mnt/condiviso";
ALLOW_USERS = [ "bertof" "tiziano" ];
};
};
};
@ -378,7 +369,7 @@ with lib; {
"calendar"
"citybikes"
"configurator"
"coronavirus"
# "coronavirus"
"cover"
"default_config"
"derivative"

View file

@ -2,8 +2,10 @@
services.openssh = {
enable = true;
openFirewall = true;
# permitRootLogin = "prohibit-password";
passwordAuthentication = false;
settings = {
# PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
};
};
users.users.root = {
openssh.authorizedKeys.keys = [

View file

@ -2,10 +2,11 @@
services.openssh = {
enable = true;
openFirewall = true;
kbdInteractiveAuthentication = lib.mkDefault false;
permitRootLogin = lib.mkDefault "prohibit-password";
passwordAuthentication = lib.mkDefault false;
settings = {
KbdInteractiveAuthentication = lib.mkDefault false;
PermitRootLogin = lib.mkDefault "prohibit-password";
PasswordAuthentication = lib.mkDefault false;
};
};
users.users.root.openssh.authorizedKeys.keys = [

View file

@ -6,7 +6,7 @@ with lib; {
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.checkJournalingFS = true;
# boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = pkgs.linuxPackages_6_1;
# boot.kernelPackages = pkgs.linuxPackages_6_1;
boot.extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
# # Cross-build arm
@ -68,8 +68,7 @@ with lib; {
# Configure keymap in X11
layout = "it,us";
xkbOptions =
"eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle";
xkbOptions = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle";
libinput.enable = true;
displayManager.sddm = {
@ -181,32 +180,23 @@ with lib; {
services.snapper = {
configs =
let
bertofExtraConfig = ''
ALLOW_USERS="bertof"
TIMELINE_CREATE=yes
TIMELINE_CLEANUP=yes
'';
common = { extraConfig = bertofExtraConfig; };
common = {
ALLOW_USERS = [ "bertof" ];
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
};
in
{
bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; };
bertof_music =
recursiveUpdate common { subvolume = "/home/bertof/Musica"; };
bertof_downloads =
recursiveUpdate common { subvolume = "/home/bertof/Scaricati"; };
bertof_images =
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_sata =
recursiveUpdate common { subvolume = "/home/bertof/Giochi/SATA"; };
# bertof_games_hdd = recursiveUpdate common { subvolume = "/home/bertof/Giochi/HDD"; };
bertof_git =
recursiveUpdate common { subvolume = "/home/bertof/Documenti/Git"; };
bertof_home = recursiveUpdate common { SUBVOLUME = "/home/bertof"; };
bertof_music = recursiveUpdate common { SUBVOLUME = "/home/bertof/Musica"; };
bertof_downloads = recursiveUpdate common { SUBVOLUME = "/home/bertof/Scaricati"; };
bertof_images = 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_sata = recursiveUpdate common { SUBVOLUME = "/home/bertof/Giochi/SATA"; };
# bertof_games_hdd = recursiveUpdate common { SUBVOLUME = "/home/bertof/Giochi/HDD"; };
bertof_git = recursiveUpdate common { SUBVOLUME = "/home/bertof/Documenti/Git"; };
};
};

View file

@ -3,7 +3,7 @@ with lib; {
boot = {
binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ];
# kernelPackages = pkgs.linuxPackages_latest;
kernelPackages = pkgs.linuxPackages_6_1;
# kernelPackages = pkgs.linuxPackages_6_1;
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
loader = {
systemd-boot.enable = true;
@ -110,19 +110,12 @@ with lib; {
# joycond.enable = true;
keybase.enable = true;
onedrive.enable = true;
openssh = {
enable = true;
openFirewall = true;
forwardX11 = true;
};
openssh = { enable = true; openFirewall = true; };
pipewire = {
enable = true;
pulse.enable = true;
alsa = { enable = true; support32Bit = true; };
jack.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
# media-session.enable = true;
};
power-profiles-daemon.enable = true;
@ -131,15 +124,13 @@ with lib; {
configs =
let
common = {
extraConfig = ''
ALLOW_USERS="bertof"
TIMELINE_CREATE=yes
TIMELINE_CLEANUP=yes
'';
ALLOW_USERS = [ "bertof" ];
TIMELINE_CLEANUP = true;
TIMELINE_CREATE = true;
};
in
{
bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; };
bertof_home = recursiveUpdate common { SUBVOLUME = "/home/bertof"; };
};
};
thermald.enable = true;