diff options
Diffstat (limited to '')
-rw-r--r-- | README (renamed from ginaz/README) | 0 | ||||
-rw-r--r-- | ginaz/flake.lock | 48 | ||||
-rw-r--r-- | ginaz/flake.nix | 23 | ||||
-rw-r--r-- | home/nipsy/common/core/zsh/zshrc (renamed from ginaz/home.nix) | 124 | ||||
-rw-r--r-- | hosts/ginaz/default.nix (renamed from ginaz/configuration.nix) | 135 | ||||
-rw-r--r-- | hosts/ginaz/hardware-configuration.nix (renamed from ginaz/hardware-configuration.nix) | 3 |
6 files changed, 35 insertions, 298 deletions
diff --git a/ginaz/flake.lock b/ginaz/flake.lock deleted file mode 100644 index 021cb88..0000000 --- a/ginaz/flake.lock +++ /dev/null @@ -1,48 +0,0 @@ -{ - "nodes": { - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1710401383, - "narHash": "sha256-jskq7uDpKXrRoY4hDpNqykmSSKHUXYlo7ZFc/se7fus=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "1ab3cec3a1bbb065b2d52b913d1431366028d5b5", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1710272261, - "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "home-manager": "home-manager", - "nixpkgs": "nixpkgs" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/ginaz/flake.nix b/ginaz/flake.nix deleted file mode 100644 index b60a38a..0000000 --- a/ginaz/flake.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - description = "nipsy's NixOS configuration"; - - inputs = { - nixpkgs.url = github:NixOS/nixpkgs/nixos-unstable; - home-manager.url = "github:nix-community/home-manager"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - }; - - outputs = inputs@{ nixpkgs, home-manager, ... }: { - nixosConfigurations.ginaz = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ - ./configuration.nix - home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - #home-manager.useUserPackages = true; - home-manager.users.nipsy = import ./home.nix; - } - ]; - }; - }; -} diff --git a/ginaz/home.nix b/home/nipsy/common/core/zsh/zshrc index c2f84f7..9e43d1d 100644 --- a/ginaz/home.nix +++ b/home/nipsy/common/core/zsh/zshrc @@ -1,120 +1,3 @@ -{ config, pkgs, ... }: - -{ - gtk = { - enable = true; - gtk3.extraConfig.gtk-application-prefer-dark-theme = true; - gtk4.extraConfig.gtk-application-prefer-dark-theme = true; - }; - - home.username = "nipsy"; - home.homeDirectory = "/home/nipsy"; - home.stateVersion = "23.11"; - - programs.git = { - enable = true; - userName = "Mark Nipper"; - userEmail = "nipsy@bitgnome.net"; - extraConfig.pull.rebase = true; - }; - - programs.home-manager.enable = true; - - programs.tmux = { - enable = true; - extraConfig = '' - #set-option -ga terminal-overrides ",st-256color:Tc" - set -as terminal-features ",foot*:RGB" - set -as terminal-features ",st-256color:RGB" - set -ga monitor-bell on - set -g history-limit 100000 - set -g bell-action any - #set -g bell-on-alert on - - set -s escape-time 0 - - setw -g aggressive-resize on - setw -g wrap-search off - - bind-key a send-prefix - bind-key k kill-session - bind-key H pipe-pane -o 'cat >> ~/.tmux.log.#h-#S-#I-#P' - - #bind-key m \ - # set -g mouse on \;\ - # display 'Mouse: ON' - #bind M \ - # set -g mouse off \;\ - # display 'Mouse: OFF' - - # vim-like copypaste mode - set-window-option -g mode-keys vi - bind-key -T copy-mode-vi v send -X begin-selection - bind-key -T copy-mode-vi y send -X copy-pipe "xclip -selection clipboard" - bind-key -T copy-mode-vi C-v send -X rectangle-toggle - bind-key P run "tmux set-buffer \"$(xclip -o -selection clipboard)\"; tmux paste-buffer" - - # don't exit copy mode after selection - #set -s mouse on - #bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection -x - ''; - }; - - programs.vim = { - enable = true; - extraConfig = '' - " Handling of big files - William Natter, Tony Mechelynck and others - " fairly certain that BufSizeThreshold is in bytes - let g:SaveUndoLevels = &undolevels - let g:BufSizeThreshold = 5242880 - if has("autocmd") - au VimEnter * let g:SaveUndoLevels = &undolevels - au BufReadPre * if getfsize(expand("%")) >= g:BufSizeThreshold | setlocal noswapfile | endif - au BufEnter * if getfsize(expand("%")) < g:BufSizeThreshold | let &undolevels=g:SaveUndoLevels | else | setlocal undolevels=-1 | endif - au BufEnter * if getfsize(expand("%")) < g:BufSizeThreshold | syntax on | else | syntax off | endif - endif - - set mouse& - set noautoindent " always set autoindenting off - - " enable better 24-bit color support - "let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum" - "let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum" - set termguicolors - - " If using a dark background within the editing area and syntax highlighting - " turn on this option as well - set background=dark - - if has("autocmd") - " Enabled file type detection - " Use the default filetype settings. If you also want to load indent files - " to automatically do language-dependent indenting add 'indent' as well. - filetype plugin on - "filetype indent on - endif " has ("autocmd") - - " The following are commented out as they cause vim to behave a lot - " different from regular vi. They are highly recommended though. - set showcmd " Show (partial) command in status line. - set showmatch " Show matching brackets. - set ignorecase " Do case insensitive matching - set incsearch " Incremental search - "set expandtab " replace tabs with spaces - set smarttab " use shiftwidth instead of tabstop at start of line - set spell spelllang=en_us " turn on the spell check - - set laststatus=2 - set statusline=%<%f%h%m%r%=%{&ff}\ %Y\ %b\ 0x%B\ \ %l,%c%V\ %P - - map <F5> :w<CR><bar>:!clear;go run %<CR> - map <F6> :w<CR><bar>:%! gofmt<CR> - ''; - }; - - programs.zsh = { - enable = true; - initExtra = '' umask 022 #export GOROOT="''${HOME}/.local/go" @@ -192,8 +75,8 @@ setopt LONG_LIST_JOBS NO_HUP setopt NO_BEEP lsopt='--color=auto' -alias ll="ls -alFh $lsopt" -alias la="ls -aF $lsopt" +#alias ll="ls -alFh $lsopt" +#alias la="ls -aF $lsopt" alias cal="ncal -b" #alias grep='grep --color=always' # cannot do this as it breaks shell pipelines alias talk='gnutalk --curses' @@ -285,6 +168,3 @@ function precmd { } PS1='%# ' - ''; - }; -} diff --git a/ginaz/configuration.nix b/hosts/ginaz/default.nix index 9310c2b..d5fa16c 100644 --- a/ginaz/configuration.nix +++ b/hosts/ginaz/default.nix @@ -1,27 +1,19 @@ -# Edit this configuration file to define what should be installed on -# your system. Help is available in the configuration.nix(5) man page, on -# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). - -{ config, lib, pkgs, ... }: { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; - - boot.initrd.kernelModules = [ "amdgpu" "zfs" ]; - boot.kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.generationsDir.copyKernels = true; - boot.loader.systemd-boot.enable = true; - boot.supportedFilesystems = [ "zfs" ]; - boot.zfs.devNodes = "/dev/disk/by-label"; +{ config, inputs, pkgs, ... }: { + boot = { + initrd.kernelModules = [ "amdgpu" "zfs" ]; + kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages; + loader = { + efi.canTouchEfiVariables = true; + systemd-boot.enable = true; + timeout = 3; + }; + supportedFilesystems = [ "zfs" ]; + zfs.devNodes = "/dev/disk/by-label"; + }; documentation.dev.enable = true; documentation.man.enable = true; - environment.shells = with pkgs; [ zsh ]; - # List packages installed in system profile. To search, run: - # $ nix search wget environment.systemPackages = with pkgs; [ bc bespokesynth @@ -122,8 +114,7 @@ sshfs st stoken - surge - #surge-XT + surge-XT sxiv synthv1 sysstat @@ -164,15 +155,26 @@ zynaddsubfx ]; - i18n.defaultLocale = "en_US.UTF-8"; + imports = [ + inputs.hardware.nixosModules.lenovo-yoga-7-14ARH7.amdgpu - networking.hostId = "8425e349"; - networking.hostName = "ginaz"; - networking.networkmanager.enable = true; - networking.nftables.enable = true; + ./hardware-configuration.nix + ../common/core + ../common/optional/google-authenticator.nix + ../common/optional/pipewire.nix + ../common/optional/services/openssh.nix + ../common/optional/services/xorg.nix + ../common/optional/zfs.nix + ../common/users/nipsy + ../common/users/root + ]; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - nixpkgs.config.allowUnfree = true; + networking = { + hostId = "8425e349"; + hostName = "ginaz"; + networkmanager.enable = true; + nftables.enable = true; + }; programs.atop.enable = true; programs.firefox.enable = true; @@ -187,20 +189,6 @@ programs.tmux.enable = true; programs.zsh.enable = true; - security.pam.services = { - chfn.googleAuthenticator.enable = true; - chsh.googleAuthenticator.enable = true; - cups.googleAuthenticator.enable = true; - lightdm.googleAuthenticator.enable = true; - login.googleAuthenticator.enable = true; - other.googleAuthenticator.enable = true; - sshd.googleAuthenticator.enable = true; - su.googleAuthenticator.enable = true; - sudo.googleAuthenticator.enable = true; - vlock.googleAuthenticator.enable = true; - xlock.googleAuthenticator.enable = true; - xscreensaver.googleAuthenticator.enable = true; - }; security.polkit = { enable = true; extraConfig = '' @@ -220,23 +208,7 @@ }) ''; }; - security.rtkit.enable = true; - services.blueman.enable = true; - services.openssh = { - enable = true; - openFirewall = true; - settings.PasswordAuthentication = false; - settings.KbdInteractiveAuthentication = false; - settings.PermitRootLogin = "yes"; - }; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - jack.enable = true; - }; services.printing.enable = true; services.udev.extraRules = '' SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="2500",MODE:="0666" @@ -245,29 +217,6 @@ SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3020",MODE:="0666" SUBSYSTEM=="usb",ENV{DEVTYPE}=="usb_device",ATTRS{idVendor}=="1df7",ATTRS{idProduct}=="3030",MODE:="0666" ''; - services.xserver = { - displayManager.defaultSession = "xsession"; - displayManager.lightdm = { - enable = true; - extraSeatDefaults = ''greeter-hide-users=true''; - }; - displayManager.session = [ - { - manage = "desktop"; - name = "xsession"; - start = ''exec $HOME/.xsession''; - } - ]; - enable = true; - libinput.enable = true; - videoDrivers = [ "amdgpu" ]; - xkb.layout = "us"; - xkb.options = "caps:super,compose:ralt"; - }; - services.zfs.autoScrub.enable = true; - services.zfs.trim.enable = true; - - system.stateVersion = "23.11"; systemd = { user.services.polkit-gnome-authentication-agent-1 = { @@ -285,25 +234,5 @@ }; }; - time.timeZone = "America/Los_Angeles"; - - users.groups.nipsy.gid = 1000; - users.users.nipsy = { - isNormalUser = true; - group = "nipsy"; - home = "/home/nipsy"; - description = "Mark Nipper"; - extraGroups = [ "wheel" "networkmanager" ]; - #packages = with pkgs; [ - # firefox - # tree - #]; - shell = pkgs.zsh; - openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIbKppxX6GF88fAfXJZR4ZcPzwopi7TAy+v/dmWso+7f nipsy@arrakis.bitgnome.net" ]; - }; - - users.users.root = { - shell = pkgs.zsh; - openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIbKppxX6GF88fAfXJZR4ZcPzwopi7TAy+v/dmWso+7f nipsy@arrakis.bitgnome.net" ]; - }; + system.stateVersion = "23.11"; } diff --git a/ginaz/hardware-configuration.nix b/hosts/ginaz/hardware-configuration.nix index 140a799..a5ae455 100644 --- a/ginaz/hardware-configuration.nix +++ b/hosts/ginaz/hardware-configuration.nix @@ -5,7 +5,7 @@ { imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + [ #(modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ]; @@ -44,7 +44,6 @@ hardware.bluetooth.enable = true; #hardware.bluetooth.powerOnBoot = true; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; } |