summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian T <julian@jtle.dk>2021-03-28 00:24:28 +0100
committerJulian T <julian@jtle.dk>2021-03-28 00:24:28 +0100
commitdedff3809b3d0bca1ad309cfb6e7648b029485f4 (patch)
tree2c56d1e81e11396e09d27efeb56b08cbf4a33061
parentea6c7b65ba32b4be09ef4c7a8532b239c03f120d (diff)
Move more things from core to desktop, and add iso file
-rw-r--r--core.nix44
-rw-r--r--desktop.nix51
-rw-r--r--iso.nix17
-rw-r--r--pc_t14.nix23
4 files changed, 86 insertions, 49 deletions
diff --git a/core.nix b/core.nix
index 7c71927..801a940 100644
--- a/core.nix
+++ b/core.nix
@@ -13,14 +13,8 @@
};
};
- # Enable sound.
- sound.enable = true;
-
hardware = {
- opengl.enable = true;
enableRedistributableFirmware = true;
-
- bluetooth.enable = false;
};
networking = {
@@ -50,29 +44,6 @@
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
- programs = {
- ssh.startAgent = false;
- gnupg.agent = {
- enable = true;
- enableSSHSupport = true;
- pinentryFlavor = "gtk2";
- };
- };
- programs.dconf.enable = true;
-
- services = {
- udev.packages = [ pkgs.yubikey-personalization ];
- };
-
- # Define a user account. Don't forget to set a password with ‘passwd’.
- users.users.julian = {
- isNormalUser = true;
- shell = pkgs.zsh;
- extraGroups = [ "wheel" "video" "vboxusers" "cdrom" ];
- };
-
- virtualisation.docker.enable = false;
-
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database
# servers. You should change this only after NixOS release notes say you
@@ -85,17 +56,10 @@
environment = {
systemPackages = with pkgs; [
# General stuff
- wget vim neovim git htop zsh stow pass tree dnsutils gnupg zip
- unzip tig file imagemagick whois nmap usbutils lshw gnumake
- aspell aspellDicts.da aspellDicts.en pv acpi jq killall netcat-gnu perl gopass
- cowsay gdb man-pages sox gcc binutils python3 python
-
- # Nixos stuff
- nox
-
- # Network stuff
- networkmanagerapplet networkmanager-openconnect iw batctl
- wirelesstools
+ wget vim neovim git htop zsh tree dnsutils zip
+ unzip tig file whois nmap usbutils lshw gnumake
+ aspell pv jq killall netcat-gnu perl
+ cowsay man-pages gcc binutils python3 python
];
};
}
diff --git a/desktop.nix b/desktop.nix
index 136b35c..4882cf7 100644
--- a/desktop.nix
+++ b/desktop.nix
@@ -1,15 +1,23 @@
{ config, pkgs, ... }:
{
- hardware.pulseaudio = {
- enable = true;
- # Stupid but need it to control sound from acpid
- # systemWide = true;
+ hardware = {
+ pulseaudio = {
+ enable = true;
+ # Stupid but need it to control sound from acpid
+ # systemWide = true;
+
+ # Enable bluetooth audio
+ package = pkgs.pulseaudioFull;
+ };
+
+ bluetooth.enable = true;
- # Enable bluetooth audio
- package = pkgs.pulseaudioFull;
+ opengl.enable = true;
};
+ sound.enable = true;
+
services = {
xserver = {
enable = true;
@@ -58,8 +66,28 @@
GRANT ALL PRIVILEGES ON DATABASE julian TO julian;
'';
};
+
+ blueman.enable = true;
+
+ udev.packages = [ pkgs.yubikey-personalization ];
};
+ programs = {
+ gnupg.agent = {
+ enable = true;
+ enableSSHSupport = true;
+ pinentryFlavor = "gtk2";
+ };
+
+ dconf.enable = true;
+ };
+
+ # Define a user account. Don't forget to set a password with ‘passwd’.
+ users.users.julian = {
+ isNormalUser = true;
+ shell = pkgs.zsh;
+ extraGroups = [ "wheel" "video" "vboxusers" "cdrom" ];
+ };
virtualisation.virtualbox.host.enable = true;
@@ -68,7 +96,15 @@
];
environment.systemPackages = with pkgs; [
- gopass
+ # General stuff
+ gopass stow pass gnupg imagemagick acpi gdb sox
+
+ # Nixos stuff
+ nox
+
+ # Network stuff
+ networkmanagerapplet networkmanager-openconnect iw
+ wirelesstools
# Developing
rustup gcc go clang-tools
@@ -90,5 +126,6 @@
# Other stuff
texlive.combined.scheme-medium biber
youtube-dl sshpass python38Packages.pynvim
+ aspellDicts.da aspellDicts.en
];
}
diff --git a/iso.nix b/iso.nix
new file mode 100644
index 0000000..0396651
--- /dev/null
+++ b/iso.nix
@@ -0,0 +1,17 @@
+# This module defines a small NixOS installation CD. It does not
+# contain any graphical stuff.
+{config, pkgs, ...}:
+{
+ imports = [
+ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix>
+
+ # Provide an initial copy of the NixOS channel so that the user
+ # doesn't need to run "nix-channel --update" first.
+ <nixpkgs/nixos/modules/installer/cd-dvd/channel.nix>
+
+ ./core.nix
+
+ # Include extra stuff for specific pc etc.
+ # ./pc_t14.nix
+ ];
+}
diff --git a/pc_t14.nix b/pc_t14.nix
index fa536f0..489b67d 100644
--- a/pc_t14.nix
+++ b/pc_t14.nix
@@ -23,11 +23,30 @@
};
};
+ initrd.kernelModules = [ "amdgpu" ];
};
- hardware.acpilight.enable = true;
+ hardware = {
+ acpilight.enable = true;
- services.tlp.enable = true;
+ opengl = {
+ driSupport = true;
+ driSupport32Bit = true;
+
+ extraPackages = with pkgs; [
+ amdvlk
+ ];
+
+ extraPackages32 = with pkgs; [
+ driversi686Linux.amdvlk
+ ];
+ };
+ };
+
+ services = {
+ tlp.enable = true;
+ xserver.videoDrivers = ["amdgpu"];
+ };
environment.systemPackages = with pkgs; [
linuxPackages.acpi_call