WIP: initial flake conversion
This commit is contained in:
parent
58426c0ccd
commit
28b10e0bfa
|
@ -0,0 +1 @@
|
||||||
|
secrets/** filter=git-crypt diff=git-crypt
|
|
@ -5,17 +5,19 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
local = import ./local.nix { inherit config pkgs lib; };
|
# local = import ./local.nix { inherit config pkgs lib; };
|
||||||
hostName = local.networking.hostName;
|
# hostName = local.networking.hostName;
|
||||||
host-config = ./machines + "/${hostName}.nix";
|
# host-config = ./machines + "/${hostName}.nix";
|
||||||
optionalPath = path: lib.lists.optional (builtins.pathExists path) path;
|
# optionalPath = path: lib.lists.optional (builtins.pathExists path) path;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
<home-manager/nixos>
|
# <home-manager/nixos>
|
||||||
./hardware-configuration.nix
|
# ./hardware-configuration.nix
|
||||||
./local.nix
|
# ./local.nix
|
||||||
./cachix.nix
|
./cachix.nix
|
||||||
] ++ optionalPath host-config;
|
]; # ++ optionalPath host-config;
|
||||||
|
|
||||||
|
documentation.info.enable = lib.mkForce false;
|
||||||
|
|
||||||
# Nix ######################################################################
|
# Nix ######################################################################
|
||||||
system.stateVersion = "20.03"; # Leave this alone (see configuration.nix(5))
|
system.stateVersion = "20.03"; # Leave this alone (see configuration.nix(5))
|
||||||
|
@ -68,7 +70,7 @@ in {
|
||||||
users.groups.jez = { };
|
users.groups.jez = { };
|
||||||
users.users.elly.isNormalUser = true;
|
users.users.elly.isNormalUser = true;
|
||||||
|
|
||||||
home-manager.users.jez = import ./home/jez/home.nix;
|
# home-manager.users.jez = import ./home/jez/home.nix;
|
||||||
|
|
||||||
environment.shells = with pkgs; [ bashInteractive bash fish zsh ];
|
environment.shells = with pkgs; [ bashInteractive bash fish zsh ];
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,62 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixos"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1621794721,
|
||||||
|
"narHash": "sha256-JXfTSZUu9EVbT9D/MFsx0cXfa8bw1NFCzIxZ7gO73Uo=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "90493027e33ba9eb3f50dc1da365d0e4ca31bf14",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"latest": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1621793326,
|
||||||
|
"narHash": "sha256-yt4MOSZttklXCb/UJ9sPAGR7m7JF+3nAXLijjkCCoZk=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "ab51a2dbd6b5fcc8f6ae467075a2863ecac7c7d0",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixos": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1621728353,
|
||||||
|
"narHash": "sha256-cgRKslcI/lG5wnxgt1z6OGm+JnzmBqyR8m/JzpUNpYQ=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "900115a4f7fdd9189e7803ca781a65be663f2c89",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"id": "nixpkgs",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"type": "indirect"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"latest": "latest",
|
||||||
|
"nixos": "nixos"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
{
|
||||||
|
description = "A very basic flake";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixos.url = "nixpkgs/nixos-unstable";
|
||||||
|
latest.url = "nixpkgs";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixos";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, nixos, latest, home-manager }: {
|
||||||
|
|
||||||
|
nixosConfigurations = {
|
||||||
|
arianrhod = nixos.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./configuration.nix
|
||||||
|
./hosts/arianrhod
|
||||||
|
./hosts/arianrhod/hardware.nix
|
||||||
|
./secrets/arianrhod.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
# {
|
||||||
|
# home-manager.useGlobalPkgs = true;
|
||||||
|
# home-manager.useUserPackages = true;
|
||||||
|
# home-manager.users.jdoe = import ./home.nix;
|
||||||
|
# }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,7 +1,9 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ../bits/home-common.nix ../bits/zfs.nix ];
|
imports = [ ../../bits/home-common.nix ../../bits/zfs.nix ];
|
||||||
|
|
||||||
|
networking.hostName = "arianrhod";
|
||||||
|
|
||||||
networking.interfaces.enp0s25.useDHCP = true;
|
networking.interfaces.enp0s25.useDHCP = true;
|
||||||
networking.interfaces.wlp2s0.useDHCP = true;
|
networking.interfaces.wlp2s0.useDHCP = true;
|
|
@ -0,0 +1,49 @@
|
||||||
|
# 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" "ahci" "usbhid" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "puddle/ROOT/nixos";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "puddle/DATA/home";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/root" =
|
||||||
|
{ device = "puddle/DATA/home/root";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home/jez" =
|
||||||
|
{ device = "puddle/DATA/home/jez";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/puddle" =
|
||||||
|
{ device = "puddle";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/4A6A-FC6D";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
}
|
Binary file not shown.
Loading…
Reference in New Issue