separate into machine and user specific profiles

This commit is contained in:
atagen 2022-08-18 20:38:00 +10:00
parent 7d9fe63a4a
commit 3849967624
6 changed files with 95 additions and 49 deletions

14
home/fossil.nix Normal file
View file

@ -0,0 +1,14 @@
{ config, pkgs, ... }:
{
home.username = "fossil";
home.homeDirectory = "/home/fossil";
home.packages = with pkgs; [
cmus
zellij
steam
];
}

View file

@ -1,21 +1,21 @@
{ config, pkgs, ... }:
{
imports = [
# who are you?
# ./fossil.nix
# ./plank.nix
];
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
(import "${fetchTarball "https://github.com/nix-community/fenix/archive/main.tar.gz"}/overlay.nix")
];
home.username = "fossil";
home.homeDirectory = "/home/fossil";
home.packages = with pkgs; [
kitty
firefox
thunderbird
cmus
zellij
btop
steam
rust-analyzer-nightly
(fenix.complete.withComponents [

8
home/plank.nix Normal file
View file

@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
home.username = "plank";
home.homeDirectory = "/home/plank";
}

21
system/adrift.nix Normal file
View file

@ -0,0 +1,21 @@
{ config, pkgs, ... }:
{
networking.hostName = "adrift"; # Define your hostname.
services.xserver.videoDrivers = [ "i915" ];
users.users.plank = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
fileSystems."/" = {
device = "/dev/mapper/nix-os";
fsType = "ext4";
};
fileSystems."/home" = {
device = "/dev/mapper/nix-home";
fsType = "ext4";
};
}

View file

@ -1,6 +1,3 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
@ -11,13 +8,19 @@
[ # Include the results of the hardware scan.
./hardware-configuration.nix
<home-manager/nixos>
# where are we ?
# ./wollomi.nix
# ./adrift.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 5;
boot.loader.systemd-boot.consoleMode = "max";
boot.loader.timeout = 3;
boot.loader.efi.canTouchEfiVariables = true;
boot.plymouth.enable = true;
networking.hostName = "wollomi"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
@ -37,39 +40,23 @@
useXkbConfig = true; # use xkbOptions in tty.
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# dlna
services.minidlna = {
enable = true;
announceInterval = 120;
friendlyName = "PC";
mediaDirs = [ "A,/data/Music/Slsk" ];
};
# enable nvidia
nixpkgs.config.allowUnfree = true;
services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
hardware.opengl.driSupport32Bit = true;
#input stuff
hardware.ckb-next.enable = true;
services.xserver.layout = "us";
# services.xserver.xkbOptions = {
# "eurosign:e";
# "caps:escape" # map caps to escape.
# };
services.xserver.enable = true;
services.xserver.layout = "us";
# kde time
services.xserver.desktopManager.plasma5.enable = true;
services.xserver.displayManager.sddm.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
services.xserver.desktopManager.plasma5.runUsingSystemd = true;
# Enable sound.
security.rtkit.enable = true;
@ -90,10 +77,6 @@
qt5.style = "gtk2";
# Define a user account. Don't forget to set a password with passwd.
users.users.fossil = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
programs.zsh.enable = true;
users.defaultUserShell = pkgs.zsh;
@ -104,8 +87,6 @@
helix
rnix-lsp
ckb-next
home-manager
git
@ -120,20 +101,6 @@
# enableSSHSupport = true;
# };
fileSystems."/" = {
device = "/dev/mapper/linux-nix";
fsType = "ext4";
};
fileSystems."/home" = {
device = "/dev/mapper/linux-home";
fsType = "btrfs";
};
fileSystems."/data" = {
device = "/dev/sdb1";
fsType = "ntfs";
};
# List services that you want to enable:
@ -145,7 +112,6 @@
# networking.firewall.allowedTCPPorts = [ 8200 ];
# networking.firewall.allowedUDPPorts = [ 1900 ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you

37
system/wollomi.nix Normal file
View file

@ -0,0 +1,37 @@
{ config, pkgs, ... }:
{
networking.hostName = "wollomi"; # Define your hostname.
# dlna
services.minidlna = {
enable = true;
announceInterval = 120;
friendlyName = "PC";
mediaDirs = [ "A,/data/Music/Slsk" ];
};
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
hardware.ckb-next.enable = true;
users.users.fossil = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
};
environment.systemPackages = with pkgs; [
ckb-next
];
fileSystems."/" = {
device = "/dev/mapper/linux-nix";
fsType = "ext4";
};
fileSystems."/home" = {
device = "/dev/mapper/linux-home";
fsType = "btrfs";
};
fileSystems."/data" = {
device = "/dev/sdb1";
fsType = "ntfs";
};
networking.firewall.enable = false;
}