From 1d5c0a1d15ee8c5500be521aaf1fc87798a42e92 Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Mon, 14 Jul 2025 08:55:51 -0700 Subject: [PATCH] feat: files force,,, --- flake.lock | 26 +++++++++++++------------- flake.nix | 6 +++--- home/profiles/common/files.nix | 3 +++ home/profiles/graphical/spotify.nix | 3 +++ modules/home/files-force.nix | 27 +++++++++++++++++++++++++++ 5 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 home/profiles/common/files.nix create mode 100644 modules/home/files-force.nix diff --git a/flake.lock b/flake.lock index 54ccf67b..9d560606 100644 --- a/flake.lock +++ b/flake.lock @@ -5,17 +5,17 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1752473264, + "lastModified": 1752473542, "narHash": "sha256-PhowmGOEqpVHSijrb/5f2HHwaH2uaGxS6kWQKdGyIgM=", - "owner": "kittywitch", - "repo": "arcexprs", - "rev": "fed3d7a889571f065741db910b0e0435a23af2e6", + "owner": "arcnmx", + "repo": "nixexprs", + "rev": "194e3d4a292d441187f2f386120b1b07db3dc72e", "type": "github" }, "original": { - "owner": "kittywitch", + "owner": "arcnmx", "ref": "master", - "repo": "arcexprs", + "repo": "nixexprs", "type": "github" } }, @@ -29,15 +29,15 @@ ] }, "locked": { - "lastModified": 1752471575, + "lastModified": 1752473330, "narHash": "sha256-HJZosSUcwX7HuGWyRkhBJQ1ToUkPzRzakM4ozoZmeTY=", - "owner": "kittywitch", + "owner": "arcnmx", "repo": "base16.nix", - "rev": "f038c00bc1a4750340e3ade44063d67e4408db44", + "rev": "dda216bd4d4bcd2460ae274cefb9584f9f7843d0", "type": "github" }, "original": { - "owner": "kittywitch", + "owner": "arcnmx", "ref": "flake", "repo": "base16.nix", "type": "github" @@ -118,11 +118,11 @@ ] }, "locked": { - "lastModified": 1752471889, - "narHash": "sha256-4xKCC4pqhjmuY9LxRbNT9ej3LVvsqrSSlukK5ADMbiY=", + "lastModified": 1752507097, + "narHash": "sha256-/JlfJOzHs7tJpFp6bw1AF7hO9FMMgLjQgtCaIK/jA2M=", "owner": "kittywitch", "repo": "nyx", - "rev": "96406d53afbeb672c842a01b21e135ca19a262c3", + "rev": "721f290b311f88eef85e8415f445fe5f90bf9155", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 488d93ee..70d43e7c 100644 --- a/flake.nix +++ b/flake.nix @@ -314,11 +314,11 @@ }; # a bunch of modules (also arcnmx is good) arcexprs = { - url = "github:kittywitch/arcexprs/master"; - #url = "github:arcnmx/nixexprs/master"; + #url = "github:kittywitch/arcexprs/master"; + url = "github:arcnmx/nixexprs/master"; }; base16 = { - url = "github:kittywitch/base16.nix/flake"; + url = "github:arcnmx/base16.nix/flake"; inputs = { nixpkgs.follows = "nixpkgs"; flakelib.follows = "flakelib"; diff --git a/home/profiles/common/files.nix b/home/profiles/common/files.nix new file mode 100644 index 00000000..2c54e399 --- /dev/null +++ b/home/profiles/common/files.nix @@ -0,0 +1,3 @@ +_: { + home.clobberAllFiles = true; +} diff --git a/home/profiles/graphical/spotify.nix b/home/profiles/graphical/spotify.nix index 5a631007..568f5caa 100644 --- a/home/profiles/graphical/spotify.nix +++ b/home/profiles/graphical/spotify.nix @@ -5,6 +5,9 @@ }: let spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system}; in { + programs.ncspot = { + enable = true; + }; programs.spicetify = { enable = true; enabledExtensions = with spicePkgs.extensions; [ diff --git a/modules/home/files-force.nix b/modules/home/files-force.nix new file mode 100644 index 00000000..6209ddc0 --- /dev/null +++ b/modules/home/files-force.nix @@ -0,0 +1,27 @@ +{ + config, + options, + lib, + ... +}: let + inherit (lib.types) attrsOf submodule; + inherit (lib.options) mkOption mkEnableOption; + inherit (lib.modules) mkDefault; + inherit (lib.attrsets) genAttrs; + fileOption = mkOption { + type = attrsOf (submodule ( + _: { + config.force = mkDefault config.home.clobberAllFiles; + } + )); + }; + +in { + options = { + home = { + clobberAllFiles = mkEnableOption "clobbering all files"; + file = fileOption; + }; + xdg = genAttrs [ "configFile" "cacheFile" "stateFile" "dataFile" ] (_: fileOption); + }; +}