remove parts dir
This commit is contained in:
parent
47dcad4a82
commit
341a41c63e
14 changed files with 19 additions and 249 deletions
1
.envrc
1
.envrc
|
@ -1,7 +1,6 @@
|
|||
watch_file flake.nix
|
||||
|
||||
watch_dir hosts
|
||||
watch_dir parts
|
||||
|
||||
use flake
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
apps.x86_64-linux = {
|
||||
default = {
|
||||
type = "app";
|
||||
program = pkgs.getExe user.packages.fish;
|
||||
program = "${user.packages.fish}/bin/fish";
|
||||
};
|
||||
helix = {
|
||||
type = "app";
|
||||
|
|
|
@ -79,14 +79,12 @@
|
|||
};
|
||||
other = {
|
||||
system.username = "cr";
|
||||
|
||||
};
|
||||
programs = {
|
||||
ssh.enable = true;
|
||||
btop.enable = true;
|
||||
nh.enable = true;
|
||||
};
|
||||
|
||||
};
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
|
|
|
@ -70,7 +70,6 @@ in {
|
|||
desktops.hyprland.enable = true;
|
||||
|
||||
programs = {
|
||||
|
||||
media = {
|
||||
beets.enable = true;
|
||||
mpv.enable = true;
|
||||
|
@ -87,19 +86,16 @@ in {
|
|||
musicDirectory = "/home/${config.modules.other.system.username}/cloud/media/Music";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
other = {
|
||||
system = {
|
||||
username = "cr";
|
||||
};
|
||||
|
||||
};
|
||||
programs = {
|
||||
ssh.enable = true;
|
||||
btop.enable = true;
|
||||
nh.enable = true;
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,22 +5,22 @@
|
|||
pkgs,
|
||||
...
|
||||
}: let
|
||||
# inherit (inputs) quickshell;
|
||||
# inherit (lib.generators) toKeyValue;
|
||||
# inherit (inputs) quickshell;
|
||||
# inherit (lib.generators) toKeyValue;
|
||||
in {
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# qt6.qtimageformats # amog
|
||||
# qt6.qt5compat # shader fx
|
||||
# (quickshell.packages.x86_64-linux.default.override {
|
||||
# withJemalloc = true;
|
||||
# withQtSvg = true;
|
||||
# withX11 = true;
|
||||
# withPipewire = true;
|
||||
# withPam = true;
|
||||
# withHyprland = true;
|
||||
# })
|
||||
# pamtester # lockscreen
|
||||
# grim
|
||||
# imagemagick # screenshot
|
||||
# ];
|
||||
# environment.systemPackages = with pkgs; [
|
||||
# qt6.qtimageformats # amog
|
||||
# qt6.qt5compat # shader fx
|
||||
# (quickshell.packages.x86_64-linux.default.override {
|
||||
# withJemalloc = true;
|
||||
# withQtSvg = true;
|
||||
# withX11 = true;
|
||||
# withPipewire = true;
|
||||
# withPam = true;
|
||||
# withHyprland = true;
|
||||
# })
|
||||
# pamtester # lockscreen
|
||||
# grim
|
||||
# imagemagick # screenshot
|
||||
# ];
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
gdb,
|
||||
black,
|
||||
cmake-format,
|
||||
tinymist,
|
||||
tinymist,
|
||||
lib,
|
||||
marksman,
|
||||
lldb_19,
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
imports = [
|
||||
./shell.nix
|
||||
./templates
|
||||
./lib
|
||||
];
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
{inputs, ...}: {
|
||||
imports = [inputs.treefmt-nix.flakeModule];
|
||||
perSystem = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# https://github.com/numtide/treefmt-nix?tab=readme-ov-file#flake-parts
|
||||
formatter = config.treefmt.build.wrapper;
|
||||
|
||||
treefmt = {
|
||||
projectRootFile = "flake.nix";
|
||||
enableDefaultExcludes = true;
|
||||
settings = {
|
||||
global.excludes = ["*.png"];
|
||||
};
|
||||
programs = {
|
||||
# alejandro
|
||||
alejandra.enable = true;
|
||||
|
||||
shellcheck.enable = true;
|
||||
|
||||
prettier = {
|
||||
enable = true;
|
||||
package = pkgs.prettierd;
|
||||
settings.editorconfig = true;
|
||||
};
|
||||
|
||||
shfmt = {
|
||||
enable = true;
|
||||
# https://flake.parts/options/treefmt-nix.html#opt-perSystem.treefmt.programs.shfmt.indent_size
|
||||
indent_size = 2; # set to 0 to use tabs
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,47 +0,0 @@
|
|||
{
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs) self;
|
||||
inherit (lib) mkDefault nixosSystem recursiveUpdate;
|
||||
inherit (lib.lists) singleton concatLists;
|
||||
|
||||
mkSystem = {
|
||||
withSystem,
|
||||
system,
|
||||
hostname,
|
||||
...
|
||||
} @ args:
|
||||
withSystem system (
|
||||
{
|
||||
inputs',
|
||||
self',
|
||||
...
|
||||
}:
|
||||
nixosSystem {
|
||||
inherit system;
|
||||
specialArgs =
|
||||
recursiveUpdate
|
||||
{
|
||||
inherit lib;
|
||||
inherit inputs inputs';
|
||||
inherit self self';
|
||||
}
|
||||
(args.specialArgs or {});
|
||||
modules = concatLists [
|
||||
# This is used to pre-emptively set the hostPlatform for nixpkgs.
|
||||
# Also, we set the system hostname here.
|
||||
(singleton {
|
||||
networking.hostName = args.hostname;
|
||||
nixpkgs.hostPlatform = mkDefault args.system;
|
||||
})
|
||||
|
||||
# We pass our modules from the arguments
|
||||
(args.modules or [])
|
||||
];
|
||||
}
|
||||
);
|
||||
in {
|
||||
inherit mkSystem;
|
||||
}
|
|
@ -1,56 +0,0 @@
|
|||
{inputs, ...}: let
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
|
||||
# Define the base library to be extended. Not only will this be an extension
|
||||
# of the nixpkgs library, but it will also be extensible the way nixpkgs lib
|
||||
# is in case the extended library
|
||||
# 1. needs to be extended internally
|
||||
# 2. needs to be extended during outside consumption
|
||||
# Additionally, .extend can be used to extend the lib with
|
||||
# custom, composed functions.
|
||||
lib0 = self: let
|
||||
callLibs = file:
|
||||
import file {
|
||||
inherit inputs;
|
||||
lib = self;
|
||||
};
|
||||
in {
|
||||
extendedLib = {
|
||||
builders = callLibs ./builders.nix;
|
||||
modules = callLibs ./modules.nix;
|
||||
};
|
||||
|
||||
# This makes mkSytem available *in addition* to `lib.extendedLib.builders.mkSystem`.
|
||||
# The syntax is a matter of preference, but it is good to make sure all custom attribute
|
||||
# sets (e.g., builders) are defined and taken from a separate attrset (extendedLib) to make
|
||||
# absolutely sure we *never* conflict with nixpkgs. Likewise, the function names inherited
|
||||
# here should also be different from ones available under `lib` by default, i.e., you cannot
|
||||
# re-define functions.
|
||||
# inherit (self.extendedLib) builders;
|
||||
# inherit (self.extendedLib.builders) mkSystem;
|
||||
};
|
||||
# Merge layers of libraries into one as a subject of convenience
|
||||
# and easy access.
|
||||
extensions = lib.composeManyExtensions [
|
||||
(_: _: inputs.nixpkgs.lib)
|
||||
(_: _: inputs.flake-parts.lib)
|
||||
];
|
||||
|
||||
# Extend default library
|
||||
extendedLib = (lib.makeExtensible lib0).extend extensions;
|
||||
# This can be used with `.extend` to extend the extended library.
|
||||
in {
|
||||
# Set the `lib` argument in `perSystem`, for example:
|
||||
# ```
|
||||
# perSystem = {pkgs, lib, ...}: { ...}
|
||||
# ````
|
||||
perSystem._module.args.lib = extendedLib;
|
||||
|
||||
# Prepare `lib` for external usage. This means it can be consumed
|
||||
# from inputs.<name of this flake as an input>` by other flakes.
|
||||
# `self` can also be used to access the custom lib as long as
|
||||
# `flake.lib` is set.
|
||||
flake = {
|
||||
lib = extendedLib;
|
||||
};
|
||||
}
|
|
@ -1,44 +0,0 @@
|
|||
{lib, ...}: let
|
||||
inherit (builtins) filter map toString elem;
|
||||
inherit (lib.filesystem) listFilesRecursive;
|
||||
inherit (lib.strings) hasSuffix;
|
||||
|
||||
# NOTE: This was bluntly taken from raf.
|
||||
|
||||
# `mkModuleTree` is used to recursively import all Nix file in a given directory, assuming the
|
||||
# given directory to be the module root, where rest of the modules are to be imported. This
|
||||
# retains a sense of explicitness in the module tree, and allows for a more organized module
|
||||
# imports, discarding the vague `default.nix` name for directories that are *modules*.
|
||||
mkModuleTree = {
|
||||
path,
|
||||
ignoredPaths ? [./default.nix],
|
||||
}:
|
||||
filter (hasSuffix ".nix") (
|
||||
map toString (
|
||||
# List all files in the given path, and filter out paths that are in
|
||||
# the ignoredPaths list
|
||||
filter (path: !elem path ignoredPaths) (listFilesRecursive path)
|
||||
)
|
||||
);
|
||||
|
||||
# A variant of mkModuleTree that provides more granular control over the files that are imported.
|
||||
# While `mkModuleTree` imports all Nix files in the given directory, `mkModuleTree'` will look
|
||||
# for a specific
|
||||
mkModuleTree' = {
|
||||
path,
|
||||
ignoredPaths ? [],
|
||||
}: (
|
||||
# Two conditions fill satisfy filter here:
|
||||
# - The path should end with a module.nix, indicating
|
||||
# that it is in fact a module file.
|
||||
# - The path is not contained in the ignoredPaths list.
|
||||
# If we cannot satisfy both of the conditions, then the path will be ignored
|
||||
filter (hasSuffix "module.nix") (
|
||||
map toString (
|
||||
filter (path: !elem path ignoredPaths) (listFilesRecursive path)
|
||||
)
|
||||
)
|
||||
);
|
||||
in {
|
||||
inherit mkModuleTree mkModuleTree';
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
perSystem = {
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
devShells.default = pkgs.mkShellNoCC {
|
||||
name = "nichts";
|
||||
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
|
||||
packages = [
|
||||
pkgs.git # take a guess
|
||||
|
||||
(pkgs.writeShellApplication {
|
||||
name = "update";
|
||||
text = ''
|
||||
nix flake update && git commit flake.lock -m "flake: bump inputs"
|
||||
'';
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
_: {
|
||||
flake.templates = {
|
||||
# somelang = {
|
||||
# path = ./somelang;
|
||||
# description = "QuickShell developement flake";
|
||||
# };
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue