remove inputs

This commit is contained in:
Noah Masur 2025-02-08 20:14:54 -05:00
parent 59a52dc033
commit c7f20e958b
No known key found for this signature in database
44 changed files with 290 additions and 243 deletions

69
flake.lock generated
View File

@ -230,22 +230,6 @@
"type": "github"
}
},
"gh-collaborators": {
"flake": false,
"locked": {
"lastModified": 1736185279,
"narHash": "sha256-SGmP/8Fvf2rcYkwscMOFG01Y0VJGb/TXrNZtLacurxA=",
"owner": "katiem0",
"repo": "gh-collaborators",
"rev": "bf412dde50605e48af86f291c2ac8714f2c1b228",
"type": "github"
},
"original": {
"owner": "katiem0",
"repo": "gh-collaborators",
"type": "github"
}
},
"hmts-nvim-src": {
"flake": false,
"locked": {
@ -536,55 +520,6 @@
"type": "github"
}
},
"osc": {
"flake": false,
"locked": {
"lastModified": 1732197203,
"narHash": "sha256-xL9mqwb+C6WbuJ/qk0lNbi9xd24PbKi5G0FlwaH5XPk=",
"owner": "theimpostor",
"repo": "osc",
"rev": "87b316b3f96a22fd85654cd7bd091f2cac1c6691",
"type": "github"
},
"original": {
"owner": "theimpostor",
"ref": "v0.4.6",
"repo": "osc",
"type": "github"
}
},
"ren": {
"flake": false,
"locked": {
"lastModified": 1704996573,
"narHash": "sha256-zVIt6Xp+Mvym6gySvHIZJt1QgzKVP/wbTGTubWk6kzI=",
"owner": "robenkleene",
"repo": "ren-find",
"rev": "50c40172e354caffee48932266edd7c7a76a20fd",
"type": "github"
},
"original": {
"owner": "robenkleene",
"repo": "ren-find",
"type": "github"
}
},
"rep": {
"flake": false,
"locked": {
"lastModified": 1707216692,
"narHash": "sha256-/dH+mNtNHaYFndVhoqmz4Sc3HeemoQt1HGD98mb9Qhw=",
"owner": "robenkleene",
"repo": "rep-grep",
"rev": "10510d47e392cb9d30a861c69f702fd194b3fa88",
"type": "github"
},
"original": {
"owner": "robenkleene",
"repo": "rep-grep",
"type": "github"
}
},
"root": {
"inputs": {
"baleia-nvim-src": "baleia-nvim-src",
@ -594,7 +529,6 @@
"darwin": "darwin",
"disko": "disko",
"fidget-nvim-src": "fidget-nvim-src",
"gh-collaborators": "gh-collaborators",
"hmts-nvim-src": "hmts-nvim-src",
"home-manager": "home-manager",
"mac-app-util": "mac-app-util",
@ -611,9 +545,6 @@
"nvim-lspconfig-src": "nvim-lspconfig-src",
"nvim-tree-lua-src": "nvim-tree-lua-src",
"nvim-treesitter-src": "nvim-treesitter-src",
"osc": "osc",
"ren": "ren",
"rep": "rep",
"snipe-nvim-src": "snipe-nvim-src",
"telescope-nvim-src": "telescope-nvim-src",
"telescope-project-nvim-src": "telescope-project-nvim-src",

View File

@ -182,27 +182,6 @@
# inputs.nixpkgs.follows = "nixpkgs";
# };
# Ren and rep - CLI find and replace
rep = {
url = "github:robenkleene/rep-grep";
flake = false;
};
ren = {
url = "github:robenkleene/ren-find";
flake = false;
};
gh-collaborators = {
url = "github:katiem0/gh-collaborators";
flake = false;
};
# Clipboard over SSH
osc = {
url = "github:theimpostor/osc/v0.4.6";
flake = false;
};
# Nextcloud Apps
nextcloud-news = {
# https://github.com/nextcloud/news/releases
@ -281,10 +260,7 @@
(import ./overlays/mpv-scripts.nix inputs)
(import ./overlays/nextcloud-apps.nix inputs)
(import ./overlays/betterlockscreen.nix)
(import ./overlays/gh-collaborators.nix inputs)
(import ./overlays/osc.nix inputs)
(import ./overlays/ren-rep.nix inputs)
(import ./overlays/volnoti.nix)
];
# System types to support.
@ -297,24 +273,42 @@
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
hosts = import ./hosts;
buildHome = { };
buildNixos =
pkgs: modules:
nixpkgs.lib.nixosSystem {
inherit pkgs;
modules = modules ++ [
inputs.home-manager.nixosModules.home-manager
inputs.disko.nixosModules.disko
inputs.wsl.nixosModules.wsl
];
};
buildDarwin =
pkgs: modules:
inputs.darwin.lib.darwinSystem {
inherit pkgs;
modules = modules ++ [
inputs.home-manager.darwinModules.home-manager
inputs.mac-app-util.darwinModules.default
];
};
in
rec {
# Contains my full system builds, including home-manager
# nixos-rebuild switch --flake .#tempest
nixosConfigurations = {
arrow = import ./hosts/arrow { inherit inputs globals overlays; };
tempest = import ./hosts/tempest { inherit inputs globals overlays; };
hydra = import ./hosts/hydra { inherit inputs globals overlays; };
flame = import ./hosts/flame { inherit inputs globals overlays; };
swan = import ./hosts/swan { inherit inputs globals overlays; };
};
nixosConfigurations = builtins.mapAttrs buildNixos (import ./hosts/nixos inputs);
# Contains my full Mac system builds, including home-manager
# darwin-rebuild switch --flake .#lookingglass
darwinConfigurations = {
lookingglass = import ./hosts/lookingglass { inherit inputs globals overlays; };
};
darwinConfigurations = builtins.mapAttrs buildDarwin (import ./hosts/darwin inputs);
# For quickly applying home-manager settings with:
# home-manager switch --flake .#tempest
@ -355,19 +349,11 @@
x86_64-linux.arrow = inputs.nixos-generators.nixosGenerate rec {
system = "x86_64-linux";
format = "iso";
specialArgs = {
pkgs-stable = import inputs.nixpkgs-stable { inherit system; };
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
};
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; };
};
x86_64-linux.arrow-aws = inputs.nixos-generators.nixosGenerate rec {
system = "x86_64-linux";
format = "amazon";
specialArgs = {
pkgs-stable = import inputs.nixpkgs-stable { inherit system; };
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
};
modules = import ./hosts/arrow/modules.nix { inherit inputs globals overlays; } ++ [
(
{ ... }:

View File

@ -1,16 +1,6 @@
# Return a list of all hosts
{ lib, ... }:
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
# Get only files ending in default.nix
(builtins.filter (name: lib.hasSuffix "default.nix" name))
# Import each host function
map
(file: {
name = builtins.baseNameOf (builtins.dirOf file);
value = import file;
})
# Convert to an attrset of hostname -> host function
(builtins.listToAttrs)
]
{
darwinConfigurations = import ./nix-darwin;
nixosConfigurations = import ./nixos;
}

View File

@ -0,0 +1,16 @@
# Return a list of all nix-darwin hosts
{ lib, ... }:
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
# Get only files ending in default.nix
(builtins.filter (name: lib.hasSuffix "default.nix" name))
# Import each host function
map
(file: {
name = builtins.baseNameOf (builtins.dirOf file);
value = import file;
})
# Convert to an attrset of hostname -> host function
(builtins.listToAttrs)
]

20
hosts/nixos/default.nix Normal file
View File

@ -0,0 +1,20 @@
# Return a list of all NixOS hosts
{ nixpkgs, ... }:
let
inherit (nixpkgs) lib;
in
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
# Get only files ending in default.nix
(builtins.filter (name: lib.hasSuffix "default.nix" name))
# Import each host function
map
(file: {
name = builtins.baseNameOf (builtins.dirOf file);
value = import file;
})
# Convert to an attrset of hostname -> host function
(builtins.listToAttrs)
]

View File

@ -8,12 +8,8 @@
...
}:
inputs.nixpkgs.lib.nixosSystem rec {
inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
pkgs-stable = import inputs.nixpkgs-stable { inherit system; };
pkgs-caddy = import inputs.nixpkgs-caddy { inherit system; };
};
modules = [
globals
inputs.home-manager.nixosModules.home-manager

View File

@ -53,16 +53,16 @@
# type = lib.types.str;
# description = "Link to dotfiles repository HTTPS URL.";
# };
unfreePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of unfree packages to allow.";
default = [ ];
};
insecurePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of insecure packages to allow.";
default = [ ];
};
# unfreePackages = lib.mkOption {
# type = lib.types.listOf lib.types.str;
# description = "List of unfree packages to allow.";
# default = [ ];
# };
# insecurePackages = lib.mkOption {
# type = lib.types.listOf lib.types.str;
# description = "List of insecure packages to allow.";
# default = [ ];
# };
# hostnames = {
# audiobooks = lib.mkOption {
# type = lib.types.str;

