mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 00:57:22 +01:00
add twoson config; start adding server config
This commit is contained in:
parent
f4659a14eb
commit
9b00e9003c
8 changed files with 880 additions and 91 deletions
126
flake.nix
126
flake.nix
|
|
@ -2,46 +2,70 @@
|
|||
description = "SwarseFlake - Nix Flake for all SwarselSystems";
|
||||
|
||||
inputs = {
|
||||
|
||||
nixpkgs.url = github:nixos/nixpkgs/nixos-unstable;
|
||||
|
||||
|
||||
|
||||
# user-level configuration
|
||||
home-manager = {
|
||||
url = github:nix-community/home-manager;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# overlay to access bleeding edge emacs
|
||||
emacs-overlay = {
|
||||
url = github:nix-community/emacs-overlay;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
||||
# nix user repository
|
||||
# i use this mainly to not have to build all firefox extensions
|
||||
# myself as well as for the emacs-init package (tbd)
|
||||
nur.url = github:nix-community/NUR;
|
||||
|
||||
|
||||
# provides GL to non-NixOS hosts
|
||||
nixgl.url = github:guibou/nixGL;
|
||||
|
||||
|
||||
# manages all themeing using Home-Manager
|
||||
stylix.url = github:danth/stylix;
|
||||
|
||||
|
||||
# nix secrets management
|
||||
sops-nix.url = github:Mic92/sops-nix;
|
||||
|
||||
|
||||
# enable secure boot on NixOS
|
||||
lanzaboote.url = github:nix-community/lanzaboote;
|
||||
|
||||
|
||||
# nix for android
|
||||
nix-on-droid = {
|
||||
url = github:t184256/nix-on-droid/release-23.05;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
||||
# generate NixOS images
|
||||
nixos-generators = {
|
||||
url = github:nix-community/nixos-generators;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, nix-on-droid, emacs-overlay, nur, nixgl, stylix, sops-nix, lanzaboote, ... }: let
|
||||
outputs = inputs@{
|
||||
self,
|
||||
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nix-on-droid,
|
||||
nixos-generators,
|
||||
emacs-overlay,
|
||||
nur,
|
||||
nixgl,
|
||||
stylix,
|
||||
sops-nix,
|
||||
lanzaboote,
|
||||
|
||||
...
|
||||
}: let
|
||||
|
||||
system = "x86_64-linux"; # not very portable, but I do not use other architectures at the moment
|
||||
pkgs = import nixpkgs { inherit system;
|
||||
overlays = [ emacs-overlay.overlay
|
||||
|
|
@ -54,7 +78,7 @@
|
|||
nixModules = [ stylix.nixosModules.stylix
|
||||
./profiles/common/nixos.nix
|
||||
];
|
||||
|
||||
|
||||
# Home-Manager modules wanted on non-NixOS systems
|
||||
homeModules = [ stylix.homeManagerModules.stylix
|
||||
];
|
||||
|
|
@ -62,6 +86,7 @@
|
|||
mixedModules = [ sops-nix.homeManagerModules.sops
|
||||
./profiles/common/home.nix
|
||||
];
|
||||
|
||||
in {
|
||||
|
||||
# NixOS setups - run home-manager as a NixOS module for better compatibility
|
||||
|
|
@ -72,20 +97,33 @@
|
|||
# Make sure to move hardware-configuration to the appropriate location, by default it is found in /etc/nixos/.
|
||||
|
||||
nixosConfigurations = {
|
||||
|
||||
onett = nixpkgs.lib.nixosSystem {
|
||||
|
||||
onett = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
modules = nixModules ++ [
|
||||
./profiles/onett/nixos.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.swarsel.imports = mixedModules ++ [
|
||||
./profiles/onett/home.nix
|
||||
./profiles/onett/home.nix
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
twoson = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
modules = nixModules ++ [
|
||||
./profiles/twoson/nixos.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.swarsel.imports = mixedModules ++ [
|
||||
./profiles/twoson/home.nix
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
stand = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
modules = nixModules ++ [
|
||||
|
|
@ -93,12 +131,12 @@
|
|||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.homelen.imports = mixedModules ++ [
|
||||
./profiles/stand/home.nix
|
||||
./profiles/stand/home.nix
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
threed = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs pkgs; };
|
||||
modules = nixModules ++ [
|
||||
|
|
@ -107,30 +145,48 @@
|
|||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.users.swarsel.imports = mixedModules ++ [
|
||||
./profiles/threed/home.nix
|
||||
./profiles/threed/home.nix
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# pure Home Manager setups - for non-NixOS machines
|
||||
# run rebuild using `hmswitch`
|
||||
|
||||
homeConfigurations = {
|
||||
homeConfigurations = {
|
||||
|
||||
"leons@PCisLee" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = homeModules ++ mixedModules ++ [
|
||||
./profiles/surface/home.nix
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
"leons@PCisLee" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
modules = homeModules ++ mixedModules ++ [
|
||||
./profiles/surface/home.nix
|
||||
];
|
||||
};
|
||||
nixOnDroidConfigurations = {
|
||||
|
||||
default = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
modules = [
|
||||
./profiles/mysticant/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
nixOnDroidConfigurations.default = nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
modules = [ ./profiles/mysticant/configuration.nix ];
|
||||
packages.x86_64-linux = {
|
||||
|
||||
proxmox-lxc = nixos-generators.nixosGenerate {
|
||||
inherit system;
|
||||
modules = [
|
||||
./profiles/server1/TEMPLATE/nixos.nix
|
||||
];
|
||||
format = "proxmox-lxc";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue