mirror of
https://github.com/sstent/vmimages.git
synced 2026-04-04 03:53:38 +00:00
new flake
This commit is contained in:
@@ -1,119 +0,0 @@
|
|||||||
{self, ...} @ inputs:
|
|
||||||
with inputs; let
|
|
||||||
## Variable Declaration ##
|
|
||||||
# Supported Architectures
|
|
||||||
platforms = ["x86_64-linux"];
|
|
||||||
|
|
||||||
# NixOS Version
|
|
||||||
version = readFile ./.version;
|
|
||||||
|
|
||||||
# System Libraries
|
|
||||||
inherit (self) files;
|
|
||||||
inherit (lib) eachSystem filters;
|
|
||||||
inherit (builtins) head readFile;
|
|
||||||
inherit (lib.util) build map pack;
|
|
||||||
lib = library.lib.extend (final: prev:
|
|
||||||
{
|
|
||||||
inherit (flatpak.lib) flatpak;
|
|
||||||
deploy = deploy.lib;
|
|
||||||
filters = ignore.lib // {inherit (filter.lib) filter matchExt;};
|
|
||||||
hooks = hooks.lib;
|
|
||||||
image = generators.nixosGenerate;
|
|
||||||
wine = wine.lib;
|
|
||||||
util = import ./lib {
|
|
||||||
inherit self platforms;
|
|
||||||
lib = final;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// home.lib
|
|
||||||
// utils.lib);
|
|
||||||
in
|
|
||||||
eachSystem platforms (system: let
|
|
||||||
# Default Package Channel
|
|
||||||
pkgs = self.legacyPackages."${system}";
|
|
||||||
|
|
||||||
# Package Calling Function
|
|
||||||
call = name: pkgs.callPackage name {inherit lib inputs pkgs files;};
|
|
||||||
in {
|
|
||||||
## Configuration Checks ##
|
|
||||||
checks = import ./modules/nix/checks.nix {inherit self system lib;};
|
|
||||||
|
|
||||||
## Developer Shells ##
|
|
||||||
devShells =
|
|
||||||
map.modules' ./shells (file: pkgs.mkShell (import file pkgs))
|
|
||||||
// {
|
|
||||||
default = import ./shells {inherit pkgs;};
|
|
||||||
website = import ./site/shell.nix {inherit pkgs;};
|
|
||||||
commit =
|
|
||||||
pkgs.mkShell {inherit (self.checks."${system}".commit) shellHook;};
|
|
||||||
};
|
|
||||||
|
|
||||||
## Code Formatter ##
|
|
||||||
formatter = pkgs.treefmt;
|
|
||||||
|
|
||||||
## Package Configuration ##
|
|
||||||
legacyPackages = self.channels."${system}".stable;
|
|
||||||
|
|
||||||
# Channels
|
|
||||||
channels = {
|
|
||||||
stable = (build.channel stable [] ./packages/patches)."${system}";
|
|
||||||
unstable = (build.channel unstable [nur.overlay] [])."${system}";
|
|
||||||
wine = wine.packages."${system}";
|
|
||||||
gaming = gaming.packages."${system}";
|
|
||||||
apps = {
|
|
||||||
deploy = deploy.defaultPackage."${system}";
|
|
||||||
generators = generators.defaultPackage."${system}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Custom Packages
|
|
||||||
# apps = map.modules ./scripts (name: lib.mkApp {drv = call name;}) // {default = self.apps."${system}".nixos;};
|
|
||||||
# packages = map.modules ./packages call // map.modules ./scripts call // {default = self.packages."${system}".dotfiles;};
|
|
||||||
})
|
|
||||||
// {
|
|
||||||
# Overrides
|
|
||||||
overlays = map.modules ./packages/overlays import;
|
|
||||||
|
|
||||||
## Custom Library Functions ##
|
|
||||||
lib = lib.util;
|
|
||||||
|
|
||||||
## Program Configuration and 'dotfiles' ##
|
|
||||||
# files = import ./files lib self.legacyPackages."${head platforms}";
|
|
||||||
|
|
||||||
## Custom Configuration Modules ##
|
|
||||||
nixosModules =
|
|
||||||
map.modules ./modules import
|
|
||||||
// {default = import ./modules {inherit version lib inputs files;};};
|
|
||||||
|
|
||||||
## Configuration Templates ##
|
|
||||||
# templates = import ./.templates lib;
|
|
||||||
|
|
||||||
## Device Configuration ##
|
|
||||||
# deploy = import ./modules/nix/deploy.nix {inherit self lib;};
|
|
||||||
# nixosConfigurations =
|
|
||||||
# map.modules ./devices (name: build.device (import name));
|
|
||||||
|
|
||||||
nixosConfigurations = {
|
|
||||||
go3-wsl = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [
|
|
||||||
./hosts/WSL/go3-wsl
|
|
||||||
];
|
|
||||||
};
|
|
||||||
StuPC-WSL = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [
|
|
||||||
./hosts/WSL/StuPC-WSL
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
## Virtual Machines ##
|
|
||||||
# vmConfigurations =
|
|
||||||
# map.modules ./devices/vm (name:
|
|
||||||
# import name (head platforms) inputs self.channels."${head platforms}".stable);
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
179
flake.lock
generated
179
flake.lock
generated
@@ -1,20 +1,5 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"filter": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1694857738,
|
|
||||||
"narHash": "sha256-bxxNyLHjhu0N8T3REINXQ2ZkJco0ABFPn6PIe2QUfqo=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "nix-filter",
|
|
||||||
"rev": "41fd48e00c22b4ced525af521ead8792402de0ea",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "nix-filter",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-compat": {
|
"flake-compat": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -53,42 +38,6 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"systems": "systems_2"
|
"systems": "systems_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
|
||||||
"lastModified": 1694529238,
|
|
||||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils_3": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1694529238,
|
|
||||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"flake-utils_4": {
|
|
||||||
"inputs": {
|
|
||||||
"systems": "systems_4"
|
|
||||||
},
|
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1681202837,
|
"lastModified": 1681202837,
|
||||||
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
|
||||||
@@ -110,11 +59,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1695108154,
|
"lastModified": 1700392168,
|
||||||
"narHash": "sha256-gSg7UTVtls2yO9lKtP0yb66XBHT1Fx5qZSZbGMpSn2c=",
|
"narHash": "sha256-v5LprEFx3u4+1vmds9K0/i7sHjT0IYGs7u9v54iz/OA=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "07682fff75d41f18327a871088d20af2710d4744",
|
"rev": "28535c3a34d79071f2ccb68671971ce0c0984d7e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -124,62 +73,10 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ignore": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1694102001,
|
|
||||||
"narHash": "sha256-vky6VPK1n1od6vXbqzOXnekrQpTL4hbPAwUhT5J9c9E=",
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"rev": "9e21c80adf67ebcb077d75bd5e7d724d21eeafd6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "hercules-ci",
|
|
||||||
"repo": "gitignore.nix",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"library": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1674348806,
|
|
||||||
"narHash": "sha256-hKi7sFobRQg6sJxskRFCjt/d8gR+w0ClEWZatlr2rnw=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"rev": "af5239f892ae6e1c8bb560b11ed874cebbd10696",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"ref": "master",
|
|
||||||
"repo": "nixpkgs.lib",
|
|
||||||
"rev": "af5239f892ae6e1c8bb560b11ed874cebbd10696",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixos-hardware": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696614066,
|
|
||||||
"narHash": "sha256-nAyYhO7TCr1tikacP37O9FnGr2USOsVBD3IgvndUYjM=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixos-hardware",
|
|
||||||
"rev": "bb2db418b616fea536b1be7f6ee72fb45c11afe0",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixos-hardware",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixos-wsl": {
|
"nixos-wsl": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils_2",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
@@ -200,11 +97,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696610053,
|
"lastModified": 1701268161,
|
||||||
"narHash": "sha256-nMYt0iIt9OEdsP7XuNjwml+nweuHTWWx86f1t7Dp3FM=",
|
"narHash": "sha256-hL4jGGwMHHmyx6G9wi6IrYa8RLkoEtzCb4zWITH1B40=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f49c3d6bb60a6317e4c5137d50299b5c93a8a64b",
|
"rev": "67be70a859530f6f7c358568eaa6ab0d84b36b01",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -232,11 +129,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696375444,
|
"lastModified": 1701068326,
|
||||||
"narHash": "sha256-Sv0ICt/pXfpnFhTGYTsX6lUr1SljnuXWejYTI2ZqHa4=",
|
"narHash": "sha256-vmMceA+q6hG1yrjb+MP8T0YFDQIrW3bl45e7z24IEts=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "81e8f48ebdecf07aab321182011b067aafc78896",
|
"rev": "8cfef6986adfb599ba379ae53c9f5631ecd2fd9c",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -278,17 +175,11 @@
|
|||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"filter": "filter",
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"ignore": "ignore",
|
|
||||||
"library": "library",
|
|
||||||
"nixos-hardware": "nixos-hardware",
|
|
||||||
"nixos-wsl": "nixos-wsl",
|
"nixos-wsl": "nixos-wsl",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"utils": "utils",
|
|
||||||
"vscode-server": "vscode-server"
|
"vscode-server": "vscode-server"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -341,57 +232,9 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"systems_3": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"systems_4": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1681028828,
|
|
||||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-systems",
|
|
||||||
"repo": "default",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"utils": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils_3"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1696331477,
|
|
||||||
"narHash": "sha256-YkbRa/1wQWdWkVJ01JvV+75KIdM37UErqKgTf0L54Fk=",
|
|
||||||
"owner": "gytis-ivaskevicius",
|
|
||||||
"repo": "flake-utils-plus",
|
|
||||||
"rev": "bfc53579db89de750b25b0c5e7af299e0c06d7d3",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "gytis-ivaskevicius",
|
|
||||||
"repo": "flake-utils-plus",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"vscode-server": {
|
"vscode-server": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_4",
|
"flake-utils": "flake-utils_2",
|
||||||
"nixpkgs": "nixpkgs_3"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
|||||||
194
flake.nix
194
flake.nix
@@ -2,176 +2,68 @@
|
|||||||
description = "Your new nix config";
|
description = "Your new nix config";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Nixpkgs
|
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
|
nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
|
||||||
# You can access packages and modules from different nixpkgs revs
|
|
||||||
# at the same time. Here's an working example:
|
|
||||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
|
||||||
|
|
||||||
# Home manager
|
|
||||||
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
#nixos-hardware.url = "github:NixOS/nixos-hardware"; # Import nixos hardware quirks settings
|
||||||
# TODO: Add any other flake you might need
|
|
||||||
# hardware.url = "github:nixos/nixos-hardware";
|
|
||||||
|
|
||||||
# Shameless plug: looking for a way to nixify your themes and make
|
|
||||||
# everything match nicely? Try nix-colors!
|
|
||||||
# nix-colors.url = "github:misterio77/nix-colors";
|
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware"; # Import nixos hardware quirks settings
|
|
||||||
# nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs";}; #import nixos-generators for building images
|
|
||||||
nixos-wsl = {
|
nixos-wsl = {
|
||||||
url = "github:nix-community/nixos-wsl";
|
url = "github:nix-community/nixos-wsl";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
sops-nix.url = github:Mic92/sops-nix;
|
sops-nix.url = github:Mic92/sops-nix;
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
# nix.url = "github:NixOS/nix/2.12.0";
|
|
||||||
vscode-server.url = "github:msteen/nixos-vscode-server";
|
vscode-server.url = "github:msteen/nixos-vscode-server";
|
||||||
|
|
||||||
# homeage = {url = "github:jordanisaacs/homeage"; inputs.nixpkgs.follows = "nixpkgs";};
|
|
||||||
# Nix Library Functions
|
|
||||||
library = {
|
|
||||||
type = "github";
|
|
||||||
owner = "nix-community";
|
|
||||||
repo = "nixpkgs.lib";
|
|
||||||
ref = "master";
|
|
||||||
rev = "af5239f892ae6e1c8bb560b11ed874cebbd10696";
|
|
||||||
};
|
|
||||||
# Source Filter Functions
|
|
||||||
filter.url = "github:numtide/nix-filter";
|
|
||||||
ignore = {
|
|
||||||
url = "github:hercules-ci/gitignore.nix";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Flake Utility Functions
|
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, ... }@inputs:
|
||||||
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
|
let
|
||||||
};
|
mkHost = hostName: system:
|
||||||
|
nixpkgs.lib.nixosSystem {
|
||||||
outputs = {
|
pkgs = import nixpkgs {
|
||||||
self,
|
|
||||||
nixpkgs,
|
|
||||||
home-manager,
|
|
||||||
nixpkgs-unstable,
|
|
||||||
...
|
|
||||||
} @ inputs: let
|
|
||||||
inherit (lib.my) mapModules mapModulesRec mapHosts;
|
|
||||||
inherit (self) outputs;
|
|
||||||
|
|
||||||
system = "x86_64-linux";
|
|
||||||
|
|
||||||
mkPkgs = pkgs: extraOverlays:
|
|
||||||
import pkgs {
|
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true; # forgive me Stallman senpai
|
# settings to nixpkgs goes to here
|
||||||
overlays = extraOverlays ++ (lib.attrValues self.overlays);
|
# nixpkgs.pkgs.zathura.useMupdf = true;
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
pkgs = mkPkgs nixpkgs [self.overlay];
|
|
||||||
pkgs' = mkPkgs nixpkgs-unstable [];
|
|
||||||
|
|
||||||
lib =
|
specialArgs = {
|
||||||
nixpkgs.lib.extend
|
# By default, the system will only use packages from the
|
||||||
(self: super:
|
# stable channel. You can selectively install packages
|
||||||
|
# from the unstable channel. You can also add more
|
||||||
|
# channels to pin package version.
|
||||||
|
pkgs-unstable = import nixpkgs-unstable {
|
||||||
|
inherit system;
|
||||||
|
# settings to nixpkgs-unstable goes to here
|
||||||
|
};
|
||||||
|
|
||||||
|
#hostName = "StuPC";
|
||||||
|
|
||||||
|
# make all inputs availabe in other nix files
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
|
||||||
|
modules = [
|
||||||
|
# Root on ZFS related configuration
|
||||||
|
./modules
|
||||||
|
|
||||||
|
# Configuration shared by all hosts
|
||||||
|
|
||||||
|
# Configuration per host
|
||||||
|
./hosts/${hostName}
|
||||||
|
|
||||||
|
|
||||||
|
# home-manager
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
my = import ./lib {
|
home-manager.useGlobalPkgs = true;
|
||||||
inherit pkgs inputs outputs;
|
home-manager.useUserPackages = true;
|
||||||
lib = self;
|
home-manager.users.sstent = import ./home-manager;
|
||||||
};
|
|
||||||
}
|
}
|
||||||
// home-manager.lib);
|
];
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
lib = lib.my;
|
|
||||||
packages."${system}" =
|
|
||||||
mapModules ./pkgs (p: pkgs.callPackage p {});
|
|
||||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
|
||||||
|
|
||||||
devShell."${system}" =
|
|
||||||
import ./shell.nix {inherit pkgs;};
|
|
||||||
|
|
||||||
overlay = final: prev: {
|
|
||||||
#unstable = pkgs';
|
|
||||||
my = self.packages."${system}";
|
|
||||||
};
|
|
||||||
|
|
||||||
overlays = import ./overlays {inherit inputs;};
|
|
||||||
|
|
||||||
# Output all modules in ./modules to flake. Modules should be in
|
|
||||||
# individual subdirectories and contain a default.nix file
|
|
||||||
nixosModules = builtins.listToAttrs (map
|
|
||||||
(x: {
|
|
||||||
name = x;
|
|
||||||
value = import (./modules/nixos + "/${x}");
|
|
||||||
})
|
|
||||||
(builtins.attrNames (builtins.readDir ./modules/nixos)));
|
|
||||||
|
|
||||||
##import our HM modules
|
|
||||||
## -- imported in ./home-manger/general
|
|
||||||
|
|
||||||
homeManagerModules = builtins.listToAttrs (map
|
|
||||||
(name: {
|
|
||||||
inherit name;
|
|
||||||
value = import (./modules/home-manager + "/${name}");
|
|
||||||
})
|
|
||||||
(builtins.attrNames (builtins.readDir ./modules/home-manager)));
|
|
||||||
|
|
||||||
# nixosConfigurations =
|
|
||||||
# mapHosts ./hosts {};
|
|
||||||
|
|
||||||
# NixOS configuration entrypoint
|
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
go3-wsl = nixpkgs.lib.nixosSystem {
|
StuPC-WSL = mkHost "StuPC-WSL" "x86_64-linux";
|
||||||
specialArgs = {
|
|
||||||
inherit inputs outputs lib;
|
|
||||||
hostName = "go3-wsl";
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
./hosts/go3-wsl
|
|
||||||
];
|
|
||||||
};
|
|
||||||
StuPC-WSL = nixpkgs.lib.nixosSystem {
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs outputs lib;
|
|
||||||
hostName = "StuPC";
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
./hosts/StuPC-WSL
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Standalone home-manager configuration entrypoint
|
|
||||||
# Available through 'home-manager --flake .#your-username@your-hostname'
|
|
||||||
homeConfigurations = {
|
|
||||||
# FIXME replace with your username@hostname
|
|
||||||
"sstent@go3-wsl" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
|
||||||
pkgs = pkgs;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs outputs lib;
|
|
||||||
hostName = "go3-wsl";
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
# > Our main home-manager configuration file <
|
|
||||||
./home-manager/users/sstent
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
];
|
|
||||||
};
|
|
||||||
"sstent@StuPC-WSL" = home-manager.lib.homeManagerConfiguration {
|
|
||||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
|
||||||
pkgs = pkgs;
|
|
||||||
extraSpecialArgs = {
|
|
||||||
inherit inputs outputs lib;
|
|
||||||
hostName = "StuPC-WSL";
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
# > Our main home-manager configuration file <
|
|
||||||
./home-manager/users/sstent
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,25 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
lib,
|
lib,
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
hostName,
|
hostName,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
# imports = [
|
||||||
../../global.nix
|
#./global.nix
|
||||||
];
|
#"../modules/vscode-server/home.nix"
|
||||||
|
|
||||||
|
# ];
|
||||||
home.username = "sstent";
|
home.username = "sstent";
|
||||||
home.homeDirectory = "/home/sstent";
|
home.homeDirectory = "/home/sstent";
|
||||||
home.stateVersion = "23.05";
|
home.stateVersion = "23.05";
|
||||||
|
|
||||||
sops = {
|
sops = {
|
||||||
age.sshKeyPaths = ["/home/sstent/.ssh/id_ed25519"];
|
age.sshKeyPaths = ["/home/sstent/.ssh/id_ed25519"];
|
||||||
defaultSopsFile = "${config._secretstore}/user-secrets.yaml";
|
defaultSopsFile = ../secrets/user-secrets.yaml;
|
||||||
secrets = {
|
secrets = {
|
||||||
mrconfig = {
|
mrconfig = {
|
||||||
sopsFile = "${config._secretstore}/user_dotfiles/mrconfig";
|
sopsFile = ../secrets/user_dotfiles/mrconfig;
|
||||||
format = "binary";
|
format = "binary";
|
||||||
path = "${config.home.homeDirectory}/.mrconfig";
|
path = "${config.home.homeDirectory}/.mrconfig";
|
||||||
};
|
};
|
||||||
@@ -28,6 +28,25 @@
|
|||||||
|
|
||||||
# home.file."/home/sstent/.config/beets/test".source = config.lib.file.mkOutOfStoreSymlink /run/user/1000/secrets/test;
|
# home.file."/home/sstent/.config/beets/test".source = config.lib.file.mkOutOfStoreSymlink /run/user/1000/secrets/test;
|
||||||
|
|
||||||
|
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
# ./beets.nix
|
||||||
|
# ./keybase.nix
|
||||||
|
];
|
||||||
|
# ++ (builtins.attrValues outputs.homeManagerModules);
|
||||||
|
|
||||||
|
###dotfiles path variable
|
||||||
|
|
||||||
|
##VSCode
|
||||||
|
#services.vscode-server.enable = true;
|
||||||
|
#services.vscode-server.enableFHS = true;
|
||||||
|
#services.vscode-server.nodejsPackage = pkgs.nodejs-18_x;
|
||||||
|
|
||||||
|
#programs.git.enable = true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
@@ -40,7 +59,7 @@
|
|||||||
pyinfra
|
pyinfra
|
||||||
sshpass
|
sshpass
|
||||||
nmap
|
nmap
|
||||||
nomad_1_4
|
nomad
|
||||||
consul
|
consul
|
||||||
terraform
|
terraform
|
||||||
wget
|
wget
|
||||||
@@ -57,11 +76,11 @@
|
|||||||
gnumake
|
gnumake
|
||||||
];
|
];
|
||||||
|
|
||||||
custom = {
|
# custom = {
|
||||||
ssh-proxy.enable = false;
|
# ssh-proxy.enable = false;
|
||||||
beets.enable = true;
|
# beets.enable = true;
|
||||||
keybase.enable = true;
|
# keybase.enable = true;
|
||||||
};
|
# };
|
||||||
|
|
||||||
# home.file.".mrconfig".source = config.lib.file.mkOutOfStoreSymlink "${config._secrets}/mrconfig";
|
# home.file.".mrconfig".source = config.lib.file.mkOutOfStoreSymlink "${config._secrets}/mrconfig";
|
||||||
programs = {
|
programs = {
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
inputs,
|
#inputs,
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
outputs,
|
#outputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports =
|
imports =
|
||||||
@@ -11,8 +11,8 @@
|
|||||||
# ./beets.nix
|
# ./beets.nix
|
||||||
# ./keybase.nix
|
# ./keybase.nix
|
||||||
"${inputs.vscode-server}/modules/vscode-server/home.nix"
|
"${inputs.vscode-server}/modules/vscode-server/home.nix"
|
||||||
]
|
];
|
||||||
++ (builtins.attrValues outputs.homeManagerModules);
|
# ++ (builtins.attrValues outputs.homeManagerModules);
|
||||||
|
|
||||||
###dotfiles path variable
|
###dotfiles path variable
|
||||||
options._dotfiles = lib.mkOption {
|
options._dotfiles = lib.mkOption {
|
||||||
@@ -36,21 +36,21 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
nixpkgs = {
|
#nixpkgs = {
|
||||||
overlays = builtins.attrValues outputs.overlays;
|
# overlays = builtins.attrValues outputs.overlays;
|
||||||
config = {
|
# config = {
|
||||||
allowUnfree = true;
|
# allowUnfree = true;
|
||||||
allowUnfreePredicate = _: true;
|
# allowUnfreePredicate = _: true;
|
||||||
};
|
# };
|
||||||
};
|
#};
|
||||||
|
|
||||||
nix = {
|
#nix = {
|
||||||
package = lib.mkDefault pkgs.nix;
|
# package = lib.mkDefault pkgs.nix;
|
||||||
settings = {
|
# settings = {
|
||||||
experimental-features = ["nix-command" "flakes" "repl-flake"];
|
# experimental-features = ["nix-command" "flakes" "repl-flake"];
|
||||||
warn-dirty = false;
|
# warn-dirty = false;
|
||||||
};
|
# };
|
||||||
};
|
#};
|
||||||
|
|
||||||
##VSCode
|
##VSCode
|
||||||
services.vscode-server.enable = true;
|
services.vscode-server.enable = true;
|
||||||
|
|||||||
101
hosts/common.nix
101
hosts/common.nix
@@ -1,9 +1,7 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
# This file (and the global directory) holds config that i use on all hosts
|
# This file (and the global directory) holds config that i use on all hosts
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
inputs,
|
inputs,
|
||||||
outputs,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
@@ -12,8 +10,7 @@
|
|||||||
[
|
[
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
]
|
];
|
||||||
++ (builtins.attrValues outputs.nixosModules);
|
|
||||||
|
|
||||||
###dotfiles path variable
|
###dotfiles path variable
|
||||||
options._dotfiles = lib.mkOption {
|
options._dotfiles = lib.mkOption {
|
||||||
@@ -46,7 +43,7 @@
|
|||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
extraSpecialArgs = {inherit inputs outputs;};
|
#extraSpecialArgs = {inherit inputs outputs;};
|
||||||
sharedModules = [
|
sharedModules = [
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
];
|
];
|
||||||
@@ -84,97 +81,3 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
=======
|
|
||||||
# This file (and the global directory) holds config that i use on all hosts
|
|
||||||
{ lib, inputs, outputs, pkgs, config, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
# ./binfmt.nix
|
|
||||||
]++ (builtins.attrValues outputs.nixosModules);
|
|
||||||
|
|
||||||
###dotfiles path variable
|
|
||||||
options._dotfiles = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "${inputs.self}/home-manager/dotfiles";
|
|
||||||
description = "Path to the dotfiles in this repository";
|
|
||||||
};
|
|
||||||
|
|
||||||
###secrets path variable
|
|
||||||
options._secrets = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "/run/user/1000/secrets";
|
|
||||||
description = "Path to the Secrets runtime";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
###secretstore path variable
|
|
||||||
options._secretstore = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "${inputs.self}/secrets";
|
|
||||||
description = "Path to the Secrets storage";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
system.stateVersion = "23.05";
|
|
||||||
|
|
||||||
|
|
||||||
sops = {
|
|
||||||
defaultSopsFile = "${config._secretstore}/host-secrets.yaml";
|
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useUserPackages = true;
|
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
|
||||||
sharedModules = [
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
programs.fuse.userAllowOther = true;
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
|
|
||||||
# nixpkgs.overlays = overlays;
|
|
||||||
# Enable nix flakes
|
|
||||||
nix.package = pkgs.nixFlakes;
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
||||||
# nix.extra-platforms = aarch64-linux i686-linux;
|
|
||||||
|
|
||||||
# nix.nixPath = [ "nixpkgs=pkgs.outPath" ];
|
|
||||||
# boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
||||||
boot.binfmt.emulatedSystems = ["armv7l-linux" "aarch64-linux"];
|
|
||||||
|
|
||||||
nix.settings.substituters = [
|
|
||||||
"https://fbleagh.cachix.org"
|
|
||||||
"https://cache.armv7l.xyz"
|
|
||||||
"https://arm.cachix.org"
|
|
||||||
"https://thefloweringash-armv7.cachix.org" ];
|
|
||||||
nix.settings.trusted-public-keys = [
|
|
||||||
"fbleagh.cachix.org-1:HNgEVkx9HfKmEQdR+9IeCwqFza0k8d8fJgcYvOTVDB8="
|
|
||||||
"cache.armv7l.xyz-1:kBY/eGnBAYiqYfg0fy0inWhshUo+pGFM3Pj7kIkmlBk="
|
|
||||||
"arm.cachix.org-1:K3XjAeWPgWkFtSS9ge5LJSLw3xgnNqyOaG7MDecmTQ8="
|
|
||||||
"thefloweringash-armv7.cachix.org-1:v+5yzBD2odFKeXbmC+OPWVqx4WVoIVO6UXgnSAWFtso="
|
|
||||||
];
|
|
||||||
nix.settings.trusted-users = [ "root" "sstent" ];
|
|
||||||
|
|
||||||
#services.envfs.enable = true;
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.git
|
|
||||||
pkgs.home-manager
|
|
||||||
pkgs.sops
|
|
||||||
pkgs.ssh-to-age
|
|
||||||
pkgs.age
|
|
||||||
pkgs.qemu
|
|
||||||
pkgs.cachix
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
>>>>>>> dacf7df (updates)
|
|
||||||
|
|||||||
@@ -1,179 +0,0 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
# This file (and the global directory) holds config that i use on all hosts
|
|
||||||
{
|
|
||||||
lib,
|
|
||||||
inputs,
|
|
||||||
outputs,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
]
|
|
||||||
++ (builtins.attrValues outputs.nixosModules);
|
|
||||||
|
|
||||||
###dotfiles path variable
|
|
||||||
options._dotfiles = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "${inputs.self}/home-manager/dotfiles";
|
|
||||||
description = "Path to the dotfiles in this repository";
|
|
||||||
};
|
|
||||||
|
|
||||||
###secrets path variable
|
|
||||||
options._secrets = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "/run/user/1000/secrets";
|
|
||||||
description = "Path to the Secrets runtime";
|
|
||||||
};
|
|
||||||
|
|
||||||
###secretstore path variable
|
|
||||||
options._secretstore = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "${inputs.self}/secrets";
|
|
||||||
description = "Path to the Secrets storage";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
system.stateVersion = "23.05";
|
|
||||||
|
|
||||||
sops = {
|
|
||||||
defaultSopsFile = "${config._secretstore}/host-secrets.yaml";
|
|
||||||
age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useUserPackages = true;
|
|
||||||
extraSpecialArgs = {inherit inputs outputs;};
|
|
||||||
sharedModules = [
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
programs.fuse.userAllowOther = true;
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
|
|
||||||
# nixpkgs.overlays = overlays;
|
|
||||||
# Enable nix flakes
|
|
||||||
nix.package = pkgs.nixFlakes;
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
|
||||||
# nix.nixPath = [ "nixpkgs=pkgs.outPath" ];
|
|
||||||
networking.search = ["node.dc1.consul" "service.dc1.consul"];
|
|
||||||
|
|
||||||
#services.envfs.enable = true;
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.git
|
|
||||||
pkgs.home-manager
|
|
||||||
pkgs.sops
|
|
||||||
pkgs.ssh-to-age
|
|
||||||
pkgs.age
|
|
||||||
pkgs.bitwarden-cli
|
|
||||||
];
|
|
||||||
|
|
||||||
nix.gc = {
|
|
||||||
automatic = true; # Enable the automatic garbage collector
|
|
||||||
dates = "03:15"; # When to run the garbage collector
|
|
||||||
options = "-d"; # Arguments to pass to nix-collect-garbage
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
# This file (and the global directory) holds config that i use on all hosts
|
|
||||||
{ lib, inputs, outputs, pkgs, config, ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
# ./binfmt.nix
|
|
||||||
]++ (builtins.attrValues outputs.nixosModules);
|
|
||||||
|
|
||||||
###dotfiles path variable
|
|
||||||
options._dotfiles = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "${inputs.self}/home-manager/dotfiles";
|
|
||||||
description = "Path to the dotfiles in this repository";
|
|
||||||
};
|
|
||||||
|
|
||||||
###secrets path variable
|
|
||||||
options._secrets = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "/run/user/1000/secrets";
|
|
||||||
description = "Path to the Secrets runtime";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
###secretstore path variable
|
|
||||||
options._secretstore = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "${inputs.self}/secrets";
|
|
||||||
description = "Path to the Secrets storage";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
system.stateVersion = "23.05";
|
|
||||||
|
|
||||||
|
|
||||||
sops = {
|
|
||||||
defaultSopsFile = "${config._secretstore}/host-secrets.yaml";
|
|
||||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useUserPackages = true;
|
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
|
||||||
sharedModules = [
|
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
programs.fuse.userAllowOther = true;
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
|
|
||||||
# nixpkgs.overlays = overlays;
|
|
||||||
# Enable nix flakes
|
|
||||||
nix.package = pkgs.nixFlakes;
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
||||||
# nix.extra-platforms = aarch64-linux i686-linux;
|
|
||||||
|
|
||||||
# nix.nixPath = [ "nixpkgs=pkgs.outPath" ];
|
|
||||||
# boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
|
||||||
boot.binfmt.emulatedSystems = ["armv7l-linux" "aarch64-linux"];
|
|
||||||
|
|
||||||
nix.settings.substituters = [
|
|
||||||
"https://fbleagh.cachix.org"
|
|
||||||
"https://cache.armv7l.xyz"
|
|
||||||
"https://arm.cachix.org"
|
|
||||||
"https://thefloweringash-armv7.cachix.org" ];
|
|
||||||
nix.settings.trusted-public-keys = [
|
|
||||||
"fbleagh.cachix.org-1:HNgEVkx9HfKmEQdR+9IeCwqFza0k8d8fJgcYvOTVDB8="
|
|
||||||
"cache.armv7l.xyz-1:kBY/eGnBAYiqYfg0fy0inWhshUo+pGFM3Pj7kIkmlBk="
|
|
||||||
"arm.cachix.org-1:K3XjAeWPgWkFtSS9ge5LJSLw3xgnNqyOaG7MDecmTQ8="
|
|
||||||
"thefloweringash-armv7.cachix.org-1:v+5yzBD2odFKeXbmC+OPWVqx4WVoIVO6UXgnSAWFtso="
|
|
||||||
];
|
|
||||||
nix.settings.trusted-users = [ "root" "sstent" ];
|
|
||||||
|
|
||||||
#services.envfs.enable = true;
|
|
||||||
environment.systemPackages = [
|
|
||||||
pkgs.git
|
|
||||||
pkgs.home-manager
|
|
||||||
pkgs.sops
|
|
||||||
pkgs.ssh-to-age
|
|
||||||
pkgs.age
|
|
||||||
pkgs.qemu
|
|
||||||
pkgs.cachix
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
}
|
|
||||||
>>>>>>> dacf7df (updates)
|
|
||||||
44
hosts/default.nix
Normal file
44
hosts/default.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{ system, self, nixpkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true; # Allow proprietary software
|
||||||
|
};
|
||||||
|
|
||||||
|
lib = nixpkgs.lib;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
StuPC-WSL = lib.nixosSystem {
|
||||||
|
# Laptop profile
|
||||||
|
inherit system;
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
#../home-manager #hyprland and sway,go to this dir,choose one
|
||||||
|
] ++ [
|
||||||
|
./common.nix
|
||||||
|
] ++ [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
# extraSpecialArgs = { inherit user; };
|
||||||
|
users.sstent = {
|
||||||
|
imports = [
|
||||||
|
(import ../home-manager)
|
||||||
|
] ++ [
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nixpkgs = {
|
||||||
|
overlays =
|
||||||
|
[
|
||||||
|
self.overlays.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
10
modules/default.nix
Normal file
10
modules/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ config, lib, pkgs, ... }: { imports = [
|
||||||
|
|
||||||
|
|
||||||
|
./nixos/mnt_public
|
||||||
|
./nixos/ssh
|
||||||
|
./nixos/syncthing
|
||||||
|
./nixos/vpn
|
||||||
|
./nixos/wsl2
|
||||||
|
|
||||||
|
]; }
|
||||||
@@ -1,6 +1,12 @@
|
|||||||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
rec{
|
||||||
# You can build them using 'nix build .#example' or (legacy) 'nix-build -A example'
|
overlay = final: prev:
|
||||||
{pkgs ? (import ../nixpkgs.nix) {}}: {
|
let
|
||||||
# example = pkgs.callPackage ./example { };
|
dirContents = builtins.readDir ../pkgs;
|
||||||
npiperelay = pkgs.callPackage ./npiperelay {};
|
genPackage = name: {
|
||||||
|
inherit name;
|
||||||
|
value = final.callPackage (../pkgs + "/${name}") { };
|
||||||
|
};
|
||||||
|
names = builtins.attrNames dirContents;
|
||||||
|
in
|
||||||
|
builtins.listToAttrs (map genPackage names);
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user