preserving hardware-configuration
This commit is contained in:
parent
8d34db82c8
commit
120d26b0e4
13 changed files with 181 additions and 207 deletions
70
flake.nix
70
flake.nix
|
|
@ -43,61 +43,41 @@
|
|||
nova = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
|
||||
./hosts/nova
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
}
|
||||
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.till = {
|
||||
imports = [ ./home ];
|
||||
};
|
||||
};
|
||||
}
|
||||
users = {
|
||||
|
||||
till = {
|
||||
imports = [
|
||||
./home
|
||||
./users/till-home.nix
|
||||
];
|
||||
};
|
||||
|
||||
alt = { imports = [ ./home/alt.nix ]; };
|
||||
guest = { imports = [ ./home/guest.nix ]; };
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# homeConfigurations = {
|
||||
# till = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux.extend inputs.nur.overlays.default;
|
||||
# extraSpecialArgs = { inherit inputs; };
|
||||
# modules = [
|
||||
# ./home
|
||||
# ];
|
||||
# };
|
||||
# "till@romulus" = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux.extend inputs.nur.overlays.default;
|
||||
# extraSpecialArgs = { inherit inputs; };
|
||||
# modules = [
|
||||
# ./home/slim-desktop.nix
|
||||
# ];
|
||||
# };
|
||||
# "till@arielle" = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
# extraSpecialArgs = { inherit inputs; };
|
||||
# modules = [
|
||||
# ./home/on-server.nix
|
||||
# ];
|
||||
# };
|
||||
# alt = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux.extend inputs.nur.overlays.default;
|
||||
# extraSpecialArgs = { inherit inputs; };
|
||||
# modules = [
|
||||
# ./home/alt.nix
|
||||
# ];
|
||||
# };
|
||||
# guest = home-manager.lib.homeManagerConfiguration {
|
||||
# pkgs = nixpkgs.legacyPackages.x86_64-linux.extend inputs.nur.overlays.default;
|
||||
# extraSpecialArgs = { inherit inputs; };
|
||||
# modules = [
|
||||
# ./home/guest.nix
|
||||
# ];
|
||||
# };
|
||||
# };
|
||||
{
|
||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||
builtins.elem (nixpkgs.lib.getName pkg) [
|
||||
"corefonts"
|
||||
"textfonts"
|
||||
"keymapp"
|
||||
"steam"
|
||||
"steam-unwrapped"
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
19
home/alt.nix
19
home/alt.nix
|
|
@ -1,19 +1,6 @@
|
|||
{ config, pkgs, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
home.username = "alt";
|
||||
home.homeDirectory = "/home/alt";
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
|
|
@ -25,10 +12,6 @@
|
|||
templates = "${config.xdg.dataHome}/templates";
|
||||
};
|
||||
|
||||
home.file.".npmrc".text = ''
|
||||
prefix = ${config.xdg.dataHome}/npm/packages
|
||||
'';
|
||||
|
||||
home.packages = with pkgs; [
|
||||
fzf
|
||||
silver-searcher
|
||||
|
|
@ -37,7 +20,6 @@
|
|||
wl-clipboard
|
||||
qbittorrent
|
||||
vlc
|
||||
# mullvad-vpn
|
||||
ffmpeg
|
||||
libnotify
|
||||
];
|
||||
|
|
@ -50,6 +32,7 @@
|
|||
./vifm
|
||||
./tmux
|
||||
./nvim
|
||||
./minimal.nix
|
||||
];
|
||||
|
||||
programs.nix-index = {
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./khard-dump.nix
|
||||
./tasks.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
castget
|
||||
drawing
|
||||
feh
|
||||
ghostscript
|
||||
ghostscript
|
||||
hunspell
|
||||
hunspellDicts.de_DE
|
||||
|
|
@ -19,7 +17,6 @@
|
|||
hyphenDicts.de_DE
|
||||
hyphenDicts.en_US
|
||||
imagemagick
|
||||
imagemagick
|
||||
khal
|
||||
khard
|
||||
msmtp
|
||||
|
|
@ -28,21 +25,7 @@
|
|||
pandoc
|
||||
pdftk
|
||||
ripmime
|
||||
taskopen
|
||||
urlscan
|
||||
w3m
|
||||
zathura
|
||||
];
|
||||
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [ lazy-nvim ];
|
||||
|
||||
xdg.configFile."nvim/lua/woof-vim.lua".text = ''
|
||||
return {
|
||||
"woof-vim",
|
||||
name = "woof-vim",
|
||||
dev = {
|
||||
path = "~/devel"
|
||||
}
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
22
home/cli-office/tasks.nix
Normal file
22
home/cli-office/tasks.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
taskopen
|
||||
];
|
||||
|
||||
programs.taskwarrior = {
|
||||
enable = true;
|
||||
package = pkgs.taskwarrior3;
|
||||
dataLocation = "${config.xdg.dataHome}/taskwarrior/tasks";
|
||||
colorTheme = "light-256";
|
||||
config = {
|
||||
report.list.columns = ["id" "depends.indicator" "priority" "project" "recur.indicator" "scheduled.countdown" "due" "until.age" "status.short" "description.count" "tags"];
|
||||
report.list.labels= ["ID" "D" "Prio" "Proj" "R" "Scheduled" "Due" "Until" "S" "Description" "Tags"];
|
||||
};
|
||||
extraConfig = "
|
||||
hooks.location=${config.xdg.dataHome}/taskwarrior/hooks
|
||||
verbose=affected,context,edit,label,header,new-id,project,special,sync,recur
|
||||
";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,15 +1,17 @@
|
|||
{ config, pkgs, inputs, lib, ... }:
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
home.username = "till";
|
||||
home.homeDirectory = "/home/till";
|
||||
|
||||
imports = [
|
||||
./slim-desktop.nix
|
||||
./gnome
|
||||
./firefox.nix
|
||||
./librewolf.nix
|
||||
./tex.nix
|
||||
|
||||
./fonts.nix
|
||||
./gnome
|
||||
./r.nix
|
||||
./tex.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
|
@ -53,5 +55,4 @@
|
|||
];
|
||||
|
||||
programs.obs-studio.enable = true;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
{ config, pkgs, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
home.file.".npmrc".text = ''
|
||||
prefix = ${config.xdg.dataHome}/npm/packages
|
||||
'';
|
||||
|
||||
home.packages = with pkgs; [
|
||||
bundler
|
||||
bundix
|
||||
|
|
|
|||
|
|
@ -228,6 +228,17 @@
|
|||
passwordCommand = "pass other/ksh_systemli";
|
||||
};
|
||||
|
||||
programs.neovim.plugins = with pkgs.vimPlugins; [ lazy-nvim ];
|
||||
|
||||
xdg.configFile."nvim/lua/woof-vim.lua".text = ''
|
||||
return {
|
||||
"woof-vim",
|
||||
name = "woof-vim",
|
||||
dev = {
|
||||
path = "~/devel"
|
||||
}
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,8 @@
|
|||
{ config, pkgs, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
home.username = "till";
|
||||
home.homeDirectory = "/home/till";
|
||||
home.stateVersion = "22.11";
|
||||
|
||||
# nixpkgs = {
|
||||
# config = {
|
||||
# allowUnfree = true;
|
||||
# allowUnfreePredicate = (_: true);
|
||||
# };
|
||||
# };
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
|
||||
desktop = "${config.home.homeDirectory}/desktop";
|
||||
documents = "${config.home.homeDirectory}/misc";
|
||||
download = "${config.home.homeDirectory}/tmp";
|
||||
music = "${config.home.homeDirectory}/media/music";
|
||||
pictures = "${config.home.homeDirectory}/media/img";
|
||||
publicShare = "${config.home.homeDirectory}/box";
|
||||
templates = "${config.xdg.dataHome}/templates";
|
||||
videos = "${config.home.homeDirectory}/media/vid";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
dust
|
||||
fzf
|
||||
|
|
@ -75,4 +51,5 @@
|
|||
settings.styles.theme = "default-light";
|
||||
};
|
||||
|
||||
home.stateVersion = "22.11";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,8 @@
|
|||
{ config, pkgs, inputs, lib, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
home.file.".npmrc".text = ''
|
||||
prefix = ${config.xdg.dataHome}/npm/packages
|
||||
'';
|
||||
|
||||
imports = [
|
||||
./minimal.nix
|
||||
./devel.nix
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,53 +1,45 @@
|
|||
{ config, pkgs, inputs, lib, ... }:
|
||||
|
||||
{
|
||||
xdg.userDirs.createDirectories = true;
|
||||
imports = [
|
||||
./minimal.nix
|
||||
|
||||
home.file.".npmrc".text = ''
|
||||
prefix = ${config.xdg.dataHome}/npm/packages
|
||||
'';
|
||||
|
||||
xdg.configFile."castget/castget.conf".source = ./castget/castget.conf;
|
||||
./calendars.nix
|
||||
./cli-office
|
||||
./devel.nix
|
||||
./firefox.nix
|
||||
./foot.nix
|
||||
./mail
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
||||
aichat
|
||||
appimage-run
|
||||
drawing
|
||||
feh
|
||||
keepassxc
|
||||
usbutils
|
||||
vlc
|
||||
wl-clipboard
|
||||
yubioath-flutter
|
||||
|
||||
zathura
|
||||
];
|
||||
|
||||
imports = [
|
||||
./minimal.nix
|
||||
./devel.nix
|
||||
./calendars.nix
|
||||
./foot.nix
|
||||
./mail
|
||||
./cli-office
|
||||
];
|
||||
|
||||
programs.taskwarrior = {
|
||||
|
||||
xdg.userDirs = {
|
||||
enable = true;
|
||||
package = pkgs.taskwarrior3;
|
||||
|
||||
dataLocation = "${config.xdg.dataHome}/taskwarrior/tasks";
|
||||
|
||||
colorTheme = "light-256";
|
||||
config = {
|
||||
report.list.columns = ["id" "depends.indicator" "priority" "project" "recur.indicator" "scheduled.countdown" "due" "until.age" "status.short" "description.count" "tags"];
|
||||
report.list.labels= ["ID" "D" "Prio" "Proj" "R" "Scheduled" "Due" "Until" "S" "Description" "Tags"];
|
||||
};
|
||||
extraConfig = "
|
||||
hooks.location=${config.xdg.dataHome}/taskwarrior/hooks
|
||||
verbose=affected,context,edit,label,header,new-id,project,special,sync,recur
|
||||
";
|
||||
createDirectories = true;
|
||||
desktop = "${config.home.homeDirectory}/desktop";
|
||||
documents = "${config.home.homeDirectory}/misc";
|
||||
download = "${config.home.homeDirectory}/tmp";
|
||||
music = "${config.home.homeDirectory}/media/music";
|
||||
pictures = "${config.home.homeDirectory}/media/img";
|
||||
publicShare = "${config.home.homeDirectory}/box";
|
||||
templates = "${config.xdg.dataHome}/templates";
|
||||
videos = "${config.home.homeDirectory}/media/vid";
|
||||
};
|
||||
|
||||
xdg.configFile."castget/castget.conf".source = ./castget/castget.conf;
|
||||
|
||||
services.syncthing.enable = true;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{ config, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
networking.hostName = "nova";
|
||||
|
||||
imports = [
|
||||
./hardware.nix
|
||||
./hardware-configuration.nix
|
||||
../../users/alt.nix
|
||||
../../users/guest.nix
|
||||
../../system
|
||||
|
|
@ -15,4 +15,40 @@
|
|||
../../system/desktop/steam.nix
|
||||
../../system/desktop/yubikey-pam.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelModules = [ "v4l2loopback" ];
|
||||
boot.kernelParams = [ "psmouse.elantech_smbus=0" ];
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
||||
|
||||
boot.initrd.luks.devices."cryptroot".allowDiscards = true;
|
||||
|
||||
fileSystems."/".options = [
|
||||
"compress=zstd"
|
||||
"discard=async"
|
||||
];
|
||||
|
||||
fileSystems."/nix".options = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
"discard=async"
|
||||
];
|
||||
|
||||
fileSystems."/home".options = [
|
||||
"compress=zstd"
|
||||
"discard=async"
|
||||
];
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/swapfile";
|
||||
size = 8 * 1045;
|
||||
}
|
||||
];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
hardware.trackpoint.enable = true;
|
||||
|
||||
}
|
||||
|
|
|
|||
46
hosts/nova/hardware-configuration.nix
Normal file
46
hosts/nova/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/cryptroot";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=root" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/eaad533f-8586-4002-9c53-5aecf8e7abd8";
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/mapper/cryptroot";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/mapper/cryptroot";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/7362-C4C4";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
let
|
||||
subvolume = {
|
||||
device = "/dev/disk/by-uuid/6a0d25d4-0253-4467-85cc-ab3e0ef71f54";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" "v4l2loopback" ];
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ];
|
||||
|
||||
boot.initrd.luks.devices."cryptroot" = {
|
||||
device = "/dev/disk/by-uuid/eaad533f-8586-4002-9c53-5aecf8e7abd8";
|
||||
allowDiscards = true;
|
||||
};
|
||||
|
||||
fileSystems."/" = subvolume // {
|
||||
options = [ "subvol=root" "compress=zstd" "discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = subvolume // {
|
||||
options = [ "subvol=nix" "compress=zstd" "noatime" "discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" = subvolume // {
|
||||
options = [ "subvol=home" "compress=zstd" "discard=async" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/7362-C4C4";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [{
|
||||
device = "/swapfile";
|
||||
size = 8 * 1045;
|
||||
}];
|
||||
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.trackpoint.enable = true;
|
||||
boot.kernelParams = [ "psmouse.elantech_smbus=0" ];
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue