From f9d537522d1ffe55bb51d44b9978e53af9fd5590 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vili=20Sinerv=C3=A4?= Date: Sun, 1 Jun 2025 12:39:49 +0300 Subject: [PATCH] Prepare config for flake usage --- hosts/{generic.nix => nixos.nix} | 0 installer/template-configuration.nix | 25 ------------------------- shared/base.nix | 6 +++--- 3 files changed, 3 insertions(+), 28 deletions(-) rename hosts/{generic.nix => nixos.nix} (100%) delete mode 100644 installer/template-configuration.nix diff --git a/hosts/generic.nix b/hosts/nixos.nix similarity index 100% rename from hosts/generic.nix rename to hosts/nixos.nix diff --git a/installer/template-configuration.nix b/installer/template-configuration.nix deleted file mode 100644 index 4ca4bf5..0000000 --- a/installer/template-configuration.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ ... }: -let - host = "generic"; - stateVersion = "25.05"; - - repo = builtins.fetchGit { - url = "https://forgejo.sinerva.eu/VSinerva/nixos-conf.git"; - name = "nixos-conf-forgejo"; - ref = "main"; - }; -in -{ - imports = [ - ./hardware-configuration.nix - "${repo}/hosts/${host}.nix" - ]; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # Before changing this value read the documentation for this option - # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). - system.stateVersion = stateVersion; # Did you read the comment? -} diff --git a/shared/base.nix b/shared/base.nix index b9c1beb..6411701 100644 --- a/shared/base.nix +++ b/shared/base.nix @@ -46,9 +46,9 @@ ZSH_TMUX_CONFIG=/etc/tmux.conf ''; promptInit = '' - if [ -n "$IN_NIX_SHELL" ]; then + if [ "$SHLVL" "!= 1" ]; then setopt PROMPT_SUBST - RPROMPT+='[nix]' + RPROMPT+='[depth-$\{SHLVL\}]' fi ''; }; @@ -131,6 +131,7 @@ ######################################## Housekeeping ########################################### system.autoUpgrade = { enable = true; + flake = "git+https://gitea.sinerva.eu/VSinerva/nixos-conf.git?ref=main&shallow=1"; dates = "04:00"; randomizedDelaySec = "30min"; allowReboot = true; @@ -147,7 +148,6 @@ "flakes" ]; auto-optimise-store = true; - tarball-ttl = 0; }; gc = { automatic = true;