Compare commits

..

1 commit

Author SHA1 Message Date
8f30d06f65 flake.lock: Update
Some checks failed
/ test (push) Failing after 29m40s
Flake lock file updates:

• Updated input 'catppuccin':
    'github:catppuccin/nix/8eada392fd6571a747e1c5fc358dd61c14c8704e' (2025-01-05)
  → 'github:catppuccin/nix/4a5ac694d7f8a63dec75cbe0ac1c84c818b6b789' (2025-01-13)
• Updated input 'catppuccin/catppuccin-v1_2':
    'https://api.flakehub.com/f/pinned/catppuccin/nix/1.2.0/0193e5e0-33b7-7149-a362-bfe56b20f64e/source.tar.gz?narHash=sha256-Let3uJo4YDyfqbqaw66dpZxhJB2TrDyZWSFd5rpPLJA%3D' (2024-12-20)
  → 'https://api.flakehub.com/f/pinned/catppuccin/nix/1.2.1/0193e646-1107-7f69-a402-f2a3988ecf1d/source.tar.gz?narHash=sha256-CFX4diEQHKvZYjnhf7TLg20m3ge1O4vqgplsk/Kuaek%3D' (2024-12-20)
• Updated input 'catppuccin/home-manager':
    'github:nix-community/home-manager/1395379a7a36e40f2a76e7b9936cc52950baa1be' (2024-12-19)
  → 'github:nix-community/home-manager/2532b500c3ed2b8940e831039dcec5a5ea093afc' (2025-01-10)
• Updated input 'catppuccin/home-manager-stable':
    'github:nix-community/home-manager/80b0fdf483c5d1cb75aaad909bd390d48673857f' (2024-12-16)
  → 'github:nix-community/home-manager/bd65bc3cde04c16755955630b344bc9e35272c56' (2025-01-08)
• Updated input 'catppuccin/nixpkgs':
    'github:NixOS/nixpkgs/d3c42f187194c26d9f0309a8ecc469d6c878ce33' (2024-12-17)
  → 'github:NixOS/nixpkgs/8f3e1f807051e32d8c95cd12b9b421623850a34d' (2025-01-04)
• Updated input 'catppuccin/nixpkgs-stable':
    'github:NixOS/nixpkgs/b47fd6fa00c6afca88b8ee46cfdb00e104f50bca' (2024-12-19)
  → 'github:NixOS/nixpkgs/cbd8ec4de4469333c82ff40d057350c30e9f7d36' (2025-01-05)
• Updated input 'catppuccin/nuscht-search':
    'github:NuschtOS/search/3051be7f403bff1d1d380e4612f0c70675b44fc9' (2024-12-09)
  → 'github:NuschtOS/search/836908e3bddd837ae0f13e215dd48767aee355f0' (2025-01-02)
• Updated input 'disko':
    'github:nix-community/disko/49f8aa791f81ff2402039b3efe0c35b9386c4bcf' (2025-01-06)
  → 'github:nix-community/disko/f720e64ec37fa16ebba6354eadf310f81555cc07' (2025-01-12)
• Updated input 'emacs-overlay':
    'github:nix-community/emacs-overlay/42b7368d193ad1939c32e87b48e970423f22f242' (2025-01-08)
  → 'github:nix-community/emacs-overlay/4fad271473a3c52568acf39ae3c2e9b9364124dd' (2025-01-15)
• Updated input 'emacs-overlay/nixpkgs':
    'github:NixOS/nixpkgs/8f3e1f807051e32d8c95cd12b9b421623850a34d' (2025-01-04)
  → 'github:NixOS/nixpkgs/9abb87b552b7f55ac8916b6fc9e5cb486656a2f3' (2025-01-13)
• Updated input 'emacs-overlay/nixpkgs-stable':
    'github:NixOS/nixpkgs/3f0a8ac25fb674611b98089ca3a5dd6480175751' (2025-01-06)
  → 'github:NixOS/nixpkgs/9c6b49aeac36e2ed73a8c472f1546f6d9cf1addc' (2025-01-14)
• Updated input 'homeManager':
    'github:nix-community/home-manager/456e599f9101ed153dde268b4401c5d294ba6c8c' (2025-01-08)
  → 'github:nix-community/home-manager/fc52a210b60f2f52c74eac41a8647c1573d2071d' (2025-01-13)
