nvim stuff
This commit is contained in:
@@ -6,9 +6,7 @@
|
||||
nixvim,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
}: {
|
||||
imports = [
|
||||
./dock
|
||||
./system.nix
|
||||
@@ -25,26 +23,24 @@
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
users.${user} =
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
_module.args = { inherit user; };
|
||||
imports = [
|
||||
nixvim.homeModules.nixvim
|
||||
../base/home-manager
|
||||
./home-manager/ghostty.nix
|
||||
];
|
||||
fonts.fontconfig.enable = true;
|
||||
home = {
|
||||
packages = pkgs.callPackage ./packages.nix { } ++ pkgs.callPackage ../base/packages.nix { };
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
users.${user} = {
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
_module.args = {inherit user;};
|
||||
imports = [
|
||||
nixvim.homeModules.nixvim
|
||||
../base/home-manager
|
||||
./home-manager/ghostty.nix
|
||||
];
|
||||
fonts.fontconfig.enable = true;
|
||||
home = {
|
||||
packages = pkgs.callPackage ./packages.nix {} ++ pkgs.callPackage ../base/packages.nix {};
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
local = {
|
||||
@@ -52,11 +48,11 @@
|
||||
enable = true;
|
||||
username = user;
|
||||
entries = [
|
||||
{ path = "/Applications/Safari.app/"; }
|
||||
{ path = "/${pkgs.ghostty-bin}/Applications/Ghostty.app/"; }
|
||||
{ path = "/System/Applications/Notes.app/"; }
|
||||
{ path = "/System/Applications/Music.app/"; }
|
||||
{ path = "/System/Applications/System Settings.app/"; }
|
||||
{path = "/Applications/Safari.app/";}
|
||||
{path = "/${pkgs.ghostty-bin}/Applications/Ghostty.app/";}
|
||||
{path = "/System/Applications/Notes.app/";}
|
||||
{path = "/System/Applications/Music.app/";}
|
||||
{path = "/System/Applications/System Settings.app/";}
|
||||
{
|
||||
path = "${config.users.users.${user}.home}/Downloads";
|
||||
section = "others";
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
with lib;
|
||||
let
|
||||
with lib; let
|
||||
cfg = config.local.dock;
|
||||
inherit (pkgs) stdenv dockutil;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options = {
|
||||
local.dock = {
|
||||
enable = mkOption {
|
||||
@@ -21,11 +18,10 @@ in
|
||||
|
||||
entries = mkOption {
|
||||
description = "Entries on the Dock";
|
||||
type =
|
||||
with types;
|
||||
type = with types;
|
||||
listOf (submodule {
|
||||
options = {
|
||||
path = lib.mkOption { type = str; };
|
||||
path = lib.mkOption {type = str;};
|
||||
section = lib.mkOption {
|
||||
type = str;
|
||||
default = "apps";
|
||||
@@ -48,11 +44,14 @@ in
|
||||
|
||||
config = mkIf cfg.enable (
|
||||
let
|
||||
normalize = path: if hasSuffix ".app" path then path + "/" else path;
|
||||
entryURI =
|
||||
path:
|
||||
normalize = path:
|
||||
if hasSuffix ".app" path
|
||||
then path + "/"
|
||||
else path;
|
||||
entryURI = path:
|
||||
"file://"
|
||||
+ (builtins.replaceStrings
|
||||
+ (
|
||||
builtins.replaceStrings
|
||||
[
|
||||
" "
|
||||
"!"
|
||||
@@ -80,12 +79,12 @@ in
|
||||
(normalize path)
|
||||
);
|
||||
wantURIs = concatMapStrings (entry: "${entryURI entry.path}\n") cfg.entries;
|
||||
createEntries = concatMapStrings (
|
||||
entry:
|
||||
"${dockutil}/bin/dockutil --no-restart --add '${entry.path}' --section ${entry.section} ${entry.options}\n"
|
||||
) cfg.entries;
|
||||
in
|
||||
{
|
||||
createEntries =
|
||||
concatMapStrings (
|
||||
entry: "${dockutil}/bin/dockutil --no-restart --add '${entry.path}' --section ${entry.section} ${entry.options}\n"
|
||||
)
|
||||
cfg.entries;
|
||||
in {
|
||||
system.activationScripts.postActivation.text = ''
|
||||
echo >&2 "Setting up the Dock for ${cfg.username}..."
|
||||
su ${cfg.username} -s /bin/sh <<'USERBLOCK'
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
package = pkgs.ghostty-bin;
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
homebrew = {
|
||||
enable = true;
|
||||
masApps = { };
|
||||
masApps = {};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{ pkgs }:
|
||||
|
||||
with pkgs;
|
||||
[
|
||||
{pkgs}:
|
||||
with pkgs; [
|
||||
_1password-gui
|
||||
dockutil
|
||||
raycast
|
||||
|
||||
@@ -5,8 +5,7 @@
|
||||
secrets,
|
||||
user,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
age.identityPaths = [
|
||||
"/Users/${user}/.ssh/id_ed25519"
|
||||
];
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
{lib, ...}: {
|
||||
system.defaults = {
|
||||
NSGlobalDomain = {
|
||||
AppleShowAllExtensions = true;
|
||||
|
||||
Reference in New Issue
Block a user