cleaned up flake.nix
This commit is contained in:
parent
54cd41fc40
commit
8da38ec270
8 changed files with 36 additions and 39 deletions
21
flake.nix
21
flake.nix
|
|
@ -33,7 +33,7 @@
|
||||||
impermanence.url = "github:nix-community/impermanence";
|
impermanence.url = "github:nix-community/impermanence";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, stylix, nixvim, ... }@inputs:
|
outputs = { self, nixpkgs, ... }@inputs:
|
||||||
let
|
let
|
||||||
#systems = ["aarch64-linux" "x86_64-linux" ];
|
#systems = ["aarch64-linux" "x86_64-linux" ];
|
||||||
#forAllSystems = nixpkgs.lib.genAttrs systems;
|
#forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||||
|
|
@ -46,13 +46,6 @@
|
||||||
arm = "aarch64-linux";
|
arm = "aarch64-linux";
|
||||||
x86 = "x86_64-linux";
|
x86 = "x86_64-linux";
|
||||||
|
|
||||||
general-modules = [
|
|
||||||
inputs.sops-nix.nixosModules.sops
|
|
||||||
inputs.home-manager.nixosModules.default
|
|
||||||
stylix.nixosModules.stylix
|
|
||||||
inputs.nixos-facter-modules.nixosModules.facter
|
|
||||||
];
|
|
||||||
|
|
||||||
first-nixos-install = "1729112485"; #stat -c %W /
|
first-nixos-install = "1729112485"; #stat -c %W /
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -78,16 +71,10 @@
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
modules = [
|
modules = [
|
||||||
inputs.impermanence.nixosModules.impermanence
|
|
||||||
inputs.disko.nixosModules.default
|
|
||||||
(import ./nixos/modules/disko/impermanence-disko.nix { device = "/dev/nvme0n1"; } )
|
(import ./nixos/modules/disko/impermanence-disko.nix { device = "/dev/nvme0n1"; } )
|
||||||
./nixos/modules/impermanence
|
|
||||||
#nur.nixosModules.nur
|
|
||||||
./nixos/configuration.nix
|
./nixos/configuration.nix
|
||||||
./nixos/hardware/nvidia.nix
|
|
||||||
#./nixos/homepc-hardware-conf.nix
|
|
||||||
#nix-flatpak.nixosModules.default
|
#nix-flatpak.nixosModules.default
|
||||||
] ++ general-modules;
|
];
|
||||||
};
|
};
|
||||||
"kylekrein-mac" = nixpkgs.lib.nixosSystem {
|
"kylekrein-mac" = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
|
@ -112,10 +99,8 @@
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
modules = [
|
modules = [
|
||||||
inputs.impermanence.nixosModules.impermanence
|
|
||||||
./nixos/configuration.nix
|
./nixos/configuration.nix
|
||||||
./nixos/modules/impermanence
|
];
|
||||||
] ++ general-modules;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,17 +2,24 @@
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, lib, pkgs, stylix, hwconfig, first-nixos-install, nixvim, inputs, ... }:
|
{ config, lib, pkgs, hwconfig, first-nixos-install, inputs, ... }:
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
inputs.stylix.nixosModules.stylix
|
||||||
|
inputs.nixos-facter-modules.nixosModules.facter
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
inputs.nixvim.nixosModules.nixvim
|
inputs.nixvim.nixosModules.nixvim
|
||||||
|
inputs.disko.nixosModules.default
|
||||||
|
|
||||||
./modules/firefox
|
./modules/firefox
|
||||||
./modules/services/autoupgrade
|
./modules/services/autoupgrade
|
||||||
./modules/sops
|
./modules/sops
|
||||||
./hosts/${hwconfig.hostname}
|
./hosts/${hwconfig.hostname}
|
||||||
];
|
]
|
||||||
|
++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
||||||
facter.reportPath = ./hosts/${hwconfig.hostname}/facter.json;
|
facter.reportPath = ./hosts/${hwconfig.hostname}/facter.json;
|
||||||
kylekrein.services.autoUpgrade = {
|
kylekrein.services.autoUpgrade = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -22,6 +29,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
plymouth = {
|
plymouth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
|
@ -273,7 +282,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {inherit pkgs; inherit hwconfig; inherit first-nixos-install; inherit nixvim; inherit inputs;};
|
extraSpecialArgs = {inherit pkgs; inherit hwconfig; inherit first-nixos-install; inherit inputs;};
|
||||||
};
|
};
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
{
|
{
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
hardware = {
|
hardware = {
|
||||||
graphics = {
|
graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, lib, pkgs, stylix, hwconfig, first-nixos-install, username, inputs, ... }:
|
{ config, lib, pkgs, hwconfig, first-nixos-install, username, inputs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
in
|
in
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{ pkgs, lib, hwconfig, inputs, ... }:
|
{ pkgs, lib, hwconfig, inputs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
../../hardware/nvidia
|
||||||
|
|
||||||
../../modules/hyprland
|
../../modules/hyprland
|
||||||
|
|
||||||
../../modules/libvirt
|
../../modules/libvirt
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
{ lib, ... }:
|
{ lib, inputs, ... }:
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.impermanence.nixosModules.impermanence
|
||||||
|
];
|
||||||
fileSystems."/persist".neededForBoot = true;
|
fileSystems."/persist".neededForBoot = true;
|
||||||
environment.persistence."/persist/system" = {
|
environment.persistence."/persist/system" = {
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, lib, hwconfig, inputs, stylix, first-nixos-install, ... }:
|
{ pkgs, config, lib, hwconfig, inputs, first-nixos-install, ... }:
|
||||||
let username = "kylekrein";
|
let username = "kylekrein";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -18,7 +18,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users."${username}" = import ../../home.nix { inherit lib; inherit username; inherit inputs; inherit stylix; inherit first-nixos-install; inherit hwconfig; inherit config; inherit pkgs; };
|
home-manager.users."${username}" = import ../../home.nix { inherit lib; inherit username; inherit inputs; inherit first-nixos-install; inherit hwconfig; inherit config; inherit pkgs; };
|
||||||
kylekrein.services.autoUpgrade = {
|
kylekrein.services.autoUpgrade = {
|
||||||
configDir = lib.mkForce "/home/${username}/nixos-config";
|
configDir = lib.mkForce "/home/${username}/nixos-config";
|
||||||
user = lib.mkForce username;
|
user = lib.mkForce username;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, lib, hwconfig, inputs, stylix, first-nixos-install, ... }:
|
{ pkgs, config, lib, hwconfig, inputs, first-nixos-install, ... }:
|
||||||
let username = "tania";
|
let username = "tania";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -20,6 +20,6 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users."${username}" = import ../../home.nix { inherit lib; inherit username; inherit inputs; inherit stylix; inherit first-nixos-install; inherit hwconfig; inherit config; inherit pkgs; };
|
home-manager.users."${username}" = import ../../home.nix { inherit lib; inherit username; inherit inputs; inherit first-nixos-install; inherit hwconfig; inherit config; inherit pkgs; };
|
||||||
systemd.tmpfiles.rules = (if hwconfig.useImpermanence then ["d /persist/home/${username} 0700 ${username} users -"] else []); # /persist/home/<user> created, owned by that user
|
systemd.tmpfiles.rules = (if hwconfig.useImpermanence then ["d /persist/home/${username} 0700 ${username} users -"] else []); # /persist/home/<user> created, owned by that user
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue