feat: reconfigure
This commit is contained in:
parent
00f3a285dd
commit
c71407281c
13 changed files with 252 additions and 120 deletions
157
flake.nix
157
flake.nix
|
@ -51,91 +51,104 @@
|
||||||
# end ANTI CORRUPTION LAYER
|
# end ANTI CORRUPTION LAYER
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, digga, bud, nixos, home, nixos-hardware, nur, agenix
|
outputs =
|
||||||
, nvfetcher, deploy, ... }@inputs:
|
{ self
|
||||||
digga.lib.mkFlake {
|
, digga
|
||||||
inherit self inputs;
|
, bud
|
||||||
|
, nixos
|
||||||
|
, home
|
||||||
|
, nixos-hardware
|
||||||
|
, nur
|
||||||
|
, agenix
|
||||||
|
, nvfetcher
|
||||||
|
, deploy
|
||||||
|
, ...
|
||||||
|
}@inputs:
|
||||||
|
digga.lib.mkFlake
|
||||||
|
{
|
||||||
|
inherit self inputs;
|
||||||
|
|
||||||
channelsConfig = { allowUnfree = true; };
|
channelsConfig = { allowUnfree = true; };
|
||||||
|
|
||||||
|
channels = {
|
||||||
|
nixos = {
|
||||||
|
imports = [ (digga.lib.importOverlays ./overlays) ];
|
||||||
|
overlays = [
|
||||||
|
digga.overlays.patchedNix
|
||||||
|
nur.overlay
|
||||||
|
agenix.overlay
|
||||||
|
nvfetcher.overlay
|
||||||
|
deploy.overlay
|
||||||
|
./pkgs/default.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
|
latest = { };
|
||||||
|
};
|
||||||
|
|
||||||
|
lib = import ./lib { lib = digga.lib // nixos.lib; };
|
||||||
|
|
||||||
|
sharedOverlays = [
|
||||||
|
(final: prev: {
|
||||||
|
__dontExport = true;
|
||||||
|
lib = prev.lib.extend (lfinal: lprev: { our = self.lib; });
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
channels = {
|
|
||||||
nixos = {
|
nixos = {
|
||||||
imports = [ (digga.lib.importOverlays ./overlays) ];
|
hostDefaults = {
|
||||||
overlays = [
|
system = "x86_64-linux";
|
||||||
digga.overlays.patchedNix
|
channelName = "latest";
|
||||||
nur.overlay
|
imports = [ (digga.lib.importModules ./modules) ];
|
||||||
agenix.overlay
|
externalModules = [
|
||||||
nvfetcher.overlay
|
{ lib.our = self.lib; }
|
||||||
deploy.overlay
|
digga.nixosModules.bootstrapIso
|
||||||
./pkgs/default.nix
|
digga.nixosModules.nixConfig
|
||||||
];
|
home.nixosModules.home-manager
|
||||||
};
|
agenix.nixosModules.age
|
||||||
latest = { };
|
bud.nixosModules.bud
|
||||||
};
|
];
|
||||||
|
|
||||||
lib = import ./lib { lib = digga.lib // nixos.lib; };
|
|
||||||
|
|
||||||
sharedOverlays = [
|
|
||||||
(final: prev: {
|
|
||||||
__dontExport = true;
|
|
||||||
lib = prev.lib.extend (lfinal: lprev: { our = self.lib; });
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
nixos = {
|
|
||||||
hostDefaults = {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
channelName = "latest";
|
|
||||||
imports = [ (digga.lib.importModules ./modules) ];
|
|
||||||
externalModules = [
|
|
||||||
{ lib.our = self.lib; }
|
|
||||||
digga.nixosModules.bootstrapIso
|
|
||||||
digga.nixosModules.nixConfig
|
|
||||||
home.nixosModules.home-manager
|
|
||||||
agenix.nixosModules.age
|
|
||||||
bud.nixosModules.bud
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [ (digga.lib.importHosts ./hosts) ];
|
|
||||||
hosts = {
|
|
||||||
# set host specific properties here
|
|
||||||
NixOS = { };
|
|
||||||
};
|
|
||||||
importables = rec {
|
|
||||||
profiles = digga.lib.rakeLeaves ./profiles // {
|
|
||||||
users = digga.lib.rakeLeaves ./users;
|
|
||||||
};
|
};
|
||||||
suites = with profiles; rec {
|
|
||||||
base = [ core users.nixos users.root ];
|
imports = [ (digga.lib.importHosts ./hosts) ];
|
||||||
|
hosts = {
|
||||||
|
# set host specific properties here
|
||||||
|
Infini-DESKTOP = { };
|
||||||
|
};
|
||||||
|
importables = rec {
|
||||||
|
profiles = digga.lib.rakeLeaves ./profiles // {
|
||||||
|
users = digga.lib.rakeLeaves ./users;
|
||||||
|
};
|
||||||
|
suites = with profiles; rec {
|
||||||
|
base = [ core users.root users.infinidoge develop.common ];
|
||||||
|
graphical = base ++ [ graphical.qtile ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
imports = [ (digga.lib.importModules ./users/modules) ];
|
imports = [ (digga.lib.importModules ./users/modules) ];
|
||||||
externalModules = [ ];
|
externalModules = [ ];
|
||||||
importables = rec {
|
importables = rec {
|
||||||
profiles = digga.lib.rakeLeaves ./users/profiles;
|
profiles = digga.lib.rakeLeaves ./users/profiles;
|
||||||
suites = with profiles; rec { base = [ direnv git ]; };
|
suites = with profiles; rec { base = [ direnv git ]; };
|
||||||
|
};
|
||||||
|
users = {
|
||||||
|
infinidoge = { };
|
||||||
|
}; # digga.lib.importers.rakeLeaves ./users/hm;
|
||||||
};
|
};
|
||||||
users = {
|
|
||||||
infinidoge = { suites, ... }: { imports = suites.base; };
|
|
||||||
}; # digga.lib.importers.rakeLeaves ./users/hm;
|
|
||||||
};
|
|
||||||
|
|
||||||
devshell = ./shell;
|
devshell = ./shell;
|
||||||
|
|
||||||
homeConfigurations =
|
homeConfigurations =
|
||||||
digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
||||||
|
|
||||||
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
|
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { };
|
||||||
|
|
||||||
defaultTemplate = self.templates.bud;
|
defaultTemplate = self.templates.bud;
|
||||||
templates.bud.path = ./.;
|
templates.bud.path = ./.;
|
||||||
templates.bud.description = "bud template";
|
templates.bud.description = "bud template";
|
||||||
|
|
||||||
} // {
|
} // {
|
||||||
budModules = { devos = import ./bud; };
|
budModules = { devos = import ./bud; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,12 @@
|
||||||
{ suites, ... }: {
|
{ suites, profiles, pkgs, ... }: {
|
||||||
imports = suites.base ++ [ ./hardware-configuration.nix ];
|
imports = suites.graphical
|
||||||
|
++ [ ./hardware-configuration.nix ]
|
||||||
|
++ (with profiles; [
|
||||||
|
networking.wireless
|
||||||
|
hardware.sound
|
||||||
|
graphical.nvidia
|
||||||
|
peripherals.printing
|
||||||
|
]);
|
||||||
|
|
||||||
system.stateVersion = "21.05";
|
system.stateVersion = "21.05";
|
||||||
|
|
||||||
|
@ -17,24 +24,13 @@
|
||||||
time.timeZone = "America/New_York";
|
time.timeZone = "America/New_York";
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
useDHCP = false; # Explicitly disable broad DHCP
|
|
||||||
interfaces = {
|
interfaces = {
|
||||||
# Enable DHCP per interface
|
# Enable DHCP per interface
|
||||||
eth0.useDHCP = true;
|
eth0.useDHCP = true;
|
||||||
wlp41s0.useDHCP = true;
|
wlp41s0.useDHCP = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
wireless = {
|
wireless.interfaces = [ "wlp41s0" ];
|
||||||
enable = true; # Enable wireless
|
|
||||||
interfaces = [ "wlp41s0" ];
|
|
||||||
|
|
||||||
networks = {
|
|
||||||
Mashtun = {
|
|
||||||
pskRaw =
|
|
||||||
"1ccf3e0cc08700f2484e4a0e202836898cc8c084b7e05d6798bf0a7ba9bbc306";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
@ -67,36 +63,4 @@
|
||||||
|
|
||||||
services.gvfs.enable = true; # MTP support
|
services.gvfs.enable = true; # MTP support
|
||||||
|
|
||||||
services.xserver = {
|
|
||||||
# Enable X11 Windowing and Qtile Window Manager
|
|
||||||
enable = true;
|
|
||||||
windowManager.qtile.enable = true;
|
|
||||||
|
|
||||||
# Configure X11 keymap
|
|
||||||
layout = "us";
|
|
||||||
|
|
||||||
videoDrivers = [ "nvidia" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.nvidia.modesetting.enable = true;
|
|
||||||
hardware.opengl.driSupport32Bit = true;
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing = {
|
|
||||||
enable = true;
|
|
||||||
drivers = with pkgs; [
|
|
||||||
cnijfilter2
|
|
||||||
gutenprintBin
|
|
||||||
cupsBjnp
|
|
||||||
cups-bjnp
|
|
||||||
canon-cups-ufr2
|
|
||||||
carps-cups
|
|
||||||
cnijfilter_2_80
|
|
||||||
cnijfilter_4_00
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable sound.
|
|
||||||
sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|
49
profiles/core/nix.nix
Normal file
49
profiles/core/nix.nix
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
|
||||||
|
|
||||||
|
autoOptimiseStore = true;
|
||||||
|
|
||||||
|
gc.automatic = true;
|
||||||
|
|
||||||
|
optimise.automatic = true;
|
||||||
|
|
||||||
|
useSandbox = true;
|
||||||
|
|
||||||
|
allowedUsers = [ "@wheel" ];
|
||||||
|
|
||||||
|
trustedUsers = [ "root" "@wheel" ];
|
||||||
|
|
||||||
|
extraOptions = ''
|
||||||
|
min-free = 536870912
|
||||||
|
keep-outputs = true
|
||||||
|
keep-derivations = true
|
||||||
|
fallback = true
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [ nix-index nixfmt nixpkgs-fmt ];
|
||||||
|
|
||||||
|
shellAliases = {
|
||||||
|
# nix
|
||||||
|
n = "nix";
|
||||||
|
np = "n profile";
|
||||||
|
ni = "np install";
|
||||||
|
nr = "np remove";
|
||||||
|
ns = "n search --no-update-lock-file";
|
||||||
|
nf = "n flake";
|
||||||
|
nepl = "n repl '<nixpkgs>'";
|
||||||
|
srch = "ns nixos";
|
||||||
|
orch = "ns override";
|
||||||
|
nrb = ifSudo "sudo nixos-rebuild";
|
||||||
|
mn = ''
|
||||||
|
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
|
||||||
|
'';
|
||||||
|
|
||||||
|
# fix nixos-option
|
||||||
|
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
1
profiles/develop/common.nix
Normal file
1
profiles/develop/common.nix
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{ imports = [ ./zsh ]; }
|
8
profiles/develop/neovim.nix
Normal file
8
profiles/develop/neovim.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ ... }: {
|
||||||
|
programs.neovim = {
|
||||||
|
defaultEditor = true;
|
||||||
|
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
};
|
||||||
|
}
|
45
profiles/develop/zsh.nix
Normal file
45
profiles/develop/zsh.nix
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
{ ... }: {
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
autosuggestions.enable = true;
|
||||||
|
ohMyZsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
# Display
|
||||||
|
"colorize"
|
||||||
|
"colored-man-pages"
|
||||||
|
|
||||||
|
# zsh modifications
|
||||||
|
"zsh-interactive-cd"
|
||||||
|
"zsh_reload"
|
||||||
|
"command-not-found"
|
||||||
|
|
||||||
|
# Aliases
|
||||||
|
"alias-finder"
|
||||||
|
|
||||||
|
# Applications
|
||||||
|
## Docker
|
||||||
|
"docker"
|
||||||
|
## Python
|
||||||
|
"pip"
|
||||||
|
"python"
|
||||||
|
## Systemd
|
||||||
|
"systemd"
|
||||||
|
## Git
|
||||||
|
"git"
|
||||||
|
"github"
|
||||||
|
"gitignore"
|
||||||
|
## Emacs
|
||||||
|
"emacs"
|
||||||
|
## Vim
|
||||||
|
"fancy-ctrl-z"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
syntaxHighlighting = {
|
||||||
|
enable = true;
|
||||||
|
highlighters = [ "main" "brackets" "pattern" "cursor" ];
|
||||||
|
patterns = { "rm -rf *" = "fg=white,bold,bg=red"; };
|
||||||
|
};
|
||||||
|
zsh-autoenv.enable = true;
|
||||||
|
};
|
||||||
|
}
|
6
profiles/graphical/nvidia.nix
Normal file
6
profiles/graphical/nvidia.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{ ... }: {
|
||||||
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
|
|
||||||
|
hardware.nvidia.modesetting.enable = true;
|
||||||
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
}
|
7
profiles/graphical/qtile.nix
Normal file
7
profiles/graphical/qtile.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
imports = [ ./xserver ];
|
||||||
|
|
||||||
|
services.xserver.windowManager.qtile.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [ xsecurelock ];
|
||||||
|
}
|
15
profiles/graphical/xserver.nix
Normal file
15
profiles/graphical/xserver.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
layout = "us";
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
xclip
|
||||||
|
xdotool
|
||||||
|
xorg.xwininfo
|
||||||
|
xorg.xauth
|
||||||
|
|
||||||
|
blugon
|
||||||
|
];
|
||||||
|
}
|
4
profiles/hardware/sound.nix
Normal file
4
profiles/hardware/sound.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }: {
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = true;
|
||||||
|
}
|
3
profiles/peripherals/mobile.nix
Normal file
3
profiles/peripherals/mobile.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{ ... }: {
|
||||||
|
services.gvfs.enable = true; # MTP support
|
||||||
|
}
|
15
profiles/peripherals/printing.nix
Normal file
15
profiles/peripherals/printing.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.printing = {
|
||||||
|
enable = true;
|
||||||
|
drivers = with pkgs; [
|
||||||
|
cnijfilter2
|
||||||
|
gutenprintBin
|
||||||
|
cupsBjnp
|
||||||
|
cups-bjnp
|
||||||
|
canon-cups-ufr2
|
||||||
|
carps-cups
|
||||||
|
cnijfilter_2_80
|
||||||
|
cnijfilter_4_00
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,5 +1,7 @@
|
||||||
{ hmUsers, ... }: {
|
{ config, self, lib, pkgs, ... }: {
|
||||||
home-manager.users = { inherit (hmUsers) infinidoge; };
|
home-manager.users.infinidoge = { suites, ... }: {
|
||||||
|
imports = suites.base;
|
||||||
|
};
|
||||||
|
|
||||||
users.users.infinidoge = {
|
users.users.infinidoge = {
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue