add hm
This commit is contained in:
parent
ddaf32e68a
commit
b028ddcdc5
5 changed files with 74 additions and 17 deletions
43
flake.lock
43
flake.lock
|
@ -28,7 +28,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"utils": "utils_3"
|
"utils": "utils_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648475189,
|
"lastModified": 1648475189,
|
||||||
|
@ -179,6 +179,27 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"utils": "utils_2"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1660574517,
|
||||||
|
"narHash": "sha256-Lp5D2pAPrM3iAc1eeR0iGwz5rM+SYOWzVxI3p17nlrU=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "688e5c85b7537f308b82167c8eb4ecfb70a49861",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"lowdown-src": {
|
"lowdown-src": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -216,7 +237,7 @@
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
],
|
||||||
"utils": "utils_2"
|
"utils": "utils_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1660631203,
|
"lastModified": 1660631203,
|
||||||
|
@ -356,6 +377,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"colmena": "colmena",
|
"colmena": "colmena",
|
||||||
|
"home-manager": "home-manager",
|
||||||
"minecraft-servers": "minecraft-servers",
|
"minecraft-servers": "minecraft-servers",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"serokell-nix": "serokell-nix",
|
"serokell-nix": "serokell-nix",
|
||||||
|
@ -419,6 +441,21 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils_2": {
|
"utils_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1653893745,
|
||||||
|
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"utils_3": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_2"
|
"flake-utils": "flake-utils_2"
|
||||||
},
|
},
|
||||||
|
@ -436,7 +473,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"utils_3": {
|
"utils_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648297722,
|
"lastModified": 1648297722,
|
||||||
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
||||||
|
|
|
@ -19,10 +19,15 @@
|
||||||
|
|
||||||
minecraft-servers.url = "github:jyooru/nix-minecraft-servers";
|
minecraft-servers.url = "github:jyooru/nix-minecraft-servers";
|
||||||
minecraft-servers.inputs.nixpkgs.follows = "nixpkgs";
|
minecraft-servers.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
{ self, nixpkgs, vault-secrets, serokell-nix, minecraft-servers, colmena, ... }@inputs:
|
{ self, nixpkgs, vault-secrets, serokell-nix, minecraft-servers, colmena, home-manager, ... }@inputs:
|
||||||
let
|
let
|
||||||
inherit (nixpkgs) lib;
|
inherit (nixpkgs) lib;
|
||||||
inherit (builtins) filter mapAttrs attrValues concatLists;
|
inherit (builtins) filter mapAttrs attrValues concatLists;
|
||||||
|
@ -84,6 +89,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./nixos/common
|
./nixos/common
|
||||||
./nixos/hosts/other/null/configuration.nix
|
./nixos/hosts/other/null/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
deployment = {
|
deployment = {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# 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, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
|
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||||
|
@ -19,6 +19,12 @@ in
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# home-manager
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.victor = import ./home.nix;
|
||||||
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
@ -26,6 +32,9 @@ in
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
networking.interfaces.wlp0s20f3.useDHCP = true;
|
||||||
|
|
||||||
|
fileSystems."/".options = [ "compress=zstd" ];
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_GB.utf8";
|
i18n.defaultLocale = "en_GB.utf8";
|
||||||
|
@ -49,17 +58,13 @@ in
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
services.xserver.desktopManager.gnome.enable = true;
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
layout = "us";
|
layout = "us";
|
||||||
xkbVariant = "altgr-intl";
|
xkbVariant = "altgr-intl";
|
||||||
xkbOptions = "caps:swapescape";
|
xkbOptions = "caps:swapescape";
|
||||||
|
|
||||||
|
|
||||||
videoDrivers = [ "nvidia" ];
|
videoDrivers = [ "nvidia" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# modesetting
|
|
||||||
# hardware.nvidia.modesetting.enable = true;
|
# hardware.nvidia.modesetting.enable = true;
|
||||||
hardware.nvidia.prime = {
|
hardware.nvidia.prime = {
|
||||||
offload.enable = true;
|
offload.enable = true;
|
||||||
|
@ -67,13 +72,9 @@ in
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
};
|
};
|
||||||
|
|
||||||
specialisation = {
|
hardware.opengl.extraPackages = with pkgs; [
|
||||||
external-display.configuration = {
|
vaapiVdpau
|
||||||
system.nixos.tags = [ "external-display" ];
|
];
|
||||||
hardware.nvidia.prime.offload.enable = lib.mkForce false;
|
|
||||||
hardware.nvidia.powerManagement.enable = lib.mkForce false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
@ -101,6 +102,8 @@ in
|
||||||
vim
|
vim
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.fstrim.enable = true;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# 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`.
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
networking.useDHCP = lib.mkDefault true;
|
networking.useDHCP = lib.mkDefault true;
|
||||||
networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
11
nixos/hosts/other/null/home.nix
Normal file
11
nixos/hosts/other/null/home.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
home.username = "victor";
|
||||||
|
home.homeDirectory = "/home/victor";
|
||||||
|
home.stateVersion = "22.05";
|
||||||
|
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
programs.firefox = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.firefox-devedition-bin;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue