392 current 2024-04-17 20:52:27 24.05.20240417.203fac8 6.8.6-zen1 nvidiaProduction nvidiaStable
This commit is contained in:
parent
5b3bae6ac3
commit
41c8af5bc1
6 changed files with 133 additions and 58 deletions
14
flake.lock
generated
14
flake.lock
generated
|
|
@ -190,11 +190,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713294767,
|
"lastModified": 1713391096,
|
||||||
"narHash": "sha256-LmaabaQZdx52MPGKPRt9Opoc9Gd9RbwvCdysUUYQoXI=",
|
"narHash": "sha256-5xkzsy+ILgQlmvDDipL5xqAehnjWBenAQXV4/NLg2dE=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "fa8c16e2452bf092ac76f09ee1fb1e9f7d0796e7",
|
"rev": "f46814ec7cbef9c2aef18ca1cbe89f2bb1e8c394",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -479,16 +479,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1713248628,
|
"lastModified": 1713368829,
|
||||||
"narHash": "sha256-NLznXB5AOnniUtZsyy/aPWOk8ussTuePp2acb9U+ISA=",
|
"narHash": "sha256-EreStuOxwalGOy5seV5PGc3zDT1Ppqj/4Q3ByAOGMnY=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "5672bc9dbf9d88246ddab5ac454e82318d094bb8",
|
"rev": "203fac824e2fdfed2e3a832b8123d9a64ee58b43",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-unstable",
|
"ref": "nixos-unstable-small",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
flake.nix
11
flake.nix
|
|
@ -79,6 +79,17 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nixosConfigurations.live = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = {inherit inputs;};
|
||||||
|
modules = [
|
||||||
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix"
|
||||||
|
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
|
||||||
|
./hosts/live/configuration.nix
|
||||||
|
inputs.home-manager.nixosModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
devShells = eachSystem (pkgs: {
|
devShells = eachSystem (pkgs: {
|
||||||
default = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,6 @@
|
||||||
|
|
||||||
services.udev.extraRules = ''KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev"'';
|
services.udev.extraRules = ''KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="plugdev"'';
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
|
||||||
|
|
@ -84,23 +83,6 @@
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services.printing.enable = true;
|
services.printing.enable = true;
|
||||||
|
|
||||||
# Enable sound with pipewire.
|
|
||||||
sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
alsa.support32Bit = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
# If you want to use JACK applications, uncomment this
|
|
||||||
#jack.enable = true;
|
|
||||||
|
|
||||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
|
||||||
# no need to redefine it in your config for now)
|
|
||||||
#media-session.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable OpenGL
|
# Enable OpenGL
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -112,6 +94,10 @@
|
||||||
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.sessionVariables = {
|
||||||
|
FLAKE = "/home/zack/nixos/";
|
||||||
|
};
|
||||||
|
|
||||||
environment.sessionVariables.DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
|
environment.sessionVariables.DEFAULT_BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||||
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
|
|
@ -123,33 +109,6 @@
|
||||||
|
|
||||||
users.groups.plugdev = {};
|
users.groups.plugdev = {};
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.users.zack = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "zack";
|
|
||||||
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "plugdev"];
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
packages = with pkgs; [
|
|
||||||
firefox
|
|
||||||
kate
|
|
||||||
rio
|
|
||||||
telegram-desktop
|
|
||||||
kitty
|
|
||||||
mailspring
|
|
||||||
# thunderbird
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
extraSpecialArgs = {inherit inputs;};
|
|
||||||
users = {
|
|
||||||
"zack" = {
|
|
||||||
imports = [../../modules/home-manager];
|
|
||||||
_module.args.theme = import ../../core/theme.nix;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,12 +25,30 @@
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# Enable sound with pipewire.
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
alsa.support32Bit = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
# If you want to use JACK applications, uncomment this
|
||||||
|
#jack.enable = true;
|
||||||
|
|
||||||
|
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||||
|
# no need to redefine it in your config for now)
|
||||||
|
#media-session.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
networking.hostName = "earth"; # Define your hostname.
|
networking.hostName = "earth"; # Define your hostname.
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
networking.networkmanager.unmanaged = ["enp6s0"];
|
networking.networkmanager.unmanaged = ["enp6s0"];
|
||||||
|
|
||||||
boot.supportedFilesystems = ["ntfs"];
|
boot.supportedFilesystems = ["ntfs"];
|
||||||
|
|
@ -94,6 +112,47 @@
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
specialisation = {
|
||||||
|
nvidiaProduction.configuration = {
|
||||||
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.production;
|
||||||
|
environment.etc."specialisation".text = "nvidiaProduction";
|
||||||
|
};
|
||||||
|
nvidiaStable.configuration = {
|
||||||
|
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
|
||||||
|
environment.etc."specialisation".text = "nvidiaStable";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.users.zack = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "zack";
|
||||||
|
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "plugdev"];
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
packages = with pkgs; [
|
||||||
|
firefox
|
||||||
|
kate
|
||||||
|
rio
|
||||||
|
telegram-desktop
|
||||||
|
kitty
|
||||||
|
mailspring
|
||||||
|
# thunderbird
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
extraSpecialArgs = {inherit inputs;};
|
||||||
|
users = {
|
||||||
|
"zack" = {
|
||||||
|
imports = [../../modules/home-manager/default.nix];
|
||||||
|
_module.args.theme = import ../../core/theme.nix;
|
||||||
|
|
||||||
|
home.username = "zack";
|
||||||
|
home.homeDirectory = "/home/zack";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
|
|
|
||||||
49
hosts/live/configuration.nix
Normal file
49
hosts/live/configuration.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
imports = [
|
||||||
|
../common/default.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
qemuGuest.enable = true;
|
||||||
|
openssh.settings.PermitRootLogin = lib.mkForce "yes";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
supportedFilesystems = lib.mkForce ["btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs"];
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
hostName = "live";
|
||||||
|
};
|
||||||
|
|
||||||
|
# gnome power settings do not turn off screen
|
||||||
|
systemd = {
|
||||||
|
services.sshd.wantedBy = pkgs.lib.mkForce ["multi-user.target"];
|
||||||
|
targets = {
|
||||||
|
sleep.enable = false;
|
||||||
|
suspend.enable = false;
|
||||||
|
hibernate.enable = false;
|
||||||
|
hybrid-sleep.enable = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.nixos = {
|
||||||
|
# imports = [../../modules/home-manager/default.nix];
|
||||||
|
_module.args.theme = import ../../core/theme.nix;
|
||||||
|
|
||||||
|
home.stateVersion = "23.11"; # Please read the comment before changing it.
|
||||||
|
|
||||||
|
home.username = "nixos";
|
||||||
|
home.homeDirectory = "/home/nixos";
|
||||||
|
};
|
||||||
|
users.extraUsers.root.password = "nixos";
|
||||||
|
}
|
||||||
|
|
@ -4,11 +4,6 @@
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
# Home Manager needs a bit of information about you and the paths it should
|
|
||||||
# manage.
|
|
||||||
home.username = "zack";
|
|
||||||
home.homeDirectory = "/home/zack";
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./swayidle.nix
|
./swayidle.nix
|
||||||
./vim/default.nix
|
./vim/default.nix
|
||||||
|
|
@ -104,6 +99,8 @@
|
||||||
|
|
||||||
pkgs.openvpn
|
pkgs.openvpn
|
||||||
|
|
||||||
|
pkgs.nix-output-monitor
|
||||||
|
|
||||||
pkgs.nh
|
pkgs.nh
|
||||||
|
|
||||||
pkgs.parsec-bin
|
pkgs.parsec-bin
|
||||||
|
|
@ -131,7 +128,7 @@
|
||||||
alejandra . &>/dev/null
|
alejandra . &>/dev/null
|
||||||
git add .
|
git add .
|
||||||
echo "[REBUILD]: rebuilding nixos"
|
echo "[REBUILD]: rebuilding nixos"
|
||||||
sudo nixos-rebuild switch --flake ~/nixos#earth --max-jobs 4
|
nh os switch
|
||||||
gen=$(nixos-rebuild list-generations | grep current)
|
gen=$(nixos-rebuild list-generations | grep current)
|
||||||
git commit -am "$gen"
|
git commit -am "$gen"
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue