From f2ec1995640475d17b2d4cd743368cac4cdef334 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 4 May 2021 01:27:21 +0200 Subject: [PATCH 1/4] home: add .local/bin to env --- home/env.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/home/env.nix b/home/env.nix index f2b2551..e196dd9 100644 --- a/home/env.nix +++ b/home/env.nix @@ -3,5 +3,6 @@ home.sessionPath = [ "${config.xdg.configHome}/emacs/bin" "${config.home.homeDirectory}/.cargo/bin" + "${config.home.homeDirectory}/.local/bin" ]; } From 8fe2ef669140a77c6afb1e9d5e517784bc20c275 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 4 May 2021 01:27:35 +0200 Subject: [PATCH 2/4] home: i3: add music block to bar --- home/x/i3bar.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/x/i3bar.nix b/home/x/i3bar.nix index a9c4b65..75997fb 100644 --- a/home/x/i3bar.nix +++ b/home/x/i3bar.nix @@ -69,6 +69,12 @@ in # TODO: use format when i3status-rust updates to v0.20 # format = "{percentage}"; } + { + block = "music"; + player = "spotify"; + buttons = ["prev" "play" "next"]; + hide_when_empty = true; + } { block = "sound"; driver = "pulseaudio"; From bc74de3fc6e7705d837b33935751675e41d0d51e Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 4 May 2021 01:27:46 +0200 Subject: [PATCH 3/4] home: i3: add pomodoro block to bar --- home/x/i3bar.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/home/x/i3bar.nix b/home/x/i3bar.nix index 75997fb..c4b1e5a 100644 --- a/home/x/i3bar.nix +++ b/home/x/i3bar.nix @@ -22,6 +22,12 @@ in settings = i3BarTheme; blocks = [ + { + block = "pomodoro"; + length = 60; + break_length = 10; + use_nag = true; + } { block = "disk_space"; path = "/"; From 71c4871af07e9657b8f1af6c8034a2c858323fe6 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 4 May 2021 01:32:37 +0200 Subject: [PATCH 4/4] boreal: prune backups older than a month --- hosts/boreal/default.nix | 8 ++++++++ services/borg-backup.nix | 18 +++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/hosts/boreal/default.nix b/hosts/boreal/default.nix index e31549c..b7ab958 100644 --- a/hosts/boreal/default.nix +++ b/hosts/boreal/default.nix @@ -47,6 +47,14 @@ in borg-backup = { enable = true; repo = secrets.borg-backup.boreal-repo; + # for a workstation, having backups spanning the last month should be + # enough + prune = { + keep = { + daily = 7; + weekly = 4; + }; + }; paths = [ "/home/alarsyo" ]; diff --git a/services/borg-backup.nix b/services/borg-backup.nix index 6c4e132..866a2af 100644 --- a/services/borg-backup.nix +++ b/services/borg-backup.nix @@ -14,6 +14,18 @@ in { description = "Borgbase repo info. Required."; }; + prune = mkOption { + type = types.attrs; + default = { + keep = { + daily = 7; + weekly = 4; + monthly = 6; + }; + }; + description = "pruning options for borg"; + }; + paths = mkOption { type = types.listOf types.str; default = []; @@ -57,11 +69,7 @@ in { doInit = true; compression = "auto,zstd"; startAt = "daily"; - prune.keep = { - daily = 7; - weekly = 4; - monthly = 6; - }; + prune = cfg.prune; }; }; }