From f769a25a96fe5622909756635a144ce6b492070a Mon Sep 17 00:00:00 2001 From: Daniel Ziltener Date: Wed, 21 Aug 2024 17:30:52 +0200 Subject: [PATCH] . --- Makefile | 3 +++ configuration.nix | 14 +++++++++++++- emacs/init.el | 14 ++++++++++++++ flake.lock | 16 ++++++++-------- flake.nix | 4 ++-- home.nix | 29 ++++++++++++++++++++++++----- hyprland/hyprland.nix | 5 +++-- 7 files changed, 67 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 11694f2..65edf34 100644 --- a/Makefile +++ b/Makefile @@ -32,6 +32,9 @@ install-system: configuration.nix setup-fido: systemd-cryptenroll --fido2-device=auto /dev/disk/by-partlabel/disk-main-luks +setup-desktop: + bw config server https://vaultwarden.lyrion.ch + install: nix-collect-garbage --delete-old env NIXPKGS_ALLOW_BROKEN=1 nixos-rebuild switch --flake .#ziltis-desktop --impure --show-trace diff --git a/configuration.nix b/configuration.nix index 2f14f04..01b4a5d 100644 --- a/configuration.nix +++ b/configuration.nix @@ -61,7 +61,16 @@ }; services.displayManager = { - sddm.enable = true; + sddm = { + enable = true; + wayland.enable = true; + settings = { + Autologin = { + User = "zilti"; + Session = "hyprland"; + }; + }; + }; }; services.libinput.enable = true; @@ -237,5 +246,8 @@ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "24.05"; # Did you read the comment? + # The following line is completely useless. I am leaving it here just to document + # the idiocy of all the people who keep recommending it online. + nix.settings.experimental-features = "nix-command flakes"; } diff --git a/emacs/init.el b/emacs/init.el index 9ade6e0..390b130 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -755,6 +755,20 @@ Point must be at the beginning of balanced expression (sexp)." ;;;; Git +;; The following snippet is a convenience function for git-commit to add the ticket number, if found +;; in the branch name, to the commit message. +(use-package git-commit + :hook + (git-commit-mode + . + (lambda () + (when-let ((branch (magit-get-current-branch))) + (when (string-match "\\(ticket\\|feature\\)-\\([[:digit]]\\{3,\\}\\)" branch) + (let ((prefix (format "[T-%s] \n" (match-string 2 branch)))) + (goto-char (point-min)) + (insert prefix) + (forward-char -1))))))) + ;; Magit requires 'transient' >= 0.5.0, but due to bad defaults, Emacs' package manager refuses to ;; upgrade this and other built-in packages to higher releases from GNU Elpa. (use-package transient diff --git a/flake.lock b/flake.lock index ebbb6fc..a4a6167 100644 --- a/flake.lock +++ b/flake.lock @@ -27,16 +27,16 @@ ] }, "locked": { - "lastModified": 1720042825, - "narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=", + "lastModified": 1723986931, + "narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=", "owner": "nix-community", "repo": "home-manager", - "rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073", + "rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "master", "repo": "home-manager", "type": "github" } @@ -59,16 +59,16 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1720386169, - "narHash": "sha256-NGKVY4PjzwAa4upkGtAMz1npHGoRzWotlSnVlqI40mo=", + "lastModified": 1723991338, + "narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "194846768975b7ad2c4988bdb82572c00222c0d7", + "rev": "8a3354191c0d7144db9756a74755672387b702ba", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index bc69137..871b4d8 100644 --- a/flake.nix +++ b/flake.nix @@ -18,9 +18,9 @@ }; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { - url = "github:nix-community/home-manager/release-24.05"; + url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; flatpaks.url = "github:GermanBread/declarative-flatpak/stable"; diff --git a/home.nix b/home.nix index 1be604e..46bfd3c 100644 --- a/home.nix +++ b/home.nix @@ -7,7 +7,8 @@ args@{ config, pkgs, split-monitor-workspaces, flatpaks, ... }: home.packages = with pkgs; [ appimage-run binutils - bitwarden + bitwarden-desktop + bitwarden-cli brightnessctl coreutils-full clojure-lsp @@ -37,7 +38,7 @@ args@{ config, pkgs, split-monitor-workspaces, flatpaks, ... }: libuuid lm_sensors gnumake - mattermost + mattermost-desktop # (nerdfonts.override { fonts = [ "VictorMono" "MPlus" ]; }) nerdfonts nixd @@ -149,14 +150,32 @@ args@{ config, pkgs, split-monitor-workspaces, flatpaks, ... }: host = "lyrion.ch"; tls = { enable = true; - useStartTls = true; }; }; smtp = { host = "lyrion.ch"; tls = { enable = true; - useStartTls = true; + }; + }; + thunderbird = { enable = true; }; + aerc = { enable = true; }; + }; + bevuta = { + realName = "Daniel Ziltener"; + userName = "daniel.ziltener@bevuta.com"; + passwordCommand = "Bevuta/E-Mail | head -n 1"; + address = "daniel.ziltener@bevuta.com"; + imap = { + host = "mail.networkname.de"; + tls = { + enable = true; + }; + }; + smtp = { + host = "mail.networkname.de"; + tls = { + enable = true; }; }; thunderbird = { enable = true; }; @@ -217,7 +236,7 @@ args@{ config, pkgs, split-monitor-workspaces, flatpaks, ... }: shopt -s extglob shopt -s globstar shopt -s checkjobs - eval "$(${pkgs.liquidprompt}/share/liquidprompt/liquidprompt)" + eval "$(${pkgs.liquidprompt}/bin/liquidprompt)" eval "$(${pkgs.liquidprompt}/share/liquidprompt/themes/alternate_vcs/alternate_vcs.theme)" ''; }; diff --git a/hyprland/hyprland.nix b/hyprland/hyprland.nix index f9fec32..086d572 100644 --- a/hyprland/hyprland.nix +++ b/hyprland/hyprland.nix @@ -80,14 +80,15 @@ master = { new_status = "slave"; orientation = "center"; - workspace = "w[g2] layoutopt:orientation:left"; + workspace = "w[g2], layoutopt:orientation:left"; always_center_master = true; mfact = 0.5; special_scale_factor = 0.8; }; gestures = { workspace_swipe = false; }; - "$lockscreen" = "${pkgs.swaylock-effects}/bin/swaylock"; + # "$lockscreen" = "${pkgs.swaylock-effects}/bin/swaylock"; + "$lockscreen" = "${pkgs.hyprlock}/bin/hyprlock"; "$mainMod" = "SUPER"; bind = [