Compare commits

..

No commits in common. "08c39b6601c4521db5ae7438234575de2e7ed52a" and "af5925da19b6f42eb930976de7e51a952ef17475" have entirely different histories.

3 changed files with 118 additions and 142 deletions

214
flake.nix
View File

@ -3,7 +3,6 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils"; # Only expressed here to use for followers
nixpkgs-py39.url = "github:nixos/nixpkgs/f294325aed382b66c7a188482101b0f336d1d7db"; nixpkgs-py39.url = "github:nixos/nixpkgs/f294325aed382b66c7a188482101b0f336d1d7db";
home-manager = { home-manager = {
@ -18,6 +17,7 @@
home-manager.follows = ""; home-manager.follows = "";
}; };
}; };
flake-utils.url = "github:numtide/flake-utils";
nixos-hardware.url = "github:nixos/nixos-hardware/master"; nixos-hardware.url = "github:nixos/nixos-hardware/master";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
@ -124,21 +124,28 @@
}) })
inputs.golink.overlay inputs.golink.overlay
]; ];
pkgs = import nixpkgs {
inherit overlays system;
config.allowUnfree = true;
};
userSecret = path: { userSecret = path: {
file = path; file = path;
owner = username; owner = username;
}; };
commonConfig = {config, ...}: { commonConfig = {gui ? true}: {config, ...}: {
config = { config = {
nixpkgs.overlays = overlays; nixpkgs.overlays = overlays;
# TODO Remove when apps are updated # TODO Remove when apps are updated
nixpkgs.config.permittedInsecurePackages = [ nixpkgs.config.permittedInsecurePackages = [
"electron-25.9.0" "electron-25.9.0"
]; ];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.${username}.imports =
if gui
then [./apps/gui]
else [./apps/nogui];
extraSpecialArgs = {
flakePath = "/home/${username}/.config/nixpkgs";
};
};
age.secrets = { age.secrets = {
ssh-config = userSecret ./secrets/shared/ssh-config.age; ssh-config = userSecret ./secrets/shared/ssh-config.age;
ssh-config-work = userSecret ./secrets/shared/ssh-config-work.age; ssh-config-work = userSecret ./secrets/shared/ssh-config-work.age;
@ -159,8 +166,9 @@
}; };
}; };
workModules = [ workModules = [
home-manager.nixosModules.home-manager
agenix.nixosModules.default agenix.nixosModules.default
commonConfig (commonConfig {})
({pkgs, ...}: { ({pkgs, ...}: {
config = { config = {
nixpkgs.overlays = [ nixpkgs.overlays = [
@ -168,6 +176,10 @@
py39 = import nixpkgs-py39 {inherit (pkgs) system;}; py39 = import nixpkgs-py39 {inherit (pkgs) system;};
}) })
]; ];
home-manager.users.${username}.programs = {
git.package = pkgs.gitSVN;
firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)];
};
age.secrets = { age.secrets = {
netrc = { netrc = {
file = ./secrets/work/netrc.age; file = ./secrets/work/netrc.age;
@ -190,118 +202,92 @@
}) })
]; ];
username = "jolheiser"; username = "jolheiser";
system = "x86_64-linux"; in
in { {
homeConfigurations = let nixosConfigurations = {
commonModules = [ "chai" = nixpkgs.lib.nixosSystem {
{ system = "x86_64-linux";
home = { modules =
inherit username; workModules
homeDirectory = "/home/${username}"; ++ [
}; ./machines/chai
} ];
./apps/gui };
]; "earlgrey" = nixpkgs.lib.nixosSystem {
in { system = "x86_64-linux";
"jolheiser" = home-manager.lib.homeManagerConfiguration { modules =
inherit pkgs; workModules
modules = commonModules; ++ [
}; ./machines/earlgrey
"work" = home-manager.lib.homeManagerConfiguration { ];
inherit pkgs; };
modules = "masala" = nixpkgs.lib.nixosSystem {
commonModules system = "x86_64-linux";
++ [ modules =
{ workModules
nixpkgs.overlays = [ ++ [
(_: _: { wsl.nixosModules.wsl
py39 = import nixpkgs-py39 {inherit (pkgs) system;}; ./machines/masala
}) ];
]; };
programs = { "matcha" = nixpkgs.lib.nixosSystem {
git.package = pkgs.gitSVN; system = "x86_64-linux";
firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)]; modules = [
}; home-manager.nixosModules.home-manager
} agenix.nixosModules.default
./machines/matcha
(commonConfig {})
]; ];
}; };
}; "genmaicha" = nixpkgs.lib.nixosSystem {
nixosConfigurations = { system = "x86_64-linux";
"chai" = nixpkgs.lib.nixosSystem { modules = [
inherit system; home-manager.nixosModules.home-manager
modules = nixos-hardware.nixosModules.framework-13-7040-amd
workModules agenix.nixosModules.default
++ [ ./machines/genmaicha
./machines/chai (commonConfig {})
]; ];
}; };
"earlgrey" = nixpkgs.lib.nixosSystem { "sencha" = nixpkgs.lib.nixosSystem {
inherit system; system = "x86_64-linux";
modules = modules = [
workModules home-manager.nixosModules.home-manager
++ [ agenix.nixosModules.default
./machines/earlgrey ./machines/sencha
(commonConfig {})
]; ];
};
"masala" = nixpkgs.lib.nixosSystem {
inherit system;
modules =
workModules
++ [
wsl.nixosModules.wsl
./machines/masala
];
};
"matcha" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
agenix.nixosModules.default
./machines/matcha
commonConfig
];
};
"genmaicha" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
nixos-hardware.nixosModules.framework-13-7040-amd
agenix.nixosModules.default
./machines/genmaicha
commonConfig
];
};
"sencha" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
agenix.nixosModules.default
./machines/sencha
commonConfig
];
};
};
colmena = {
meta = {
nixpkgs = import nixpkgs {
inherit overlays system;
}; };
}; };
dragonwell = { colmena = {
imports = [ meta = {
inputs.agenix.nixosModules.default nixpkgs = import nixpkgs {
inputs.golink.nixosModules.default system = "x86_64-linux";
inputs.ugit.nixosModules.default overlays = overlays;
./machines/dragonwell };
};
dragonwell = {
imports = [
inputs.agenix.nixosModules.default
inputs.golink.nixosModules.default
inputs.ugit.nixosModules.default
./machines/dragonwell
];
};
};
nixConfig = {
extra-substitutors = ["https://jolheiser.cachix.org"];
extra-trusted-public-keys = ["jolheiser.cachix.org-1:fiKkfTuHFqDK5ZOVxcqb4InUkKsrTvtMLISid7XvuVg="];
};
}
// inputs.flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
devShells.default = pkgs.mkShell {
nativeBuildInputs = [
agenix.packages.${system}.agenix
pkgs.colmena
]; ];
}; };
}; });
nixConfig = {
extra-substitutors = ["https://jolheiser.cachix.org"];
extra-trusted-public-keys = ["jolheiser.cachix.org-1:fiKkfTuHFqDK5ZOVxcqb4InUkKsrTvtMLISid7XvuVg="];
};
devShells.${system}.default = pkgs.mkShell {
nativeBuildInputs = [
agenix.packages.${system}.agenix
pkgs.colmena
];
};
};
} }

