Convert to flake instead of raw

This commit is contained in:
Greg Hellings
2022-04-17 22:29:13 -05:00
parent f01898923e
commit 1326dc61a8
7 changed files with 127 additions and 18 deletions
-1
View File
@@ -1,2 +1 @@
host
hardware-configuration.nix
-15
View File
@@ -1,15 +0,0 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
"${builtins.fetchTarball "https://github.com/ryantm/agenix/archive/0.10.1.tar.gz"}/modules/age.nix"
./hardware-configuration.nix
./base.nix
./host
];
}
Generated
+62
View File
@@ -0,0 +1,62 @@
{
"nodes": {
"agenix": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1648942457,
"narHash": "sha256-i29Z1t3sVfCNfpp+KAfeExvpqHQSbLO1KWylTtfradU=",
"owner": "ryantm",
"repo": "agenix",
"rev": "0d5e59ed645e4c7b60174bc6f6aac6a203dc0b01",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1638587357,
"narHash": "sha256-2ySMW3QARG8BsRPmwe7clTbdCuaObromOKewykP+UJc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e34c5379866833f41e2a36f309912fa675d687c7",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1650143261,
"narHash": "sha256-KI3IDHAtXG/7Uu1gNuuy6ovKqP/d6OhV0HwCWIKx0Aw=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0a862f558d4001c62f15f652b1b907002dc1e9b9",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
"nixpkgs": "nixpkgs_2"
}
}
},
"root": "root",
"version": 7
}
+31
View File
@@ -0,0 +1,31 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{
description = "Greg's machines!";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11";
agenix.url = "github:ryantm/agenix";
};
outputs = inputs:
let
mods = hostname: [
inputs.agenix.nixosModule
./profiles/base.nix
./hosts/${hostname}
];
in {
nixosConfigurations = {
"2maccabees" = inputs.nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = {
nixpkgs = inputs.nixpkgs;
agenix = inputs.agenix;
};
modules = mods "2maccabees";
};
};
};
}
+1
View File
@@ -2,6 +2,7 @@
{
imports = [
./hardware-configuration.nix
./dnsmasq.nix
./home-assistant.nix
./networking.nix
+31
View File
@@ -0,0 +1,31 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" "uas" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/35f9a49a-b557-4eb3-a013-2afca7a990e4";
fsType = "btrfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A982-C8A3";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/4b6f2dc4-d845-4ec4-81f2-4f61bb3f282d"; }
];
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}
+2 -2
View File
@@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ config, pkgs, agenix, ... }:
let
syncs = [
@@ -73,7 +73,7 @@ in
# Base packages that need to be in all my hosts
environment.systemPackages = with pkgs; [
(pkgs.callPackage "${builtins.fetchTarball "https://github.com/ryantm/agenix/archive/0.10.1.tar.gz"}/pkgs/agenix.nix" {})
agenix.defaultPackage."${system}"
git
home-manager
htop