mirror of
https://github.com/gburd/nix-config.git
synced 2024-07-01 23:57:20 +00:00
will apply, but is it right?
This commit is contained in:
parent
f1f46c9865
commit
069735729d
18
.sops.yaml
18
.sops.yaml
|
@ -5,16 +5,30 @@ keys:
|
|||
# Hosts
|
||||
- &hosts:
|
||||
- &floki age1z2x0g05q2erpux006vwhul70d8akj9avrj67s9p27fm4ce32ly8qt8nllz
|
||||
- &iso-console age1z2x0g05q2erpux006vwhul70d8akj9avrj67s9p27fm4ce32ly8qt8nllz
|
||||
- &iso-desktop age1z2x0g05q2erpux006vwhul70d8akj9avrj67s9p27fm4ce32ly8qt8nllz
|
||||
|
||||
creation_rules:
|
||||
|
||||
- path_regex: hosts/floki/secrets.ya?ml$
|
||||
- path_regex: nixos/floki/secrets.ya?ml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *floki
|
||||
pgp:
|
||||
- *gburd
|
||||
- path_regex: hosts/common/secrets.ya?ml$
|
||||
- path_regex: nixos/iso-console/secrets.ya?ml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *iso-console
|
||||
pgp:
|
||||
- *gburd
|
||||
- path_regex: nixos/iso-desktop/secrets.ya?ml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *iso-desktop
|
||||
pgp:
|
||||
- *gburd
|
||||
- path_regex: nixos/_mixins/secrets.ya?ml$
|
||||
key_groups:
|
||||
- age:
|
||||
- *floki
|
||||
|
|
|
@ -71,7 +71,7 @@ signing, as well as for SSH'ing around.
|
|||
Most relevant user apps daily drivers:
|
||||
|
||||
- neovim
|
||||
- fish + starship
|
||||
- fish
|
||||
- kitty
|
||||
- qutebrowser
|
||||
- neomutt + mbsync
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
{
|
||||
imports = [
|
||||
inputs.impermanence.nixosModules.home-manager.impermanence
|
||||
inputs.nix-colors.homeManagerModule
|
||||
./cli
|
||||
./nvim
|
||||
] ++ (builtins.attrValues outputs.homeManagerModules);
|
76
_/overlays/default.nix
Normal file
76
_/overlays/default.nix
Normal file
|
@ -0,0 +1,76 @@
|
|||
{ inputs, ... }:
|
||||
let
|
||||
addPatches = pkg: patches: pkg.overrideAttrs (oldAttrs: {
|
||||
patches = (oldAttrs.patches or [ ]) ++ patches;
|
||||
});
|
||||
in
|
||||
{
|
||||
# For every flake input, aliases 'pkgs.inputs.${flake}' to
|
||||
# 'inputs.${flake}.packages.${pkgs.system}' or
|
||||
# 'inputs.${flake}.legacyPackages.${pkgs.system}'
|
||||
flake-inputs = final: _: {
|
||||
inputs = builtins.mapAttrs
|
||||
(_: flake:
|
||||
let
|
||||
legacyPackages = (flake.legacyPackages or { }).${final.system} or { };
|
||||
packages = (flake.packages or { }).${final.system} or { };
|
||||
in
|
||||
if legacyPackages != { } then legacyPackages else packages
|
||||
)
|
||||
inputs;
|
||||
};
|
||||
|
||||
# Adds my custom packages
|
||||
additions = final: prev: import ../pkgs { pkgs = final; } // {
|
||||
formats = prev.formats // import ../pkgs/formats { pkgs = final; };
|
||||
vimPlugins = prev.vimPlugins // final.callPackage ../pkgs/vim-plugins { };
|
||||
};
|
||||
|
||||
# Modifies existing packages
|
||||
modifications = final: prev: {
|
||||
vimPlugins = prev.vimPlugins // {
|
||||
vim-numbertoggle = addPatches prev.vimPlugins.vim-numbertoggle [ ./vim-numbertoggle-command-mode.patch ];
|
||||
};
|
||||
|
||||
passExtensions = prev.passExtensions // {
|
||||
# https://github.com/tadfisher/pass-otp/pull/173
|
||||
pass-otp = addPatches prev.passExtensions.pass-otp [ ./pass-otp-fix-completion.patch ];
|
||||
};
|
||||
|
||||
# https://github.com/mdellweg/pass_secret_service/pull/37
|
||||
pass-secret-service = addPatches prev.pass-secret-service [ ./pass-secret-service-native.diff ];
|
||||
|
||||
# https://github.com/NixOS/nix/issues/5567#issuecomment-1193259926
|
||||
# nix = addPatches prev.nix [ ./nix-make-installables-expr-context.patch ];
|
||||
|
||||
# xdg-utils-spawn-terminal = addPatches prev.xdg-utils [ ./xdg-open-spawn-terminal.diff ];
|
||||
xdg-utils-spawn-terminal = prev.xdg-utils;
|
||||
|
||||
pfetch = prev.pfetch.overrideAttrs (oldAttrs: {
|
||||
version = "unstable-2021-12-10";
|
||||
src = final.fetchFromGitHub {
|
||||
owner = "dylanaraps";
|
||||
repo = "pfetch";
|
||||
rev = "a906ff89680c78cec9785f3ff49ca8b272a0f96b";
|
||||
sha256 = "sha256-9n5w93PnSxF53V12iRqLyj0hCrJ3jRibkw8VK3tFDvo=";
|
||||
};
|
||||
# Add term option, rename de to desktop, add scheme option
|
||||
patches = (oldAttrs.patches or [ ]) ++ [ ./pfetch.patch ];
|
||||
});
|
||||
|
||||
qutebrowser = prev.qutebrowser.overrideAttrs (oldAttrs: {
|
||||
patches = (oldAttrs.patches or [ ]) ++ [ ./qutebrowser-tree-tabs.diff ];
|
||||
});
|
||||
|
||||
# scgit = prev.cgit-pink.overrideAttrs (_: {
|
||||
# pname = "scgit";
|
||||
# version = "0.1";
|
||||
# src = final.fetchFromSourcehut {
|
||||
# owner = "~misterio";
|
||||
# repo = "scgit";
|
||||
# rev = "2cd05c95827fb94740e876733dc6f7fe88340de2";
|
||||
# sha256 = "sha256-95mRJ3ZCSkLHqehFQdwM2BY0h+YDhohwpnRiF6/lZtA=";
|
||||
# };
|
||||
# });
|
||||
};
|
||||
}
|
34
flake.lock
34
flake.lock
|
@ -4,7 +4,9 @@
|
|||
"inputs": {
|
||||
"darwin": "darwin",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1695384796,
|
||||
|
@ -270,16 +272,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1677676435,
|
||||
"narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1695559356,
|
||||
"narHash": "sha256-kXZ1pUoImD9OEbPCwpTz4tHsNTr4CIyIfXb3ocuR8sI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
|
||||
"rev": "261abe8a44a7e8392598d038d2e01f7b33cf26d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
|
@ -318,22 +320,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1695559356,
|
||||
"narHash": "sha256-kXZ1pUoImD9OEbPCwpTz4tHsNTr4CIyIfXb3ocuR8sI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "261abe8a44a7e8392598d038d2e01f7b33cf26d0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-23.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nmd": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -376,7 +362,7 @@
|
|||
"nh": "nh",
|
||||
"nix-formatter-pack": "nix-formatter-pack",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||
"sops-nix": "sops-nix",
|
||||
"vscode-server": "vscode-server"
|
||||
|
|
36
flake.nix
36
flake.nix
|
@ -8,7 +8,7 @@
|
|||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
agenix.inputs.ixpkgs.follows = "nixpkgs";
|
||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
disko.url = "github:nix-community/disko";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
@ -54,43 +54,24 @@
|
|||
# nix build .#homeConfigurations."gburd@floki".activationPackage
|
||||
homeConfigurations = {
|
||||
# .iso images
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
"gburd@iso-console" = libx.mkHome { hostname = "iso-console"; username = "nixos"; };
|
||||
"gburd@iso-desktop" = libx.mkHome { hostname = "iso-desktop"; username = "nixos"; desktop = "pantheon"; };
|
||||
|
||||
# "gburd@iso-console" = libx.mkHome { hostname = "iso-console"; username = "nixos"; };
|
||||
# "gburd@iso-desktop" = libx.mkHome { hostname = "iso-desktop"; username = "nixos"; desktop = "pantheon"; };
|
||||
# Workstations
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
"gburd@floki" = libx.mkHome { hostname = "floki"; username = "gburd"; desktop = "pantheon"; };
|
||||
|
||||
# Servers
|
||||
# ---------------------------------------------------------------------
|
||||
};
|
||||
|
||||
nixosConfigurations = {
|
||||
# .iso images
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
# - nix build .#nixosConfigurations.{iso-console|iso-desktop}.config.system.build.isoImage
|
||||
iso-console = libx.mkHost { hostname = "iso-console"; username = "nixos"; installer = nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"; };
|
||||
iso-desktop = libx.mkHost { hostname = "iso-desktop"; username = "nixos"; installer = nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix"; desktop = "pantheon"; };
|
||||
|
||||
# iso-console = libx.mkHost { hostname = "iso-console"; username = "nixos"; installer = nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"; };
|
||||
# iso-desktop = libx.mkHost { hostname = "iso-desktop"; username = "nixos"; installer = nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix"; desktop = "pantheon"; };
|
||||
# Workstations
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
# Lenovo Carbon X1 Extreme Gen 5 - x86_64
|
||||
floki = libx.mkHost { hostname = "floki"; username = "gburd"; desktop = "pantheon"; };
|
||||
|
||||
# Servers
|
||||
# ---------------------------------------------------------------------
|
||||
};
|
||||
|
||||
# Custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays { inherit inputs outputs; };
|
||||
|
||||
hydraJobs = import ./hydra.nix { inherit inputs outputs; };
|
||||
|
||||
# Devshell for bootstrapping; acessible via 'nix develop' or 'nix-shell' (legacy)
|
||||
devShells = libx.forAllSystems (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
|
@ -110,14 +91,13 @@
|
|||
}
|
||||
);
|
||||
|
||||
# Custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays { inherit inputs outputs; };
|
||||
|
||||
# Custom packages; acessible via 'nix build', 'nix shell', etc
|
||||
packages = libx.forAllSystems (system:
|
||||
let pkgs = nixpkgs.legacyPackages.${system};
|
||||
in import ./pkgs { inherit pkgs; }
|
||||
);
|
||||
|
||||
nixosModules = import ./modules/nixos;
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
templates = import ./templates;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -12,9 +12,7 @@
|
|||
./pfetch.nix
|
||||
./ranger.nix
|
||||
./screen.nix
|
||||
#./shellcolor.nix
|
||||
./ssh.nix
|
||||
./starship.nix
|
||||
./xpo.nix
|
||||
];
|
||||
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue