Compare commits
No commits in common. "3a7334c3b914499386cfec4867cb5095fa22b77a" and "571196db9d95bf7ce3df958f1a389d6a4258c514" have entirely different histories.
3a7334c3b9
...
571196db9d
@ -23,6 +23,19 @@
|
|||||||
|
|
||||||
networking.hostName = "MaxNixosLaptop"; # Define your hostname.
|
networking.hostName = "MaxNixosLaptop"; # Define your hostname.
|
||||||
|
|
||||||
|
# NIXOS
|
||||||
|
nix.settings = {
|
||||||
|
experimental-features = ["nix-command" "flakes"];
|
||||||
|
substituters = ["https://cache.nixos.org" "https://nix-community.cachix.org"];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
auto-optimise-store = true;
|
||||||
|
max-jobs = "auto";
|
||||||
|
cores = 12;
|
||||||
|
};
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.max = {
|
users.users.max = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.myConfig.cache;
|
|
||||||
in {
|
|
||||||
options.myConfig.cache = {
|
|
||||||
enable = lib.mkEnableOption "extra binary caches";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
nix.settings = {
|
|
||||||
substituters = ["https://nix-community.cachix.org"];
|
|
||||||
trusted-public-keys = [
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -10,7 +10,7 @@ in {
|
|||||||
enable = lib.mkEnableOption "printing";
|
enable = lib.mkEnableOption "printing";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = {
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing = {
|
services.printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
}: let
|
}: let
|
||||||
cfg = config.myConfig;
|
cfg = config.myConfig;
|
||||||
in {
|
in {
|
||||||
imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix ./touch.nix ./cache.nix ./nix.nix];
|
imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix ./touch.nix];
|
||||||
|
|
||||||
options.myConfig = {
|
options.myConfig = {
|
||||||
enable = lib.mkEnableOption "my custom config";
|
enable = lib.mkEnableOption "my custom config";
|
||||||
@ -17,7 +17,6 @@ in {
|
|||||||
bootloader.enable = true;
|
bootloader.enable = true;
|
||||||
locale.enable = true;
|
locale.enable = true;
|
||||||
rebuild.enable = true;
|
rebuild.enable = true;
|
||||||
cache.enable = true;
|
|
||||||
|
|
||||||
greetd.enable = lib.mkIf cfg.desktop true;
|
greetd.enable = lib.mkIf cfg.desktop true;
|
||||||
sway.enable = lib.mkIf cfg.desktop true;
|
sway.enable = lib.mkIf cfg.desktop true;
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
{...}: {
|
|
||||||
config = {
|
|
||||||
nix.settings = {
|
|
||||||
experimental-features = ["nix-command" "flakes"];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
max-jobs = "auto";
|
|
||||||
cores = 1;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
@ -21,13 +21,14 @@
|
|||||||
${pkgs.alejandra}/bin/alejandra . #&>/dev/null
|
${pkgs.alejandra}/bin/alejandra . #&>/dev/null
|
||||||
|
|
||||||
# Shows your changes
|
# Shows your changes
|
||||||
${pkgs.git}/bin/git diff -U0
|
${pkgs.git}/bin/git diff -U0 *.nix
|
||||||
|
|
||||||
echo "NixOS Rebuilding..."
|
echo "NixOS Rebuilding..."
|
||||||
|
|
||||||
# echo using sudo so we get feedback after unlocking
|
# echo using sudo so we get feedback after unlocking
|
||||||
sudo echo "Beginning rebuild"
|
sudo echo "Beginning rebuild"
|
||||||
# Rebuild, output simplified errors, log trackebacks
|
# Rebuild, output simplified errors, log trackebacks
|
||||||
|
# sudo nixos-rebuild switch &>nixos-switch.log || (${pkgs.coreutils}/bin/cat nixos-switch.log | ${pkgs.gnugrep}/bin/grep --color error && false)
|
||||||
sudo nixos-rebuild switch
|
sudo nixos-rebuild switch
|
||||||
|
|
||||||
# Get current generation metadata
|
# Get current generation metadata
|
||||||
|
Loading…
x
Reference in New Issue
Block a user