• Updated input 'impermanence':
    'github:nix-community/impermanence/d000479f4f41390ff7cf9204979660ad5dd16176' (2024-12-23)
  → 'github:nix-community/impermanence/c64bed13b562fc3bb454b48773d4155023ac31b7' (2025-01-12)
• Updated input 'lix':
    'git+https://git@git.lix.systems/lix-project/lix?ref=refs/heads/main&rev=3413ab56292f12ac03ee49270bcaf16038020cb3' (2025-01-07)
  → 'git+https://git@git.lix.systems/lix-project/lix?ref=refs/heads/main&rev=acbb3cff2d1a8b998135dc6f48cdd7fda85a3124' (2025-01-14)
• Updated input 'mobile-nixos':
    'github:NixOS/mobile-nixos/595d359518864a13483fd3f4f4ad740cb3bae825' (2024-12-26)
  → 'github:NixOS/mobile-nixos/43fba7218ebbd450f8b578be10bab2a726f470a0' (2025-01-14)
• Updated input 'nix-fast-build':
    'github:Mic92/nix-fast-build/a06a8b2c079f7b6dab491a12555387bdb737cc44' (2025-01-06)
  → 'github:Mic92/nix-fast-build/906af17fcd50c84615a4660d9c08cf89c01cef7d' (2025-01-11)
• Updated input 'nix-fast-build/flake-parts':
    'github:hercules-ci/flake-parts/f2f7418ce0ab4a5309a4596161d154cfc877af66' (2025-01-01)
  → 'github:hercules-ci/flake-parts/b905f6fc23a9051a6e1b741e1438dbfc0634c6de' (2025-01-06)
• Updated input 'nix-fast-build/treefmt-nix':
    'github:numtide/treefmt-nix/29806abab803e498df96d82dd6f34b32eb8dd2c8' (2025-01-03)
  → 'github:numtide/treefmt-nix/13c913f5deb3a5c08bb810efd89dc8cb24dd968b' (2025-01-06)
• Updated input 'nixDarwin':
    'github:LnL7/nix-darwin/ba9b3173b0f642ada42b78fb9dfc37ca82266f6c' (2025-01-05)
  → 'github:LnL7/nix-darwin/bd921223ba7cdac346477d7ea5204d6f4736fcc6' (2025-01-14)
• Updated input 'nixDarwin/nixpkgs':
    'github:NixOS/nixpkgs/e913ae340076bbb73d9f4d3d065c2bca7caafb16' (2024-06-11)
  → 'github:NixOS/nixpkgs/8c9fd3e564728e90829ee7dbac6edc972971cd0f' (2025-01-07)
• Updated input 'nixosHardware':
    'github:NixOS/nixos-hardware/4f339f6be2b61662f957c2ee9eda0fa597d8a6d6' (2025-01-07)
  → 'github:NixOS/nixos-hardware/8870dcaff63dfc6647fb10648b827e9d40b0a337' (2025-01-09)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/8f3e1f807051e32d8c95cd12b9b421623850a34d' (2025-01-04)
  → 'github:NixOS/nixpkgs/9abb87b552b7f55ac8916b6fc9e5cb486656a2f3' (2025-01-13)
2025-01-15 13:20:07 +00:00
11 changed files with 172 additions and 131 deletions

73
flake.lock generated
View file

@ -260,6 +260,27 @@
}
},
"flake-parts_3": {
"inputs": {
"nixpkgs-lib": [
"nix-fast-build",
"nixpkgs"
]
},
"locked": {
"lastModified": 1736143030,
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-parts_4": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib_2"
},
@ -277,7 +298,7 @@
"type": "github"
}
},
"flake-parts_4": {
"flake-parts_5": {
"inputs": {
"nixpkgs-lib": [
"nixThePlanet",
@ -452,7 +473,7 @@
},
"hercules-ci-effects": {
"inputs": {
"flake-parts": "flake-parts_4",
"flake-parts": "flake-parts_5",
"nixpkgs": "nixpkgs_7"
},
"locked": {
@ -746,6 +767,28 @@
"type": "github"
}
},
"nix-fast-build": {
"inputs": {
"flake-parts": "flake-parts_3",
"nixpkgs": [
"nixpkgs"
],
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1736592044,
"narHash": "sha256-HkaJeIFgxncLm8MC1BaWRTkge9b1/+mjPcbzXTRshoM=",
"owner": "Mic92",
"repo": "nix-fast-build",
"rev": "906af17fcd50c84615a4660d9c08cf89c01cef7d",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "nix-fast-build",
"type": "github"
}
},
"nix-formatter-pack": {
"inputs": {
"nixpkgs": [
@ -836,7 +879,7 @@
},
"nixThePlanet": {
"inputs": {
"flake-parts": "flake-parts_3",
"flake-parts": "flake-parts_4",
"hercules-ci-effects": "hercules-ci-effects",
"nixpkgs": "nixpkgs_8",
"osx-kvm": "osx-kvm"
@ -1298,12 +1341,13 @@
"lix-eval-jobs": "lix-eval-jobs",
"lix-module": "lix-module",
"mobile-nixos": "mobile-nixos",
"nix-fast-build": "nix-fast-build",
"nix-on-droid": "nix-on-droid",
"nixDarwin": "nixDarwin",
"nixThePlanet": "nixThePlanet",
"nixosHardware": "nixosHardware",
"nixpkgs": "nixpkgs_9",
"treefmt-nix": "treefmt-nix_2",
"treefmt-nix": "treefmt-nix_3",
"vscode-server": "vscode-server"
}
},
@ -1448,6 +1492,27 @@
}
},
"treefmt-nix_2": {
"inputs": {
"nixpkgs": [
"nix-fast-build",
"nixpkgs"
]
},
"locked": {
"lastModified": 1736154270,
"narHash": "sha256-p2r8xhQZ3TYIEKBoiEhllKWQqWNJNoT9v64Vmg4q8Zw=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "13c913f5deb3a5c08bb810efd89dc8cb24dd968b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"type": "github"
}
},
"treefmt-nix_3": {
"inputs": {
"nixpkgs": [
"nixpkgs"

View file

@ -59,6 +59,10 @@
};
catppuccin.url = "github:catppuccin/nix";
emacs-overlay.url = "github:nix-community/emacs-overlay";
nix-fast-build = {
url = "github:Mic92/nix-fast-build";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =

View file

@ -1016,41 +1016,26 @@ This is meant to be an helper to be called from the window manager."
;;; Experiments, remove from here
(defun ccr/test (niri-socket)
"Select a window and focus it based on `niri msg` output."
(defun ccr/test ()
"test"
(interactive)
(let* ((niri-output (ccr/niri-get-windows niri-socket))
(display-list (mapcar (lambda (entry)
(let ((title (cdr (assoc 'title entry)))
(app-id (cdr (assoc 'app_id entry)))
(id (cdr (assoc 'id entry))))
(cons (format "%s - %s" title app-id) id)))
niri-output)))
(with-selected-frame
(make-frame '((name . "Emacs Selector")
(minibuffer . only)
(fullscreen . 0)
(undecorated . t)
(internal-border-width . 10)
(width . 120)
(height . 20)))
(unwind-protect
(let* ((entry (completing-read "Select window: " (mapcar #'car display-list) nil t ""))
(entry-id (cdr (assoc entry display-list))) ;; Get the ID associated with the selected entry
(command (format "NIRI_SOCKET=\"%s\" niri msg action focus-window --id %s" niri-socket entry-id)))
(message command)
(shell-command command))
(delete-frame)))))
(with-selected-frame
(make-frame '((name . "Emacs Selector")
(minibuffer . only)
(fullscreen . 0) ; no fullscreen
(undecorated . t) ; remove title bar
;;(auto-raise . t) ; focus on this frame
;;(tool-bar-lines . 0)
;;(menu-bar-lines . 0)
(internal-border-width . 10)
(width . 50)
(height . 10)))
(unwind-protect
(completing-read "ciao " '("foo" "bar" "pippo") nil t "")
(delete-frame))))
(defun ccr/niri-get-windows (niri-socket)
"Esegue `niri msg --json windows` e parse l'output JSON in una alist."
(let* ((command (format "NIRI_SOCKET=\"%s\" niri msg --json windows" niri-socket))
(output (shell-command-to-string command))
(json-object-type 'alist) ; Usa alist per rappresentare gli oggetti JSON
(parsed-json (json-read-from-string output)))
parsed-json))
(provide 'init)
;;; init.el ends here

View file

@ -2,13 +2,25 @@
{
services.gpg-agent = {
enable = true;
pinentryPackage = pkgs.pinentry-rofi.override {
rofi = pkgs.rofi-wayland;
};
extraConfig = ''
allow-emacs-pinentry
allow-loopback-pinentry
'';
enableSshSupport = true;
extraConfig =
let
pinentryRofi = pkgs.writeShellApplication {
name = "pinentry-rofi-with-env";
runtimeInputs = with pkgs; [
coreutils
rofi-wayland
];
text = ''
"${pkgs.pinentry-rofi}/bin/pinentry-rofi" "$@"
'';
};
in
''
allow-emacs-pinentry
allow-loopback-pinentry
pinentry-program ${pinentryRofi}/bin/pinentry-rofi-with-env
'';
};
programs.gpg = {

View file

@ -1,7 +1,6 @@
{
config,
pkgs,
lib,
...
}:
let
@ -53,34 +52,29 @@ in
services.udiskie.enable = true;
home.pointerCursor = {
gtk.enable = true;
x11.enable = true;
package = pkgs.catppuccin-cursors;
name = "catppuccin-mocha-sapphire";
size = 38;
};
gtk = {
enable = true;
theme = {
name = "Catppuccin-GTK-Purple-Dark-Compact";
package = pkgs.magnetic-catppuccin-gtk.override {
accent = [ "purple" ];
shade = "dark";
size = "compact";
};
};
# font.name = lib.mkForce "Sans,Symbols Nerd Font";
iconTheme = {
name = "Adwaita";
package = pkgs.adwaita-icon-theme;
};
cursorTheme = {
name = "catppuccin-mocha-sapphire";
package = pkgs.catppuccin-cursors;
size = 38;
};
};
qt = {
enable = true;
};
home.file.".icons/catppuccin-mocha-sapphire" = {
source = "${pkgs.catppuccin-cursors.mochaSapphire}/share/icons/catppuccin-mocha-sapphire-cursors";
recursive = true;
};
wayland.windowManager.hyprland = {
enable = true;
plugins = with pkgs.hyprlandPlugins; [

View file

@ -301,18 +301,9 @@ window-rule {
}
window-rule {
match title=r#"^Emacs Selector$"#
opacity 0.95
open-floating true
open-focused true
match app-id=r#"^Emacs Selector$"#
}
window-rule {
match title=r#"^bTop$"#
opacity 0.95
open-floating true
open-focused true
}
@ -343,9 +334,9 @@ binds {
Mod+M { spawn "emacsclient" "-c" "--eval" "(notmuch-search \"tag:new\")"; }
Mod+G { spawn "emacsclient" "-c" "--eval" "(switch-to-buffer (gptel \"*ChatGPT*\"))"; }
Mod+Shift+C { spawn "emacsclient" "-c" "--eval" "(org-roam-dailies-capture-today)"; }
Mod+Alt+L { spawn "swaylock"; }
Super+Alt+L { spawn "swaylock"; }
Mod+Space { spawn "rofi" "-show" "menu" "-modi" "menu:rofi-power-menu"; }
Mod+Ctrl+b { spawn "foot" "--title='bTop'" "-W" "210x60" "btop";}
// Example volume keys mappings for PipeWire & WirePlumber.
// The allow-when-locked=true property makes them work even when the session is locked.

View file

@ -48,4 +48,10 @@
}
];
};
# Otherwise it will start only after Sway and will not work with Hyprland
systemd.user.services.swayidle = {
Unit.PartOf = lib.mkForce [ ];
Install.WantedBy = lib.mkForce [ "graphical-session-pre.target" ];
};
}

View file

@ -14,22 +14,20 @@
deltaflyer = {
nixpkgs =
let
# keep in sync with https://github.com/mobile-nixos/mobile-nixos/blob/development/npins/sources.json
rev = "d3c42f187194c26d9f0309a8ecc469d6c878ce33";
# keep in sync with https://github.com/NixOS/mobile-nixos/blob/development/pkgs.nix
rev = "44d0940ea560dee511026a53f0e2e2cde489b4d4";
in
builtins.getFlake "github:NixOS/nixpkgs/${rev}";
extraHmModules = [
inputs.catppuccin.homeManagerModules.catppuccin
# inputs.ccrEmacs.hmModules.default
];
vpn = {
ip = "10.100.0.5";
publicKey = "6bzmBx2b5yzMdW0aK0KapoBesNcxTv5+qdo+pGmG+jc=";
};
# homeManager = builtins.getFlake "github:nix-community/home-manager/670d9ecc3e46a6e3265c203c2d136031a3d3548e";
homeManager = builtins.getFlake "github:nix-community/home-manager/670d9ecc3e46a6e3265c203c2d136031a3d3548e";
extraModules = [
(import "${inputs.mobile-nixos}/lib/configuration.nix" { device = "oneplus-fajita"; })
inputs.catppuccin.nixosModules.catppuccin
inputs.lix-module.nixosModules.default
];
secrets = {
"deltaflyer-wireguard-private-key" = { };

View file

@ -30,13 +30,6 @@
# INSECURE STUFF FIRST
# Users and hardcoded passwords.
{
nixpkgs.overlays = [
(prev: final: {
gcc7 = final.gcc;
gcc8 = final.gcc;
})
];
users.users.root.password = "nixos";
# users.users.ccr.password = "1234";
@ -73,13 +66,11 @@
"git"
"shell"
"helix"
# "hyprland"
"niri"
"hyprland"
"emacs"
"firefox"
"mpv"
"xdg"
"catppuccin"
];
extraGroups = [
"dialout"
@ -108,18 +99,18 @@
ccr.extraModules = [
{
programs.fish.loginShellInit = ''
pgrep niri >/dev/null || exec niri-session
pgrep Hypr >/dev/null || exec dbus-run-session Hyprland
'';
wayland.windowManager.hyprland.extraConfig = lib.mkAfter ''
monitor = DSI-1, 1080x2340, 0x0, 2, transform, 1
input {
touchdevice {
transform = 1
}
}
bind = $mod, r, exec, rotate-screen hor
bind = $mod SHIFT, r, exec, rotate-screen ver
'';
# wayland.windowManager.hyprland.extraConfig = lib.mkAfter ''
# monitor = DSI-1, 1080x2340, 0x0, 2, transform, 1
# input {
# touchdevice {
# transform = 1
# }
# }
# bind = $mod, r, exec, rotate-screen hor
# bind = $mod SHIFT, r, exec, rotate-screen ver
# '';
home.packages =
let
rotateScript = pkgs.writeShellApplication {

View file

@ -3,7 +3,6 @@
#
{
lib,
pkgs,
...
}:
{
@ -17,38 +16,35 @@
# # desktopManager.plasma5.mobile.enable = true;
displayManager.autoLogin = {
enable = true;
user = "ccr";
};
# displayManager.autoLogin = {
# enable = true;
# };
displayManager.session = [
{
manage = "desktop";
name = "niri";
start = ''
${pkgs.niri}/bin/niri-session &
waitPID=$!
'';
}
];
# displayManager.session = [{
# manage = "desktop";
# name = "hyprland";
# start = ''
# ${pkgs.hyprland}/bin/Hyprland &
# waitPID=$!
# '';
# }];
displayManager.defaultSession = "niri";
# displayManager.defaultSession = "hyprland";
displayManager.lightdm = {
enable = true;
# Workaround for autologin only working at first launch.
# A logout or session crashing will show the login screen otherwise.
extraSeatDefaults = ''
session-cleanup-script=${pkgs.procps}/bin/pkill -P1 -fx ${pkgs.lightdm}/sbin/lightdm
'';
};
# displayManager.lightdm = {
# enable = true;
# # Workaround for autologin only working at first launch.
# # A logout or session crashing will show the login screen otherwise.
# extraSeatDefaults = ''
# session-cleanup-script=${pkgs.procps}/bin/pkill -P1 -fx ${pkgs.lightdm}/sbin/lightdm
# '';
# };
libinput.enable = true;
};
hardware.bluetooth.enable = true;
hardware.pulseaudio.enable = lib.mkDefault false; # mkDefault to help out users wanting pipewire
hardware.pulseaudio.enable = lib.mkDefault true; # mkDefault to help out users wanting pipewire
networking.networkmanager.enable = true;
networking.wireless.enable = false;
powerManagement.enable = true;

View file

@ -8,13 +8,12 @@
{
nixpkgs.overlays = [
(final: _: {
nix-eval-jobs =
(fleetFlake.inputs.lix-eval-jobs.packages.${final.system}.nix-eval-jobs.override {
nix = final.nix;
})
// {
nix = final.nix;
};
nix-fast-build = fleetFlake.inputs.nix-fast-build.packages.${final.system}.nix-fast-build // {
nix = final.nix;
};
nix-eval-job = fleetFlake.inputs.lix-eval-jobs.packages.${final.system}.nix-eval-jobs // {
nix = final.nix;
};
})
];