View File

@ -11,12 +11,6 @@ rebuild *args:
switch *args: switch *args:
@just rebuild switch {{args}} @just rebuild switch {{args}}
hm:
@home-manager switch --flake .
work:
@home-manager switch --flake '.#work'
# Rebuild the current machine for next boot # Rebuild the current machine for next boot
boot *args: boot *args:
@just rebuild boot {{args}} @just rebuild boot {{args}}

View File

@ -1,35 +1,31 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
config, imports =
lib, [ (modulesPath + "/installer/scan/not-detected.nix") ../common/cifs.nix
modulesPath, ];
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
../common/cifs.nix
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [ ];
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = []; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/e2274508-9989-4f6b-9bcf-a0d246f292f9"; { device = "/dev/disk/by-uuid/e2274508-9989-4f6b-9bcf-a0d246f292f9";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-1121cd25-7c4c-47ee-b04a-2cab0cd251ea".device = "/dev/disk/by-uuid/1121cd25-7c4c-47ee-b04a-2cab0cd251ea"; boot.initrd.luks.devices."luks-1121cd25-7c4c-47ee-b04a-2cab0cd251ea".device = "/dev/disk/by-uuid/1121cd25-7c4c-47ee-b04a-2cab0cd251ea";
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-uuid/86CA-6DF6"; { device = "/dev/disk/by-uuid/86CA-6DF6";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = []; swapDevices = [ ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's