mirror of
https://github.com/0x1d/nix.git
synced 2025-12-14 22:02:25 +01:00
refactor base system
This commit is contained in:
4
ctl.sh
4
ctl.sh
@@ -34,8 +34,8 @@ function os {
|
||||
sudo nixos-rebuild --flake ./os#nixos test
|
||||
}
|
||||
function rebuild {
|
||||
echo "Rebuild OS"
|
||||
sudo nixos-rebuild --flake ./os#nixos switch
|
||||
echo "Rebuild OS config: ${1}"
|
||||
sudo nixos-rebuild --flake ./os#${1} switch
|
||||
}
|
||||
function upgrade {
|
||||
echo "Upgrade channels and rebuild OS"
|
||||
|
||||
@@ -1,10 +1,6 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixFlakes;
|
||||
|
||||
20
os/flake.nix
20
os/flake.nix
@@ -14,13 +14,19 @@
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
./configuration.nix
|
||||
./system/boot.nix
|
||||
./system/i18n.nix
|
||||
./system/network.nix
|
||||
./system/sound.nix
|
||||
./system/xserver.nix
|
||||
./system/virtualisation.nix
|
||||
./system/packages.nix
|
||||
./hw/lenovo-thinkpad-e14.nix
|
||||
./system/base.nix
|
||||
./users/demo.nix
|
||||
./users/master.nix
|
||||
];
|
||||
};
|
||||
testos = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
home-manager.nixosModules.home-manager
|
||||
./configuration.nix
|
||||
./hw/lenovo-thinkpad-e14.nix
|
||||
./system/base.nix
|
||||
./users/demo.nix
|
||||
./users/master.nix
|
||||
];
|
||||
|
||||
12
os/system/base.nix
Normal file
12
os/system/base.nix
Normal file
@@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./boot.nix
|
||||
./security.nix
|
||||
./i18n.nix
|
||||
./network.nix
|
||||
./sound.nix
|
||||
./xserver.nix
|
||||
./virtualisation.nix
|
||||
./packages.nix
|
||||
];
|
||||
}
|
||||
@@ -26,8 +26,6 @@
|
||||
gcc
|
||||
unzip
|
||||
wget
|
||||
plasma5Packages.bismuth
|
||||
kdeconnect
|
||||
firefox
|
||||
thunderbird
|
||||
remmina
|
||||
|
||||
4
os/system/security.nix
Normal file
4
os/system/security.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }: {
|
||||
security.polkit.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
{ pkgs, ... }: {
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
home.username = "master";
|
||||
home.homeDirectory = "/home/master";
|
||||
home.packages = with pkgs; [
|
||||
plasma5Packages.bismuth
|
||||
kdeconnect
|
||||
nerdfonts
|
||||
tmux
|
||||
btop
|
||||
@@ -29,32 +31,30 @@
|
||||
obsidian
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
settings = {
|
||||
directory.fish_style_pwd_dir_length = 1;
|
||||
directory.truncation_length = 2;
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
bash = {
|
||||
enable = true;
|
||||
};
|
||||
direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
settings = {
|
||||
directory.fish_style_pwd_dir_length = 1;
|
||||
directory.truncation_length = 2;
|
||||
};
|
||||
};
|
||||
neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
vimdiffAlias = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
|
||||
Reference in New Issue
Block a user