Format files
This commit is contained in:
parent
40a4e0e21f
commit
8f204d6f50
18 changed files with 161 additions and 95 deletions
3
extern/default.nix
vendored
3
extern/default.nix
vendored
|
@ -25,6 +25,5 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
# passed to all home-manager modules
|
# passed to all home-manager modules
|
||||||
userSpecialArgs = {
|
userSpecialArgs = { };
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,8 @@
|
||||||
tests = nixos.lib.optionalAttrs (system == "x86_64-linux")
|
tests = nixos.lib.optionalAttrs (system == "x86_64-linux")
|
||||||
(import ./tests { inherit self pkgs; });
|
(import ./tests { inherit self pkgs; });
|
||||||
deployHosts = nixos.lib.filterAttrs
|
deployHosts = nixos.lib.filterAttrs
|
||||||
(n: _: self.nixosConfigurations.${n}.config.nixpkgs.system == system) self.deploy.nodes;
|
(n: _: self.nixosConfigurations.${n}.config.nixpkgs.system == system)
|
||||||
|
self.deploy.nodes;
|
||||||
deployChecks = deploy.lib.${system}.deployChecks { nodes = deployHosts; };
|
deployChecks = deploy.lib.${system}.deployChecks { nodes = deployHosts; };
|
||||||
in
|
in
|
||||||
nixos.lib.recursiveUpdate tests deployChecks;
|
nixos.lib.recursiveUpdate tests deployChecks;
|
||||||
|
|
|
@ -19,38 +19,39 @@
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/75b8df4a-8839-40cd-92ad-dc83007199f4";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/75b8df4a-8839-40cd-92ad-dc83007199f4";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/B940-3C52";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/B940-3C52";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/1b49df34-6db0-487a-9bb1-306ede0245b0"; }
|
[{ device = "/dev/disk/by-uuid/1b49df34-6db0-487a-9bb1-306ede0245b0"; }];
|
||||||
];
|
|
||||||
|
|
||||||
boot.kernelParams = [ "intel_pstate=no_hwp" ];
|
boot.kernelParams = [ "intel_pstate=no_hwp" ];
|
||||||
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
|
fileSystems."/".options = [ "noatime" "nodiratime" "discard" ];
|
||||||
|
|
||||||
|
|
||||||
boot.loader.grub = {
|
boot.loader.grub = {
|
||||||
enable= true;
|
enable = true;
|
||||||
version = 2;
|
version = 2;
|
||||||
device = "nodev";
|
device = "nodev";
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
enableCryptodisk = true;
|
enableCryptodisk = true;
|
||||||
gfxmodeEfi = "1024x768";
|
gfxmodeEfi = "1024x768";
|
||||||
};
|
};
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot";
|
boot.loader.efi.efiSysMountPoint = "/boot";
|
||||||
|
|
||||||
boot.initrd.luks.devices = {
|
boot.initrd.luks.devices = {
|
||||||
root = {
|
root = {
|
||||||
device = "/dev/disk/by-uuid/d51c0e1d-7b44-4011-bb8c-8773df2ca890";
|
device = "/dev/disk/by-uuid/d51c0e1d-7b44-4011-bb8c-8773df2ca890";
|
||||||
preLVM = true;
|
preLVM = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
46
hosts/tesco.nix
Normal file
46
hosts/tesco.nix
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
{ suites, ... }@inputs:
|
||||||
|
{
|
||||||
|
imports = builtins.trace (builtins.attrNames inputs) (suites.desktop ++ suites.amd);
|
||||||
|
|
||||||
|
# This value determines the NixOS release from which the default
|
||||||
|
# settings for stateful data, like file locations and database versions
|
||||||
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
# this value at the release version of the first install of this system.
|
||||||
|
# Before changing this value read the documentation for this option
|
||||||
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
|
system.stateVersion = "20.09"; # Did you read the comment?
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "tesco"; # Define your hostname.
|
||||||
|
networking.useDHCP = false;
|
||||||
|
networking.interfaces.enp6s0.useDHCP = true;
|
||||||
|
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/71831856-336e-43b5-9ed8-a657939f95a9";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/3B73-1D5D";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home/mae" =
|
||||||
|
{
|
||||||
|
device = "/dev/disk/by-uuid/d7e91b96-f7e1-4feb-84d4-4e024746d73e";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[{ device = "/dev/disk/by-uuid/99d35be0-8935-4cec-bf58-4f666db922f0"; }];
|
||||||
|
|
||||||
|
}
|
|
@ -37,9 +37,9 @@ rec {
|
||||||
let
|
let
|
||||||
# Everything that nix flake check requires for the packages output
|
# Everything that nix flake check requires for the packages output
|
||||||
filter = (n: v: with v; let platforms = meta.hydraPlatforms or meta.platforms or [ ]; in
|
filter = (n: v: with v; let platforms = meta.hydraPlatforms or meta.platforms or [ ]; in
|
||||||
lib.isDerivation v && !meta.broken && builtins.elem system platforms);
|
lib.isDerivation v && !meta.broken && builtins.elem system platforms);
|
||||||
in
|
in
|
||||||
lib.filterAttrs filter packages;
|
lib.filterAttrs filter packages;
|
||||||
|
|
||||||
safeReadDir = path: lib.optionalAttrs (builtins.pathExists path) (builtins.readDir path);
|
safeReadDir = path: lib.optionalAttrs (builtins.pathExists path) (builtins.readDir path);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,9 +4,9 @@ with lib;
|
||||||
let
|
let
|
||||||
mkHomes = host: config:
|
mkHomes = host: config:
|
||||||
mapAttrs' (user: v: nameValuePair "${user}@${host}" v)
|
mapAttrs' (user: v: nameValuePair "${user}@${host}" v)
|
||||||
config.config.system.build.homes;
|
config.config.system.build.homes;
|
||||||
|
|
||||||
hmConfigs = mapAttrs mkHomes self.nixosConfigurations;
|
hmConfigs = mapAttrs mkHomes self.nixosConfigurations;
|
||||||
|
|
||||||
in
|
in
|
||||||
foldl recursiveUpdate {} (attrValues hmConfigs)
|
foldl recursiveUpdate { } (attrValues hmConfigs)
|
||||||
|
|
|
@ -2,16 +2,16 @@
|
||||||
|
|
||||||
let mkProfileAttrs =
|
let mkProfileAttrs =
|
||||||
/**
|
/**
|
||||||
Synopsis: mkProfileAttrs _path_
|
Synopsis: mkProfileAttrs _path_
|
||||||
|
|
||||||
Recursively collect the subdirs of _path_ containing a default.nix into attrs.
|
Recursively collect the subdirs of _path_ containing a default.nix into attrs.
|
||||||
This sets a contract, eliminating ambiguity for _default.nix_ living under the
|
This sets a contract, eliminating ambiguity for _default.nix_ living under the
|
||||||
profile directory.
|
profile directory.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
let profiles = mkProfileAttrs ./profiles; in
|
let profiles = mkProfileAttrs ./profiles; in
|
||||||
assert profiles ? core.default; 0
|
assert profiles ? core.default; 0
|
||||||
**/
|
**/
|
||||||
dir:
|
dir:
|
||||||
let
|
let
|
||||||
imports =
|
imports =
|
||||||
|
|
13
profiles/amd/default.nix
Normal file
13
profiles/amd/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
|
hardware.opengl.driSupport = true;
|
||||||
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
|
||||||
|
hardware.opengl.extraPackages = with pkgs; [
|
||||||
|
rocm-opencl-icd
|
||||||
|
rocm-opencl-runtime
|
||||||
|
amdvlk
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
}
|
|
@ -27,6 +27,7 @@ in
|
||||||
manix
|
manix
|
||||||
moreutils
|
moreutils
|
||||||
nix-index
|
nix-index
|
||||||
|
tmux
|
||||||
nmap
|
nmap
|
||||||
ripgrep
|
ripgrep
|
||||||
whois
|
whois
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
clang
|
clang
|
||||||
nodejs
|
nodejs
|
||||||
python3
|
python3
|
||||||
libcxx
|
libcxx
|
||||||
git
|
git
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.steam
|
pkgs.steam
|
||||||
pkgs.lutris
|
pkgs.lutris
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
{ ... } : {
|
{ ... }: {
|
||||||
services.xserver.libinput.enable = true;
|
services.xserver.libinput.enable = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,6 @@
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
{
|
{
|
||||||
|
|
||||||
networking.interfaces.enp0s31f6.useDHCP = true;
|
|
||||||
networking.interfaces.wlp3s0.useDHCP = true;
|
|
||||||
|
|
||||||
xdg.portal.enable = true;
|
xdg.portal.enable = true;
|
||||||
|
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{ users, profiles, userProfiles, ... }:
|
{ users, profiles, userProfiles, ... }:
|
||||||
{
|
{
|
||||||
system = with profiles; rec {
|
system = with profiles; rec {
|
||||||
base = [users.mae users.root];
|
base = [ users.mae users.root ];
|
||||||
|
amd = [ profiles.amd ];
|
||||||
desktop = base ++ [ sway develop game workstation ssh users.mae users.root ];
|
desktop = base ++ [ sway develop game workstation ssh users.mae users.root ];
|
||||||
lap = desktop ++ [ laptop bluetooth print networkmanager ];
|
lap = desktop ++ [ laptop bluetooth print networkmanager ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -92,7 +92,7 @@ lib.runTests {
|
||||||
system = {
|
system = {
|
||||||
bar = [ profiles.foo.default ];
|
bar = [ profiles.foo.default ];
|
||||||
allProfiles = [ profiles.foo.default profiles.t.default ];
|
allProfiles = [ profiles.foo.default profiles.t.default ];
|
||||||
allUsers = [];
|
allUsers = [ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -3,55 +3,61 @@
|
||||||
home-manager.users.mae = {
|
home-manager.users.mae = {
|
||||||
imports = [ ../profiles/git ];
|
imports = [ ../profiles/git ];
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
vimdiffAlias = true;
|
vimdiffAlias = true;
|
||||||
withNodeJs = true;
|
withNodeJs = true;
|
||||||
|
|
||||||
plugins = with pkgs.vimPlugins; [
|
plugins = with pkgs.vimPlugins; [
|
||||||
{ plugin = coc-nvim;
|
{
|
||||||
config = ''
|
plugin = coc-nvim;
|
||||||
nmap <silent> <F2> <Plug>(coc-rename)
|
config = ''
|
||||||
|
nmap <silent> <F2> <Plug>(coc-rename)
|
||||||
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
||||||
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
||||||
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
||||||
" Remap <C-f> and <C-b> for scroll float windows/popups.
|
|
||||||
if has('nvim-0.4.0') || has('patch-8.2.0750')
|
" Remap <C-f> and <C-b> for scroll float windows/popups.
|
||||||
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
if has('nvim-0.4.0') || has('patch-8.2.0750')
|
||||||
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
nnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||||
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
|
nnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||||
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
|
inoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(1)\<cr>" : "\<Right>"
|
||||||
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
inoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? "\<c-r>=coc#float#scroll(0)\<cr>" : "\<Left>"
|
||||||
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
vnoremap <silent><nowait><expr> <C-f> coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"
|
||||||
endif
|
vnoremap <silent><nowait><expr> <C-b> coc#float#has_scroll() ? coc#float#scroll(0) : "\<C-b>"
|
||||||
''; }
|
endif
|
||||||
fzf-vim
|
'';
|
||||||
{ plugin = iceberg-vim;
|
}
|
||||||
config = "colorscheme iceberg";}
|
fzf-vim
|
||||||
vim-sleuth
|
{
|
||||||
coc-json
|
plugin = iceberg-vim;
|
||||||
coc-html
|
config = "colorscheme iceberg";
|
||||||
coc-tsserver
|
}
|
||||||
neoformat
|
vim-sleuth
|
||||||
undotree
|
coc-json
|
||||||
{ plugin = vim-jsdoc;
|
coc-html
|
||||||
config = ''
|
coc-tsserver
|
||||||
let g:jsdoc_formatter = "tsdoc"
|
neoformat
|
||||||
let g:typescript_indent_disable = 1
|
undotree
|
||||||
'';}
|
{
|
||||||
];
|
plugin = vim-jsdoc;
|
||||||
extraConfig = ''
|
config = ''
|
||||||
set background=dark
|
let g:jsdoc_formatter = "tsdoc"
|
||||||
set termguicolors
|
let g:typescript_indent_disable = 1
|
||||||
|
'';
|
||||||
set ic
|
}
|
||||||
set number
|
];
|
||||||
set autoindent
|
extraConfig = ''
|
||||||
|
set background=dark
|
||||||
set completeopt=menuone,noinsert,noselect
|
set termguicolors
|
||||||
set shortmess+=c
|
|
||||||
'';
|
set ic
|
||||||
};
|
set number
|
||||||
|
set autoindent
|
||||||
|
|
||||||
|
set completeopt=menuone,noinsert,noselect
|
||||||
|
set shortmess+=c
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
users.users.mae = {
|
users.users.mae = {
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
|
@ -59,6 +65,6 @@
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
hashedPassword = "$6$vyS4lqYbl3$OXztJnAC5ZayA4eCBSIRlYtsi9u1HnafsfNL28l4CJh0BISVlSj6D48CA80cshnvYW/EEzfEj7z4zTNFpJAT/.";
|
hashedPassword = "$6$vyS4lqYbl3$OXztJnAC5ZayA4eCBSIRlYtsi9u1HnafsfNL28l4CJh0BISVlSj6D48CA80cshnvYW/EEzfEj7z4zTNFpJAT/.";
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
extraGroups = [ "wheel" "video" "lp" "scanner" "adbusers" "render"];
|
extraGroups = [ "wheel" "video" "lp" "scanner" "adbusers" "render" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
[]
|
[ ]
|
||||||
|
|
Loading…
Reference in a new issue