View File

@ -1,17 +0,0 @@
inputs: _final: prev: {
gh-collaborators = prev.buildGoModule rec {
pname = "gh-collaborators";
version = "v3.0.0";
src = inputs.gh-collaborators;
vendorHash = "sha256-9qmvG2q9t1Zj8yhKFyA99IaJ90R/gRVdQVjdliVKLRE";
ldflags = [
"-s"
"-w"
"-X github.com/katiem0/gh-collaborators/cmd.Version=${version}"
# "-X main.Version=${version}"
];
};
}

View File

@ -1,15 +0,0 @@
inputs: _final: prev: {
osc = prev.buildGoModule {
pname = "osc";
version = "v0.4.6";
src = inputs.osc;
vendorHash = "sha256-POtQWIjPObsfa3YZ1dLZgedZFUcc4HeTWjU20AucoKc=";
ldflags = [
"-s"
"-w"
];
};
}

View File

@ -13,7 +13,7 @@ let
packagesDirectory = lib.filesystem.listFilesRecursive ../pkgs;
packages = lib.pipe packagesDirectory [
# Get only files called package.nix
(builtins.filter (name: (name == "package.nix")))
(builtins.filter (name: lib.hasSuffix "package.nix"))
# Apply callPackage to create a derivation
(builtins.map prev.callPackage)
# Convert the list to an attrset

View File

@ -1,16 +0,0 @@
inputs: _final: prev: {
ren = prev.rustPlatform.buildRustPackage {
pname = "ren-find";
version = "0.0.7";
src = inputs.ren;
cargoHash = "sha256-3bI3j2xvNHp4kyLEq/DZvRJBF2rn6pE4n8oXh67edDI=";
};
# rep = prev.rustPlatform.buildRustPackage {
# pname = "rep-grep";
# version = "0.0.7";
# src = inputs.rep;
# cargoHash = "sha256-GEr3VvQ0VTKHUbW/GFEgwLpQWP2ZhS/4KYjDvfFLgxo=";
# };
}

View File

@ -1,44 +0,0 @@
# Fix: Volnoti error: 'volnoti' has been removed due to lack of maintenance upstream.
_final: prev: {
volnoti = prev.stdenv.mkDerivation {
pname = "volnoti-unstable";
version = "2013-09-23";
src = prev.fetchFromGitHub {
owner = "davidbrazdil";
repo = "volnoti";
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
sha256 = "155lb7w563dkdkdn4752hl0zjhgnq3j4cvs9z98nb25k1xpmpki7";
};
patches = [
# Fix dbus interface headers. See
# https://github.com/davidbrazdil/volnoti/pull/10
(prev.fetchpatch {
url = "https://github.com/davidbrazdil/volnoti/commit/623ad8ea5c3ac8720d00a2ced4b6163aae38c119.patch";
sha256 = "046zfdjmvhb7jrsgh04vfgi35sgy1zkrhd3bzdby3nvds1wslfam";
})
];
nativeBuildInputs = with prev; [
pkg-config
autoreconfHook
wrapGAppsHook3
];
buildInputs = with prev; [
dbus
gdk-pixbuf
glib
xorg.libX11
gtk2
dbus-glib
librsvg
];
meta = with prev.lib; {
description = "Lightweight volume notification for Linux";
homepage = "https://github.com/davidbrazdil/volnoti";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = [ ];
# Broken by https://github.com/nix-community/home-manager/pull/5725/commits/98bf8de65dc1ed12c6443b18f6f24d36e9c438d6
mainProgram = "volnoti";
};
};
}

View File

@ -0,0 +1,44 @@
# Fix: Volnoti error: 'volnoti' has been removed due to lack of maintenance upstream.
{ pkgs, lib, ... }:
pkgs.stdenv.mkDerivation {
pname = "volnoti-unstable";
version = "2013-09-23";
src = pkgs.fetchFromGitHub {
owner = "davidbrazdil";
repo = "volnoti";
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
sha256 = "155lb7w563dkdkdn4752hl0zjhgnq3j4cvs9z98nb25k1xpmpki7";
};
patches = [
# Fix dbus interface headers. See
# https://github.com/davidbrazdil/volnoti/pull/10
(pkgs.fetchpatch {
url = "https://github.com/davidbrazdil/volnoti/commit/623ad8ea5c3ac8720d00a2ced4b6163aae38c119.patch";
sha256 = "046zfdjmvhb7jrsgh04vfgi35sgy1zkrhd3bzdby3nvds1wslfam";
})
];
nativeBuildInputs = with pkgs; [
pkg-config
autoreconfHook
wrapGAppsHook3
];
buildInputs = with pkgs; [
dbus
gdk-pixbuf
glib
xorg.libX11
gtk2
dbus-glib
librsvg
];
meta = with lib; {
description = "Lightweight volume notification for Linux";
homepage = "https://github.com/davidbrazdil/volnoti";
license = licenses.gpl3;
platforms = platforms.linux;
maintainers = [ ];
# Broken by https://github.com/nix-community/home-manager/pull/5725/commits/98bf8de65dc1ed12c6443b18f6f24d36e9c438d6
mainProgram = "volnoti";
};
}

View File

@ -0,0 +1,21 @@
{ pkgs, ... }:
pkgs.buildGoModule rec {
pname = "gh-collaborators";
version = "v3.0.0";
src = {
owner = "katiem0";
repo = "gh-collaborators";
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
sha256 = pkgs.lib.fakeHash;
};
vendorHash = "sha256-9qmvG2q9t1Zj8yhKFyA99IaJ90R/gRVdQVjdliVKLRE";
ldflags = [
"-s"
"-w"
"-X github.com/katiem0/gh-collaborators/cmd.Version=${version}"
# "-X main.Version=${version}"
];
}

View File

@ -0,0 +1,21 @@
# Clipboard over SSH
{ pkgs, ... }:
pkgs.buildGoModule {
pname = "osc";
version = "v0.4.6";
src = {
owner = "theimpostor";
repo = "osc";
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
sha256 = pkgs.lib.fakeHash;
};
vendorHash = "sha256-POtQWIjPObsfa3YZ1dLZgedZFUcc4HeTWjU20AucoKc=";
ldflags = [
"-s"
"-w"
];
}

View File

@ -0,0 +1,12 @@
{ pkgs, ... }:
pkgs.rustPlatform.buildRustPackage {
pname = "ren-find";
version = "0.0.7";
src = pkgs.fetchFromGitHub {
owner = "robenkleene";
repo = "ren-find";
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
sha256 = pkgs.lib.fakeHash;
};
cargoHash = "sha256-3bI3j2xvNHp4kyLEq/DZvRJBF2rn6pE4n8oXh67edDI=";
}

View File

@ -0,0 +1,12 @@
{ pkgs, ... }:
pkgs.rustPlatform.buildRustPackage {
pname = "rep-grep";
version = "0.0.7";
src = pkgs.fetchFromGitHub {
owner = "robenkleene";
repo = "rep-grep";
rev = "4af7c8e54ecc499097121909f02ecb42a8a60d24";
sha256 = pkgs.lib.fakeHash;
};
cargoHash = "sha256-GEr3VvQ0VTKHUbW/GFEgwLpQWP2ZhS/4KYjDvfFLgxo=";
}

View File

@ -0,0 +1,29 @@
{ config, lib, ... }:
{
options = {
allowUnfreePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of unfree packages to allow.";
default = [ ];
};
allowInsecurePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of insecure packages to allow.";
default = [ ];
};
};
config = {
# Allow specified unfree packages (identified elsewhere)
# Retrieves package object based on string name
nixpkgs.config.allowUnfreePredicate =
pkg: builtins.elem (lib.getName pkg) config.allowUnfreePackages;
# Allow specified insecure packages (identified elsewhere)
nixpkgs.config.permittedInsecurePackages = config.allowInsecurePackages;
};
}

View File

@ -14,7 +14,7 @@ in
options.nmasur.presets.programs._1password.enable = lib.mkEnableOption "1Password password manager";
config = lib.mkIf cfg.enable {
unfreePackages = [
allowUnfreePackages = [
"1password"
"_1password-gui"
"1password-cli"

View File

@ -14,7 +14,7 @@ in
options.nmasur.presets.programs.discord.enable = lib.mkEnableOption "Discord chat";
config = lib.mkIf cfg.enable {
unfreePackages = [ "discord" ];
allowUnfreePackages = [ "discord" ];
home.packages = [ pkgs.discord ];
xdg.configFile."discord/settings.json".text = pkgs.formats.json {
BACKGROUND_COLOR = "#202225";

View File

@ -17,7 +17,7 @@ in
config = lib.mkIf cfg.enable {
unfreePackages = [
allowUnfreePackages = [
"okta-browser-plugin"
];

View File

@ -15,7 +15,7 @@ in
config = lib.mkIf cfg.enable {
unfreePackages = [ "terraform" ];
allowUnfreePackages = [ "terraform" ];
programs.fish.shellAbbrs = {
te = "terraform";

View File

@ -15,7 +15,7 @@ in
config = lib.mkIf cfg.enable {
unfreePackages = [
allowUnfreePackages = [
"vault-bin"
# "teams"
];

View File

@ -32,5 +32,18 @@ in
"/opt/homebrew/opt/trash/bin"
];
# Include home-manager config in nix-darwin
home-manager = {
sharedModules = [ ../../../../home-manager ];
# Use the system-level nixpkgs instead of Home Manager's
useGlobalPkgs = lib.mkDefault true;
# Install packages to /etc/profiles instead of ~/.nix-profile, useful when
# using multiple profiles for one user
useUserPackages = lib.mkDefault true;
};
};
}

View File

@ -0,0 +1,29 @@
{ config, lib, ... }:
{
options = {
allowUnfreePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of unfree packages to allow.";
default = [ ];
};
allowInsecurePackages = lib.mkOption {
type = lib.types.listOf lib.types.str;
description = "List of insecure packages to allow.";
default = [ ];
};
};
config = {
# Allow specified unfree packages (identified elsewhere)
# Retrieves package object based on string name
nixpkgs.config.allowUnfreePredicate =
pkg: builtins.elem (lib.getName pkg) config.allowUnfreePackages;
# Allow specified insecure packages (identified elsewhere)
nixpkgs.config.permittedInsecurePackages = config.allowInsecurePackages;
};
}

View File

@ -14,7 +14,7 @@ in
options.nmasur.presets.programs.dwarf-fortress.enable = lib.mkEnableOption "Dwarf Fortress";
config = lib.mkIf cfg.enable {
unfreePackages = [
allowUnfreePackages = [
"dwarf-fortress"
"phoebus-theme"
];

View File

@ -15,7 +15,7 @@ in
config = lib.mkIf cfg.enable {
hardware.steam-hardware.enable = true;
unfreePackages = [
allowUnfreePackages = [
"steam"
"steam-original"
"steamcmd"

View File

@ -88,7 +88,7 @@ in
# Allows shared group to read/write the sabnzbd directory
users.users.sabnzbd.homeMode = "0770";
unfreePackages = [ "unrar" ]; # Required as a dependency for sabnzbd
allowUnfreePackages = [ "unrar" ]; # Required as a dependency for sabnzbd
# Requires updating the base_url config value in each service
# If you try to rewrite the URL, the service won't redirect properly

View File

@ -20,7 +20,7 @@ in
config = lib.mkIf cfg.enable {
unfreePackages = [ "minecraft-server" ];
allowUnfreePackages = [ "minecraft-server" ];
services.minecraft-server = {
eula = true;

View File

@ -14,7 +14,7 @@ in
config = lib.mkIf cfg.enable {
unfreePackages = [ "n8n" ];
allowUnfreePackages = [ "n8n" ];
services.n8n = {
webhookUrl = "https://${hostnames.n8n}";

19
templates/default.nix Normal file
View File

@ -0,0 +1,19 @@
# Return a list of all templates
{ lib, ... }:
lib.pipe (lib.filesystem.listFilesRecursive ./.) [
# Get only files ending in default.nix
(builtins.filter (name: lib.hasSuffix "flake.nix" name))
# Import each template function
map
(file: rec {
name = builtins.baseNameOf (builtins.dirOf file);
value = {
path = builtins.dirOf file;
description = "${name} template";
};
})
# Convert to an attrset of template name -> template path and description
(builtins.listToAttrs)
]