--wip-- [skip ci]

This commit is contained in:
Filippo Berto 2022-12-13 12:17:58 +01:00
parent df9e409448
commit 0c40f2cd09
4 changed files with 121 additions and 86 deletions

26
flake.lock generated
View file

@ -272,7 +272,31 @@
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nixpkgs-u": "nixpkgs-u", "nixpkgs-u": "nixpkgs-u",
"pre-commit-hooks": "pre-commit-hooks_2" "pre-commit-hooks": "pre-commit-hooks_2",
"tex2nix": "tex2nix"
}
},
"tex2nix": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1665144382,
"narHash": "sha256-CCnC3YsQCGoKIGdMND+pr5Rl7nufT1Krv1TZPBIEm8o=",
"owner": "Mic92",
"repo": "tex2nix",
"rev": "068e8655c754783d86f442f887f2e92305d9bd4a",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "tex2nix",
"type": "github"
} }
}, },
"utils": { "utils": {

View file

@ -18,6 +18,7 @@
nixos-hardware.url = "github:NixOS/nixos-hardware"; nixos-hardware.url = "github:NixOS/nixos-hardware";
nix-rice = { url = "github:bertof/nix-rice"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; nix-rice = { url = "github:bertof/nix-rice"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; };
pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; }; pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; };
tex2nix = { url = "github:Mic92/tex2nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; };
}; };
outputs = outputs =
@ -27,10 +28,11 @@
, home-manager , home-manager
, deploy-rs , deploy-rs
, flake-utils , flake-utils
# , nixos-generators # , nixos-generators
, nixos-hardware , nixos-hardware
, nix-rice , nix-rice
, pre-commit-hooks , pre-commit-hooks
, tex2nix
}: }:
let let
config = { config = {
@ -95,16 +97,11 @@
nix = { nix = {
package = pkgs.nixVersions.stable; package = pkgs.nixVersions.stable;
extraOptions = "experimental-features = nix-command flakes"; extraOptions = "experimental-features = nix-command flakes";
# registry = { registry = {
# stable = { stable = { from = { id = "stable"; type = "indirect"; }; flake = nixpkgs; };
# from = { unstable = { from = { id = "unstable"; type = "indirect"; }; flake = nixpkgs-u; };
# # id = "stable"; tex2nix = { from = { id = "tex2nix"; type = "indirect"; }; flake = tex2nix; };
# type = "indirect"; };
# };
# flake = nixpkgs;
# to = { owner = "nixos"; repo = "nixpkgs"; type = "github"; };
# };
# };
}; };
}) })

View file

@ -33,15 +33,6 @@ with lib; {
networkmanager.enable = true; networkmanager.enable = true;
# networkmanager.wifi.backend = "iwd"; # networkmanager.wifi.backend = "iwd";
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
useDHCP = false;
interfaces = {
enp60s0.useDHCP = true;
wlp0s20f3.useDHCP = true;
};
# Configure network proxy if necessary # Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/"; # proxy.default = "http://user:password@proxy:port/";
# proxy.noProxy = "127.0.0.1,localhost,internal.domain"; # proxy.noProxy = "127.0.0.1,localhost,internal.domain";

View file

@ -4,84 +4,105 @@
{ config, lib, modulesPath, ... }: { config, lib, modulesPath, ... }:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
options = [ "subvol=@root" "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@root" ];
};
fileSystems."/nix" = { fileSystems."/nix" =
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
options = [ "subvol=@nix" "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@nix" ];
};
fileSystems."/boot" = { fileSystems."/home/bertof" =
device = "/dev/disk/by-uuid/82DB-3444"; {
fsType = "vfat"; device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
options = [ "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@bertof/@home" ];
};
fileSystems."/home/bertof" = { fileSystems."/home/bertof/Giochi/SSD" =
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
options = [ "subvol=@bertof/@home" "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@bertof/@games" ];
};
fileSystems."/home/bertof/Documenti/Git" = { fileSystems."/home/bertof/Video" =
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
options = [ "subvol=@bertof/@git" "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@bertof/@videos" ];
};
fileSystems."/home/bertof/Immagini" = { fileSystems."/home/bertof/Giochi/SATA" =
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
options = [ "subvol=@bertof/@images" "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@bertof/@games" ];
};
fileSystems."/home/bertof/Video" = { fileSystems."/home/bertof/Musica" =
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
options = [ "subvol=@bertof/@videos" "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@bertof/@music" ];
};
fileSystems."/home/bertof/Documenti" = { fileSystems."/home/bertof/Immagini" =
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
options = [ "subvol=@bertof/@documents" "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@bertof/@images" ];
};
fileSystems."/home/bertof/Musica" = { fileSystems."/home/bertof/Scaricati" =
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
options = [ "subvol=@bertof/@music" "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@bertof/@downloads" ];
};
fileSystems."/home/bertof/Scaricati" = { fileSystems."/home/bertof/Documenti" =
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64";
options = [ "subvol=@bertof/@downloads" "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@bertof/@documents" ];
};
fileSystems."/home/bertof/Giochi/SSD" = { fileSystems."/home/bertof/Documenti/Git" =
device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c";
options = [ "subvol=@bertof/@games" "x-gvfs-hide" ]; fsType = "btrfs";
}; options = [ "subvol=@bertof/@git" ];
};
fileSystems."/home/bertof/Giochi/SATA" = { fileSystems."/boot" =
device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; {
fsType = "btrfs"; device = "/dev/disk/by-uuid/82DB-3444";
options = [ "subvol=@bertof/@games" "x-gvfs-hide" ]; fsType = "vfat";
}; };
fileSystems."/var/lib/docker/btrfs" =
{
device = "/home/bertof/Documenti/Git/@root/var/lib/docker/btrfs";
fsType = "none";
options = [ "bind" ];
};
swapDevices = swapDevices =
[{ device = "/dev/disk/by-uuid/5f3cf424-2bd8-4352-a778-1bb067cb5700"; }]; [{ device = "/dev/disk/by-uuid/5f3cf424-2bd8-4352-a778-1bb067cb5700"; }];
@ -92,11 +113,13 @@
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
# networking.useDHCP = lib.mkDefault true; # networking.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true; # networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp60s0.useDHCP = lib.mkDefault true; networking.interfaces.enp10s0u1u2.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; networking.interfaces.enp60s0.useDHCP = lib.mkDefault true;
# networking.interfaces.virbr0.useDHCP = lib.mkDefault true;
networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
# networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true; # networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }