trying flakes

This commit is contained in:
ari committed 2024-04-27 11:32:18 -04:00
1 parent e6aa284555
commit 66b0576db2
4 files changed
+184 -10

No files matched your search

Generated
+106 -3
View File
@@ -1,8 +1,61 @@
{
"nodes": {
"fenix": {
"inputs": {
"nixpkgs": [
"fh",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"narHash": "sha256-0dZpggYjjmWEk+rGixiBHOHuQfLzEzNfrtjSig04s6Q=",
"rev": "9ccae1754eec0341b640d5705302ac0923d22875",
"revCount": 1618,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/nix-community/fenix/0.1.1618%2Brev-9ccae1754eec0341b640d5705302ac0923d22875/018aea4c-03c9-7734-95d5-b84cc8881e3d/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/nix-community/fenix/0.1.1565.tar.gz"
}
},
"fh": {
"inputs": {
"fenix": "fenix",
"flake-compat": "flake-compat",
"naersk": "naersk",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1711118970,
"narHash": "sha256-fRaKydMSwd1zl6ptBKvn5ej2pqtI8xi9dioFmR8QA+g=",
"rev": "73fed26f0231ae650122beb3ac1b7654b5cc682c",
"revCount": 425,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/DeterminateSystems/fh/0.1.10/018e66b1-a218-7f23-949d-ace71c4e4c8b/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/DeterminateSystems/fh/%2A.tar.gz"
}
},
"flake-compat": {
"locked": {
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.0.1.tar.gz"
}
},
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1714203603,
@@ -18,7 +71,39 @@
"type": "github"
}
},
"naersk": {
"inputs": {
"nixpkgs": [
"fh",
"nixpkgs"
]
},
"locked": {
"narHash": "sha256-TunvZMCxXHvU6fz5kq3XTLfojIvTDlbFGfPUFtwCU5o=",
"rev": "06a99941d72e2202ed62b8aa08b9869817fea56f",
"revCount": 332,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/nix-community/naersk/0.1.332%2Brev-06a99941d72e2202ed62b8aa08b9869817fea56f/018b61d4-48e5-77e8-8893-9f917732b11a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/nix-community/naersk/0.1.332.tar.gz"
}
},
"nixpkgs": {
"locked": {
"narHash": "sha256-9NJcFF9CEYPvHJ5ckE8kvINvI84SZZ87PvqMbH6pro0=",
"rev": "5e4c2ada4fcd54b99d56d7bd62f384511a7e2593",
"revCount": 534806,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.534806%2Brev-5e4c2ada4fcd54b99d56d7bd62f384511a7e2593/018b29e9-ae6d-72f2-993b-19cb9a64a3b5/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.514192.tar.gz"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1713714899,
"narHash": "sha256-+z/XjO3QJs5rLE5UOf015gdVauVRQd2vZtsFkaXBq2Y=",
@@ -34,7 +119,7 @@
"type": "github"
}
},
"nixpkgs_2": {
"nixpkgs_3": {
"locked": {
"lastModified": 1714076141,
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=",
@@ -52,8 +137,26 @@
},
"root": {
"inputs": {
"fh": "fh",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_3"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1696050837,
"narHash": "sha256-2K3Aq4gjPZBDnkAMJaMA4ElE+BNbmrqtSBWtt9kPGaM=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "0840038f02daec6ba3238f05d8caa037d28701a0",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
}
},
+34 -5
View File
@@ -1,9 +1,10 @@
{
inputs.nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable;
inputs.home-manager.url = github:nix-community/home-manager;
inputs.fh.url = "https://flakehub.com/f/DeterminateSystems/fh/*.tar.gz";
outputs = { self, nixpkgs, ... }@attrs:
outputs = { self, nixpkgs, home-manager, fh, ... }@attrs:
let
user = {
name = "ari";
@@ -11,16 +12,44 @@
email = "ariel@sosnovsky.ca";
};
dataDir = "/mnt/Data";
systemStateVersion = "23.11";
homeMangerVersion = "24.04";
hostName = "fwbook";
in
{
nixosConfigurations.fwbook = nixpkgs.lib.nixosSystem {
nixosConfigurations.${hostName} = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
/etc/nixos/cachix.nix
hardware-configs/fwbook.nix
<nixos-hardware/framework/13-inch/7040-amd>
(import /home/ari/nixos-setup/main.nix {
(import ./modules/os/nix.nix {
systemStateVersion = systemStateVersion;
})
(import ./modules/os/core.nix {
user = user;
hostName = hostName;
firewall = { enable = true; };
})
(import ./modules/os/hardware.nix {
enableFingerPrint = true;
hostName = "fwbook";
})
(import ./modules/os/ssh.nix {
user = user;
enableSSHServer = false;
})
./modules/os/services.nix
./modules/docker/core.nix
(import ./modules/user.nix {
user = user;
})
(import ./modules/rootUser.nix {
hostName = hostName;
})
home-manager.nixosModules.default
fh.packages.x86_64-linux.default
(import ./modules/optional/home-manager-config.nix {
homeMangerVersion = homeMangerVersion;
hostName = hostName;
user = user;
})
/home/ari/nixos-setup/modules/optional/amd-packages.nix
+42
View File
@@ -0,0 +1,42 @@
# 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 = [ "nvme" "xhci_pci" "thunderbolt" "uas" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/3fbf3ccf-655a-4040-b898-b97a1d555912";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/3342-B2BE";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/5175a4b0-0067-47c6-b7da-35acb247f134"; }];
# 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
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+2 -2
View File
@@ -5,8 +5,8 @@
# Configure keymap in X11
services.xserver = {
layout = "us";
xkbVariant = "";
xkb.layout = "us";
xkb.variant = "";
};
# Logind