From a50f5193bbdc3dc7bb0783b43fe637a15905add9 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Fri, 7 Mar 2025 23:21:24 -0500 Subject: [PATCH 01/10] nix darwin branch fix branch is set to 24.11 instead of latest, latest caused issues when following nixpkgs that was set to 24.11 --- flake.lock | 10 ++---- flake.lock.orig | 96 +++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 2 +- 3 files changed, 100 insertions(+), 8 deletions(-) create mode 100644 flake.lock.orig diff --git a/flake.lock b/flake.lock index 3c33cdf..65a208e 100644 --- a/flake.lock +++ b/flake.lock @@ -2,9 +2,7 @@ "nodes": { "darwin": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": ["nixpkgs"] }, "locked": { "lastModified": 1743496612, @@ -16,16 +14,14 @@ }, "original": { "owner": "lnl7", - "ref": "master", + "ref": "nix-darwin-24.11", "repo": "nix-darwin", "type": "github" } }, "home-manager": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": ["nixpkgs"] }, "locked": { "lastModified": 1743808813, diff --git a/flake.lock.orig b/flake.lock.orig new file mode 100644 index 0000000..07806ec --- /dev/null +++ b/flake.lock.orig @@ -0,0 +1,96 @@ +{ + "nodes": { + "darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { +<<<<<<< HEAD + "lastModified": 1743496612, + "narHash": "sha256-emPWa5lmKbnyuj8c1mSJUkzJNT+iJoU9GMcXwjp2oVM=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "73d59580d01e9b9f957ba749f336a272869c42dd", +======= + "lastModified": 1739553546, + "narHash": "sha256-L4ou3xfOr17EAe836djRoQ7auVkYOREMtiQa82wVGqU=", + "owner": "lnl7", + "repo": "nix-darwin", + "rev": "353846417f985e74fdc060555f17939e4472ea2c", +>>>>>>> f85c89b (nix darwin branch fix) + "type": "github" + }, + "original": { + "owner": "lnl7", + "ref": "nix-darwin-24.11", + "repo": "nix-darwin", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1743808813, + "narHash": "sha256-2lDQBOmlz9ggPxcS7/GvcVdzXMIiT+PpMao6FbLJSr0=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "a9f8b3db211b4609ddd83683f9db89796c7f6ac6", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-24.11", + "repo": "home-manager", + "type": "github" + } + }, + "nix-flatpak": { + "locked": { + "lastModified": 1711997201, + "narHash": "sha256-J71xzQlVYsjagA4AsVwRazhBh2rZrPpKvxTgs6UzL7c=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "b76fa31346db7fc958a9898f3c594696ca71c4fd", + "type": "github" + }, + "original": { + "owner": "gmodena", + "ref": "v0.4.1", + "repo": "nix-flatpak", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1743703532, + "narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "bdb91860de2f719b57eef819b5617762f7120c70", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "darwin": "darwin", + "home-manager": "home-manager", + "nix-flatpak": "nix-flatpak", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index d893951..7f6343d 100644 --- a/flake.nix +++ b/flake.nix @@ -8,7 +8,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; darwin = { - url = "github:lnl7/nix-darwin/master"; + url = "github:lnl7/nix-darwin/nix-darwin-24.11"; inputs.nixpkgs.follows = "nixpkgs"; }; }; From 1a27a139bd7f7de76ca64162ceb09418418ea969 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Fri, 7 Mar 2025 23:22:00 -0500 Subject: [PATCH 02/10] added media player to brew install iina --- modules/machine/sephiroth/apps.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/machine/sephiroth/apps.nix b/modules/machine/sephiroth/apps.nix index 2a47cb5..572f998 100644 --- a/modules/machine/sephiroth/apps.nix +++ b/modules/machine/sephiroth/apps.nix @@ -22,6 +22,7 @@ }; taps = [ + "iina/homebrew-mpv-iina" ]; brews = [ @@ -31,6 +32,7 @@ "ghostty" "raycast" "jordanbaird-ice" + "iina" ]; }; } From fc058e1742cd6593dfed458f0366d26b49cf6099 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Sat, 8 Mar 2025 00:21:20 -0500 Subject: [PATCH 03/10] added more brew apps --- modules/machine/sephiroth/apps.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/machine/sephiroth/apps.nix b/modules/machine/sephiroth/apps.nix index 572f998..65221b3 100644 --- a/modules/machine/sephiroth/apps.nix +++ b/modules/machine/sephiroth/apps.nix @@ -33,6 +33,12 @@ "raycast" "jordanbaird-ice" "iina" + "linearmouse" + "sanesidebuttons" + "betterdisplay" + "maccy" + "swift-quit" + # "alt-tab" ]; }; } From f8a21f3c91f3008a547b0377e9967b4926b9afb3 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Tue, 15 Apr 2025 19:50:43 -0400 Subject: [PATCH 04/10] added maintainers file --- meta/maintainers.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 meta/maintainers.nix diff --git a/meta/maintainers.nix b/meta/maintainers.nix new file mode 100644 index 0000000..62c76e8 --- /dev/null +++ b/meta/maintainers.nix @@ -0,0 +1,11 @@ +{...}: { + "wymiller" = { + email = "wyatt@wyattjmiller.com"; + name = "Wyatt J. Miller"; + homepage = "https://wyattjmiller.com"; + license = { + spdxID = "MPL-2.0"; + fullName = "Mozilla Public License 2.0"; + }; + }; +} From 8cd339297baf46aba6f6d297bfd6f55a43f78731 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Tue, 15 Apr 2025 19:51:21 -0400 Subject: [PATCH 05/10] added sudoers file, imported to common users --- modules/common/users.nix | 4 ++++ modules/security/README.md | 3 +++ modules/security/sudo.nix | 25 +++++++++++++++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 modules/security/README.md create mode 100644 modules/security/sudo.nix diff --git a/modules/common/users.nix b/modules/common/users.nix index 5d65284..0051e3f 100644 --- a/modules/common/users.nix +++ b/modules/common/users.nix @@ -5,6 +5,10 @@ hostname, ... } @ args: { + imports = [ + ../security/sudo.nix + ]; + networking.hostName = hostname; # Don't forget to set a password with ‘passwd’! diff --git a/modules/security/README.md b/modules/security/README.md new file mode 100644 index 0000000..51e9735 --- /dev/null +++ b/modules/security/README.md @@ -0,0 +1,3 @@ +# Security modules + +These are modules relating to security and security-related programs diff --git a/modules/security/sudo.nix b/modules/security/sudo.nix new file mode 100644 index 0000000..9f0b04f --- /dev/null +++ b/modules/security/sudo.nix @@ -0,0 +1,25 @@ +{ + config, + lib, + ... +}: +with lib; { + options = { + security.sudo = { + wheelNeedsPassword = mkOption { + type = types.bool; + default = true; + description = "Whether users in the wheel group need to provide a password for sudo."; + }; + }; + }; + + config = { + environment.etc."sudoers.d/wheel-no-password" = mkIf (!config.security.sudo.wheelNeedsPassword) { + text = '' + %wheel ALL=(ALL) NOPASSWD: ALL + ''; + # mode = "0440"; + }; + }; +} From e8d66b41e9950288c025e463c1c2066758eef907 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Tue, 15 Apr 2025 19:51:39 -0400 Subject: [PATCH 06/10] added system copy paste functionality --- defaults/nvim/init.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/defaults/nvim/init.lua b/defaults/nvim/init.lua index 2ce1cdd..ce06ec5 100644 --- a/defaults/nvim/init.lua +++ b/defaults/nvim/init.lua @@ -1,6 +1,14 @@ -- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution -- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk. local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim" + +vim.api.nvim_set_keymap("v", "", '"+y', { noremap = true }) +vim.api.nvim_set_keymap("n", "", 'l"+P', { noremap = true }) +vim.api.nvim_set_keymap("v", "", '"+P', { noremap = true }) +vim.api.nvim_set_keymap("c", "", 'l"+Pl', { noremap = true }) +vim.api.nvim_set_keymap("i", "", 'l"+Pli', { noremap = true }) +vim.api.nvim_set_keymap("t", "", '"+Pi', { noremap = true }) + if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then -- stylua: ignore vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath }) From 327c6ba9f000c188951b1a957597bd13484bcbb9 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Tue, 15 Apr 2025 19:51:56 -0400 Subject: [PATCH 07/10] added homebrew cask medis --- modules/machine/sephiroth/apps.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/machine/sephiroth/apps.nix b/modules/machine/sephiroth/apps.nix index 65221b3..799d391 100644 --- a/modules/machine/sephiroth/apps.nix +++ b/modules/machine/sephiroth/apps.nix @@ -38,6 +38,7 @@ "betterdisplay" "maccy" "swift-quit" + "medis" # "alt-tab" ]; }; From 9ce14b97ef0e6ac37f752ab23827f3d94c991f77 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Tue, 15 Apr 2025 19:59:49 -0400 Subject: [PATCH 08/10] update root flake --- flake.lock | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/flake.lock b/flake.lock index 65a208e..40a1db6 100644 --- a/flake.lock +++ b/flake.lock @@ -2,14 +2,16 @@ "nodes": { "darwin": { "inputs": { - "nixpkgs": ["nixpkgs"] + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1743496612, - "narHash": "sha256-emPWa5lmKbnyuj8c1mSJUkzJNT+iJoU9GMcXwjp2oVM=", + "lastModified": 1743127615, + "narHash": "sha256-+sMGqywrSr50BGMLMeY789mSrzjkoxZiu61eWjYS/8o=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "73d59580d01e9b9f957ba749f336a272869c42dd", + "rev": "fc843893cecc1838a59713ee3e50e9e7edc6207c", "type": "github" }, "original": { @@ -21,14 +23,16 @@ }, "home-manager": { "inputs": { - "nixpkgs": ["nixpkgs"] + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1743808813, - "narHash": "sha256-2lDQBOmlz9ggPxcS7/GvcVdzXMIiT+PpMao6FbLJSr0=", + "lastModified": 1744743431, + "narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=", "owner": "nix-community", "repo": "home-manager", - "rev": "a9f8b3db211b4609ddd83683f9db89796c7f6ac6", + "rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387", "type": "github" }, "original": { @@ -56,11 +60,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1743703532, - "narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=", + "lastModified": 1744440957, + "narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "bdb91860de2f719b57eef819b5617762f7120c70", + "rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d", "type": "github" }, "original": { From c03715b7adad3176715e6f4724aeab7412d99153 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Tue, 15 Apr 2025 20:00:50 -0400 Subject: [PATCH 09/10] delete useless file --- flake.lock.orig | 96 ------------------------------------------------- 1 file changed, 96 deletions(-) delete mode 100644 flake.lock.orig diff --git a/flake.lock.orig b/flake.lock.orig deleted file mode 100644 index 07806ec..0000000 --- a/flake.lock.orig +++ /dev/null @@ -1,96 +0,0 @@ -{ - "nodes": { - "darwin": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { -<<<<<<< HEAD - "lastModified": 1743496612, - "narHash": "sha256-emPWa5lmKbnyuj8c1mSJUkzJNT+iJoU9GMcXwjp2oVM=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "73d59580d01e9b9f957ba749f336a272869c42dd", -======= - "lastModified": 1739553546, - "narHash": "sha256-L4ou3xfOr17EAe836djRoQ7auVkYOREMtiQa82wVGqU=", - "owner": "lnl7", - "repo": "nix-darwin", - "rev": "353846417f985e74fdc060555f17939e4472ea2c", ->>>>>>> f85c89b (nix darwin branch fix) - "type": "github" - }, - "original": { - "owner": "lnl7", - "ref": "nix-darwin-24.11", - "repo": "nix-darwin", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1743808813, - "narHash": "sha256-2lDQBOmlz9ggPxcS7/GvcVdzXMIiT+PpMao6FbLJSr0=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "a9f8b3db211b4609ddd83683f9db89796c7f6ac6", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "release-24.11", - "repo": "home-manager", - "type": "github" - } - }, - "nix-flatpak": { - "locked": { - "lastModified": 1711997201, - "narHash": "sha256-J71xzQlVYsjagA4AsVwRazhBh2rZrPpKvxTgs6UzL7c=", - "owner": "gmodena", - "repo": "nix-flatpak", - "rev": "b76fa31346db7fc958a9898f3c594696ca71c4fd", - "type": "github" - }, - "original": { - "owner": "gmodena", - "ref": "v0.4.1", - "repo": "nix-flatpak", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1743703532, - "narHash": "sha256-s1KLDALEeqy+ttrvqV3jx9mBZEvmthQErTVOAzbjHZs=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "bdb91860de2f719b57eef819b5617762f7120c70", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "darwin": "darwin", - "home-manager": "home-manager", - "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} From e6e13364873e317a683412e7023d7c29c0096d13 Mon Sep 17 00:00:00 2001 From: "Wyatt J. Miller" Date: Wed, 16 Apr 2025 02:49:06 -0400 Subject: [PATCH 10/10] changes to user seciurity --- modules/common/users.nix | 2 +- modules/security/sudo.nix | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/common/users.nix b/modules/common/users.nix index 0051e3f..60c2735 100644 --- a/modules/common/users.nix +++ b/modules/common/users.nix @@ -27,7 +27,7 @@ }) ]; - security.sudo.wheelNeedsPassword = false; + security.sudo.needsPassword = false; users.groups.wyatt = {}; diff --git a/modules/security/sudo.nix b/modules/security/sudo.nix index 9f0b04f..79360e8 100644 --- a/modules/security/sudo.nix +++ b/modules/security/sudo.nix @@ -6,7 +6,7 @@ with lib; { options = { security.sudo = { - wheelNeedsPassword = mkOption { + needsPassword = mkOption { type = types.bool; default = true; description = "Whether users in the wheel group need to provide a password for sudo."; @@ -15,7 +15,7 @@ with lib; { }; config = { - environment.etc."sudoers.d/wheel-no-password" = mkIf (!config.security.sudo.wheelNeedsPassword) { + environment.etc."sudoers.d/wheel-no-password" = mkIf (!config.security.sudo.needsPassword) { text = '' %wheel ALL=(ALL) NOPASSWD: ALL '';