restructuring for new nix-home flake
This commit is contained in:
73
flake.lock
generated
73
flake.lock
generated
@@ -39,11 +39,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748875655,
|
||||
"narHash": "sha256-13VVGRq/F4O+39qQzgfUoqn26lDbNtF5gYavAysXHiE=",
|
||||
"lastModified": 1750097069,
|
||||
"narHash": "sha256-MePLDJw4megMq47O3WXgmpnDOIaQrHYrgA3xS7Ps+c8=",
|
||||
"owner": "cachix",
|
||||
"repo": "devenv",
|
||||
"rev": "b5e62f9a9edfca90094041698626e14cacbcf72e",
|
||||
"rev": "ab8a1563714393d366b2db7d93f021afb45e7a6f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -178,11 +178,32 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748830238,
|
||||
"narHash": "sha256-EB+LzYHK0D5aqxZiYoPeoZoOzSAs8eqBDxm3R+6wMKU=",
|
||||
"lastModified": 1750099781,
|
||||
"narHash": "sha256-6EVPi3XzioPzwxLZ/2nD6jbKCLA2ZXRdOWFgHg2ozrA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c7fdb7e90bff1a51b79c1eed458fb39e6649a82a",
|
||||
"rev": "1db3cb415da14c81d8e0fdd3a5edeba82ad13a1f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nix-home",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750033262,
|
||||
"narHash": "sha256-TcFN78w6kPspxpbPsxW/8vQ1GAtY8Y3mjBaC+oB8jo4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "66523b0efe93ce5b0ba96dcddcda15d36673c1f0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -240,6 +261,27 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-home": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750100488,
|
||||
"narHash": "sha256-WFY6/1AtATVloT/takLMt6/0RNx2ivU1ZXG4Pn64/eA=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "696f5a00078b39c9ca81802170924c4647ffd5a1",
|
||||
"revCount": 16,
|
||||
"type": "git",
|
||||
"url": "https://gitea.john-stream.com/john/nix-home"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://gitea.john-stream.com/john/nix-home"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1733212471,
|
||||
@@ -264,11 +306,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1746223523,
|
||||
"narHash": "sha256-BH27BJZNbR0zQAL/mFCxDPR6K6mbrmjJ66lxVDTNPXU=",
|
||||
"lastModified": 1749760516,
|
||||
"narHash": "sha256-koLwnVjVrR4yS2ea1owMj6ps2sOhH67ObTIld9H27Yo=",
|
||||
"owner": "cachix",
|
||||
"repo": "nixpkgs-python",
|
||||
"rev": "3f5f1dbe0122a1741907aa5ab76f7337ffcd2ccb",
|
||||
"rev": "908dbb466af5955ea479ac95953333fd64387216",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -295,11 +337,11 @@
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1748693115,
|
||||
"narHash": "sha256-StSrWhklmDuXT93yc3GrTlb0cKSS0agTAxMGjLKAsY8=",
|
||||
"lastModified": 1749794982,
|
||||
"narHash": "sha256-Kh9K4taXbVuaLC0IL+9HcfvxsSUx8dPB5s5weJcc9pc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "910796cabe436259a29a72e8d3f5e180fc6dfacc",
|
||||
"rev": "ee930f9755f58096ac6e8ca94a1887e0534e2d81",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@@ -327,6 +369,7 @@
|
||||
"inputs": {
|
||||
"devenv": "devenv",
|
||||
"home-manager": "home-manager",
|
||||
"nix-home": "nix-home",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs-python": "nixpkgs-python",
|
||||
"sops-nix": "sops-nix",
|
||||
@@ -340,11 +383,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747603214,
|
||||
"narHash": "sha256-lAblXm0VwifYCJ/ILPXJwlz0qNY07DDYdLD+9H+Wc8o=",
|
||||
"lastModified": 1749592509,
|
||||
"narHash": "sha256-VunQzfZFA+Y6x3wYi2UE4DEQ8qKoAZZCnZPUlSoqC+A=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "8d215e1c981be3aa37e47aeabd4e61bb069548fd",
|
||||
"rev": "50754dfaa0e24e313c626900d44ef431f3210138",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
31
flake.nix
31
flake.nix
@@ -18,6 +18,10 @@
|
||||
url = "github:cachix/devenv";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-home = {
|
||||
url = "git+https://gitea.john-stream.com/john/nix-home";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
nixConfig = {
|
||||
@@ -25,10 +29,10 @@
|
||||
extra-substituters = "https://devenv.cachix.org";
|
||||
};
|
||||
|
||||
outputs = { self, ... }@args:
|
||||
outputs = { self, ... }@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
nixosSystem = args.nixpkgs.lib.nixosSystem;
|
||||
nixosSystem = inputs.nixpkgs.lib.nixosSystem;
|
||||
|
||||
userSettings = {
|
||||
gitUserName = "John Lancaster";
|
||||
@@ -46,26 +50,23 @@
|
||||
# pythonVersion = "3.11.10"; # This is largely irrelevant because uv will handle it
|
||||
};
|
||||
|
||||
pkgs = args.nixpkgs.legacyPackages.${systemSettings.system};
|
||||
pkgs = inputs.nixpkgs.legacyPackages.${systemSettings.system};
|
||||
|
||||
in
|
||||
{
|
||||
nixosConfigurations.${systemSettings.hostName} = nixosSystem {
|
||||
system = systemSettings.system;
|
||||
specialArgs =
|
||||
let
|
||||
inputs = args;
|
||||
in
|
||||
{
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
inherit systemSettings;
|
||||
inherit userSettings;
|
||||
};
|
||||
modules = [
|
||||
(args.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix")
|
||||
args.home-manager.nixosModules.default
|
||||
args.vscode-server.nixosModules.default
|
||||
args.sops-nix.nixosModules.sops
|
||||
(inputs.nixpkgs + "/nixos/modules/virtualisation/proxmox-lxc.nix")
|
||||
inputs.home-manager.nixosModules.default
|
||||
inputs.nix-home.nixosModules.default { user = "appdaemon"; }
|
||||
inputs.vscode-server.nixosModules.default
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
./configuration.nix
|
||||
];
|
||||
};
|
||||
@@ -76,11 +77,7 @@
|
||||
devenv-test = self.devShells.${systemSettings.system}.default.config.test;
|
||||
};
|
||||
|
||||
devShells.${systemSettings.system}.default =
|
||||
let
|
||||
inputs = args;
|
||||
in
|
||||
args.devenv.lib.mkShell {
|
||||
devShells.${systemSettings.system}.default = inputs.devenv.lib.mkShell {
|
||||
inherit inputs pkgs;
|
||||
modules = [
|
||||
({ pkgs, config, ... }: {
|
||||
|
||||
@@ -9,28 +9,16 @@
|
||||
users.users.${userSettings.userName} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "docker" ];
|
||||
openssh.authorizedKeys.keyFiles = [ ../secrets/authorized_keys ];
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
users.${userSettings.userName} = { ... }: {
|
||||
users.${userSettings.userName} = {
|
||||
home.stateVersion = systemSettings.stateVersion;
|
||||
home.homeDirectory = lib.mkForce "${userSettings.adHome}";
|
||||
systemd.user.startServices = "sd-switch"; # helps with handling systemd services when switching
|
||||
imports = [
|
||||
(import ./zsh.nix)
|
||||
(import ./git.nix {inherit userSettings;})
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
# Add any additional packages you want to install in your home directory
|
||||
superfile
|
||||
];
|
||||
programs = {
|
||||
ssh.enable = true;
|
||||
gh.enable = true;
|
||||
};
|
||||
programs.ssh.enable = true;
|
||||
programs.gh.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,17 +1,9 @@
|
||||
{ pkgs, systemSettings, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
(pkgs.writeShellScriptBin "nfs" ''
|
||||
sudo nixos-rebuild switch --flake $(readlink -f /etc/nixos)#${systemSettings.hostName} --impure
|
||||
'')
|
||||
(pkgs.writeShellScriptBin "nfsu" ''
|
||||
FLAKE=$(readlink -f /etc/nixos)
|
||||
nix flake update --flake $FLAKE --impure
|
||||
git -C $FLAKE add "$FLAKE/flake.lock" > /dev/null 2>&1
|
||||
sudo nixos-rebuild switch --flake $FLAKE#${systemSettings.hostName} --impure
|
||||
'')
|
||||
(pkgs.writeShellScriptBin "ads" "nix develop --no-pure-eval $(readlink -f /etc/nixos)")
|
||||
(pkgs.writeShellScriptBin "link-nix" "${builtins.readFile ./link-nix.sh}")
|
||||
(pkgs.writeShellScriptBin "sops-ad" "sops $(readlink -f /etc/nixos)/secrets/encrypted_secrets.yaml")
|
||||
(pkgs.writeShellScriptBin "lola-up" "docker compose -f /conf/lola/docker-compose.yml up -d")
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user